GRUB doesn't show up, boots straight into Mint

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
SugarSon
Level 1
Level 1
Posts: 46
Joined: Fri May 08, 2015 3:46 pm

GRUB doesn't show up, boots straight into Mint

Post by SugarSon »

I just installed Vera (Mint 21.1) yesterday on a system that also has Windows 7 installed on a secondary drive. I created 3 partitions on the main drive: sda1 for the OS, sda2 for the EFI bootloader, and sda3 for the swapfile. I selected sda2 as the partition on which to install GRUB. After installation, GRUB booted like it always has before and I was able to select which OS I wanted to boot into. However, after rebooting once or twice, GRUB more or less disappeared and the system was booting straight into Mint.

I went into my BIOS to check what the boot order was, and my SATA0 drive (the main one) showed up twice, as "SATA0" and "ubuntu SATA0". If I make "ubuntu SATA0" the first drive in the order, it boots into Mint, and if I select "SATA0" instead, it boots into Windows. This is strange since Windows is installed on the SATA1 drive.

I tried a few things I had found online, one of which was to mount the Windows drive and then run sudo os-prober, which returned absolutely nothing. Could this be caused by the fact that my Windows drive is partitioned using MBR and the Mint drive is using GPT?
Last edited by LockBot on Mon Jul 10, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: GRUB doesn't show up, boots straight into Mint

Post by Termy »

Usually spamming or holding Shift during boot will bring up GRUB. Failing that, you can edit GRUB settings (via '/etc/default/grub') in such a way as to force GRUB to show up.

I'm surprised you made the EFI partition 2nd. I believe I've always been told it should be first on the drive, but I really don't know, as I don't bother with EFI installations. Since it initially booted up just fine, then it presumably doesn't matter which order it's in.
I'm also Terminalforlife on GitHub.
User avatar
Pjotr
Level 24
Level 24
Posts: 20129
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: GRUB doesn't show up, boots straight into Mint

Post by Pjotr »

Termy wrote: Wed Jan 11, 2023 6:45 am I'm surprised you made the EFI partition 2nd. I believe I've always been told it should be first on the drive
Indeed. Good find. This might be the cause of the erratic behaviour.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
SugarSon
Level 1
Level 1
Posts: 46
Joined: Fri May 08, 2015 3:46 pm

Re: GRUB doesn't show up, boots straight into Mint

Post by SugarSon »

Termy wrote: Wed Jan 11, 2023 6:45 am Usually spamming or holding Shift during boot will bring up GRUB. Failing that, you can edit GRUB settings (via '/etc/default/grub') in such a way as to force GRUB to show up.

I'm surprised you made the EFI partition 2nd. I believe I've always been told it should be first on the drive, but I really don't know, as I don't bother with EFI installations. Since it initially booted up just fine, then it presumably doesn't matter which order it's in.
From what I remember, this is the way the installation program had set it up when I installed my previous version of Mint (I think it was 18.1). I don't remember selecting partitions but I also used MBR back then. From what I've heard, the only restriction for the EFI bootloader is that it's in the first ~2.2 TB of the drive, regardless of which partition it's on. Since none of my drives is that big, I figured it wouldn't be a problem.

Either way, I was able to get GRUB to start by pressing Esc as my computer was booting up, but Windows did not appear at all in the entries. All I could select was Mint with the older kernel or Mint with the newer kernel. Is it possible at all for GRUB to dual boot between two OSes installed on separate disks using different partition tables?
bendipa
Level 5
Level 5
Posts: 586
Joined: Sat Jan 04, 2020 8:02 pm
Location: NW London. UK

Re: GRUB doesn't show up, boots straight into Mint

Post by bendipa »

SugarSon wrote: Thu Jan 12, 2023 1:46 am From what I remember, this is the way the installation program had set it up when I installed my previous version of Mint (I think it was 18.1). I don't remember selecting partitions but I also used MBR back then. From what I've heard, the only restriction for the EFI bootloader is that it's in the first ~2.2 TB of the drive, regardless of which partition it's on. Since none of my drives is that big, I figured it wouldn't be a problem.
ESP
Either way, I was able to get GRUB to start by pressing Esc as my computer was booting up, but Windows did not appear at all in the entries. All I could select was Mint with the older kernel or Mint with the newer kernel. Is it possible at all for GRUB to dual boot between two OSes installed on separate disks using different partition tables?
You can, but certainly not recommended. I think where you've gone wrong is to make an ESP. You don't need to. Mint Installer automatically takes care of that. I presume your Windows disk is running on GPT format. If your other disk is too, then leave it at that.

