5

I used an Ubuntu 16.04 desktop installation as a server for a while, but with the release of 18.04 I decided to do a clean install of the server edition. So this is a single-disk, single-boot system, where I want to replace 16.04 desktop with 18.04 server.

The Ubuntu 18.04 server installer however fails during the partitioning step, both with default partitioning of an entire disk and with manually picked partitions. The log shows a Python stacktrace: the util.file_size function from curtil fails on the line

with open(path, 'rb') as fp:

with error OSError: [Errno 6] No such device or address: '/dev/sda2'. This is the (still functioning) extended partition containing the current 16.04 desktop installation. I could not find relatable cases on google, SO or askubuntu, and I have no clue why the device reads as nonexistent. If I exit to shell from the installer and try to mount /dev/sda2, I get the error

mount: /bla: /dev/sda2 is not a valid block device

truncated output from fdisk -l /dev/sda:

...
Device    Boot ... Type
/dev/sda1  *       Linux
/dev/sda2          Extended
/dev/sda5          Linux LVM

Any idea what causes the error, and how can I circumvent the issue?

1
  • still there in 20.04 LTS 64b server Apr 29, 2020 at 21:42

2 Answers 2

11

I had the same error with the installer trying to remove an LVM partition.

After the install fails, select go to command line. From there:

$ sudo fdisk -l (to see the drive name and see the partitions)

$ sudo parted

p

select /dev/sda (or whatever your drive is named)

p (too show the partitions and their numbers)

rm 1

rm 2

(etc until they are all gone)

q

$ sudo fdisk -l (verify the partitions are gone)

Reboot and install again.

5
  • 1
    It's much easier to help when you take advantage of proper formatting.
    – earthmeLon
    May 12, 2018 at 21:01
  • Yep, like the removed rant-y comment said, LVM was to blame, although I do not completely understand why. I ended up fdisk-ing the partitions manually after which everything went smooth. Thanx for your help!
    – Sebastiaan
    May 14, 2018 at 14:00
  • 1
    earthmeLon, thank you. This was my first post and it was done from a phone. I'll improve my future posts, hopefully. May 14, 2018 at 14:11
  • For some reason YUMI was the problem for me. I used Universal and it worked right away.
    – Bluebaron
    Aug 19, 2019 at 13:59
  • thanks, resolved it for 20.04 LTS 64b server Apr 29, 2020 at 21:43
2

For me it was the date. HTTPS traffic doesn't work if date is off by too much. It was a new box and the date was completely wrong. I adjusted it in the BIOS (UTC) and the next try run just smooth. I had tried many times before with different configs thinking it was something else, so I'm pretty sure it was the date.

1
  • Mate, you just saved some eBay seller a frivolous server return! I was trying everything and thought I had a lemon but it wasn't adding up. Feb 7, 2021 at 1:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.