Installer fails to format partition

Bug #365702 reported by Octavian Voicu
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by thermoman

Bug Description

Binary package hint: ubiquity

**************************************
EDIT marcel: Please read comment #4
**************************************

I booted from the newly released Kubuntu 9.04 Desktop amd64 iso and chose the install option.
When asked about partitions, I chose the manual / advanced option.

I have a scsi drive and I already had 2 ntfs partitions (sda1 and sda5) + 20 gb free space at the end.
I made two more partitions in the free space, sda6 as ext4 and sda7 as swap (2gb) and I chose to format the ext4 partition.

After hitting next, the installer worked a bit then told me it can't format the ext4 partition and jumped back to the time zone selection page.

Tried again (partitions sda6 & sda7 were already there this time) and got the same error.
Extract from /var/log/messages:

Apr 23 20:12:54 ubuntu ubiquity[9388]: switched to page stepReady
Apr 23 20:13:20 ubuntu kernel: [ 2029.196034] CE: hpet increasing min_delta_ns to 15000 nsec
Apr 23 20:13:47 ubuntu ubiquity[9388]: Step_before = stepReady
Apr 23 20:13:47 ubuntu ubiquity[9388]: progress_loop()
Apr 23 20:13:49 ubuntu partman: mke2fs 1.41.4 (27-Jan-2009)
Apr 23 20:13:49 ubuntu partman: Could not stat /dev/sda6 --- No such file or directory
Apr 23 20:13:49 ubuntu partman:
Apr 23 20:13:49 ubuntu partman: The device apparently does not exist; did you specify it correctly?
Apr 23 20:14:30 ubuntu ubiquity[9388]: switched to page stepPartAdvanced
Apr 23 20:14:31 ubuntu ubiquity[9388]: switched to page stepLocation
Apr 23 20:14:36 ubuntu ubiquity[9388]: Step_before = stepLocation
Apr 23 20:14:37 ubuntu ubiquity[9388]: log-output -t ubiquity setxkbmap -model pc105 -layout us -variant altgr-intl -option
Apr 23 20:14:37 ubuntu ubiquity[9388]: switched to page stepKeyboardConf

I managed to complete the installation by manually creating devices /dev/sda6 and /dev/sda7 before hitting next (I checked and I only had /dev/sda /dev/sda1 /dev/sda2 /dev/sda5, sda2 being the logical partition windows makes):
mknod /dev/sda6 b 8 6
mknod /dev/sda7 b 8 7

I am guessing the installer won't automatically create the device files in /dev after creating the partitions, so it can't format them.

Revision history for this message
Evan (ev) wrote :

Please run the installer again in debug mode (`ubiquity -d` from a terminal window) and attach /var/log/syslog, /var/log/partman, and /var/log/installer/debug. We'll need the partman log file to get a better idea of what's going wrong, as the device nodes are created independent of the installer, so the bug is likely to be higher up than that.

Thanks!

Changed in ubiquity (Ubuntu):
status: New → Incomplete
Revision history for this message
Octavian Voicu (octavian-voicu) wrote :

I tried to run the installer in debug mode and reproduce the problem but looks like this time it worked (conditions were not identical, but I thought the bug would show up again; guess the problem is a bit more complex).

Revision history for this message
Evan (ev) wrote :

I'm marking this as invalid as the reporter is unable to reproduce the bug and there's unfortunately not enough here to debug the problem. If you are able to reproduce this bug in the future, please file a new bug or feel free to reopen this one.

Thanks!

