dmesg and fdisk do not match about usb external disk

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

dmesg and fdisk do not match about usb external disk

frantisek holop
hi there,

please compare the following for my external usb disk:

amaaq> sudo fdisk sd0
Disk: sd0       geometry: 60801/255/63 [976768065 Sectors]
Offset: 0       Signature: 0xAA55
         Starting       Ending       LBA Info:
 #: id    C   H  S -    C   H  S [       start:      size   ]
------------------------------------------------------------------------
 0: 07    0   1  1 - 16317 254 63 [          63:   262148607 ] HPFS/QNX/AUX
 1: 0C 16318   0  1 - 32635 254 63 [   262148670:   262148670 ] Win95 FAT32L
 2: 83 32636   0  1 - 60800 254 63 [   524297340:   452470725 ] Linux files*
 3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused


and the dmesg when plugged in:

umass0 at uhub3 port 4 configuration 1 interface 0
umass0: Western Digital External HDD, rev 2.00/0.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets
sd0 at scsibus1 targ 1 lun 0: <WD, 5000AAJS Externa, 101a> SCSI2 0/direct fixed
sd0: 476940MB, 476940 cyl, 64 head, 32 sec, 512 bytes/sec, 976773168 sec total


the cylinders, heads, sectors and the number of total sectors do not match.
what does this mean?
--
dinner: dead animals and some stuff out of the ground.

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

Nick Holland
frantisek holop wrote:

> hi there,
>
> please compare the following for my external usb disk:
>
> amaaq> sudo fdisk sd0
> Disk: sd0       geometry: 60801/255/63 [976768065 Sectors]
> Offset: 0       Signature: 0xAA55
>          Starting       Ending       LBA Info:
>  #: id    C   H  S -    C   H  S [       start:      size   ]
> ------------------------------------------------------------------------
>  0: 07    0   1  1 - 16317 254 63 [          63:   262148607 ] HPFS/QNX/AUX
>  1: 0C 16318   0  1 - 32635 254 63 [   262148670:   262148670 ] Win95 FAT32L
>  2: 83 32636   0  1 - 60800 254 63 [   524297340:   452470725 ] Linux files*
>  3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
>
>
> and the dmesg when plugged in:
>
> umass0 at uhub3 port 4 configuration 1 interface 0
> umass0: Western Digital External HDD, rev 2.00/0.00, addr 2
> umass0: using SCSI over Bulk-Only
> scsibus1 at umass0: 2 targets
> sd0 at scsibus1 targ 1 lun 0: <WD, 5000AAJS Externa, 101a> SCSI2 0/direct fixed
> sd0: 476940MB, 476940 cyl, 64 head, 32 sec, 512 bytes/sec, 976773168 sec total
>
>
> the cylinders, heads, sectors and the number of total sectors do not match.
> what does this mean?

It means translation is stupid, but we keep doing it. :)

60801 x 255 x 63 = 976768065
476940 x 64 x 32 = 976773120 which is actually 48 sectors shy of what
the dmesg reports.

fdisk (and the partition system it supports) is basically cylinder
oriented, so we keep talking about cylinders, even though not only has
it all been completely bogus for the last many years, but a lot of
devices now aren't even rotating...  But by nature and the way they
are handled, you can't have "fractional cylinders".

In reality, you have the number of sectors reported by dmesg, but you
can use the number reported by fdisk.  So, there are 5103 sectors you
can't use, and at half K each, that's about 2.5M of lost space on your
488,386,584k drive.  Ouch. :)

Now, before you accuse me of wasting space without caring, I do wish
to point out that the first computer I worked with with disk storage
had 90K floppy disks and 64K RAM.  I was thrilled to upgrade to a 640k
floppy disk system on the first "big" machine I owned, and when I
later installed hard disks on it, they were only twice as big as the
amount we are wasting here (5M).  In my basement is a PDP-11/23 that
can supposedly (just barely) run an early Unix on its 14" 5M drives.

So yes, it hurts to lose that much space, but they keep telling me to
get over it.

:)

Nick.

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

frantisek holop
hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
> It means translation is stupid, but we keep doing it. :)

it is not really the translation that got me worried
(although wouldn't it be more consistent to use the n x 255 x 63
version everywhere?) but the different number of sectors..
thanks for the great explanation.

> 60801 x 255 x 63 = 976768065
> 476940 x 64 x 32 = 976773120 which is actually 48 sectors shy of what
> the dmesg reports.
>
> fdisk (and the partition system it supports) is basically cylinder
> oriented, so we keep talking about cylinders, even though not only has
> it all been completely bogus for the last many years, but a lot of
> devices now aren't even rotating...  But by nature and the way they
> are handled, you can't have "fractional cylinders".

-f
--
a war put off is not a war avoided. -- c. heston

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

Michael Shalayeff-2
On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
> hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
> > It means translation is stupid, but we keep doing it. :)
>
> it is not really the translation that got me worried
> (although wouldn't it be more consistent to use the n x 255 x 63
> version everywhere?) but the different number of sectors..
> thanks for the great explanation.

who gives a flying fuck?
bios is using it's own geometry and we are using ours.
how about you ask those spammers to send dick measurements in meters?
cu
--
    paranoic mickey       (my employers have changed but, the name has remained)

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

frantisek holop
hmm, on Thu, Feb 08, 2007 at 02:06:45PM +0100, mickey said that

> On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
> > hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
> > > It means translation is stupid, but we keep doing it. :)
> >
> > it is not really the translation that got me worried
> > (although wouldn't it be more consistent to use the n x 255 x 63
> > version everywhere?) but the different number of sectors..
> > thanks for the great explanation.
>
> who gives a flying fuck?
> bios is using it's own geometry and we are using ours.
> how about you ask those spammers to send dick measurements in meters?

perhaps this could go into the faq?

-f
--
careful planning will never replace dumb luck.

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

Michael Shalayeff-2
On Thu, Feb 08, 2007 at 03:02:32PM +0100, frantisek holop wrote:

> hmm, on Thu, Feb 08, 2007 at 02:06:45PM +0100, mickey said that
> > On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
> > > hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
> > > > It means translation is stupid, but we keep doing it. :)
> > >
> > > it is not really the translation that got me worried
> > > (although wouldn't it be more consistent to use the n x 255 x 63
> > > version everywhere?) but the different number of sectors..
> > > thanks for the great explanation.
> >
> > who gives a flying fuck?
> > bios is using it's own geometry and we are using ours.
> > how about you ask those spammers to send dick measurements in meters?
>
> perhaps this could go into the faq?

what? dick measurement techniques?
cu
--
    paranoic mickey       (my employers have changed but, the name has remained)

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

chefren
On 2/8/07 3:09 PM, mickey wrote:

> On Thu, Feb 08, 2007 at 03:02:32PM +0100, frantisek holop wrote:
>> hmm, on Thu, Feb 08, 2007 at 02:06:45PM +0100, mickey said that
>>> On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
>>>> hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
>>>>> It means translation is stupid, but we keep doing it. :)
>>>> it is not really the translation that got me worried
>>>> (although wouldn't it be more consistent to use the n x 255 x 63
>>>> version everywhere?) but the different number of sectors..
>>>> thanks for the great explanation.
>>> who gives a flying fuck?
>>> bios is using it's own geometry and we are using ours.
>>> how about you ask those spammers to send dick measurements in meters?
>> perhaps this could go into the faq?
>
> what? dick measurement techniques?


OpenBSD is about pro active security, those techniques should be
integrated into the kernel.

+++chefren

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

frantisek holop
In reply to this post by Michael Shalayeff-2
hmm, on Thu, Feb 08, 2007 at 03:09:10PM +0100, mickey said that
> what? dick measurement techniques?

a bit preoccupied with dicks and measurements, aren't we?

