[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

A loop mounted FAT filesystem.



*	From: Klaus <klaus.doering999@gmail.com>
*	Date: Tue, 04 Jun 2013 08:48:22 +0100
> I didn't understand why you used the -"C" option in 
> this case instead of just giving the device name ? 

My objective is to have a FAT filesystem residing in an ext3 
file in wheezy.

Consequent to the difficulty with "mkdosfs -C ..." I've tried 
working through a case similar to "Floppy Disk Images With FAT16".
http://wiki.osdev.org/Loopback_Device#Floppy_Disk_Images_With_FAT16

# 1. Make the empty image file.
peter@dalton:~$ dd if=/dev/zero of=FATholder bs=512 count=288000
288000+0 records in
288000+0 records out
147456000 bytes (147 MB) copied, 4.55382 s, 32.4 MB/s

# 2. Set it up for mounting.
root@dalton:/home/peter# losetup /dev/loop0 FATholder

# 3. Create the FAT filesystem.
root@dalton:/home/peter# mkfs.vfat
mkfs.vfat 3.0.13 (30 Jun 2012)
Loop device does not match a floppy size, using default hd params

# 4. Show that the user is allowed to mount the image;
root@dalton:/home/peter# grep loop /etc/fstab
/dev/loop0  /home/peter/FATmount  vfat  defaults,noauto,user  0       0

# ... and mount it.
peter@dalton:~$ mount /dev/loop0
peter@dalton:~$ mount | grep loop
/dev/loop0 on /home/peter/FATmount type vfat (rw,nosuid,nodev,noexec,relatime,ui
d=1000,gid=1000,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8,shortname=mi
xed,errors=remount-ro,user=peter)

# 5. Confirm that the virtual FatFS can be written to.
peter@dalton:~/Work$ cp rawrite.exe ~/FATmount
peter@dalton:~/Work$ ls -l ~/FATmount/raw*
-rwxr-xr-x 1 peter peter 12702 Jun 19 09:37 /home/peter/FATmount/rawrite.exe

Conclusion: success in five steps is better than failure in one step.

Thanks for the feedback,        ... Peter E.

-- 
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +13606390202  Bcc: peasthope at shaw.ca  http://carnot.yi.org/  
"http://members.shaw.ca/peasthope/index.html#Itinerary "


Reply to: