Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Mar 2003 22:09:50 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Nate Lawson <nate@root.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sbin/fdisk fdisk.c 
Message-ID:  <17378.1049054990@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 30 Mar 2003 12:05:05 -0800." <Pine.BSF.4.21.0303301153000.5939-100000@root.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.21.0303301153000.5939-100000@root.org>, Nate Lawson writ
es:
>On Sat, 29 Mar 2003, Poul-Henning Kamp wrote:
>> In message <Pine.BSF.4.21.0303291408451.4536-100000@root.org>, Nate Lawson writ
>> es:
>> >On Sat, 29 Mar 2003, Poul-Henning Kamp wrote:
>> >>   Modified files:
>> >>     sbin/fdisk           fdisk.c 
>> >>   Log:
>> >>   Use default geometry in case the device doesn't provide one:
>> >>           512 for sectorsize.
>> >>           63 for sectors.
>> >>           255 for heads.
>> >>   This will mostly show up on MD(4) devices.
>> >
>> >Won't this be a problem for small devices or for int 13 booting?  That's
>> >why we use 64 heads, 32 sectors for scsi devices < 1 GB.
>> 
>> You can specify any number you like to fdisk using all the usual
>> ways of doing so, and you should if you want to copy the image to
>> some other media afterwards.
>
>Sure.  My concern was for devices like USB flash disks where your defaults
>may not be appropriate and the info IS being written to media.  Would you
>be willing to put in a < 1GB size check on the media to use more
>appropriate heads/sector values?

USB flash disks will report with DIOCGFWSECTORS/FWHEADS and therefore
not hit this code.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17378.1049054990>