Re: PATCH: disklabel & fdisk regular files
David Young <dyoung <at> pobox.com>
2004-03-02 08:11:46 GMT
On Tue, Feb 17, 2004 at 07:39:06PM +1100, Luke Mewburn wrote:
> On Tue, Feb 17, 2004 at 01:46:38AM -0600, David Young wrote:
> | It's useful sometimes for a privilegeless user to disklabel or fdisk
> | a file containing a disk image---a file was made by makefs, say. Here
> | are patches that make it possible. The disklabel patch is pretty simple:
> | detect that the target is a file and avoid certain steps. Because fdisk
> | needs a disklabel to get started, my patch lets you give it a disktab
> | and disktype with -t and -T options.
>
> I'd prefer that disklabel(8) took a specific option to use a regular
> file to enable this behaviour; other disk related tools use '-F' for this.
Done. Patches attached.
> As for fdisk; is there a way we can implement '-F' to enable the
> "don't bother disklabeling" stuff, rather than the -t/-T stuff ?
There is a way. I can provide -F by "faking up" the disk geometry.
Patches attached.
I had used -t/-T because it was expedient, but I would like for it
to stick around. It lets one avoid "faking up" C/H/S for the file,
if one knows the geometry of the device where one will dd(1) the disk
image later.
Dave
--
--
David Young OJC Technologies
dyoung <at> ojctech.com Urbana, IL * (217) 278-3933
(Continue reading)