Laptops and Problematic Pre-installed Linux

How I used what I learned for Red Hat exams to fix a “new” factory installation

T’was 2 nights after Xmas, and someone forgot to write the bootloader to the GPT…

Not a creature was stirring, not even AI. The new work laptop came out of the box with care. In hopes that Linux was pre-installed in there.

I had visions of AI mastery snug in my head, and booted the system, and the screen went blank.

In other words, the system did not boot. I found the boot menu, and confirmed the laptop is gorgeous. It has 64GB of RAM, as well as a 2880 x 1800 screen. It’s a bit over 2 pounds, and the battery shows > 200 hours of power.

The unnamed company pre-installed Ubuntu on the Laptop. They’ve redone the UEFI, so I had to search for the boot menu. I found the hard drive. When I selected it from the boot menu, nothing. Ugh. Was this a “lump of coal?”

I called laptop support. They helped me run some diagnostics, and still nothing. The support person seemed to give up pretty quickly, and arranged to set up a return. I followed the instructions, but had a feeling.

So I set up a “Live” USB. I boot the new laptop from that USB stick, which allowed me to “look around.” Of course, I could have reinstalled Linux directly from the Live USB. But no, silly me, I had to test my skills.

(Actually, figuring out how to modify the UEFI to boot from the Live USB was a different journey…)

I had vague memories of running grub-install to write the bootloader to the GUID Partition Table (GPT). So I figure, all I have to do is find the right partitions.

So I sudo fdisk -l the laptop drive from the Live USB. I see three partitions, two of them EFI. Which one do I use?

To find out, I:

  • Reviewed the contents of the /etc/fstab file written to the hard drive
  • Ran the blkid command to find the UUIDs associated with each partition
  • Mounted each defined partition on the appropriate directory, as defined by /etc/fstab
    • To find the right directories, I compared the contents of the EFI partitions with my home laptop, which also has Linux installed

I then ran the sudo grub-install --boot-directory=/mnt/boot /dev/nvme0n1 command to write info to the GPT.

I could then reboot the system. It took a while, but I saw flashes of Linux boot messages. I have a new system that works! And yes, I’ll report the solution to the laptop manufacturer.

The skills I learned to help others prepare for Red Hat exams still help me today. They’re practical.

So with that knowledge renewed, I can exclaim, Happy Xmas to all, and I can keep this laptop!

Last modified January.01.0001