perhaps if you associate disk geometries with dicks, maybe
you also talk of nipples instead of keys on your keyboard, etc.

actually not a bad idea, maybe it could bring kids interested
in anatomy closer to computer sciense.


thank you so much for your oh so valuable comments.

-f
--
there is too much blood in my caffiene stream!

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

obsd-3
In reply to this post by Michael Shalayeff-2
On Thu, 8 Feb 2007 15:09:10 +0100, "mickey" <[hidden email]> said:

> On Thu, Feb 08, 2007 at 03:02:32PM +0100, frantisek holop wrote:
> > hmm, on Thu, Feb 08, 2007 at 02:06:45PM +0100, mickey said that
> > > On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
> > > > hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
> > > > > It means translation is stupid, but we keep doing it. :)
> > > >
> > > > it is not really the translation that got me worried
> > > > (although wouldn't it be more consistent to use the n x 255 x 63
> > > > version everywhere?) but the different number of sectors..
> > > > thanks for the great explanation.
> > >
> > > who gives a flying fuck?
> > > bios is using it's own geometry and we are using ours.
> > > how about you ask those spammers to send dick measurements in meters?
> >
> > perhaps this could go into the faq?
>
> what? dick measurement techniques?

And not long ago I wrote to the list that this list *is* nice and people
don't get attacked unless they become obnoxious.
Please thank you for proving me absolutely wrong.
Jeez, you know more about how the bios and the OS report disk
geometries and his enquiries annoy you? Please get over it.

Sorry to everyone for also wasting more of this lists bandwidth.

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

Michael Shalayeff-2
In reply to this post by chefren
On Thu, Feb 08, 2007 at 03:22:21PM +0100, chefren wrote:

> On 2/8/07 3:09 PM, mickey wrote:
> >On Thu, Feb 08, 2007 at 03:02:32PM +0100, frantisek holop wrote:
> >>hmm, on Thu, Feb 08, 2007 at 02:06:45PM +0100, mickey said that
> >>>On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
> >>>>hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
> >>>>>It means translation is stupid, but we keep doing it. :)
> >>>>it is not really the translation that got me worried
> >>>>(although wouldn't it be more consistent to use the n x 255 x 63
> >>>>version everywhere?) but the different number of sectors..
> >>>>thanks for the great explanation.
> >>>who gives a flying fuck?
> >>>bios is using it's own geometry and we are using ours.
> >>>how about you ask those spammers to send dick measurements in meters?
> >>perhaps this could go into the faq?
> >
> >what? dick measurement techniques?
>
> OpenBSD is about pro active security, those techniques should be
> integrated into the kernel.

this is a part of my plan right after i finally commit my
optimised xml parser for kernel. it has also asm implemetation
for vax (requires CIS-XML microcode though).
cu
--
    paranoic mickey       (my employers have changed but, the name has remained)

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

Michael Shalayeff-2
In reply to this post by obsd-3
On Thu, Feb 08, 2007 at 10:01:07AM -0500, [hidden email] wrote:

> On Thu, 8 Feb 2007 15:09:10 +0100, "mickey" <[hidden email]> said:
> > On Thu, Feb 08, 2007 at 03:02:32PM +0100, frantisek holop wrote:
> > > hmm, on Thu, Feb 08, 2007 at 02:06:45PM +0100, mickey said that
> > > > On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
> > > > > hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
> > > > > > It means translation is stupid, but we keep doing it. :)
> > > > >
> > > > > it is not really the translation that got me worried
> > > > > (although wouldn't it be more consistent to use the n x 255 x 63
> > > > > version everywhere?) but the different number of sectors..
> > > > > thanks for the great explanation.
> > > >
> > > > who gives a flying fuck?
> > > > bios is using it's own geometry and we are using ours.
> > > > how about you ask those spammers to send dick measurements in meters?
> > >
> > > perhaps this could go into the faq?
> >
> > what? dick measurement techniques?
>
> And not long ago I wrote to the list that this list *is* nice and people
> don't get attacked unless they become obnoxious.
> Please thank you for proving me absolutely wrong.
> Jeez, you know more about how the bios and the OS report disk
> geometries and his enquiries annoy you? Please get over it.
>
> Sorry to everyone for also wasting more of this lists bandwidth.

