[Gllug] Raw Partitions
Ben Fitzgerald
ben_m_f at yahoo.co.uk
Wed Nov 16 22:15:43 UTC 2005
On Wed, Nov 16, 2005 at 06:05:47PM +0100, Martin A. Brooks wrote:
> Christian Smith wrote:
> >What ioctls would be needed?
>
>
> Well, for one, unless I'm _really_ out of touch. You can't write to a
> loop device. File systems so mounted are read-only. No?
Hi,
Maybe I got the wrong end of the stick with your comment above as it
doesn't make perfect sense to me, so if this is telling you how to suck
eggs then sorry!
I just had a play with losetup, which I was unaware of. You can create a
file of say 100k in size, use losetup to associate /dev/loop0 with the
file then format /dev/loop0 and mount it rw:
debian:~# df -h /mnt/
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 93K 13K 75K 15% /mnt
If you simply mount a file, such as an initrd file with an ext2 fs (when
decompressed) you can have that rw:
# mount | grep /mnt
/export/home/ben/tmp/initrd.ext2 on /mnt type ext2 (rw,loop=/dev/loop0)
Looks from the above that it, as the OP said, uses /dev/loop#
implicitly.
Cheers,
Ben.
--
Registered Linux user number 339435
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list