Xubuntu Hardy live installer doesn't detect HDD partitions

Bug #209974 reported by flowbot
32
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

I recently burnt the Xubuntu Hardy Heron Live CD Beta to install it to my Inspiron 1420 laptop, which is currently running Xubuntu Gutsy Gibbon and also has Windows Vista on another partition. When I try to install Hardy with Ubiquity (or even with the new option to install straight away without booting to live cd), I get to the partitioning part and choose "manual". However, the partitioner does not detect any of my existing partitions and only detects my entire hard drive as "unallocated". Needless to say, I sure don't want to delete my existing partitions, as I have a seperate /home partition containing all my data.

Here is my partition setup:

[code]
shayne@shayne-laptop:~$ sudo fdisk -l
[sudo] password for shayne:

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0000000

   Device Boot Start End Blocks Id System
/dev/sda1 14267 14594 2620416 c W95 FAT32 (LBA)
/dev/sda2 * 10 1315 10485760 7 HPFS/NTFS
/dev/sda3 1315 4962 29296875 7 HPFS/NTFS
/dev/sda4 4963 14594 77362032+ f W95 Ext'd (LBA)
/dev/sda5 14267 14594 2620416 dd Unknown
/dev/sda6 * 4963 6178 9767488+ 83 Linux
/dev/sda7 14145 14266 979933+ 82 Linux swap / Solaris
/dev/sda8 6179 14144 63986863+ 83 Linux

Partition table entries are not in disk order
[/code]

It looks like it could be related to some of these bugs from previous releases:

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/174669
https://bugs.launchpad.net/ubuntu/+bug/108804
https://answers.launchpad.net/ubuntu/+question/5370

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

It seems that libparted dislikes your partition table despite fdisk being happy with it. I've gone through those other bugs and there are no obvious clues that would allow me to diagnose this in any more detail; however, since you reported this so recently, you can probably still reproduce it and get me log files that could help.

Could you please reproduce this bug and then, without rebooting out of the live CD environment, attach /var/log/syslog and /var/log/partman to this bug, following the directions in http://wiki.ubuntu.com/DebuggingUbiquity/AttachingLogs? Thanks in advance.

Changed in ubiquity:
assignee: nobody → kamion
status: New → Incomplete
importance: Undecided → High
Revision history for this message
flowbot (flowbot) wrote :

Unfortunately I backed up all my data and reformatted my HDD, so I can't reproduce this atm ... I'm about to install Xubuntu on a similar system though, so maybe i'll run into similar difficulties there ... if so, I'll be sure to attach the logs you requested.

Revision history for this message
titi4u (titi4u) wrote :

Hello,
I have exactly the same problem as described by flowbot !!!
Fdisk sees the partitions, but qparted just sees an empty hard drive, so I can't make a fresh install of ubuntu 8.04 !!!
I've attached the logs.
Thank you for your help.

Revision history for this message
titi4u (titi4u) wrote :
Revision history for this message
titi4u (titi4u) wrote :
Changed in parted:
status: Incomplete → New
Revision history for this message
arminbw (mail-arminbwagner) wrote :

I did have similar looking problems while installing ubuntu 8.04 using Ubiquity.

I did have a second "primary" partition after my extended partition which caused the "wrong" disk order.

More details are available here: http://ubuntuforums.org/showthread.php?t=766355

And just as a comment. Gparted bug 337244: http://bugzilla.gnome.org/show_bug.cgi?id=337244

Revision history for this message
t93 (edward-e-ferguson) wrote :

I am unable to use the Hardy alternate install CD because manual partitioning does recognize the partitions that are already on my hard drive and treats that drive as a single FAT partition.

Fdisk correctly shows the partitions that I am currently using on my drive to run Gutsy and other systems:

$ sudo fdisk -lu

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00014061

   Device Boot Start End Blocks Id System
/dev/hda1 * 63 24579449 12289693+ c W95 FAT32 (LBA)
/dev/hda2 24579450 34346969 4883760 83 Linux
/dev/hda3 34346970 44114489 4883760 83 Linux
/dev/hda4 44114490 234436544 95161027+ 5 Extended
/dev/hda5 44114553 45110519 497983+ 82 Linux swap / Solaris
/dev/hda6 45110583 103699574 29294496 83 Linux
/dev/hda7 103699638 105659504 979933+ 83 Linux
/dev/hda8 105659568 107619434 979933+ 83 Linux
/dev/hda9 107619498 109579364 979933+ 83 Linux
/dev/hda10 109579428 111539294 979933+ 83 Linux
/dev/hda11 111539358 234436544 61448593+ 8e Linux LVM