you cannot read can you?
it does not matter what geometries are
as long as you do not change any yourself.
cu
--
    paranoic mickey       (my employers have changed but, the name has remained)

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

chefren
In reply to this post by Michael Shalayeff-2
On 2/8/07 4:13 PM, mickey wrote:

> On Thu, Feb 08, 2007 at 03:22:21PM +0100, chefren wrote:
>> On 2/8/07 3:09 PM, mickey wrote:
>>> On Thu, Feb 08, 2007 at 03:02:32PM +0100, frantisek holop wrote:
>>>> hmm, on Thu, Feb 08, 2007 at 02:06:45PM +0100, mickey said that
>>>>> On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
>>>>>> hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
>>>>>>> It means translation is stupid, but we keep doing it. :)
>>>>>> it is not really the translation that got me worried
>>>>>> (although wouldn't it be more consistent to use the n x 255 x 63
>>>>>> version everywhere?) but the different number of sectors..
>>>>>> thanks for the great explanation.
>>>>> who gives a flying fuck?
>>>>> bios is using it's own geometry and we are using ours.
>>>>> how about you ask those spammers to send dick measurements in meters?
>>>> perhaps this could go into the faq?
>>> what? dick measurement techniques?
>> OpenBSD is about pro active security, those techniques should be
>> integrated into the kernel.
>
> this is a part of my plan right after i finally commit my
> optimised xml parser for kernel. it has also asm implemetation
> for vax (requires CIS-XML microcode though).

OK, even better!

Just to be sure, I know this is a little paranoid but the users really
need it top notch: You won't forget full ASN.1 support won't you?

+++chefren

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

Michael Shalayeff-2
On Thu, Feb 08, 2007 at 04:27:21PM +0100, chefren wrote:

> On 2/8/07 4:13 PM, mickey wrote:
> >On Thu, Feb 08, 2007 at 03:22:21PM +0100, chefren wrote:
> >>On 2/8/07 3:09 PM, mickey wrote:
> >>>On Thu, Feb 08, 2007 at 03:02:32PM +0100, frantisek holop wrote:
> >>>>hmm, on Thu, Feb 08, 2007 at 02:06:45PM +0100, mickey said that
> >>>>>On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
> >>>>>>hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
> >>>>>>>It means translation is stupid, but we keep doing it. :)
> >>>>>>it is not really the translation that got me worried
> >>>>>>(although wouldn't it be more consistent to use the n x 255 x 63
> >>>>>>version everywhere?) but the different number of sectors..
> >>>>>>thanks for the great explanation.
> >>>>>who gives a flying fuck?
> >>>>>bios is using it's own geometry and we are using ours.
> >>>>>how about you ask those spammers to send dick measurements in meters?
> >>>>perhaps this could go into the faq?
> >>>what? dick measurement techniques?
> >>OpenBSD is about pro active security, those techniques should be
> >>integrated into the kernel.
> >
> >this is a part of my plan right after i finally commit my
> >optimised xml parser for kernel. it has also asm implemetation
> >for vax (requires CIS-XML microcode though).
>
> OK, even better!
>
> Just to be sure, I know this is a little paranoid but the users really
> need it top notch: You won't forget full ASN.1 support won't you?

of course! it's a part of the original specification for
this project we are doing for a very important customer
that i cannot name openly here.
it is going to change the world, man, as everything that comes from germany!
you'll see.
cu
--
    paranoic mickey       (my employers have changed but, the name has remained)

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

chefren
On 2/8/07 5:59 PM, mickey wrote:

