Planning to make an external nvme SSD my backup PC

This is NOT a help request post. Its just more on this external SSD saga.

Initial problem (subsequently solved)

I went to boot this external SSD drive from my Lenovo laptop and it would not boot ! As it turned out the issue was a partitioning boot flag issue.

Detailed story

Encountering the problem:

I went to boot the external SSD drive from Lenovo laptop, where with the laptop switched OFF, I plugged in the USB external SSD housing (that has the SSD inside), switched on the Laptop (pressing F12) and the BIOS boot menu came up.

I selected the external enclosure’s boot menu item (which is a UEFI boot), and the screen ‘blinked’ and same boot menu showed. No matter how many times I selected the external enclosure’s boot menu item, it simply ‘blinked’ and showed the same thing. I could not boot to the external SSD (from my Lenovo laptop)

However the laptop’s internal SSD booted fine.

Switch to Desktop PC

So I switched the laptop off, and took the external SSD enclosure down to my desktop PC, plugged it in a USB port, switched on the PC, and pressed F12. I obtained the BIOS book menu. I observed both the external enclosures UEFI and MBR boot options in the menu, I selected the UEFI boot, and the external enclosure SSD booted LEAP-15.6 ok from the desktop PC. No problems.

Go Figure !

So I then checked the boot flags with : sudo parted -l

(where I will only here show the SSD) part of that command:

Model: Realtek RTL9210B-CG (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/2048B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  3146kB  2097kB                     bios_grub
 2      3146kB  2151MB  2147MB  fat32              msftdata
 3      2151MB  55.8GB  53.7GB  ext4
 4      55.8GB  1000GB  944GB   ext4

There was no esp flag set for the fat32 which is the /boot/efi partition. There should be an esp !! There used to be such.

So I then ran parted to reset the flag, first sending the ‘print’ command at the (parted) prompt to confirm no flag set:

oldcpu@orico-samsung:~> sudo parted /dev/sdc
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: Realtek RTL9210B-CG (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/2048B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  3146kB  2097kB                     bios_grub
 2      3146kB  2151MB  2147MB  fat32              msftdata
 3      2151MB  55.8GB  53.7GB  ext4
 4      55.8GB  1000GB  944GB   ext4

Then I set the ‘esp’ flag:

(parted) set 2 esp on                                                     
(parted) set 2 boot on

Then I checked to make certain I did not mess things up (and things were ok):

(parted) print                                                            
Model: Realtek RTL9210B-CG (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/2048B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  3146kB  2097kB                     bios_grub
 2      3146kB  2151MB  2147MB  fat32              boot, esp
 3      2151MB  55.8GB  53.7GB  ext4
 4      55.8GB  1000GB  944GB   ext4

(parted) quit                                                             
Information: You may need to update /etc/fstab.
oldcpu@orico-samsung:~>

The inappropriate “msftdata” was replaced with “boot, esp”.

Test against Lenovo laptop

I switched off the desktop PC and then took the USB external SSD up my Lenovo laptop, plugged it in, switched ON the Laptop, and pressed F12.

At the BIOS boot menu, I selected the UEFI boot drive, and this time on the Lenovo laptop, it worked !!

I am happy it works - albeit a couple of puzzles (which I speculate about).

  1. Why did external SSD not boot in UEFI mode to laptop (where boot flag not set) but it did boot to the desktop in UEFI mode?
    .
    I attribute that to the different BIOS in each motherboard. Both BIOS had UEFI histories, and I speculate initially the Lenovo, when I selected the UEFI boot selection, did a quality check, noted the boot flag was missing, and did not boot. In contrast, the Desktop, if one is booting from a BIOS ‘memory’ selection, does no such boot flag check if the entry is already in BIOS (from previous boots).

  2. Why did this problem happen?
    .
    Originally I had ‘esp’ set correctly as the flag and not ‘msftdata’ … I do not know how the change to msftdata happened, but I suspect it may have been some (unknown exactly what) update where I was not careful afterwards to ensure the ‘esp’ flag was not inappropriately changed to ‘msftdata’.

Anyway, its working again. Hopefully I will figure out what caused this, before I have a repeat of the same problem again.