Note that the partitions are in ascending sector order and that none overlap.

For some reason, parted (executed by the installer and under Gutsy) thinks that the disk has a "loop" label, which the parted documentation describes as "a fake disk label, that tells Parted to treat the virtual device as a single file system. With this fake disk label, there is either zero or one partition."

$ parted -v
GNU Parted 1.7.1
$ sudo parted /dev/hda unit chs print

Disk /dev/hda: 14593,80,62
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 14593,255,63. Each cylinder is 8225kB.
Partition Table: loop

Number Start End File system Flags
 1 0,0,0 14593,80,62 fat32

Thus the erroneous loop disk label seems to be causing the parted problems that prevent me from installing Hardy.

Revision history for this message
Drone4four (drone4four) wrote :

TestDisk doesn't recognize any problems now and gparted and ubiquity still recognize nothing. I have been without Ubuntu now for days. This is really frustrating for me. =/

Like arminbw pointed out, here is my forum thread in which I am waiting for someone to post a work around: http://ubuntuforums.org/showthread.php?t=766355

Revision history for this message
arminbw (mail-arminbwagner) wrote :
Revision history for this message
Drone4four (drone4four) wrote :

calc, in #ubuntu-bugs,refering to this bug report said that, "colin watson or evan d is the most likely person to be able to fix it." On irc, apparently colin is known as "cjwatson" and evan is known as "evand." calc said that I could message the two developers. calc also said that I could test their custom spin before the fix is made to the 8.04.1 release.

One more thing: The partition program used for the Anaconda installer for Fedora 8 and Fedora 9 preview release didn't detect any partitions.

Therefore, here is a list of apps that do NOT recognize my partitions:
+ Ubiquity
+ Partition Magic 8.0
+ GParted
+ Fedora 8 + 9 Anaconda installer