Really need to see your partitions. Run sudo parted -l.
Computer: Dell Vostro 470
Systems: Linux Mint 21.3 Xfce (Una), Manjaro 23.1 Xfce (Vulcan), Windows 10 (22H2) Pro.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: GRUB doesn't show up, boots straight into Mint

Post by Termy »

SugarSon wrote: Thu Jan 12, 2023 1:46 am Is it possible at all for GRUB to dual boot between two OSes installed on separate disks using different partition tables?
I would be very surprised if this were not the case. GRUB can access GPT and MBR. I don't install systems on GPTs though, so perhaps I'm missing something. I tend to prefer the simplicity of MBR. I've only ever used GPT for an external 6T HDD which required GPT. A while back, I installed Gentoo with EFI, but even then I didn't need GPT. Granted, my UEFI is set for 'legacy', largely so I don't have to faff about with EFI — if it ain't broke.
I'm also Terminalforlife on GitHub.
SugarSon
Level 1
Level 1
Posts: 46
Joined: Fri May 08, 2015 3:46 pm

Re: GRUB doesn't show up, boots straight into Mint

Post by SugarSon »

bendipa wrote: Thu Jan 12, 2023 5:37 am
You can, but certainly not recommended. I think where you've gone wrong is to make an ESP. You don't need to. Mint Installer automatically takes care of that. I presume your Windows disk is running on GPT format. If your other disk is too, then leave it at that.

Really need to see your partitions. Run sudo parted -l.
My Windows disk doesn't run on GPT, it's actually MBR, as shown below.
These are my first 2 drives:

Model: ATA XX0000XX000-0XX0 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 991GB 991GB ext4
2 991GB 992GB 512MB fat32 boot, esp
3 992GB 1000GB 8191MB linux-swap(v1) swap


Model: ATA XXX XX0000XXXX-0 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 106MB 105MB primary ntfs boot
2 106MB 500GB 500GB primary ntfs

I also have a third drive that is used exclusively for storage, backups, etc.
The reason why I created the ESP manually is because if I was letting the installation program set it up automatically, it wanted to install Mint on my storage drive (on /dev/sdc) for some reason, even though it's connected to my third SATA port.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: GRUB doesn't show up, boots straight into Mint

Post by linux-rox »

Please report the output of inxi -SM. Looks to me like you are booting in UEFI mode, which would explain why Mint doesn't see Windows.