Changed in ubiquity (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
thermoman (thermoman) wrote :

This bug is NOT invalid - please reopen.

I have the same issue on Lenovo Ideapad S10e not being able to install Ubuntu 9.04 Netbook Remix.

Partition table as shown in text console #2 when installer started up:

> 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: 0xe41dfeb7

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 3004 24121597 7 HPFS/NTFS
/dev/sda2 3004 19457 132165700+ 5 Extended
/dev/sda5 3004 5615 20979835 83 Linux
/dev/sda6 5616 6008 3156741 82 Linux swap / Solaris
/dev/sda7 6009 19457 108029061 83 Linux

> ls -l /dev/sda*
brw-rw---- 1 root disk 8, 0 2009-10-25 15:47 /dev/sda
brw-rw---- 1 root disk 8, 1 2009-10-25 15:47 /dev/sda1
brw-rw---- 1 root disk 8, 2 2009-10-25 15:47 /dev/sda2
brw-rw---- 1 root disk 8, 5 2009-10-25 15:47 /dev/sda5
brw-rw---- 1 root disk 8, 6 2009-10-25 15:47 /dev/sda6
brw-rw---- 1 root disk 8, 7 2009-10-25 15:47 /dev/sda7

I chose manual partition and set

  /dev/sda5: ext3, format yes, mount point /
  /dev/sda7: ext3, format yes, mount point /home

*********************
In Summary page before hitting the "install" button it says (translated from german to english):

  Partition table of the following devices was changed:
   SCSI3 (0,0,0) (sda)

Thats WRONG - i did NOT change any partition table in the installer - i just selected existing partitions to be formatted.
I didn't create partitions, i didn't delete partitions, i didn't resize existing partitions.

So the installer should not - i repeat, NOT - change anything at all regarding the existing partition table!
*********************

What now happens affter hitting "install" button:

The installer deletes some partitons and creates them again (WTF?) and then tells the kernel to reread the partition table
of /dev/sda - which FAILS:

> ls -l /dev/sda*
brw-rw---- 1 root disk 8, 0 2009-10-25 16:12 /dev/sda
brw-rw---- 1 root disk 8, 1 2009-10-25 16:12 /dev/sda1
brw-rw---- 1 root disk 8, 2 2009-10-25 16:12 /dev/sda2

> 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: 0xe41dfeb7

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 3004 24121597 7 HPFS/NTFS
/dev/sda2 3004 19457 132165700+ 5 Extended
/dev/sda5 3004 5615 20979835 83 Linux
/dev/sda6 5616 6008 3156741 82 Linux swap / Solaris
/dev/sda7 6009 19457 108029061 83 Linux

The installer does notice that something went wrong:

  Error informing the kernel about modofications to partition /dev/sda5 -- Device or resource busy ...

I hit button "Ignore".

Next thing error message appears, telling me mkfs on /dev/sda5 went wrong - no wonder since device file /dev/sda5 does not exist...

Please fix the installers partition module.

Marcel.

Revision history for this message
thermoman (thermoman) wrote :

/var/log/installer/debug

Revision history for this message
thermoman (thermoman) wrote :

/var/log/partman

Revision history for this message
thermoman (thermoman) wrote :

/var/log/syslog

Changed in ubiquity (Ubuntu):
status: Invalid → New
thermoman (thermoman)
description: updated
Revision history for this message
thermoman (thermoman) wrote :

Also affects Ubuntu 9.10 Netbook Remix - can't install from USB, same issue.

Revision history for this message
thermoman (thermoman) wrote :

Found the problem:

Ubuntu installer mounts any existing swap partition upon boot - in my case /dev/sda6.

The active swap partition prevents the kernel from rereading the partition table after the installer modified it.

Workaround:

Before starting installation change to text console via ALT+CTRL+F2 and type in:

sudo bash
swapoff -a

Change back to the installer via ALT+CTRL+F7 and continue installation.

Suggested fix:

Deactivate all active swap partitions before manipulating the partition table.

BUT: the main problem remains: the installer should not make changed to the partition table in the first place if i don't change any partitions as explained above in comment #4

Ubuntu 9.10 Netbook Remix installing right now...

Revision history for this message
jwakeman (joe-wakeman) wrote :

I ran into this same exact issue and thermoman's workaround worked like a charm. All i wanted to do was manually create my partition layout using systemrescuecd and fdisk, then install ubuntu on the partition i had created specifically for it. When tried to install on the selected partition the same failure described by thermoman was encountered. I then spent several hours trying all types of ridiculousness before i came across thermoman's workaround. Went back to my original partition setup, did the "swapoff thing" and the install worked fine.

tags: added: ubiquity-1.12.12
tags: added: jaunty
Revision history for this message
Phillip Susi (psusi) wrote :

This was fixed some time ago in parted: it no longer fails to update the partition table when another partition is in use.

Changed in ubiquity (Ubuntu):
status: New → 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.