linuxmint / live-installer

A live installer for the Debian edition
56 stars 65 forks source link

live-installer fails on existing LVM installation #118

Closed jkirk closed 2 years ago

jkirk commented 3 years ago

I tried to (re)install LMDE4 (on a disk where LMDE4 was already installed) and the installation failed with the following error message:

screenshot_20210521T193608

("The partition table could not be written for /dev/sda. Restart the computer and try again.")

I then started the the live-installer via command line and saw the following:

mint@mint:~$ sudo /usr/bin/live-installer
[....]
Starting PartitionSetup()
Excluding /dev/sdb (detected as the live device)
Can't find model in blkid output: ['loop', 'loop0', '0', '1.7G']
Disks:  [('/dev/sda', 'CT500MX500SSD1 (500 GB)')]
    Analyzing path='/dev/sda' description='CT500MX500SSD1 (500 GB)'
      - Found the device...
      - Found the disk...
      - Looking at partitions...
           -> 1 free space partitions
           -> 0 primary partitions
           -> 0 logical partitions
           -> 0 raid partitions
           -> 0 LVM partitions
           -> set of 1 partitions
              -> Building partition object for /dev/sda-1
                  . length 976773101
                  . size_percent 80
                  . size 500.1 GB
                  . name 
                  . type Free space
                  . About to mount it...
mount: /tmp/live-installer/tmpmount: special device /dev/sda-1 does not exist.
df: /dev/sda-1: No such file or directory
                  . value error!
WARNING: Partition /dev/sda-1 or type 4 failed to mount!
                  . self.os_fs_info : Free space, self.description , self.free_space , self.used_percent 0
                  . umounting it
                  . done
(u'/dev/sda-1', '500.1 GB', 500107827712.0)
      - Found partitions...
      - Iterating partitions...
        . Appending partition ...
      - Loading HTML view...
Finished PartitionSetup()
Loading HTML string
Showing the partition screen
 ## INSTALLATION 
 --> Installation started
umount: /target/dev/shm: no mount point specified.
umount: /target/dev/pts: no mount point specified.
umount: /target/dev/: no mount point specified.
umount: /target/sys/: no mount point specified.
umount: /target/proc/: no mount point specified.
umount: /target/run/: no mount point specified.
 --> Mounting partitions
 ------ Mounting /run/live/medium/live/filesystem.squashfs on /source/
EXECUTING: 'mount -o loop -t squashfs /run/live/medium/live/filesystem.squashfs /source/'
 --> Creating partitions on /dev/sda
Error: Partition(s) 2 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.

This is how the disk was partitioned:

mint@mint:~$ sudo fdisk -l /dev/sda
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500MX500SSD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: D78A00D0-DBBB-4054-990C-6F07630F7936

Device      Start       End   Sectors   Size Type
/dev/sda1    4096    589823    585728   286M Linux filesystem
/dev/sda2  591872 976773119 976181248 465.5G Linux filesystem

mint@mint:~$ sudo pvs
  PV         VG      Fmt  Attr PSize    PFree
  /dev/sda2  lvmlmde lvm2 a--  <465.48g <456.77g

mint@mint:~$ sudo vgs
  VG      #PV #LV #SN Attr   VSize    VFree
  lvmlmde   1   2   0 wz--n- <465.48g 1.00g
mint@mint:~$ sudo lvs
  LV   VG      Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root lvmlmde -wi-a----- <456.77g
  swap lvmlmde -wi-a-----    7.71g

When running the installer in German, the following error is shown:

screenshot_20210521T192924

("'ascii' codec can't decode byte 0xc3 in position 36: ordinal not in range(128)")

The shell output when set to German looks like this:

[..live-installer output..]
Excluding /dev/sdb (detected as the live device)
Can't find model in blkid output: ['loop', 'loop0', '0', '1.7G']
Disks:  [('/dev/sda', 'CT500MX500SSD1 (500 GB)')]
    Analyzing path='/dev/sda' description='CT500MX500SSD1 (500 GB)'
      - Found the device...
      - Found the disk...
      - Looking at partitions...
           -> 1 free space partitions
           -> 0 primary partitions
           -> 0 logical partitions
           -> 0 raid partitions
           -> 0 LVM partitions
           -> set of 1 partitions
              -> Building partition object for /dev/sda-1
                  . length 976773101
                  . size_percent 80
                  . size 500.1 GB
                  . name 
                  . type Freier Speicherplatz
                  . About to mount it...
mount: /tmp/live-installer/tmpmount: special device /dev/sda-1 does not exist.
df: /dev/sda-1: No such file or directory
                  . value error!
WARNING: Partition /dev/sda-1 or type 4 failed to mount!
                  . self.os_fs_info : Freier Speicherplatz, self.description , self.free_space , self.used_percent 0
                  . umounting it
                  . done
(u'/dev/sda-1', '500.1 GB', 500107827712.0)
      - Found partitions...
      - Iterating partitions...
        . Appending partition ...
      - Loading HTML view...
Finished PartitionSetup()
Loading HTML string
Showing the partition screen
 ## INSTALLATION 
 --> Installation started
umount: /target/dev/shm: no mount point specified.
umount: /target/dev/pts: no mount point specified.
umount: /target/dev/: no mount point specified.
umount: /target/sys/: no mount point specified.
umount: /target/proc/: no mount point specified.
umount: /target/run/: no mount point specified.
 --> Mounting partitions
 ------ Mounting /run/live/medium/live/filesystem.squashfs on /source/
EXECUTING: 'mount -o loop -t squashfs /run/live/medium/live/filesystem.squashfs /source/'
 --> Creating partitions on /dev/sda
Error: Partition(s) 2 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
'ascii' codec can't decode byte 0xc3 in position 36: ordinal not in range(128)

My workaround was to deactive the LVM via sudo vgchange -an lvmlmde before starting the live-installer.

clefebvre commented 2 years ago

Ok, the German issue no longer happens, but the LVM one does and I'm able to reproduce it.

clefebvre commented 2 years ago

https://github.com/linuxmint/live-installer/commit/23b2eba6aaed2f87db3d363c8fc31beb64d1faab