Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Aug 2002 14:40:03 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/20633: fdisk doesn't handle LBA correctly
Message-ID:  <200208172140.g7HLe3nS000636@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/20633; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: "Artem 'Zazoobr' Ignatjev" <timon@memphis.mephi.ru>
Cc: freebsd-gnats-submit@freebsd.org, <freebsd-hackers@freebsd.org>
Subject: Re: bin/20633: fdisk doesn't handle LBA correctly
Date: Sun, 18 Aug 2002 07:45:23 +1000 (EST)

 On Sat, 17 Aug 2002, Artem 'Zazoobr' Ignatjev wrote:
 
 > On Sun, Aug 18, 2002 at 02:12:45AM +1000, Bruce Evans wrote:
 > >> [skip]
 > >>>
 > >>> Fdisk should print these values, at least optionally, since they are needed
 > >>> for debugging.  The magic values might be non-magic on old systems.
 > >> Debugging WHAT? And, I can hardly imagine such a situation inside hard
 > >> drives & slice tables.
 > >
 > > Debugging hard disk tables and slice tables.  I do it routinely.  It
 > > can be important to look at the raw data, but the dp_scyl...dp_ehd
 > > data is a little too raw.
 > Ok, so we must add option to fdisk(8) to print CHS?
 
 If we displayed suppressed the existing display for cases where we know
 it is bogus, then there should be an option to display it for these cases.
 
 > And, BTW, does CHS makes sense inside an extended slices?
 
 I think so, since boot loaders might use at least the starting C/H/S if
 there are any boot loaders that support booting from logical drives in
 extended partitions (I think lilo can).  Using them might even work for
 cylinders below 1024.
 
 > > ...
 > > Actually, 1023 is most magic (it is what the kernel expects), but the
 > > data in the PR shows that 1022 is magic too.  The magic 0xfe in the
 > > kernel is for the ending head number.  It can be important not to use
 > > a starting or ending head number of 255 (== a head count of 256) because
 > > some broken BIOSes crash on it, and there are now conventions that
 > > prohibit using it.
 >
 > Maybe we should take as magic cyls >1021?
 
 Don't assume much when displaying magic values, but only write values that
 satisfy current conventions.
 
 > And where can one read all
 > this conventions?
 
 google :-).
 
 > [skip]
 > >> The data for partition 13 is:
 > >> sysid 165 (FreeBSD/NetBSD/386BSD),
 > >>     start 80051958, size 8401932 (4102 Meg), flag 0
 > >> 	beg: cyl 1023/ head 254/ sector 63;
 > >> 	end: cyl 1023/ head 254/ sector 63
 > >> Script done on Fri Aug 16 22:23:06 2002
 > >
 > > Seems reasonable.  It shows all of the magic beg and end values, because
 > > the most magic one (all 0xff's) is so magic that it is never used :-).
 
 > and how  translates that value to CHS? Guess 1023/255/63?
 
 Something like "beg: [invalid]" for 1023/255/63, and "beg: [not used]
 for 1023/254/63.
 
 > I suppose, that it will be better to follow the linux' fdisk..
 
 > Could you please look at http://memphis.mephi.ru/~timon/fdisk/ (and http://memphis.mephi.ru/~timon at all ;-) since you'll need a patch from there  or manually define DOSPTYP_EXTX if you'll try to compile it )?
 
 Not sure if I have time to look at the details.
 
 Bruce
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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