Announcement

Collapse
No announcement yet.

Deleted boot option in BIOS

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Deleted boot option in BIOS

    Hello guys.

    I've accidentally deleted the Kubuntu booting option in the Bios while I was trying to remove an older boot option for a system I'm not using anymore. Now I can't boot. Any ideas how to help this idiot out?
    Last edited by Snowhog; Apr 13, 2022, 11:12 AM.

    #2
    This happened to me twice. I could not find a way to add an item to the boot. Fortunately the data is still there, so I used a live DVD and copied my files. Then reinstalled.

    Comment


      #3
      Probably the easiest way is to run boot-repair from a live disk
      https://help.ubuntu.com/community/Boot-Repair
      This is kinda like using the hammer to swat a fly in your case, just a little, but is safe.

      The simplest way might be able to use the command line from a live session to manually add the entry back:

      sudo efibootmgr --create --disk=/dev/sdX --part=1 --label="ubuntu" --loader='EFI\ubuntu\shimx64.efi'

      replace sdX with your drive, and edit the '--p' as appropriate if your efi partition is not the first one on the drive
      You might also have to change the 'shimx64.efi' to 'bootx64.efi' if the first does not work.

      More details on using efibootmgr:
      https://linuxconfig.org/how-to-manag...tries-on-linux
      useful if you want to quickly remove entries that don't work.

      Comment


        #4
        I have a feeling no one likes my re-install advice, so here is a link to all the tools that may get you out of this jam https://superuser.com/questions/1050...bios-boot-list None of this worked for me.

        Comment


          #5
          Do you mean Bios or do you mean in the Grub boot menu? I have found the advice above by claydoh, boot-repair, to be the best option in these cases in my experience. A good recommendation is to keep backups on a separate drive using Timeshift. Then, when booting from a live install disc, install Timeshift in the live environment. If you restore one of the backups, it will automatically repair the boot menu in Grub.

          Good Luck!

          Comment


            #6
            "sudo efibootmgr --create --disk=/dev/sdX --part=1 --label="ubuntu" --loader='EFI\ubuntu\shimx64.efi'"; Might try this once I experience the "grub>"
            In the mean time, Here's how I do it:
            Boot live distro, then from shell:
            Code:
            sudo mount /dev/nvme0n1p4 /mnt
            sudo mount /dev/nvme0n1p1 /mnt/boot/efi
            for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
            sudo chroot /mnt
            grub-install /dev/nvme0n1p4
            update-grub sudo mount /dev/nvme0n1p4 /mnt
            sudo mount /dev/nvme0n1p1 /mnt/boot/efi
            for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
            sudo chroot /mnt
            grub-install /dev/nvme0n1p4
            update-grub
            Change the 'dev' to which type you have. And the 'p4' to the partition your kubuntu is on.
            Boot Info Script

            Comment


              #7
              Originally posted by verndog View Post
              "sudo efibootmgr --create --disk=/dev/sdX --part=1 --label="ubuntu" --loader='EFI\ubuntu\shimx64.efi'"; Might try this once I experience the "grub>"
              In the mean time, Here's how I do it:
              Boot live distro, then from shell:
              Code:
              sudo mount /dev/nvme0n1p4 /mnt
              sudo mount /dev/nvme0n1p1 /mnt/boot/efi
              for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
              sudo chroot /mnt
              grub-install /dev/nvme0n1p4
              update-grub sudo mount /dev/nvme0n1p4 /mnt
              sudo mount /dev/nvme0n1p1 /mnt/boot/efi
              for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
              sudo chroot /mnt
              grub-install /dev/nvme0n1p4
              update-grub
              Change the 'dev' to which type you have. And the 'p4' to the partition your kubuntu is on.
              Yes, this is what boot-repair is doing, and is still that hammer I mentioned, for this specific case, as in the end, one of the things that running grub-install does is to use efibootmgr to create the bios entry. You don't need to be running a live session and mount things to do that, since neither grub or any drives are involved for this specific part.
              Last edited by claydoh; Apr 23, 2022, 09:18 AM.

              Comment

              Working...
              X