Page 1 of 1

Loopback devices

Posted: Sat Aug 14, 2004 11:51 pm
by jinksys
Im wanting to use a floppy image in place of using the actual floppy drive since images are much
faster and wont kill my drive when testing my kernel with bochs.
I create the image:

$ dd if=/dev/fd1 of=floppy.img

mount it:

$ mount -t msdos floppy.img /media/floppyimage -o loop

everything goes fine, I can do a `ls /media/floppyimage`
and see the contents of the image. My problem is that I
must be root to delete, move, etc files in the mountpoint.
How can I mount a floppy image so that normal users can
write/read ?

Re:Loopback devices

Posted: Sun Aug 15, 2004 12:46 am
by Dreamsmith
Try something like:

Code: Select all

sudo mount disk.img mnt/dir -t vfat -o loop,uid=1000,gid=1000,umask=027
Replace 1000 with your actual UID and GID, and specify the correct paths, of course...

Re:Loopback devices

Posted: Sun Aug 15, 2004 12:56 am
by jinksys
thanks

Re:Loopback devices

Posted: Sat Aug 21, 2004 2:51 pm
by northfuse
you could also add an entry to your /etc/fstab file:

/.../disk.img /.../mnt/dir vfat loop,user,noauto 0 0

this is what i do and it seems to work well :) Remember that /etc/fstab requires absolute paths. This way you can just cd into the directory, type mount disk.img, and its mounted! i find it realy easy