Here is a list of apps that DO recognize all my partitions:
+ Slackware 12 installer
+ fdisk -l
+ Nautilus (or what ever automatically mounts the hard discs in the Hardy Ubuntu LiveCD
+ Windows XP
+ TestDisk

btw: good research arminbw. =D It appears as though this bug has been around since 2004. Let's squash it once and for all.

Revision history for this message
t93 (edward-e-ferguson) wrote :

Recall that parted was detecting my disk label as type "loop" instead
of "msdos" and, as a consequence, treating my hard drive as a single
partition:

https://bugs.launchpad.net/ubuntu/+source/parted/+bug/209974/comments/7

I have found a way to work around this problem in my case that I will
describe in case others are having the same problem.

The file parted-1.7.1/libparted/labels/dos.c is apparently the one
that tests a disk label to see if it is of type "msdos." It contains
the test:

 /* if this is a FAT fs, fail here. Note that the Smart Boot Manager
  * Loader (SBML) signature indicates a partition table, not a file
  * system.
  */
 if ((!strncmp (part_table.boot_code + 0x36, "FAT", 3)
     && strncmp (part_table.boot_code + 0x40, "SBML", 4) != 0)
     || !strncmp (part_table.boot_code + 0x52, "FAT", 3))
  return 0;

which says that a label is NOT of type "msdos" if the label contains the
string "FAT" at offset 0x36 (but not "SMBL" at 0x40) or the string "FAT"
at offset 0x52.

When I dumped the first sector of my hard drive:

sudo dd if=/dev/hdb of=mbr bs=512 count=1 ; od -Ax -t x1z mbr | head
000000 eb 5e 80 05 20 39 ff ff 00 00 00 00 02 10 5f 00 >.^.. 9........_.<
000010 02 00 00 00 00 f8 00 00 3f 00 ff 00 00 00 00 00 >........?.......<
000020 7a 0d 77 01 dc 2e 00 00 00 00 00 00 02 00 00 00 >z.w.............<
000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
000040 80 00 29 de 14 4d 3f 4e 4f 20 4e 41 4d 45 20 20 >..)..M?NO NAME <
000050 20 20 46 41 54 33 32 20 20 20 00 00 00 00 00 00 > FAT32 ......<
000060 e8 00 00 5b 81 eb 63 00 c1 eb 04 8c c8 01 c3 8e >...[..c.........<
000070 db 53 6a 75 cb f6 06 02 00 04 74 0f 31 c0 8e c0 >.Sju......t.1...<
000080 bf fc 05 66 b8 44 55 43 45 66 ab 68 00 20 17 bc >...f.DUCEf.h. ..<
000090 00 90 31 c9 51 ba 80 00 b4 08 e8 d8 00 58 16 07 >..1.Q........X..<

I found "FAT" at offset 0x52. (This explains why the disk label was not
classified as "msdos". I have been unable to explain why the label was
classified as "loop".)

I used hexedit to change offset 0x52 from 0x46 to 0x66 so the string
became "fAT" instead of "FAT". Thereafter parted started recognizing
my disk label as "msdos" and could see all of my partitions. I was
able to complete a Ubuntu installation on my hard drive.

I do not know the source of "FAT" at offset 0x52 of my disk label. It
does not appear to have been placed there by bootlace.com from the
grub4dos package

http://download.gna.org/grub4dos/grub4dos-0.4.3-2008-03-14.zip

which I used to install my boot loader. I have attached a copy of the
first sector of my disk in case it would be useful to the developers.

In summary, there is an inconsistency between the way fdisk and parted
treat some disks with "msdos" labels. If your hard drive has multiple
partitions when viewed by fdisk but only one partition when viewed by
parted (which may be of type "loop"), dump the first sector of the
drive to see if it contains "FAT" at offset 0x52 or 0x36. If you find
"FAT" at one of those locations, changing it may fix your problem.

USE THIS ADVICE AT YOUR OWN RISK; I AM NOT RESPONSIBLE IF YOU DESTROY
THE INFORMATION ON YOUR DISK.

Revision history for this message
dmsuperman (dmsuperman) wrote :

I'd like to add that I have this issue as well (not necessarily with the Xubuntu disc, but both the LiveCD and Alternate install CD for Ubuntu Hardy Heron have this issue).

I have 2 SATA drives, a 400GB with a single NTFS partition, and a 320GB one. The 320GB has:
75GB NTFS
20GB EXT3
4GB Swap
200GB EXT3

The second partition (the first EXT3 one) is where my Ubuntu currently resides. However, when I load up either installer, it only detects that I have the first drive, with a single NTFS partition on it (the 400GB one) and my second drive shows 0 partitions, only the option to create a new partition table.

I'd say this is a pretty serious bug, as it prevents me (and others) from installing Ubuntu 8.04 period. As a workaround, I'm going to install 7.10, and upgrade in place, but I always have felt uneasy about an in place upgrade, preferring instead to do a fresh install.

Revision history for this message
dmsuperman (dmsuperman) wrote :

Sorry, I forgot to note: fdisk -l also does show all the partitions as they should be, and they obviously exist because I can boot to them right now. It's only the installer that cannot pick them up.

Revision history for this message
wzd (waynedensmore) wrote :

Strangely enough, there is some code in grub4dos that does that: http://svn.gna.org/svn/grub4dos/trunk/stage2/grldrstart.S:

. = Entry_32 + 0x47

 .ascii "NO NAME " /* volume label, 11 bytes. */

 . = Entry_32 + 0x52

 .ascii "FAT32 " /* filesystem ID, 8 bytes. */

Looks like it is trying to populate a volume label and sticking that stuff in the MBR for some strange reason....

Revision history for this message
dmsuperman (dmsuperman) wrote :

I want to add notes.

It's independent of distro, my working 7.10 disc had the same issue
Affects live and alternate
fdisk -l from install tty works properly

My fix!
Adding a few mb unallocated space between partitions fixed it
I believe it's to do with somehow overlapping partitions

Revision history for this message
Drone4four (drone4four) wrote :

dmsuperman: how exactly did you add a few mb of unallocated space between partitions? fdisk can't perform those tasks and GParted and Partition Magic only see unallocated space?

Revision history for this message
dmsuperman (dmsuperman) wrote :

I used my favorite tool, Acronis Disk Director Suite.

Revision history for this message
DavidN (david-nash) wrote :

Have to agree with you dmsuperman ...
PROBLEM: - the overlapping partitions seems to be the problem. However mine went wobbly with the 'simple' trial installation of windoze(xp). I should have had a clue when it blue-screened me twice. With only that ONE partition overlap, it threw everything off so Ubuntu's PartEd would not show any partitions on my drive (I have quite a few).
SOLUTION: - TestDisk to the rescue (again!-brilliant little program) ... I decided to delete the partion (it was a fresh install so I lost nothing). Another possibility would have been to shrink the windoze partition creating a gap between it an the next partition, if there is some software that could correctly recognise it and work with it.
After that one deletion, I'm in Ubuntu with PartEd fully recognising all the remaining partitions, and ready to roar! (and I didn't have to create spaces between them all).

