Re: Can I run Linux apps from my FAT32 hard drive?
- From: Lew Pitcher <lpitcher@xxxxxxxxxxxx>
- Date: Thu, 02 Aug 2007 05:29:19 -0700
On Jul 29, 9:42 am, gerry.casa...@xxxxxxxxx wrote:
I've been playing around with Damn Small Linux and would like to know
if I can access downloaded Linux apps stored on my Windows hard
drive. I don't want to do a HD install because my wife relies on
Windows for Yahoo messenger to communicate with her family and friends
who are scattered all over the globe. I tried using YM in Linux, but
with no luck. Further, I don't have the Windows disc to do a
reinstall if (when) I screw up the repartitioning.
I've successfully mounted my hard drive and downloaded apps to it from
DSL. I've then unpacked them. After that, however, I'm lost. When I
click "install", I usually get error messages mentioning syslink and/
or permission denied. I'm doing all of this as superuser, by the way.
Is what I'm attempting possible? If so, I'd appreciate any
suggestions on how to get it to work.
As you have now found out, the Microsoft FATxx and NTFS filesystems do
not provide proper support for Linux file attributes, and you will
have some difficulties if you store your Linux files on one of these
filesystems.
However, there is a way around all this. What you need is a loopback
filesystem.
Only a unixish filesystem (ext2, ext3, reiserfs, etc.) can handle the
file metadata that Linux needs. You can create a file (yes, a file) on
your FATxx filesystem that will act as a separate filesystem to Linux.
You format this file as an ext2 fs (for instance), and mount it to
Linux. Once mounted, the file on FATxx becomes a fully functioning
ext2 "partition", capable of storing Linux files with full linux file
metadata support.
For example:
# Show that /mnt/hd is a vfat/FATxx filesystem
root@merlin:/mnt/hd# mount | grep /mnt/hd
/dev/hda6 on /mnt/hd type vfat (rw)
# create a file on the FATxx filesystem, fill it with binary zero
# NB: this file can be any size - the only restriction is that its
size
# must be fixed apon allocation (i.e. touch won't do it)
root@merlin:/mnt/hd# dd if=/dev/zero of=ext2.fs bs=1024 count=2000
2000+0 records in
2000+0 records out
2048000 bytes (2.0 MB) copied, 0.032994 seconds, 62.1 MB/s
# reformat the contents of the file as an ext2 filesystem
# NB: I could have formatted it as any other unixish fs
root@merlin:/mnt/hd# mke2fs ext2.fs
mke2fs 1.38 (30-Jun-2005)
ext2.fs is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
256 inodes, 2000 blocks
100 blocks (5.00%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
256 inodes per group
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# Now, mount the file as an ext2 filesystem
root@merlin:/mnt/hd# mkdir newmount
root@merlin:/mnt/hd# mount -o loop -t ext2 ext2.fs newmount
root@merlin:/mnt/hd# mount | grep ext2.fs
/mnt/hd/ext2.fs on /mnt/hd/newmount type ext2 (rw,loop=/dev/loop0)
# Let's do some stuff in the new fs that FATxx doesn't support
# just to prove that we actually do have unix file metadata support
# this way
root@merlin:/mnt/hd# cd newmount
root@merlin:/mnt/hd/newmount# ls -la
total 45
drwxr-xr-x 3 root root 1024 2007-08-02 08:21 ./
drwxr-xr-x 3 root root 16384 2007-08-02 08:21 ../
drwx------ 2 root root 12288 2007-08-02 08:21 lost+found/
root@merlin:/mnt/hd/newmount# touch a.b.c
root@merlin:/mnt/hd/newmount# ls -l
total 12
-rw-r--r-- 1 root root 0 2007-08-02 08:21 a.b.c
drwx------ 2 root root 12288 2007-08-02 08:21 lost+found/
root@merlin:/mnt/hd/newmount# chown bin:bin a.b.c
root@merlin:/mnt/hd/newmount# ls -l
total 12
-rw-r--r-- 1 bin bin 0 2007-08-02 08:21 a.b.c
drwx------ 2 root root 12288 2007-08-02 08:21 lost+found/
root@merlin:/mnt/hd/newmount# chmod go-r a.b.c
root@merlin:/mnt/hd/newmount# ls -l
total 12
-rw------- 1 bin bin 0 2007-08-02 08:21 a.b.c
drwx------ 2 root root 12288 2007-08-02 08:21 lost+found/
root@merlin:/mnt/hd/newmount# ln -s a.b.c c.d.e
root@merlin:/mnt/hd/newmount# ls -l
total 12
-rw------- 1 bin bin 0 2007-08-02 08:21 a.b.c
lrwxrwxrwx 1 root root 5 2007-08-02 08:23 c.d.e -> a.b.c
drwx------ 2 root root 12288 2007-08-02 08:21 lost+found/
Will that solve your problem?
HTH
--
Lew
.
- Prev by Date: Re: Can I run Linux apps from my FAT32 hard drive?
- Next by Date: Re: shell scripts: save/restore permissions?
- Previous by thread: Re: Can I run Linux apps from my FAT32 hard drive?
- Next by thread: Re: Can I run Linux apps from my FAT32 hard drive?
- Index(es):
Relevant Pages
|
|