linuxmint / lmde-5-cinnamon-beta

Bug squashing for LMDE 5 Cinnamon BETA
5 stars 1 forks source link

live-installer: Two GPT partition tables on the same device #19

Closed C8forT closed 2 years ago

C8forT commented 2 years ago

Using the live installer, I installed LMDE 5 onto a SSD on which I previously had LMDE 4 installed. I left the default options, did not select "LVM", and selected to erase the drive. It worked and rebooted fine until I shut down the system, disconnected the SATA cable from the SSD and moved the SATA cable to use my Arch SSD to get some things done. After finishing, I moved the SATA cable back to the LMDE SSD, but it would not boot - I tried UEFI mode and bios mode, neither would work. While troubleshooting, I discovered that the LMDE SSD had two (2) GPT partition tables - the erase disk part of the installation did not remove the previous GPT partition table before creating a new one. I suspect that was the issue. I deleted both GPT partition tables, created a MBR partition table and reinstalled. It has been working great, even after swapping the SATA cable to my Arch SSD and then moving it back to LMDE.

mtwebster commented 2 years ago

I'm not sure what happened here. I can repeatedly install the iso on the same disk without any sort of issue like this. I did not attempt to install over an existing lmde4, however.

You say you did the install, and then rebooted and it was fine (at least once)?

C8forT commented 2 years ago

Correct. I did not have an issue booting/rebooting until I swapped the SATA cable to another SSD/OS, and then swapped it back. Perhaps it is possible that installing LMDE 5 onto the same disk on which I had LMDE 4 installed created some confusion for the installer, or perhaps it was a random error during the erase disk operation performed by the installer. I don't know. I have assumed that the issue was having two partition tables, because it has been working great since wiping them and installing a new partition table, but this time I manually created a MBR partition table, just in case it was an issue with the GPT partition creation.

C8forT commented 2 years ago

It seems that my bios recognized the correct GPT partition table until I booted from the other SSD. After plugging the LMDE 5 SSD back in, perhaps my bios was confused as to which of the two partition tables it was to use to boot, and maybe it was trying to boot using the old partition table.

clefebvre commented 2 years ago

@C8forT where/how did you see 2 partition tables? Can you reproduce this again?

C8forT commented 2 years ago

I had the SSD on which LMDE 5 was installed as the only SSD plugged into the system (via SATA) and booted from the live USB installer. In the live session terminal I typed sudo parted -l. For /dev/sda the output provided "Partion Table: gpt" twice, with the second one directly under the first one, something like this:

Model: ATA Samsung SSD 850 (scsi) Disk /dev/sda: 250GB Sector size (logical/physical): 512B/512B Partition Table: gpt Partition Table: gpt Disk Flags: ...

I have the original SSD fully configured and customized, so I will install LMDE 4 on another SSD, then install LMDE 5 onto that SSD, and post whether the issue repeats.

C8forT commented 2 years ago

After much testing, I was able to replicate the boot problem, but not the issue of two GPT partition tables. Thus, the two issues may be unrelated, contrary to my original diagnosis. Perhaps the existence of two GPT partition tables was an issue with the particular SSD I was using or a fluke. Without being able to reproduce it, it is hard to tell.

As far the boot issue, it occurs when LMDE is installed with the UEFI boot loader, and then the SSD is disconnected and a SSD using bios boot loading is used. After I plug LMDE back in my bios cannot find the boot loader. My motherboard is an Asus P8Z77-V Deluxe, bios version 2104. The strange thing is that I have KDE Neon configured on its own disk using a GPT partition table and a UEFI boot loader, and it boots fine, even after I boot my system from a bios boot SSD.

clefebvre commented 2 years ago

What do you mean by it doesn't find the boot loader? You mean the default boot option fails, and if so how? or you mean the computer EFI BIOS is unable to show LMDE (which should be called Debian btw) when listing the available EFI boot devices?

Note: You can troubleshoot the available EFI devices and the BootOrder with sudo efibootmgr.

C8forT commented 2 years ago

When I first install LMDE using a GPT partition table and configured using EFI boot, in the Boot tab of my bios there are two boot entries listed for the LMDE SSD and the system boots properly. The boot entries are as follows:

debian (P1: OC2-AGILITY3) P1: OC2-AGILITY3 (114473MB)

As long as the LMDE SSD remains connected to the system, it works fine, regardless of whether I boot from another SSD.

If I disconnect the LMDE SSD from the system and boot from another SSD, the "debian (P1: OC2-AGILITY3)" boot entry disappears - only "P1: OC2-AGILITY3 (114473MB)" is shown - and I cannot boot from the LMDE SSD.

This occurs regardless of whether it is the only SSD connected at the time, and regardless of whether I configure bios for UEFI boot mode or Legacy bios boot mode. This morning I confirmed that the issue occurs regardless of the boot mode configured for the other SSD used to boot while the LMDE SSD is disconnected.

If I reconnect the LMDE SSD and it is the only SSD in the system at the time of boot, the following message is presented:

"Reboot and select proper Boot device or Insert Boot Media in selected Boot device and press a key."

If there is another bootable drive in the system, the system will automatically boot from that other drive, even if I select P1: OC2-AGILITY3 (114473 MB) in Boot Override.

After a clean install of LMDE SSD, before booting from another SSD, sudo efibootmgr outputs the following:

BootCurrent: 0000 Timeout: 0 seconds BootOrder: 0000,0005,0004 Boot0000 debian Boot0004 CD/DVD Drive Boot0005 Hard Drive

For comparison, in Neon sudo efibootmgr outputs the following:

BootCurrent: 0000 Timeout: 0 seconds BootOrder: 0000,0005,0006,0004 Boot0000 ubuntu Boot0004 CD/DVD Drive Boot0005 Hard Drive Boot0006* UEFI OS

"Boot0006* UEFI OS" is not present in LMDE. Also, for Neon there actually are three boot entries for that SSD in the bios. They are as follows:

UEFI OS (P1: T-FORCE 1TB) ubuntu (P1: T-FORCE 1TB) P1: T-FORCE 1TB

An equivalent to the first entry (UEFI OS...) does not appear for LMDE, even after a clean install. Perhaps that is where the issue may lay, but I don't know.

clefebvre commented 2 years ago

That's really weird... I'm not sure what to say though or what else to troubleshoot. If it can boot it once, it should be able to boot it again..

clefebvre commented 2 years ago

I'll close the issue because we can't identify the issue so it won't lead towards a bug fix.