Revision history for this message
Yotam Medini (yotam-medini-gmail) wrote :
Gabriel Ruiz (anakron)
Changed in parted:
status: New → Confirmed
Revision history for this message
Bullet (sswarnendu) wrote :

hello,
i have a similar looking problem while installing from the ubuntu 8.04 hardy heron 64 bit live cd...on the manual partitioning step........nothing is detected.......i've already lauched a bug(bug no:244375) reporting this......feisty fawn detects every partition.......plz help

Revision history for this message
Wicked (livewickedly) wrote :

I am having this problem as well. The disks partitions were setup with Ubuntu 8.04 gParted, so I am not quite certain how Xubuntu can not read the partitions. (I did notice a line in the syslog about the sd driver needing to be updating "Sep 17 00:23:07 ubuntu kernel: [ 78.961984] Driver 'sd' needs updating - please use bus_type methods" I don't know if this is a help.) I have booted Ubuntu 8.04 and it can see the partitions fine. I will attach my Ubuntu syslog and partlog after I try deleting the partition I was going to reinstall to and see if that is a work around.

As mentioned several times fdisk can see the partitions fine.

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x02550255

   Device Boot Start End Blocks Id System
/dev/sda1 4983 6256 10233405 83 Linux
/dev/sda2 * 1 19457 156288289+ 5 Extended
/dev/sda5 1 249 1999998 82 Linux swap / Solaris
/dev/sda6 250 2550 18482751 83 Linux
/dev/sda7 2551 3766 9767488+ 83 Linux
/dev/sda8 3767 4982 9767488+ 83 Linux
/dev/sda9 6257 19457 106037001 83 Linux

Partition table entries are not in disk order

Revision history for this message
Wicked (livewickedly) wrote :

partman log on Xubuntu 8.04

Revision history for this message
Wicked (livewickedly) wrote :

I can confirm that deleting the partition I was going to install Xubuntu to solved the problem.

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

This patch may have fixed it:

parted (1.7.1-5.1ubuntu10) intrepid; urgency=low

  * fat-partition-table.dpatch: Instead of checking for FAT file system
    signatures (which has false positives), check whether the boot indicator
    on each partition is 0 or 0x80 (LP: #232175). This matches the behaviour
    of both the Linux kernel and fdisk.

 -- Colin Watson <email address hidden> Thu, 29 May 2008 12:09:09 +0100

It should certainly deal with t93's problem, but I can't say for sure whether that was the same as flowbot's (the original reporter of this bug). flowbot, could you try the Intrepid beta? If that doesn't work, could you please post the output of 'sudo od -Ax -tx1 -N512 /dev/sda'?

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

Ah, I remember now that flowbot said he couldn't reproduce this any more.

I'm going to hope that this has been dealt with by the fix for bug 232175 and close this bug. If any of you folks can still reproduce it with Intrepid, I'd really appreciate it if you could each, *separately*, file a new bug rather than continuing with this one. It's quite possible that you're all experiencing things that are really separate bugs deep down even though they have similar symptoms, and it doesn't really help me to have them all stuck together in the same bug report.

If you find that this is still a problem for you in Intrepid, then please include the output of 'sudo od -Ax -tx1 -N512 /dev/sda' as I mentioned before (replacing /dev/sda with /dev/sdb or whatever if your hard disk is called by a different device name). This dumps the contents of your partition table in such a way that I should be able to feed it back to parted on my system and reproduce your problem.

Changed in parted:
status: Confirmed → Fix Released
Revision history for this message
titi4u (titi4u) wrote :

I tried Ubuntu 8.10, and I managed to install it !
But before, I had to delete linux partitions (but not my FAT and NTFS partitions), using fdisk, and recreate them, because the partitioner didn't detect any existing partitions. Did the problem come from the linux partitions ? I don't know, but I hope I won't have this problem again in the future :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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