> On Thu, Feb 08, 2007 at 05:26:01PM +0100, chefren wrote:
>> On 2/8/07 5:04 PM, mickey wrote:
>>> On Thu, Feb 08, 2007 at 04:27:21PM +0100, chefren wrote:
>>>> On 2/8/07 4:13 PM, mickey wrote:
>>>>> On Thu, Feb 08, 2007 at 03:22:21PM +0100, chefren wrote:
>>>>>> On 2/8/07 3:09 PM, mickey wrote:
>>>>>>> On Thu, Feb 08, 2007 at 03:02:32PM +0100, frantisek holop wrote:
>>>>>>>> hmm, on Thu, Feb 08, 2007 at 02:06:45PM +0100, mickey said that
>>>>>>>>> On Thu, Feb 08, 2007 at 10:13:29AM +0100, frantisek holop wrote:
>>>>>>>>>> hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said
>>>>>>>>>> that
>>>>>>>>>>> It means translation is stupid, but we keep doing it. :)
>>>>>>>>>> it is not really the translation that got me worried
>>>>>>>>>> (although wouldn't it be more consistent to use the n x 255 x 63
>>>>>>>>>> version everywhere?) but the different number of sectors..
>>>>>>>>>> thanks for the great explanation.
>>>>>>>>> who gives a flying fuck?
>>>>>>>>> bios is using it's own geometry and we are using ours.
>>>>>>>>> how about you ask those spammers to send dick measurements in meters?
>>>>>>>> perhaps this could go into the faq?
>>>>>>> what? dick measurement techniques?
>>>>>> OpenBSD is about pro active security, those techniques should be
>>>>>> integrated into the kernel.
>>>>> this is a part of my plan right after i finally commit my
>>>>> optimised xml parser for kernel. it has also asm implemetation
>>>>> for vax (requires CIS-XML microcode though).
>>>> OK, even better!
>>>>
>>>> Just to be sure, I know this is a little paranoid but the users really
>>>> need it top notch: You won't forget full ASN.1 support won't you?
>>> of course! it's a part of the original specification for
>>> this project we are doing for a very important customer
>>> that i cannot name openly here.
>>> it is going to change the world, man, as everything that comes from
>>> germany!
>>> you'll see.
>> This shines too much, you cannot hide it!
>>
>> Godwins Law integrated in the kernel of OpenBSD, who would have
>> thought about that??? Genial!
>
> nonono. godwin's law does not apply here.
> everybody knows now that xml was invented
> by (no less) herr joseph goebbels himself
> and was used to counter soviet propaganda (and
> also (as a byproduct) navigate V-2A7 rockets)!

It's You! You are the traitor!!!

+++chefren

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

Lars Hansson
In reply to this post by obsd-3
[hidden email] wrote:
> And not long ago I wrote to the list that this list *is* nice and people
> don't get attacked unless they become obnoxious.
> Please thank you for proving me absolutely wrong.

Yeah because there are absolutely never, EVER, in a million years, any
harsh replies on any other mailinglists in the world.

---
Lars Hansson

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

frantisek holop
In reply to this post by Nick Holland
hmm, on Tue, Jan 30, 2007 at 07:40:52PM -0500, Nick Holland said that
> > the cylinders, heads, sectors and the number of total sectors do not match.
> > what does this mean?
>
> It means translation is stupid, but we keep doing it. :)

ok, now just to make things more interesting, i have found a disk
where fdisk and dmesg output matches, but some other stuff doesn't...


umass0 at uhub3 port 4 configuration 1 interface 0
umass0: Western Digital External HDD, rev 2.00/1.02, addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets
sd0 at scsibus1 targ 1 lun 0: <WD, 1600BEVExternal, 1.02> SCSI0 0/direct fixed
sd0: 152627MB, 152627 cyl, 64 head, 32 sec, 512 bytes/sec, 312581808 sec total