Assuming that's correct, the easiest way to fix this would be reinstall, making sure to boot the live session in BIOS/legacy mode. Don't bother with an EFI partition. The installer will complain about that, but push on (it's a bug and the warning is a false alarm).

If you're keen not to reinstall, this installation probably can be fixed. It'll take some work, but not brain surgery.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: GRUB doesn't show up, boots straight into Mint

Post by Jo-con-Ël »

SugarSon wrote: Tue Jan 10, 2023 3:19 pm I went into my BIOS to check what the boot order was, and my SATA0 drive (the main one) showed up twice, as "SATA0" and "ubuntu SATA0". If I make "ubuntu SATA0" the first drive in the order, it boots into Mint, and if I select "SATA0" instead, it boots into Windows. This is strange since Windows is installed on the SATA1 drive.
That is not strange. You select SATA 0 (BIOS Legacy boot option) but there is not grub(bios) loader installed on that drive so its boot next BIOS option on boot order (SATA 1).

Do as indicated but IMO there is no need to run inxi -SM in this case. Choosing ubuntu option (Mint's UEFI boot option) you boot on UEFI mode.

Notice if you decided to reinstall from scratch, booting Live on BIOS mode does not warrant you wont end-up on similar (not the same) situation. Current edition try to install on both UEFI and BIOS mode when choosing auto-partitioning option-Erase disk and install will create GTP partitioning scheme, bios-boot and EFI partition and Mint's root (swap will be on swapfile) and install on both BIOS and UEFI modes w/o warning or advise.

If choosing Something else... option and there click on create new partition table button also installer will format disk with GPT partitioning scheme and you will need to create a bios-boot 1MB partition first of all, then create Mintś root and do not creating EFI partition. When receiving a warning about EFI partition is needed just ignore and continue.

Your disk is now GPT son you can consider installing so with Something else option but w/o creating a new partition table, just removing current partitions and creating that bios-boot partition first on unallocated space at the beginning, then Mint root and install ignoring warning about EFI partition is needed.

If you want MBR/msdos partitioning you will need to format that drive with MBR/msdos partitioning scheme first with Gparted/Disks and create only a root partition. Then choosing Something else option select Mintś root partition and complete pop-up window accordingly. Ignore warning about EFI partition and Continue.

Notice loader will be placed on sda on all cases by default. If it is set on another drive (sdc as you said) just change it before proceed with installation..
Arrieritos semos y en el camino nos encontraremos.
SugarSon
Level 1
Level 1
Posts: 46
Joined: Fri May 08, 2015 3:46 pm

Re: GRUB doesn't show up, boots straight into Mint

Post by SugarSon »

Jo-con-Ël wrote: Wed Jan 18, 2023 5:07 am That is not strange. You select SATA 0 (BIOS Legacy boot option) but there is not grub(bios) loader installed on that drive so its boot next BIOS option on boot order (SATA 1).

Do as indicated but IMO there is no need to run inxi -SM in this case. Choosing ubuntu option (Mint's UEFI boot option) you boot on UEFI mode.

Notice if you decided to reinstall from scratch, booting Live on BIOS mode does not warrant you wont end-up on similar (not the same) situation. Current edition try to install on both UEFI and BIOS mode when choosing auto-partitioning option-Erase disk and install will create GTP partitioning scheme, bios-boot and EFI partition and Mint's root (swap will be on swapfile) and install on both BIOS and UEFI modes w/o warning or advise.

If choosing Something else... option and there click on create new partition table button also installer will format disk with GPT partitioning scheme and you will need to create a bios-boot 1MB partition first of all, then create Mintś root and do not creating EFI partition. When receiving a warning about EFI partition is needed just ignore and continue.

Your disk is now GPT son you can consider installing so with Something else option but w/o creating a new partition table, just removing current partitions and creating that bios-boot partition first on unallocated space at the beginning, then Mint root and install ignoring warning about EFI partition is needed.

If you want MBR/msdos partitioning you will need to format that drive with MBR/msdos partitioning scheme first with Gparted/Disks and create only a root partition. Then choosing Something else option select Mintś root partition and complete pop-up window accordingly. Ignore warning about EFI partition and Continue.

Notice loader will be placed on sda on all cases by default. If it is set on another drive (sdc as you said) just change it before proceed with installation..
Thank you for this. I ran inxi -SM anyway and the only relevant bit of info seems to be "UEFI: American Megatrends", which suggests my system is running in UEFI mode rather than BIOS. I didn't necessarily want to partition my sda drive in MBR, GPT is fine but I was under the impression that GRUB didn't really care how the other drives were partitioned and would let you boot to another OS if it found it, regardless of drive partitioning.

I'd rather avoid reinstalling at this point, if possible, since I have already installed a fair amount of stuff onto my hard drive. Is there a way to only reinstall GRUB without re-partitioning the disks or is that the only way to do it? The strange thing is when I booted my system for the first time after installation, GRUB did start and listed Windows in the boot menu, but then it just disappeared.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: GRUB doesn't show up, boots straight into Mint

Post by Jo-con-Ël »

SugarSon wrote: Fri Jan 20, 2023 4:02 am GPT is fine but I was under the impression that GRUB didn't really care how the other drives were partitioned and would let you boot to another OS if it found it, regardless of drive partitioning.
Yes, it is. GPT is not a problem but you need a bios-boot partition to place grub(bios) loader to boot on BIOS mode from GPT disk.

GRUB wont detect systems installed in other way/mode. This is what happens to you now. Your are booting on UEFI mode and it wont detect Windows installed on BIOS mode. You need to boot on BIOS mode (SATA0 option).

In case of hybrid booting (if you decide to boot on both modes as indicated below) after running sudo update-grub on a BIOS Mint session GRUB menu will include a Windows option. You wont be able to boot Windows entry if booting on UEFI mode (when choosing ubuntu on boot menu). Also in that case (booting with ubuntu option) if you run sudo update-grub Windows entry will disappear from GRUB menu.

IMO, for internal disk and dual boot installation, it is worth install on one mode (on BIOS mode in your case) only or, install on both modes but boot only on one (BIOS in your case)... or do no install updates (nor kernel neither grub) when booting on the other (UEFI mode in your case).
SugarSon wrote: Fri Jan 20, 2023 4:02 am I'd rather avoid reinstalling at this point, if possible, since I have already installed a fair amount of stuff onto my hard drive. Is there a way to only reinstall GRUB without re-partitioning the disks or is that the only way to do it? The strange thing is when I booted my system for the first time after installation, GRUB did start and listed Windows in the boot menu, but then it just disappeared.
It is already said by linux-rox. Yes you can install grub (bios). It is easy to install on other disk MBR, but you will need to create 1-2MB bios-boot partition on that GPT disk if you want booting when selecting that SATA 0 Disk.

Decide if you want Mint booting on both modes or only on BIOS mode.
If you want boot on both modes you can resize Mint root or that EFI partition to created a bios-boot partition.

If you don't want EFI booting just remove that EFI partition and create a bios-boot partition and reinstall grub (bios) on that partition. Fist you wiil need to edit /etc/fstab to avoid EFI partition mounting on Mint installed session.

Code: Select all

sudoedit /etc/fstab
and remove/comment (write # at the beginin of) efi line
# /boot/efi was on /dev/sda2 during installation
#UUID=XXXX-XXX /boot/efi vfat umask=0077 0 1
Save changes (Ctrl+O and press Enter to confirm) and close editor (Ctrl+X)
I hardly remember there is a way to create that bios-boot partition (with dd?) from current installation if you already have unallocated space on that disk- In any case you can to do that booting Linux Mint Live USB on BIOS mode running Gparted (Menu> Administration>Gparted),
- Resize/remove EFI partition (depending on what you decided right click on EFI partition>Resize/move or>Deleted). When done click on Apply button (the one with the checking mark).

-Create a 1-2 MB partition on unallocated space (right click on unallocated space>New..) with cleared (empty) filesystem. Do not forget to click on Apply button and notice sometime it takes NTFS or another files system spontaneously, so you will need to format again right click>Format) to cleared> Apply.
-Flag that partition (right-click on that partition>Manage flags) and select bios_grub.

-Close Gparted when done.
Then mount Mint root's and install grub. Open a terminal, copy and paste one line each time and press Enter.

Code: Select all

sudo mount /dev/sda1 /mnt 
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sda --target=i386-pc
update-grub
exit
for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
sudo umount /mnt
Reboot and choose SATA0 option on boot menu now to see results.
Last edited by Jo-con-Ël on Thu Jan 26, 2023 8:25 pm, edited 6 times in total.
Arrieritos semos y en el camino nos encontraremos.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: GRUB doesn't show up, boots straight into Mint

Post by linux-rox »

Right, create a BIOS boot partition and reinstall Grub in legacy mode is what I had in mind.

Note: There's a typo in the first line, should be /dev/sda1 (no space).
Also, I don't see the point of remounting sda1 at the end.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: GRUB doesn't show up, boots straight into Mint

Post by Jo-con-Ël »

Edited, thanks. I began to write codes but then I was in a hurry and decide to copy and paste codes from another post and change devices names (wrongly, also it is not /dev/sdc) and forgot to remove the line that I wrote before. :oops:
Arrieritos semos y en el camino nos encontraremos.
SugarSon
Level 1
Level 1
Posts: 46
Joined: Fri May 08, 2015 3:46 pm

Re: GRUB doesn't show up, boots straight into Mint

Post by SugarSon »

Thanks! And if, in the future, I install a different version of Windows on a GPT partition, would I need to do the same thing again or it would be detected automatically?
User avatar
oligalma
Level 3
Level 3
Posts: 104
Joined: Tue Jan 31, 2017 5:13 am

Re: GRUB doesn't show up, boots straight into Mint

Post by oligalma »

There's a tool called "boot repair", which allows to recover GRUB. However, I'm not sure if it will work in your case.

https://help.ubuntu.com/community/Boot-Repair
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: GRUB doesn't show up, boots straight into Mint

Post by Jo-con-Ël »

SugarSon wrote: Thu Jan 26, 2023 7:10 pm Thanks! And if, in the future, I install a different version of Windows on a GPT partition, would I need to do the same thing again or it would be detected automatically?
Notice Windows can´t be intalled on GPT partition/disk w/o UEFI booting (i.e. that EFI partition must be preserved or recreated) and you wont be able to multboot Mint ,Windows MBR and Windows UEFI in any case. You'd better explain in detail what you want to get (replace current Windows installed on BIOS mode, keep both Windows, BIOS and new UEFI one,...)

If you want to install Windows on current GPT disk you would need to keep that EFI partition or recreated it if you already removed it, and also make room for Windows creating an NTFS partition at the begining of the disk, reinstall grub-efi....It is worth beginning from scratch and first install Windows on UEFI mode on GPT disk first and then reinstall Mint from scratch in the same UEFI mode, so you will get dual boot Mint and Wndows UEFI and single boot Windows on MBR disk.
oligalma wrote: Thu Jan 26, 2023 7:18 pm There's a tool called "boot repair", which allows to recover GRUB. However, I'm not sure if it will work in your case.
Boot Repair is an useful tool if you know what Standard/Recommeded repair option will do or what Advanced option you need to run.

BR Recommended repair, will try resintalling grub-efi and it is not needed in this case. You will be able to install grub (bios) from BR Advanced options but you will need to create bios-boot/bios_grub partition first or try installing on EFI PBR.
Arrieritos semos y en el camino nos encontraremos.
SugarSon
Level 1
Level 1
Posts: 46
Joined: Fri May 08, 2015 3:46 pm

Re: GRUB doesn't show up, boots straight into Mint

Post by SugarSon »

Jo-con-Ël wrote: Fri Jan 27, 2023 10:51 am Notice Windows can´t be intalled on GPT partition/disk w/o UEFI booting (i.e. that EFI partition must be preserved or recreated) and you wont be able to multboot Mint ,Windows MBR and Windows UEFI in any case. You'd better explain in detail what you want to get (replace current Windows installed on BIOS mode, keep both Windows, BIOS and new UEFI one,...)

If you want to install Windows on current GPT disk you would need to keep that EFI partition or recreated it if you already removed it, and also make room for Windows creating an NTFS partition at the begining of the disk, reinstall grub-efi....It is worth beginning from scratch and first install Windows on UEFI mode on GPT disk first and then reinstall Mint from scratch in the same UEFI mode, so you will get dual boot Mint and Wndows UEFI and single boot Windows on MBR disk.
Sorry, I just realized my initial post wasn't very clear. What I meant was I would install Windows on its own drive, the same way it is now, but using GPT to partition it instead of MBR. The "different version of Windows" would replace the current one. Would GRUB detect the new installation if it was on a GPT drive?
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: GRUB doesn't show up, boots straight into Mint

Post by Jo-con-Ël »

You can convert current Windows BIOS(MBR) to UEFI(GPT) without data loose. There are several How to, by example this one.

Once Windws is converted, most probably it will boot Windows UEFI by default but you can change boot order priority on computer setup to boot Linux Mint (ubuntu) option by default. Then on Mint session run sudo update-grub in order to detect and include a Windows UEFI option on GRUB menu.
Arrieritos semos y en el camino nos encontraremos.
SugarSon
Level 1
Level 1
Posts: 46
Joined: Fri May 08, 2015 3:46 pm

Re: GRUB doesn't show up, boots straight into Mint

Post by SugarSon »

Jo-con-Ël wrote: Fri Feb 03, 2023 4:26 am You can convert current Windows BIOS(MBR) to UEFI(GPT) without data loose. There are several How to, by example this one.

Once Windws is converted, most probably it will boot Windows UEFI by default but you can change boot order priority on computer setup to boot Linux Mint (ubuntu) option by default. Then on Mint session run sudo update-grub in order to detect and include a Windows UEFI option on GRUB menu.
That's neat, I'll look into that as well. Thanks again for your help!
Locked

Return to “Installation & Boot”