fdisk(8) no longer capable of altering geometry

Deomid Ryabkov myself at rojer.pp.ru
Mon Nov 14 01:36:32 PST 2005


Simon L. Nielsen wrote:
> On 2005.11.12 01:19:52 +0100, Dario Freni wrote:
>   
>> My little follow-up to this issue. This bug is quite critical on 
>> products using bsdinstaller such as FreeSBIE or pfSense. I heard rumours 
>> that PC-BSD also encounter this problem and had to workaround it by 
>> sysinstall.
>>
>> Can somebody please take a look at it?
>>     
>
> Just curious... why do you need to alter the geometry?  I never once
> had a problem just ignoring the fact that fdisk/sysinstall warned
> about geometry...
>   
sysinstall warns and fixes it for you. i had to duplicate sysinstall's 
behavior in my home-made quick'n'dirty installer
or otherwise disks larger than (some size, like 60G, i don't remember 
exactly) are not bootable after install.
the fixup, rewritten in perl, looks like this:

print "geom: cyl=$cyl, hd=$hd, sect=$sect\n";
if ($cyl > 1024 or $hd > 16 or $sect > 63) {
        $hd = 16; $sect = 63;
        $cyl = int ($size / ($hd * $sect));
        if ($cyl > 1024) {
                $hd = 255;
                $cyl = int ($size / ($hd * $sect));
        }
        print "new geom: cyl=$cyl, hd=$hd, sect=$sect\n";
        @ret = ($cyl, $hd, $sect);
}

i don't know the exact meaning of ths, but it is indeed required to be 
able to boot off the disk.

--
Deomid Ryabkov aka Rojer
myself at rojer.pp.ru
rojer at sysadmins.ru
ICQ: 8025844

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3228 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20051114/bb9df8d8/smime.bin


More information about the freebsd-current mailing list