amaaq> fdisk sd0
fdisk: sysctl(machdep.bios.diskinfo): Device not configured
Disk: sd0       geometry: 152627/64/32 [312581808 Sectors]
Offset: 0       Signature: 0xAA55
         Starting       Ending       LBA Info:
 #: id    C   H  S -    C   H  S [       start:      size   ]
------------------------------------------------------------------------
 0: 0C    0   1 32 - 76316  38  1 [          63:   156296322 ] Win95 FAT32L
 1: 83 76316  38  2 - 152625  22  1 [   156296385:   156280320 ] Linux files*
 2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
 3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused


but

152627 * 64 * 32 = 312580096 and not 312581808


also according to windows the geometry is 19457/255/63

19457 * 255 * 63 = 312576705

312581808 - 312576705 = 5103, that's the same amount of sectors
i can't use with the 500G disk.


so what's up with these dick measurements?

-f
--
forget everything, as one day everything will forget you.

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

Marco S Hyman
frantisek holop writes:
 > so what's up with these dick measurements?

I think you got that part just right :-)

Expecthing cyl * head * sec/cyl to come up with the number of actual
sectors on the disk is your problem.   Modern disk don't have a fixed
number of sec/track.  They use Zone Bit Recording which uses a different
number of sec/track depending upon the location of the track on the
disk.

The code tries to come up with an approximate CHS for historical
reasons.   It would probably be best if it just reported the number
of sectors as that is the only important measure.

// marc

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

frantisek holop
hmm, on Mon, Feb 12, 2007 at 06:23:31PM -0800, Marco S Hyman said that

> frantisek holop writes:
>  > so what's up with these dick measurements?
>
> I think you got that part just right :-)
>
> Expecthing cyl * head * sec/cyl to come up with the number of actual
> sectors on the disk is your problem.   Modern disk don't have a fixed
> number of sec/track.  They use Zone Bit Recording which uses a different
> number of sec/track depending upon the location of the track on the
> disk.

all i "expect" is consistency and the same kind of numbers
accross diff OSes..

how am i (and fdisk) supposed to make partitions on CHS boundaries
if instead of 19457/255/63 fdisk sees the disk as 152627/64/32?

> The code tries to come up with an approximate CHS for historical
> reasons.   It would probably be best if it just reported the number
> of sectors as that is the only important measure.

ok, on the 500G disk the fdisk total no. of sectors did not
equal to dmesg total no. of sectors.  with this disk, it does.
why is that?

-f
--
doubt is the beginning of wisdom

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

Shane J Pearson
On 13/02/2007, at 8:18 PM, frantisek holop wrote:

> how am i (and fdisk) supposed to make partitions on CHS boundaries
> if instead of 19457/255/63 fdisk sees the disk as 152627/64/32?

What is the point in trying to align to such boundaries, when the  
physical HDD does not have 255 or 64 heads and those numbers are  
faked due to working around legacy limitations?


Shane J Pearson
shanejp netspace net au

Reply | Threaded
Open this post in threaded view
|

Re: dmesg and fdisk do not match about usb external disk

frantisek holop
hmm, on Tue, Feb 13, 2007 at 08:56:24PM +1100, Shane J Pearson said that
> On 13/02/2007, at 8:18 PM, frantisek holop wrote:
>
> >how am i (and fdisk) supposed to make partitions on CHS boundaries
> >if instead of 19457/255/63 fdisk sees the disk as 152627/64/32?
>
> What is the point in trying to align to such boundaries, when the  
> physical HDD does not have 255 or 64 heads and those numbers are  
> faked due to working around legacy limitations?

fdisk(8):

CAVEATS
     Hand crafted disk layouts are highly error prone.  MBR partitions should
     start on a cylinder boundary (head 0, sector 1), except when starting on
     track 0, (these should begin at head 1, sector 1).  MBR partitions should
     also end at cylinder boundaries.


as far as i know most of the other OSs also align to boundaries.

-f
--
the borg are coming!  quick!  try and look useless!

12