2

This question has been asked a zillion times and has a zillion answers, but I could not find one to address my issue.

I only have one os installed: Ubuntu 16.04 32-bit. I want to change it to Ubuntu 16.04 64-bit. When I try installing, the installer does not detect an OS and suggests erasing the entire disk, not what I want.

I tried running fixparts and rewrote the partition table. This did not change the problem.

I have tried both UEFI and BIOS modes.

I have seen this happen with past installs, and had to do "something else" and manually assign the root partition. But I always find this disturbing. I would really like it if Ubuntu would suggest the appropriate action of replacing the 32-bit boot partition (sda1) with the new install.

Perhaps the next course of action is to run ubiquity in debug mode and see if that gives any clue. Otherwise, I will have to dig further, starting at "def calculate_operating_systems" in /usr/lib/ubiquity/plugins/ubi-partman.py.

# lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial

# sudo fdisk -l

Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000a2f5d

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sda1  *         2048     499711     497664   243M 83 Linux
/dev/sda2          501759  312580095  312078337 148.8G  f W95 Ext'd (LBA)
/dev/sda3       312580096 3907028991 3594448896   1.7T 83 Linux
/dev/sda5          501760  312580095  312078336 148.8G 8e Linux LVM

Partition table entries are not in disk order.


Disk /dev/mapper/merlot-root: 146 GiB, 156703391744 bytes, 306061312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/merlot-swap_1: 2.9 GiB, 3078619136 bytes, 6012928 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

# sudo dmsetup deps -o devname
merlot-swap_1: 1 dependencies   : (sda5)
merlot-root: 1 dependencies : (sda5)

# sudo dmsetup -v table /dev/mapper/merlot-root
Name:              merlot-root
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      252, 0
Number of targets: 1
UUID: LVM-nCfFBn74k3QnfrxB0ZX41AxLnua9hTryu96VYKllCnGIJbKdvlPTWshZbejIqeJU

0 306061312 linear 8:5 384

I was able to get the installer to recognize Ubuntu by removing launchpad bugfix #1265192. Here is the misc.py code and syslog output on my system before removing the bugfix.

for res in result:
            syslog.syslog(res)
            res = res.split(':')
            # launchpad bug #1265192, fix os-prober Windows EFI path
            res[0] = re.match(r'[/\w\d]+', res[0]).group()
            if res[2] == 'Ubuntu':
                version = [v for v in re.findall('[0-9.]*', res[1]) if v][0]
                # Get rid of the superfluous (development version) (11.04)
                text = re.sub('\s*\(.*\).*', '', res[1])
                _os_prober_oslist[res[0]] = text
                _os_prober_osvers[res[0]] = version
                syslog.syslog(res[0])
                syslog.syslog(text)
                syslog.syslog(version)
            else:
                # Get rid of the bootloader indication. It's not relevant here.
                _os_prober_oslist[res[0]] = res[1].replace(' (loader)', '')
    return _os_prober_oslist, _os_prober_osvers

May 15 14:44:11 ubuntu os-prober: debug: os detected by /usr/lib/os-probes/50mounted-tests
May 15 14:44:11 ubuntu ubiquity[18280]: /dev/mapper/merlot-root:Ubuntu 16.04.1 LTS (16.04):Ubuntu:linux
May 15 14:44:11 ubuntu ubiquity[18280]: /dev/mapper/merlot
May 15 14:44:11 ubuntu ubiquity[18280]: Ubuntu 16.04.1 LTS
May 15 14:44:11 ubuntu ubiquity[18280]: 16.04.1
May 15 14:44:11 ubuntu ubiquity[18280]: Device /dev/mapper/merlot-swap_1 not found in os-prober output
May 15 14:44:11 ubuntu ubiquity[18280]: Device /dev/sda1 not found in os-prober output
May 15 14:44:11 ubuntu ubiquity[18280]: Device /dev/sda5 not found in os-prober output
May 15 14:44:11 ubuntu ubiquity[18280]: Device /dev/sda3 not found in os-prober output
May 15 14:44:11 ubuntu ubiquity[18280]: Device /dev/mapper/merlot-root not found in os-prober output
May 15 14:44:11 ubuntu ubiquity[18280]: switched to page partman

I'm not a python coder, but

res[0] = re.match(r'[/\w\d]+', res[0]).group()

takes

/dev/mapper/merlot-root

and makes it

/dev/mapper/merlot

and then ubiquity cannot find the drive.

Alas, once I comment the bugfix and select the "replace ubuntu" option, install still fails, so more work is needed to fix this.

I've spent enough time on this so I am going to do "something else" and install manually.

0 Answers0