-1

I've successfully cloned (clonezilla) my UEFI Ubuntu Installation (internal HDD SATA) to an external USB Drive. After that i removed the internal drive. The usb drive should be the new booting drive.

Problem: The PC does not boot with the USB Drive automatically. I've to hit F12 and then two options appear:

  • Legacy: USB Drive Name
  • UEFI: ubuntu

If I select "UEFI: ubuntu" it boots up as intended.

  • In bios i can only select the usb drive as boot devices (no ubuntu)
  • Secure boot on or off makes no difference
  • CSM disabled (Only UEFI) does not work (even with F12, no device or ubuntu entry)
  • CSM enabled with UEFI first or Legacy First makes no difference. It boots up and says something like "no system found" or the screen keeps black. (only with F12 + select ubuntu bootable)
  • If I reboot the working Ubuntu system, the screen stays black - no Splash screen - no messages
  • I booted into Ubuntu Live CD and tried to repair the bootloader with Boot-Repair. After that the problem is still persistent. What has changed, there is kind of loading splash screen of ubuntu server, and I have a new "select menu" after the bios F12 menu. I can choose default ubuntu or ubuntu with specific settings

I thought maybe I should change from uefi to legacy? Would Repair-Boot automatically change this if I boot with legacy mode into Repair-Boot and try to repair the bootloader?

My Setup:

  • Ubuntu Server
  • M700 Think Centre 16GB RAM i5 6400T
  • No internal drive
  • USB external drive (2TB)

One more Info: I accidently booted up the system with both drives after the cloning was finished. May be this could cause a dual boot initialization which is failing after disassembly the old internal drive?

If someone is asking why I switched to an external drive: Previously I used a raspberryPi with an external case with integrated Raid 1 (2x 2TB SSDs). I switched from ARM to X86 and wanted to use the same drive with Raid 1. The pc, which is the drive connected to, doesn't know that the drive is a raid 1. With the raspberryPi it worked without any problems.

Maybe some can give me some advice :)? It's bad if my server has to reboot and it remains me to sit in front of it to hit F12 choosing uefi ubuntu for a correct boot up :D.

Update 1:

I found this Question: https://askubuntu.com/a/503490/1592245

  • mounted /boot/
  • switched to /boot/efi/EFI/
  • there are two folders "BOOT" and "ubuntu"

Without secure boot, just copy /EFI/ubuntu/grubx64.efi to /EFI/Boot/bootx64.efi (the unsigned version).

The grub.cfg file should be in /EFI/ubuntu/grub.cfg (and that should be just a 3 liner which brings in the maintained grub.cfg from the regular /boot/grub location.

  • /EFI/ubuntu/grub.cfg exists and has only 3 lines (i've deleted my myUUID in this post):

    search.fs_uuid myUUID root hd0,gpt2

    set prefix=($root)'/grub'

    configfile $prefix/grub.cfg

Maybe the UUID is wrong? What else should I check?

Update 2: Fixed I finally found a fix which works for my use-case.

I changed my

GRUB_CMDLINE_LINUX="" 

to

GRUB_CMDLINE_LINUX="reboot=bios"

in

sudo nano /etc/default/grub

Here is the reference.

7
  • I tried in the ubuntu terminal "efibootmrgr -v". The first boot device is "ubuntu".. That should be correct.
    – meroon
    May 2, 2022 at 17:45
  • Is this not handled by the bios boot order? Which bios are you running?
    – bleeves
    May 2, 2022 at 18:00
  • 1
    External devices only boot from /EFI/Boot/bootx64.efi like the live installer. That is a drive selection in UEFI, not "ubuntu". You may be able to set USB entry as default boot using efibootmgr. If you have an ESP on internal drive you can install grub to that and create an ubuntu entry. But if external not connected, it just gives grub> as UEFI boots grub in ESP, but grub.cfg calls for grub.cfg in the install which is on external drive.
    – oldfred
    May 2, 2022 at 19:33
  • Hi @oldfred, thank you for your reply. I found this Question: askubuntu.com/a/503490/1592245 But on the first sight it seems everything is correctly configured on my system. I will ad an update to my initial post.
    – meroon
    May 3, 2022 at 6:31
  • The UUID in /EFI/ubuntu must be the UUID of your install. The hd0,gpt2 must also be the same partition. If directly booting external from UEFI hd0 is correct. But if configfile or chainloading from an internal install that is hd0, then it may be hd1. Depending on how I boot I sometimes have to manually edit hdX to correct drive.
    – oldfred
    May 3, 2022 at 13:33

1 Answer 1

0

I finally found a fix which works for my use-case.

I changed my

GRUB_CMDLINE_LINUX="" 

to

GRUB_CMDLINE_LINUX="reboot=bios"

in

sudo nano /etc/default/grub

It also fixed, that the system does not reboot correctly (stuck in black screen waiting, to push the power button).

I've update my initial post with the reference to the solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .