DragonFly kernel List (threaded) for 2007-08
DragonFly BSD
DragonFly kernel List (threaded) for 2007-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: fdisk issue


From: Erik Wikström <erik-wikstrom@xxxxxxxxx>
Date: Sat, 11 Aug 2007 14:00:13 +0200

On 2007-08-11 13:37, Michael Neumann wrote:
Hi,

I had experienced that my laptop's BIOS hangs up when I don't specify
fdisk's -C option! The source code in question in fdisk.c follows:

    if (tcyl > MAXCYL && C_flag == 0) {
      printf("Warning: starting cylinder wraps, using all 1's\n");
      partp->dp_scyl = -1;
      partp->dp_ssect = -1;
      partp->dp_shd = -1;
    } else {
      partp->dp_scyl = DOSCYL(tcyl);
      partp->dp_ssect = DOSSECT(tsec,tcyl);
      partp->dp_shd = thd;
    }

I'd like to understand why we set dp_* to -1. Is there a special reason? FreeBSD just ignores this and executes the "else" part.

From the man-page:


Normally if the CHS fields for a partition are set to all 1's if they would otherwise wrap. This typically causes BIOSes to properly detect that the disk should be put in Large mode. If this option is specified the CHS fields will be set to wrapped values instead. This option may be needed on very old PCs.

And from the fact that you have to open up your computer to boot from CD I'd say that you computer is quite old.


PS: the first sentence might need some work, as a non-native speaker it took me some time to figure it out.


--
Erik Wikström



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]