Partition table interpretation error on kernel 2.6

Bug #6807 reported by Debian Bug Importer
6
Affects Status Importance Assigned to Milestone
parted (Debian)
Fix Released
Unknown
parted (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Automatically imported from Debian bug report #250528
http://bugs.debian.org/250528

Revision history for this message
In , Bastian Kleineidam (calvin) wrote :

Hi,

I get the above error too:
$ parted /dev/hda check 1
Error: The partition table on /dev/hda is inconsistent. There are many reasons why this might
be the case. However, the most likely reason is that Linux detected the BIOS geometry for
/dev/hda incorrectly. GNU Parted suspects the real geometry should be 7476/255/63 (not
119150/16/63). You should check with your BIOS first, as this may not be correct. You can
inform Linux by adding the parameter hda=7476,255,63 to the command line. See the LILO or
GRUB documentation for more information. If you think Parted's suggested geometry is correct,
you may select Ignore to continue (and fix Linux later). Otherwise, select Cancel (and fix
Linux and/or the BIOS now).
Ignore/Cancel? c
Information: Don't forget to update /etc/fstab, if necessary.

Apart from that, this error message is pretty shitty, it does not say
anything:
- does not tell what units the numbers 7476/255/63 are
- "there are many reasons", but does not tell what they are
- "most likely" is a wild guess and not helpful
- I can not see that "Linux detected the BIOS incorrectly", instead of
  that I see two more weird number pairs:
  $ cat /proc/ide/hda/geometry
  physical 16383/16/63
  logical 65535/16/63
- what should the user input after seeing a prompt "Ignore/Cancel" ?
  better would be "[i]gnore/[C]ancel:"

Greetings, Bastian

--
  ,''`. Bastian Kleineidam . calvin (at) debian.org
 : :' :
 `. `' GnuPG Schlüssel http://kampfwurst.net/gpgkey.txt
   `-

Sitzen zwei Glühbirnen im Keller und stricken Atomsocken. BUMM.
Was ist passiert? Eine hat ne Masche verloren.

Revision history for this message
In , Sven Luther (sven-luther) wrote : Re: Bug#250528: Partition table interpretation error on kernel 2.6

On Mon, May 24, 2004 at 11:40:26PM +0200, Bastian Kleineidam wrote:
> Hi,
>
> I get the above error too:
> $ parted /dev/hda check 1
> Error: The partition table on /dev/hda is inconsistent. There are many reasons why this might
> be the case. However, the most likely reason is that Linux detected the BIOS geometry for
> /dev/hda incorrectly. GNU Parted suspects the real geometry should be 7476/255/63 (not
> 119150/16/63). You should check with your BIOS first, as this may not be correct. You can
> inform Linux by adding the parameter hda=7476,255,63 to the command line. See the LILO or
> GRUB documentation for more information. If you think Parted's suggested geometry is correct,
> you may select Ignore to continue (and fix Linux later). Otherwise, select Cancel (and fix
> Linux and/or the BIOS now).
> Ignore/Cancel? c
> Information: Don't forget to update /etc/fstab, if necessary.

This is probably because the behavior with regard geometry changed
between 2.4 and 2.6.

> Apart from that, this error message is pretty shitty, it does not say
> anything:
> - does not tell what units the numbers 7476/255/63 are

Come on, anyone handling partition table would know that, it is in
512byte sectors naturally.

> - "there are many reasons", but does not tell what they are

Because it is an open ended list.

> - "most likely" is a wild guess and not helpful

Sure.

> - I can not see that "Linux detected the BIOS incorrectly", instead of
> that I see two more weird number pairs:
> $ cat /proc/ide/hda/geometry
> physical 16383/16/63
> logical 65535/16/63

So, what is the real geometry of your disk ? And what did it show with
2.4 kernels ?

> - what should the user input after seeing a prompt "Ignore/Cancel" ?
> better would be "[i]gnore/[C]ancel:"

The capital letter is the one to use, is that not enough ?

Friendly,

Sven Luther

Revision history for this message
In , Kimmo =?iso-8859-1?q?Ter=E4v=E4inen?= (kimmo-teravainen) wrote : Re: Bug#250528: More info

I forgot to give this information within my bug report.
Output is the same in both kernels (2.4 and 2.6)

# fdisk -l /dev/hdb
Disk /dev/hdb: 1286 MB, 1286111232 bytes
64 heads, 63 sectors/track, 623 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes

   Device Boot Start End Blocks Id System
/dev/hdb1 * 1 622 1253920+ b W95 FAT32

Revision history for this message
In , Sven Luther (sven-luther) wrote :

On Wed, May 26, 2004 at 12:47:45PM +0300, Kimmo Teräväinen wrote:
> I forgot to give this information within my bug report.
> Output is the same in both kernels (2.4 and 2.6)
>
> # fdisk -l /dev/hdb
> Disk /dev/hdb: 1286 MB, 1286111232 bytes
> 64 heads, 63 sectors/track, 623 cylinders
> Units = cylinders of 4032 * 512 = 2064384 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hdb1 * 1 622 1253920+ b W95 FAT32

Well, i believe this is a upstream issue, let me check this out, but i
will not have time for it today.

Friendly,

Sven Luther

Revision history for this message
In , Wummel (wurst2) wrote : Re: Bug#250528: Partition table interpretation error on kernel 2.6
Download full text (3.4 KiB)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Sven,

On Tue, May 25, 2004 at 07:40:41AM +0200, Sven Luther wrote:
> > Apart from that, this error message is pretty shitty, it does not say
> > anything:
> > - does not tell what units the numbers 7476/255/63 are
>
> Come on, anyone handling partition table would know that, it is in
> 512byte sectors naturally.
>
> > - "there are many reasons", but does not tell what they are
>
> Because it is an open ended list.
>
> > - "most likely" is a wild guess and not helpful
>
> Sure.

It would be helpful if the error message told me how to verify if the
Linux system indeed detected the wrong numbers. Instead this is left
as an exercise to the reader, who would have to know about the /proc
file system, read a little in linux/Documentation/filesystems.txt,
and eventually find /proc/ide/hda/geometry. After that, the user would
have to know that those magic a/b/c numbers in the geometry file are
also written on top of most modern harddisks, and compare them with the
file contents.
This is exactly the stuff I found so frustrating in my early days:
lots of programs expected me to magically know something, because
everyone should know about it, right? Well, I know now but can easily
imagine people who don't. And expecting from them to magically gain
knowledge is not user friendly.

Anyway, it is not that hard to write units behind numbers, and to give
a little help on how to get disk geometry information both from Linux
and from the harddisk.

>
> > - I can not see that "Linux detected the BIOS incorrectly", instead of
> > that I see two more weird number pairs:
> > $ cat /proc/ide/hda/geometry
> > physical 16383/16/63
> > logical 65535/16/63
>
> So, what is the real geometry of your disk ? And what did it show with
> 2.4 kernels ?

The physical data (as read from the harddisk label) for my IBM 60GB
harddisk is:
CHS: 16383/16/63
which is correctly detected by the 2.6.6 kernel (see above).
So it seems what parted detected (7476/255/63) is wrong, assuming that
parted indeed meant physical cylinder/header/sector format and not
something else.

I have no 2.4 kernel anymore, so I cannot test it.

>
> > - what should the user input after seeing a prompt "Ignore/Cancel" ?
> > better would be "[i]gnore/[C]ancel:"
>
> The capital letter is the one to use, is that not enough ?

IMO the most secure thing is trying to make everything explicit.
So my suggestion above is also flawed. A better approach could be:
"Press c or C to cancel, and i or I to ignore. Any other key aborts the
command."
This way the user does not have to guess the answer.

Greetings, Bastian

PS: why am I so hyper-correct about this error message? Easy, it gives
me the creeps when harddisk-changing programs are not clear and concise.
What I really did when seeing the parted error message was to kill -9
the parted process to make sure it does not fuck up my harddisk, and
purge the parted package. You can be sure I don't run this program
again until the author gives more about helpful error messages :)

- --
  ,''`. Bastian Kleineidam . calvin (at) debian.org
 : :' :
 `. `' GnuPG Schlüssel http://kampfwurst.net/...

Read more...

Revision history for this message
In , Adam Aube (aaube01) wrote : parted: Parted works fine despite warning

Package: parted
Version: 1.6.9-3.1
Followup-For: Bug #250528

I have used parted to move and resize partitions without problems - I
simply choose Ignore when the error occurs. Using 2.6-series kernel.

Adam

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #250528
http://bugs.debian.org/250528

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sun, 23 May 2004 18:53:55 +0300
From: Kimmo =?iso-8859-1?q?Ter=E4v=E4inen?= <email address hidden>
To: <email address hidden>
Subject: Partition table interpretation error on kernel 2.6

--Boundary-00=_TkMsAtcpyaZwy+D
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: parted
Version: 1.6.9-3
Severity: grave

When using kernel 2.6 (2.6.5-1-686) parted gives this error message:

<clip>
# parted /dev/hdb check 1
Error: The partition table on /dev/hdb is inconsistent. There are many
reasons
why this might be the case. However, the most likely reason is that Linux
detected the BIOS geometry for /dev/hdb incorrectly. GNU Parted suspects the
real geometry should be 623/64/63 (not 2492/16/63). You should check with
your
BIOS first, as this may not be correct. You can inform Linux by adding the
parameter hdb=623,64,63 to the command line. See the LILO or GRUB
documentation
for more information. If you think Parted's suggested geometry is correct,
you
may select Ignore to continue (and fix Linux later). Otherwise, select Cancel
(and fix Linux and/or the BIOS now).
Ignore/Cancel? cancel
Information: Don't forget to update /etc/fstab, if necessary.

</clip>

When using 2.4 (2.4.25-1-386) it seem to work as expected. I suspect that
usage may cause data loss in kernel 2.6. Please adjust the severity if
bug is not so serious.

Attached: fstab, output of locale

--Boundary-00=_TkMsAtcpyaZwy+D
Content-Type: text/plain;
  charset="us-ascii";
  name="fstab"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="fstab"

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 none swap sw 0 0
/dev/hda2 / reiserfs defaults 0 1
#/dev/hdb1 /windows vfat users,rw,gid=users,async,utf8,shortname=mixed,dmask=002,umask=002 0 2
/dev/hdb1 /windows vfat users,rw,gid=users,async,utf8,shortname=mixed,dmask=002,umask=002 0 2

/dev/fd0 /floppy auto noauto,users,rw,gid=users,async 0 0
/dev/hdc /cdrw auto noauto,users,ro,gid=users,async,utf8 0 0
/dev/hdd /cdrom iso9660 noauto,users,ro,gid=users,async,norock,utf8 0 0

#/dev/hdc /mnt/udf udf noauto,users,rw,gid=users,async,utf8 0 0

--Boundary-00=_TkMsAtcpyaZwy+D
Content-Type: text/plain;
  charset="us-ascii";
  name="locale"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="locale"

LANG=POSIX
LC_CTYPE=fi_FI.UTF-8
LC_NUMERIC="POSIX"
LC_TIME=fi_FI.UTF-8
LC_COLLATE="POSIX"
LC_MONETARY=fi_FI.UTF-8
LC_MESSAGES="POSIX"
LC_PAPER=fi_FI.UTF-8
LC_NAME="POSIX"
LC_ADDRESS=fi_FI.UTF-8
LC_TELEPHONE=fi_FI.UTF-8
LC_MEASUREMENT=fi_FI.UTF-8
LC_IDENTIFICATION="POSIX"
LC_ALL=

--Boundary-00=_TkMsAtcpyaZwy+D--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20040524214026.GA17860@treasure>
Date: Mon, 24 May 2004 23:40:26 +0200
From: Bastian Kleineidam <email address hidden>
To: <email address hidden>
Subject: Re: Partition table interpretation error on kernel 2.6

Hi,

I get the above error too:
$ parted /dev/hda check 1
Error: The partition table on /dev/hda is inconsistent. There are many reasons why this might
be the case. However, the most likely reason is that Linux detected the BIOS geometry for
/dev/hda incorrectly. GNU Parted suspects the real geometry should be 7476/255/63 (not
119150/16/63). You should check with your BIOS first, as this may not be correct. You can
inform Linux by adding the parameter hda=7476,255,63 to the command line. See the LILO or
GRUB documentation for more information. If you think Parted's suggested geometry is correct,
you may select Ignore to continue (and fix Linux later). Otherwise, select Cancel (and fix
Linux and/or the BIOS now).
Ignore/Cancel? c
Information: Don't forget to update /etc/fstab, if necessary.

Apart from that, this error message is pretty shitty, it does not say
anything:
- does not tell what units the numbers 7476/255/63 are
- "there are many reasons", but does not tell what they are
- "most likely" is a wild guess and not helpful
- I can not see that "Linux detected the BIOS incorrectly", instead of
  that I see two more weird number pairs:
  $ cat /proc/ide/hda/geometry
  physical 16383/16/63
  logical 65535/16/63
- what should the user input after seeing a prompt "Ignore/Cancel" ?
  better would be "[i]gnore/[C]ancel:"

Greetings, Bastian

--
  ,''`. Bastian Kleineidam . calvin (at) debian.org
 : :' :
 `. `' GnuPG Schl�http://kampfwurst.net/gpgkey.txt
   `-

Sitzen zwei Gl�en im Keller und stricken Atomsocken. BUMM.
Was ist passiert? Eine hat ne Masche verloren.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20040525054041.GA8060@pegasos>
Date: Tue, 25 May 2004 07:40:41 +0200
From: Sven Luther <email address hidden>
To: Bastian Kleineidam <email address hidden>, <email address hidden>
Subject: Re: Bug#250528: Partition table interpretation error on kernel 2.6

On Mon, May 24, 2004 at 11:40:26PM +0200, Bastian Kleineidam wrote:
> Hi,
>
> I get the above error too:
> $ parted /dev/hda check 1
> Error: The partition table on /dev/hda is inconsistent. There are many reasons why this might
> be the case. However, the most likely reason is that Linux detected the BIOS geometry for
> /dev/hda incorrectly. GNU Parted suspects the real geometry should be 7476/255/63 (not
> 119150/16/63). You should check with your BIOS first, as this may not be correct. You can
> inform Linux by adding the parameter hda=7476,255,63 to the command line. See the LILO or
> GRUB documentation for more information. If you think Parted's suggested geometry is correct,
> you may select Ignore to continue (and fix Linux later). Otherwise, select Cancel (and fix
> Linux and/or the BIOS now).
> Ignore/Cancel? c
> Information: Don't forget to update /etc/fstab, if necessary.

This is probably because the behavior with regard geometry changed
between 2.4 and 2.6.

> Apart from that, this error message is pretty shitty, it does not say
> anything:
> - does not tell what units the numbers 7476/255/63 are

Come on, anyone handling partition table would know that, it is in
512byte sectors naturally.

> - "there are many reasons", but does not tell what they are

Because it is an open ended list.

> - "most likely" is a wild guess and not helpful

Sure.

> - I can not see that "Linux detected the BIOS incorrectly", instead of
> that I see two more weird number pairs:
> $ cat /proc/ide/hda/geometry
> physical 16383/16/63
> logical 65535/16/63

So, what is the real geometry of your disk ? And what did it show with
2.4 kernels ?

> - what should the user input after seeing a prompt "Ignore/Cancel" ?
> better would be "[i]gnore/[C]ancel:"

The capital letter is the one to use, is that not enough ?

Friendly,

Sven Luther

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Wed, 26 May 2004 12:47:45 +0300
From: Kimmo =?utf-8?q?Ter=C3=A4v=C3=A4inen?= <email address hidden>
To: <email address hidden>
Subject: Re: Bug#250528: More info

I forgot to give this information within my bug report.
Output is the same in both kernels (2.4 and 2.6)

# fdisk -l /dev/hdb
Disk /dev/hdb: 1286 MB, 1286111232 bytes
64 heads, 63 sectors/track, 623 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes

   Device Boot Start End Blocks Id System
/dev/hdb1 * 1 622 1253920+ b W95 FAT32

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20040526111036.GA20801@pegasos>
Date: Wed, 26 May 2004 13:10:36 +0200
From: Sven Luther <email address hidden>
To: Kimmo =?iso-8859-1?Q?Ter=E4v=E4inen?= <email address hidden>,
 <email address hidden>
Subject: Re: Bug#250528: More info

On Wed, May 26, 2004 at 12:47:45PM +0300, Kimmo Ter�inen wrote:
> I forgot to give this information within my bug report.
> Output is the same in both kernels (2.4 and 2.6)
>
> # fdisk -l /dev/hdb
> Disk /dev/hdb: 1286 MB, 1286111232 bytes
> 64 heads, 63 sectors/track, 623 cylinders
> Units = cylinders of 4032 * 512 = 2064384 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hdb1 * 1 622 1253920+ b W95 FAT32

Well, i believe this is a upstream issue, let me check this out, but i
will not have time for it today.

Friendly,

Sven Luther

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (3.6 KiB)

Message-ID: <20040529145843.GA3550@treasure>
Date: Sat, 29 May 2004 16:58:43 +0200
From: Bastian Kleineidam <email address hidden>
To: <email address hidden>
Subject: Re: Bug#250528: Partition table interpretation error on kernel 2.6

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Sven,

On Tue, May 25, 2004 at 07:40:41AM +0200, Sven Luther wrote:
> > Apart from that, this error message is pretty shitty, it does not say
> > anything:
> > - does not tell what units the numbers 7476/255/63 are
>
> Come on, anyone handling partition table would know that, it is in
> 512byte sectors naturally.
>
> > - "there are many reasons", but does not tell what they are
>
> Because it is an open ended list.
>
> > - "most likely" is a wild guess and not helpful
>
> Sure.

It would be helpful if the error message told me how to verify if the
Linux system indeed detected the wrong numbers. Instead this is left
as an exercise to the reader, who would have to know about the /proc
file system, read a little in linux/Documentation/filesystems.txt,
and eventually find /proc/ide/hda/geometry. After that, the user would
have to know that those magic a/b/c numbers in the geometry file are
also written on top of most modern harddisks, and compare them with the
file contents.
This is exactly the stuff I found so frustrating in my early days:
lots of programs expected me to magically know something, because
everyone should know about it, right? Well, I know now but can easily
imagine people who don't. And expecting from them to magically gain
knowledge is not user friendly.

Anyway, it is not that hard to write units behind numbers, and to give
a little help on how to get disk geometry information both from Linux
and from the harddisk.

>
> > - I can not see that "Linux detected the BIOS incorrectly", instead of
> > that I see two more weird number pairs:
> > $ cat /proc/ide/hda/geometry
> > physical 16383/16/63
> > logical 65535/16/63
>
> So, what is the real geometry of your disk ? And what did it show with
> 2.4 kernels ?

The physical data (as read from the harddisk label) for my IBM 60GB
harddisk is:
CHS: 16383/16/63
which is correctly detected by the 2.6.6 kernel (see above).
So it seems what parted detected (7476/255/63) is wrong, assuming that
parted indeed meant physical cylinder/header/sector format and not
something else.

I have no 2.4 kernel anymore, so I cannot test it.

>
> > - what should the user input after seeing a prompt "Ignore/Cancel" ?
> > better would be "[i]gnore/[C]ancel:"
>
> The capital letter is the one to use, is that not enough ?

IMO the most secure thing is trying to make everything explicit.
So my suggestion above is also flawed. A better approach could be:
"Press c or C to cancel, and i or I to ignore. Any other key aborts the
command."
This way the user does not have to guess the answer.

Greetings, Bastian

PS: why am I so hyper-correct about this error message? Easy, it gives
me the creeps when harddisk-changing programs are not clear and concise.
What I really did when seeing the parted error message was to kill -9
the parted process to make sure it does not fuck up my harddisk, and
purge the parted ...

Read more...

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Thu, 24 Jun 2004 23:59:20 -0400
From: Adam Aube <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: parted: Parted works fine despite warning

Package: parted
Version: 1.6.9-3.1
Followup-For: Bug #250528

I have used parted to move and resize partitions without problems - I
simply choose Ignore when the error occurs. Using 2.6-series kernel.

Adam

Revision history for this message
Matt Zimmerman (mdz) wrote :

Remove myself from all these CCs now that we have the warty-bugs mailing list

Revision history for this message
Matt Zimmerman (mdz) wrote :

This doesn't seem RC, but waiting for decision from Debian to be sure

Revision history for this message
In , Thomas Hood (jdthood-yahoo) wrote : severity of 250528 is minor

severity 250528 minor

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <20040708181303.6DCE110D58F@localhost>
Date: Thu, 8 Jul 2004 20:13:03 +0200 (CEST)
From: <email address hidden> (Thomas Hood)
To: <email address hidden>
Subject: severity of 250528 is minor

severity 250528 minor

Revision history for this message
Matt Zimmerman (mdz) wrote :

Debian agrees, not RC

Revision history for this message
In , Sven Luther (sven-luther) wrote : closing some older bug reports no more of actuality.

close 250528
clsoe 210989
thanks

We believe that the above bug reports are now fixed in parted 1.6.11-6, and
that the parted1.6 has finally been removed from experimental. Thus closing
those bug reports, please reopen them if this is not the case.

Friendly,

Sven Luther

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20041101105710.GA3421@pegasos>
Date: Mon, 1 Nov 2004 11:57:10 +0100
From: Sven Luther <email address hidden>
To: <email address hidden>
Subject: closing some older bug reports no more of actuality.

close 250528
clsoe 210989
thanks

We believe that the above bug reports are now fixed in parted 1.6.11-6, and
that the parted1.6 has finally been removed from experimental. Thus closing
those bug reports, please reopen them if this is not the case.

Friendly,

Sven Luther

Revision history for this message
Daniel Robitaille (robitaille) wrote :

Marked as fixed in Debian in 2004

Changed in parted:
status: Unconfirmed → Fix Released
Changed in parted:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.