sfdisk/sarge and ida partitions

Erik Rossen rossen at freesurf.ch
Sat Dec 13 09:52:38 CET 2003


On Fri, Dec 12, 2003 at 05:53:44PM +1300, Sam Vilain wrote:
> On Fri, 12 Dec 2003 17:09, Jay Kusler wrote;
> 
>   > an sfdisk anomaly.  setup_hardisks on sarge fails unless I
>   > explicitly pass the device name to sfdisk by patching
>   > setup_hardisks.
>   >           $result = `sh -c "LC_ALL=C sfdisk -g -q"`;
>   > becomes:  $result = `sh -c "LC_ALL=C sfdisk -g -q /dev/ida/c0d0"`;    
> 
> On a related note, I notice that sfdisk doesn't return information on
> any SCSI devices beyond /dev/sde unless explicitly passed to it
> either.  Just where *does* sfdisk get its list of block devices/disks
> from, and why is it so buggy?  Anyone?

I don't know exactly without looking at the code, but the results of

strace -e open sfdisk -d -g

look pretty complete to me.


By the way, the man page for sfdisk makes no mention of its ability to
scan all disk devices if none are specified on the command line and it
even seems to indicate that a device name is mandatory.

SFDISK(8) Linux Programmer's Manual SFDISK(8)

NAME
       sfdisk - Partition table manipulator for Linux

SYNOPSIS
       sfdisk [options] device
       sfdisk -s [partition]

Perhaps it would be better not to use this undocumented feature?

-- 
Erik Rossen                          ^    OpenPGP key: 2935D0B9
rossen at freesurf.ch                  /e\   "Use GnuPG, see the
http://people.linux-gull.ch/rossen  ---    black helicopters."




More information about the linux-fai mailing list