[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in parted 1.4.22 (I think)
From: |
Frazer Williams |
Subject: |
Bug in parted 1.4.22 (I think) |
Date: |
Wed, 9 Jan 2002 12:13:11 -0600 |
User-agent: |
Mutt/1.2.5i |
Hi,
I seem to have found a bug in parted. Whether the bug is in parted or
in my head, I'd appreciate any advice or help. Here's my side of the story.
I have a 6GB IDE drive that has a 2GB Windows partion in partition 1.
Partition 2 is extended, and contatins 4 Linux logical partions, 5, 6,
7, and 8. Partition 8 is swap, the rest are ext2. I'm running RedHat
7.1 with no known problems from the disk. fdisk, cfdisk, and sfdisk all
find no problem with the disk, but parted first complains about a
partition alignment problem, and then proceeds to get the minor numbers
reversed for the logical partions 5, 6, 7, and 8.
Here's the output of /sbin/sfdisk -uS -l /dev/hda.
=====sfdisk -uS -l /dev/hda=====
Disk /dev/hda: 784 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/hda1 * 63 4192964 4192902 6 FAT16
/dev/hda2 4192965 12594959 8401995 5 Extended
/dev/hda3 0 - 0 0 Empty
/dev/hda4 0 - 0 0 Empty
/dev/hda5 4193028 4514264 321237 83 Linux
/dev/hda6 4514328 8498384 3984057 83 Linux
/dev/hda7 8498448 12482504 3984057 83 Linux
/dev/hda8 12482568 12594959 112392 82 Linux swap
================================
And, here's the output of parted /dev/hda. (This is version 1.4.16, but
I get the same result with 1.4.22.)
========parted /dev/hda=========
GNU Parted 1.4.16
[copyright stuff deleted]
Using /dev/hda
Warning: The operating system thinks the geometry on /dev/hda is 784/255/63.
You should check that this matches the BIOS geometry before using this program.
(parted) print
Warning: Unable to align partition properly. This probably means that another
partitioning tool generated an incorrect partition table, because it didn't have
the correct BIOS geometry. It is safe to ignore,but ignoring may cause
(fixable) problems with some boot loaders.
Ignore Cancel ? Ignore
Disk geometry for /dev/hda: 0.000-6149.882 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 2047.346 primary FAT boot
2 2047.346 6149.882 extended
8 2047.377 2204.230 logical ext2
7 2204.262 4149.602 logical ext2
6 4149.633 6094.973 logical ext2
5 6095.004 6149.882 logical linux-swap
(parted) quit
=====================================
Note the minor numbers are backwards for 8, 7, 6, and 5.
I ran into this problem trying to upgrade RedHat Linux from 7.1 to 7.2.
The incorrect minor numbers cause the installer to give up with an error
message that it can't mount /dev/hda8.
I considered the possibility that parted could be correct and fdisk et
al. wrong. To check that, from the installer shell I first created
/dev/hda[5-8] with commands like
mknod /dev/hda5 b 3 5
I was then able to mount /dev/hda5, and it contained the expected files.
I was not unable to mount /dev/hda8. Thus the first partion in hda2
must indeed be the partition accessed with minor number 5 as sfdisk
reports, not 8 as parted claims.
Some further, probably useless, information:
1. From the installer shell (so /dev/hda[5-8] were not mounted) I ran
e2fsck on /dev/hda[5-8]. No problems were found.
2. I dumped some of the partition tables, and to my novice eye they
look fine. For example, here is what was in the partition table for
the first logical partition in /dev/hda2 (i.e. hda5), as seen
through od:
========partition table dump for hda5============
0001be 0000 1941 fe05 10bf e714 0004 caf8 003c
0001ce 0100 0541 fe83 187f 003f 0000 e6d5 0004
0001de 0000 0000 0000 0000 0000 0000 0000 0000
*
0001fe aa55
000200
=================================================
I would appreciate any help or advice you could give me. If it would be
helpful, I could probably track down and dump the other partition tables
on the disk.
Thanks.
Frazer
- Bug in parted 1.4.22 (I think),
Frazer Williams <=