parted cannot detect partitions properly when Smart Boot Manager is in use

Bug #9440 reported by Yuan Qi
10
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Note, although this report is for a d-i daily build, I have observed exactly the same
problems with the ubuntu installer. Since ubuntu installer is based on d-i and use
partman, the following descriptions should also apply to it.

Package: installation-reports

Debian-installer-version: 2004-10-23 build, sarge-i386-netinst.iso from
cdimage.debian.org
uname -a:
Date: 2004-10-23
Method: Booted from CD-ROM using netinst image (daily built)

Machine: Custom built
Processor: AMD-K6(tm) 3D processor (K6II 500MHz)
Memory: 62560 kB
Root Device: IDE, WDC WD102AA-00BAA0
Root Size/partition table: Not detected properly by partman. The actual partition table
is

Primary FAT32 2.02GB
Primary FAT16 15.6MB
Extended
    Logical FAT32 4.76GB
    Logical FAT32 2.70GB

Output of lspci and lspci -n:

Base System Installation Checklist:
[O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it

Initial boot worked: [O]
Configure network HW: [O]
Config network: [O]
Detect CD: [O]*
Load installer modules: [O]
Detect hard drives: [E]**
Partition hard drives: [ ]
Create file systems: [ ]
Mount partitions: [ ]
Install base system: [ ]
Install boot loader: [ ]
Reboot: [ ]

*I have two CD-ROM drives. When I load the d-i CD into the second CD-ROM drive (IDE
secondary master) and leave another CD in the first CD-ROM drive (IDE primary slave), d-
i fails to detect the CD in the second CD-ROM drive until the CD in the first CD-ROM
drive has been removed.

**Although the hard drive was successfully detected, the partitions were not correctly
detected. See comments for more details

Comments/Problems:

It seems partman is not able to detect my partitions properly. Instead of showing the 4
partitions as outlined above, it only shows one FAT16 partition covering the whole
harddrive (10.3GB), which is strange.

I used PartitionMagic 8.0 to partition my hard drive and resize my partitions. I don't
believe this program is in conflict with (at least previous versions of) d-i, since I
had successfully installed d-i beta4 base system on my computer and I used the resize
function to resize my partitions beforehand. I also used GoBack 3.0 and I was able to
install d-i base system beta4 when it's disabled (I have uninstalled the program since
then, so it shouldn't not be a problem now).

I also observed the same problem with d-i prerc2 so this doesn't seem to be a temporary
problem with a particular daily build, but rather a general problem.

I also have the debug reports.

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

Created an attachment (id=599)
Installer debug logs

Revision history for this message
Sander (sander----) wrote :

I've had the exact same problem with the 4.10 release. My details:

Machine: Custom built
Processor: AMD Athlon 800mhz
Memory: 786 mb
Root Device: IDE, Maxtor 53074H4 (30gb)
Root Size/partition table: Not detected properly by partman. The actual
partition table
is

Primary FAT32 502MB
Primary Unallocated (but also tested with ext3 partition)
Extended
    Logical NTFS 8.20GB
    Logical Unallocated (but also tested with linux swap)
    Logical FAT32 16.73GB

cfdisk correctly sees the partition table, partman doesn't. partman sees one big
30gb fat16 partition.
My disk was also (re)partitioned with partition magic 8.0 from a dos boot cd.

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

Can you run parted on the disk, use the 'p' command to print parted's idea of
the partition table, and show us the result?

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

I booted from Warty live CD (Final version) and the kernel was able to detect
all partitions properly. I was able to mount all my partitions in -rw without
any problems.

Here is the partition table given by fdisk:

Disk /dev/hda: 10.2 GB, 10262568960 bytes
255 heads, 63 sectors/track, 1247 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/hda1 * 1 266 2136613+ b W95 FAT32
/dev/hda2 269 1247 7863817+ f W95 Ext'd (LBA)
/dev/hda3 267 268 16065 6 FAT16
/dev/hda5 269 892 5012248+ b W95 FAT32
/dev/hda6 893 1247 2851506 b W95 FAT32

Partition table entries are not in disk order

And this is the correct partition table

With parted however, I got this:

Disk geometry for /dev/hda: 0.000-9787.148 megabytes
Disk label type: loop
Minor Start End Filesystem Flags
1 0.000 9787.148 fat16

Which is incorrect.

Thus one can conclude that the problem with partman lies in libparted.

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

One more thing, when I used parted and selected /dev/hda1 (or any partitions for
that matter), I get this:

Disk geometry for /dev/hda1: 0.000-2086.536 megabytes
Disk label type: loop
Minor Start End Filesystem Flags
1 0.000 2086.536 fat32

If you refer to the partition table produced by fdisk (ie. the correct one), you
would know that /dev/hda1 is indeed a 2GB fat32 partition, so parted is having
no troubles detecting the size and type of the partition. Yet, it did not show
the boot flag on the partition.

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

A user from Debian pointed me to this bug: http://bugs.debian.org/259248. He
told me it seems the bug is fixed in version 1.6.9-3.2 of parted. It seems this
is due to an incompatibility with Smart Boot Manager (btmgr.sf.net), which I
use. Please fix this problem by updating to the latest version of parted and
maybe release a revised CD image for users who are using Smart Boot Manager. Thanks.

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

(In reply to comment #6)
> A user from Debian pointed me to this bug: http://bugs.debian.org/259248. He
> told me it seems the bug is fixed in version 1.6.9-3.2 of parted. It seems this
> is due to an incompatibility with Smart Boot Manager (btmgr.sf.net), which I
> use. Please fix this problem by updating to the latest version of parted and
> maybe release a revised CD image for users who are using Smart Boot Manager.
Thanks.

Thanks for the pointer. in this case, the bug is already fixed in Hoary, which
has parted 1.6.11-8.

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

After trying out the newly released Debian installer RC2 (Nov.22.04), I
encountered a new bug with libparted. Although my partitions are detected
properly now, when I try to resize the partition, partman always displays a
dialogue with the following string: "??? ???". Can you do an extensive test of
partman on a machine with Smart Boot Manager (btmgr.sf.net)? Apparantly
libparted has several issues with it.

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

A few bits of extra information:
- The version of parted included in d-i RC2 is parted 1.6.11
- The CD-ROM was checked and it is valid
- When I tried to check my 2nd partition (the 16mb FAT16 partition) in parted,
it gives off an error message saying that I have encountered a bug in parted
- Since this error is due to a standard behaviour on Smart Boot Manager's part,
maybe we should detect it and offer to fix up the partition table instead of
trying to patch parted so that it supports this hack

Thanks.

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

(In reply to comment #9)
> A few bits of extra information:
> - The version of parted included in d-i RC2 is parted 1.6.11
> - The CD-ROM was checked and it is valid
> - When I tried to check my 2nd partition (the 16mb FAT16 partition) in parted,
> it gives off an error message saying that I have encountered a bug in parted
> - Since this error is due to a standard behaviour on Smart Boot Manager's part,
> maybe we should detect it and offer to fix up the partition table instead of
> trying to patch parted so that it supports this hack
>
> Thanks.

Sorry, I meant "non-standard" behaviour

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

(In reply to comment #9)
> - Since this error is due to a standard behaviour on Smart Boot Manager's part,
> maybe we should detect it and offer to fix up the partition table instead of
> trying to patch parted so that it supports this hack

Do you know what the (non-standard) behaviour is which triggers this problem?

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

This is what I learned from this debian installer bug
(http://bugs.debian.org/259248):

"From the partition table dump in 258889, the loader for Smart
BootManager[1] is installed. The loader contains "FAT" at 0x36,
so libparted thinks that there is a FAT file system. The attached
patch makes it check for the loader signature, "SBML" at 0x40, and
continue instead."

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

I also found this on redhat bugzilla, which further describes the "non-standard"
behaviour:

"This is SBM's fault. not a bug of Phoebe installer nor GNU parted.
SBM incorrectly put a fat filesystem signature, "FAT12" in offset 0x36
bytes from beginning of disk.
So, GNU parted will think this is a raw FAT filesystem.
I tried to clear from offset 0x36 to 0x3a with SPACE code, 0x20.
Then, I can successfully install Phoebe."

Here is the link to that bug report:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=85631

If you need even more information, I suggest that you download SBM from
btmgr.sf.net and install it on a test machine.

Revision history for this message
Colin Watson (cjwatson) wrote :

Oi, give me that bug back! :-)

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

After uninstalling smart boot manager, I installed windows 200 and formatted the
first partition on my hard drive to ntfs. This time, partman detected a single
10.3 GB NTFS partition instead. Note that uninstalling SBM does not remove the
non-standard signature it writes to the partition table. Tested the new Hoary
Array 3 CD.

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

If this bug is indeed the same as #259248 in Debian, it should have been fixed
in array 3 (parted 1.6.20-0.exp.2ubuntu1)

parted (1.6.18-0.exp.1) experimental; urgency=low
[...]
    - MS-DOS disk label detection when Smart BootManager is installed fix by
      Matt Kraai (Bug #259248).

I'm not sure that I am interpreting your last comment correctly, though. Is the
problem fixed for you, or not?

Revision history for this message
Yuan Qi (ubuntubugs-3-maxchee) wrote :

Baiscally, I used win2k's conversion program to convert the first FAT32
partition to NTFS. However, ubuntu's installer now detects a NTFS partition the
size of my whole hard drive. So no, the problem is NOT fixed.

Revision history for this message
KarlGoetz (kgoetz) wrote :

Hi,
This bug has been silent over a year. Yuan, is it still not fixed? Colin, should it have been fixed?
if its dealt with, please close this bug.
Thanks.

Revision history for this message
Colin Watson (cjwatson) wrote :

There is no clear indication that the problem has been fixed, so it should not be closed. That said, it has morphed quite some way from the original bug; it might have been helpful for Yuan to file a new bug each time he encountered a new problem ...

A developer needs to find time to test with SBM.

Revision history for this message
Ari (ari-reads) wrote :

I've also run into problems with the installer not detecting existing partitions (both ntfs and ext3) with Dapper, all Edgy knots and Beta1; I have no idea what SBM is though. I filed a Bug #60639

Colin Watson (cjwatson)
Changed in parted:
assignee: kamion → nobody
Revision history for this message
Paul Dufresne (paulduf) wrote :

This page let's you download a Smart Boot Manager floppy:
http://linux.simple.be/tools/sbm

This seems to be a relatively old SourceForge project:
http://sourceforge.net/projects/btmgr/
(Last file, date from feb, 2001, and there is a message dating 2005, asking for someone to take the project, with no response).

Revision history for this message
jhellen (jukka-hellen) wrote :

I can confirm that this is a pain in the b...

I have a hardrive I used to use in Dapper and I was going to use that as "slave" in my fresh install of Edgy. This was all ext3 formatted and had a couple of partitions in it. Now I installed Edgy to a new drive that I connected as "master". The "slave" drive is seen in Edgy but everything is "unallocated" which isn't really nice because I have a lot of pictures on it.

I didn't have the "slave" drive connected at install and there may have been some partitions with some other distro on it.

I remember I had this same problem when I installed Dapper. It couldn't find my ext3 partitions on the second drive so thats why I'm having this kind of chaotic drives with too many partitions.

Revision history for this message
jhellen (jukka-hellen) wrote :

fdisk and testdisk seems to find those overlapping partitions and I read that testdisk could fix that "unallocated" problem but I haven't managed to do it yet.

Revision history for this message
wadpro (wadpro) wrote :

I have the same problem here!

I tried to install Kubuntu from boot but installation CD doesnt see my partitions, then I try to install it from Desktop as a live cd but it freezes!!!

AMD Turion 64 X2 1.6 processor and Fujitsu 5400 RPM HD...

I cant install Kubuntu!!!! This release is still beta!!!

Revision history for this message
Colin Watson (cjwatson) wrote :

I'm pretty sure that this was the same as bug 232175, fixed in Ubuntu 8.04.1 and 8.10.

If anyone is still encountering the same problem with those releases (not the original Ubuntu 8.04 or older), then please file a *new* bug and attach the output of the following command to give me a dump of your boot sector:

  sudo od -tx1 -Ax -N512 /dev/sda

(If the disk is called something other than /dev/sda, then use that instead, of course.)

Revision history for this message
JONTY (jonty99) wrote :

these bugs have always made things harder for us, the only thing left to do <a href="https://sites.google.com/view/write-for-us-internet/home">write for us + software</a> is to learn more about them and eliminate all the problems that come before us.

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.