From: Eric S. J. <es...@ha...> - 2005-08-01 10:36:56
|
Joshua J. Berry wrote: > On Sunday 31 July 2005 15:59, Eric S. Johansson wrote: > >>I am looking for some way to treat a file as if it were a block device >>so I could format, impose filesystem, and then mount it so I can copy >>all of the files in place and hit it with grub to make it bootable. > > > mount -o loop only works if the file has a single partition and as a filesystem. > > (or, if you want a plain block device, losetup) kind of sort of works. Can only partition consistently with fdisk and not sfdisk. the latter is required if you are attempting to write a script to partition a file as a disc. The biggest problem obviously is that a file does not have sectors, heads, cylinders. >>Is this something fuse can do easily? Already? I think this technique >>would also be useful in producing partitioned CD-ROM images. > > > FUSE doesn't do anything with raw block devices. You probably want the > loopback device (/dev/loopX). it's beginning to sound like I really need a loopback device that actually handles different partitions in the same way that hda can handle multiple partitions (hda1, hda2, ...) and can impose h/s/c semantics on a file. Thanks. Appreciate the help. ---eric |