1

I have a GPT formatted SSD Drive that I have moved from a rather new laptop to an older one that has an old BIOS. The Linux systems installed on it work fine (Kubuntu 22.04 and Mint 21), although I cannot install Windows (but that's another matter that doesn't concern us here).

I want to fix the grub so that it boots into Kubuntu (set Kubuntu as the grub location). —After trying to install Windows and failing, and then trying to fix the grub with grub-repair and failing, as explained here, I have installed a supplementary Linux Mint system in order to be able to access the old one. Now I want to get rid of the second Linux, but that would make my laptop unusable unless I make Kubuntu the the default boot before or after removing Mint (which I don't know how).—

With MBR drives it seemed very simple to me to use Boot Repair and fix frequent errors after installing or removing operating systems. But since a few years, with UEFI and GPT I usually end up with solutions that don't involve Boot Repair.

Here, I don't want to re-format the drive and change to a MBR structure.

On the other hand, changing or updating to UEFI is not an option on this machine.

I get this error saying the session is in BIOS / legacy mode.

enter image description here

enter image description here

Is Boot Repair only handling GPT under UEFI?


  • By the way: after taking the drive out and connecting it externally to a UEFI computer, can I use Boot Repair on that computer to set grub location on the Kubuntu 22.04 partition (on that GPT external drive) so that back on the old PC it boots as intended? — Or is thus setting grub location on a partition of an external drive going to destroy the grub configuration of the UEFI computer?
14
  • So you're saying you have a laptop which can not from gpt, because it only knows how to boot from an MBR? Then you simply can't boot from a GPT partitioned drive, and there's nothing that any program (never heard of Boot Repair before) can do about it. Sep 29, 2023 at 8:40
  • 2
    @MarcusMüller Linux can indeed work in BIOS mode in a GPT drive unlike Windows (cf. my answer below). Perhaps it shouldn't? But it actually does. Sep 29, 2023 at 8:55
  • 1
    @MarcusMüller - you seem to confuse GPT and UEFI: Linux can boot from a GPT drive (GPT is a drive characteristic) even if the computer has a UEFI configuration (UEFI here means non_BIOS, a computer configuration).
    – cipricus
    Sep 29, 2023 at 8:57
  • 1
    Related: wiki.archlinux.org/title/… BIOS can boot GPT. Sep 29, 2023 at 9:12
  • 1
    It should be said that if you intend to have a dual-boot then the strict requirements of Windows take precedence. Meaning: You must have the drive partitioned as 'msdos' (MBR) for any old BIOS based machine. Sep 29, 2023 at 9:13

2 Answers 2

2

Reference: https://askubuntu.com/a/500431/1210606

Most Linux based OSes can indeed work in BIOS/Legacy/CSM mode with a GPT drive provided it has a small bios_grub partition - ~2 MiB, unformatted, i.e., no file system - acting as a "fake MBR" (GPT has no Master Boot Record).

Then Boot Repair can be used for installing GRUB again for your Kubuntu. Alternatively you can boot from a Ubuntu/Kubuntu live/installation media and select the option to boot from the internal drive; then simply (re-)install GRUB for BIOS/Legacy/CSM mode:

sudo  apt-get  install  grub-pc-bin
sudo  grub-install /dev/sdX

where sdX is the target drive.

6
  • I know that bios_grub partition is needed, I have created it in order to install my Linuxes. Then Boot Repair can be used for installing GRUB again for your Kubuntu: that is what I cannot do! Boot Repair live session asks for EFI. select the option to boot from the internal drive: I have booted from a live session, but cannot use boot-repair, as indicated. Or should install GRUB for BIOS/Legacy/CSM mode before using boot-repair?
    – cipricus
    Sep 29, 2023 at 9:13
  • That message is confusing and likely doesn't mean exactly what it says. Boot Repair has been in use for many years now and it always supported BIOS mode. Sep 29, 2023 at 9:16
  • It seems to expect a EFI configuration because the drive is GPT. It explicitely asks to change from legacy to UEFI, although no UEFI is available.
    – cipricus
    Sep 29, 2023 at 9:20
  • And there's no way to cancel/override the message and proceed? TBH, I never used Boot Repair in such scenario (or at all, most of the times) but also never heard of problems with it. You certainly aren't the first to try it in a BIOS installation in GPT and if there were problems questions would have popped up here, at AskUbuntu or SuperUser, me thinks. Sep 29, 2023 at 9:26
  • Fixed it in the end with boot-repair and posted answer. Thank you!
    – cipricus
    Sep 29, 2023 at 9:56
0

This worked in the end:

  • Accept option to update the tool

  • Select advanced options

  • Select "Grub location" tab

  • Select the new OS to boot by default

  • Un-check options for separate boot/... partitions

  • Select sda for GRUB location

enter image description here

You must log in to answer this question.

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