Installer fails to remove old partitions

Bug #1768617 reported by Diego Reyes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
High
Unassigned
subiquity
Invalid
Undecided
Unassigned

Bug Description

When installing Ubuntu 18.04-server over an old installation, after selecting/confirming 'whole disk' the installer fails to remove the old partitions and aborts the process.
Tested on two different machines both with previous Ubuntu 16.04 installations.
One workaround is to write zeros to the beginning of the target disk.

Tags: bionic

Related branches

Revision history for this message
Adam Conrad (adconrad) wrote :

Which installer ISO did you use? Was this with the new one (named "live-server") or the old style (just "server")?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

if this was a live-server install, would it be possible to see the contents of the /var/log/installer directory from the live session?

Revision history for this message
Diego Reyes (dmrq70) wrote :

The iso I used is this one:

0b3490de9839c3918e35f01aa8a05c9ae286fc94 *ubuntu-18.04-live-server-amd64.iso

I don't remember seeing the option to boot to a live desktop, so I didn't know how to extract any logs.
I could reproduce it with a VM (Virtualbox on ubuntu), but only when installing 18.04 over a 16.04. If the previous installation was 17.x-desktop, the error didn't show.
I'm attaching a tar with all that's in /var/log, the error I see while installing appears in /var/log/curtin/install.log.
Let me know if I can help.

Adam Conrad (adconrad)
affects: debian-installer (Ubuntu) → subiquity
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Adding curtin to the report as this *looks* like a curtin bug to me on first sight but I might be missing something.

Revision history for this message
Scott Moser (smoser) wrote :

Based on Michael's mention of 'extended partitions', this could
possibly be fixed by
 https://code.launchpad.net/~raharper/curtin/+git/curtin/+merge/345361

Revision history for this message
Ryan Harper (raharper) wrote :

From the install.log

Current device storage tree:
sda
|-- sda2
|-- sda5
| |-- dm-1
| `-- dm-0
`-- sda1

...

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/curtin/commands/main.py", line 201, in main
    ret = args.func(args)
  File "/usr/lib/python3/dist-packages/curtin/commands/block_meta.py", line 52, in block_meta
    meta_custom(args)
  File "/usr/lib/python3/dist-packages/curtin/commands/block_meta.py", line 1374, in meta_custom
    clear_holders.clear_holders(disk_paths)
  File "/usr/lib/python3/dist-packages/curtin/block/clear_holders.py", line 552, in clear_holders
    shutdown_function(dev_info['device'])
  File "/usr/lib/python3/dist-packages/curtin/block/clear_holders.py", line 247, in wipe_superblock
    if block.is_extended_partition(blockdev):
  File "/usr/lib/python3/dist-packages/curtin/block/__init__.py", line 789, in is_extended_partition
    check_dos_signature(device))
  File "/usr/lib/python3/dist-packages/curtin/block/__init__.py", line 756, in check_dos_signature
    return (is_block_device(device) and util.file_size(device) >= 0x200 and
  File "/usr/lib/python3/dist-packages/curtin/util.py", line 565, in file_size
    with open(path, 'rb') as fp:
OSError: [Errno 6] No such device or address: '/dev/sda2'
[Errno 6] No such device or address: '/dev/sda2'
curtin: Installation failed with exception: Unexpected error while running command.

Yes, https://code.launchpad.net/~raharper/curtin/+git/curtin/+merge/345361 should fix this.

/dev/sda2 is an extended partition with a single logical volume (sda5). I've observed that after wiping the lvm device, there is a period where the kernel removes the /dev/sda2 partition node; this is resolved by asking the kernel to re-read the partition table after each shutdown stage.

Changed in curtin:
importance: Undecided → High
status: New → In Progress
Changed in subiquity:
status: New → Invalid
Ryan Harper (raharper)
Changed in curtin:
status: In Progress → 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.