Can't get to grub to choose OS on boot

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
yargew

Can't get to grub to choose OS on boot

Post by yargew »

newbie here. tried to set up dual boot Win 10/ Mint 18.3 on Acer Aspire E 17. did NOT use scorch the earth and delete all option. shrank Win partition and set up 175GB for Mint and abt 18GB for swap. Install was successful for Mint but now only boots to Mint. Need to get it to boot to grub so i can choose which OS to use for a session. Need to get it to boot to grub so i can choose which OS to use for a session. Any help greatly appreciated.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Sir Charles

Re: Can't get to grub to choose OS on boot

Post by Sir Charles »

Once booted into Mint, open a terminal and run:

Code: Select all

sudo os-prober
If your Windows installation is found, run

Code: Select all

sudo update-grub
Reboot and see if you get the Grub boot menu.
yargew

Re: Can't get to grub to choose OS on boot

Post by yargew »

Thanks for the lead. Unfortunately, I can't find anything called os:

bill@bill-Aspire-ES1-711 / $ os -prober
os: command not found
bill@bill-Aspire-ES1-711 / $ sudo os -prober
[sudo] password for bill:
sudo: os: command not found
bill@bill-Aspire-ES1-711 / $ sudo os-prober
bill@bill-Aspire-ES1-711 / $ sudo os - prober
sudo: os: command not found
bill@bill-Aspire-ES1-711 / $ man os
No manual entry for os
bill@bill-Aspire-ES1-711 / $ CODE: SELECT ALL
CODE:: command not found
bill@bill-Aspire-ES1-711 / $ ^C
bill@bill-Aspire-ES1-711 / $

Any other ideas? Or corrections on my attempt to implement your suggestion?

Thanks,

Bill
Sir Charles

Re: Can't get to grub to choose OS on boot

Post by Sir Charles »

Hi,
Please copy the command and paste it in a terminal (no space between os and -prober):

Code: Select all

sudo os-prober
press enter; now type in your password and press enter again and see if it detects your Windows installation.
yargew

Re: Can't get to grub to choose OS on boot

Post by yargew »

Thanks for the clarification! Unfortunately, it did not find anything:

bill@bill-Aspire-ES1-711 ~ $ cd /
bill@bill-Aspire-ES1-711 / $ sudo os-prober
[sudo] password for bill:
bill@bill-Aspire-ES1-711 / $

So it did not find the Win 10 environment. However, it still exists. I stumbled across the Linux partition manager accidentally--and have not yet been able to find it again--and it showed the Win 10 partition. i can see the files using other tools. i just n't get grub to run to allow me to boot into Win 10

Thanks,

Bill
Sir Charles

Re: Can't get to grub to choose OS on boot

Post by Sir Charles »

That was unfortunate. Would you run sudo parted -l and copy the output and paste it back here? There are quite a few installation experts on the forums. This will give them an overview of the partitions on your drive so they will be better positioned to help you out.
yargew

Re: Can't get to grub to choose OS on boot

Post by yargew »

Here is the result:

bill@bill-Aspire-ES1-711 ~ $ sudo parted -l
[sudo] password for bill:
Model: ATA ST500LT012-1DG14 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 630MB 629MB ntfs Basic data partition hidden, diag
2 630MB 945MB 315MB fat32 EFI system partition boot, esp
3 945MB 1079MB 134MB Microsoft reserved partition msftres
4 1079MB 301GB 300GB ntfs Basic data partition msftdata
6 301GB 476GB 175GB ext4
7 476GB 484GB 8501MB linux-swap(v1)
5 484GB 500GB 16.0GB ntfs Basic data partition hidden, diag


bill@bill-Aspire-ES1-711 ~ $

Thanks!

Bill
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can't get to grub to choose OS on boot

Post by pbear »

This is a common problem.* Try sudo update-grub. Reboot and report back. Good luck.

* For some obscure reason, the installer often fails to detect the Windows OS when configuring Grub.
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Can't get to grub to choose OS on boot

Post by fabien85 »

It's also possible that Mint and Windows are installed in different boot mode.
Most probable culprit being that windows is in UEFI mode, as natively installed by the manufacturer, but Mint is in Legacy mode.
Please post the outputs of

Code: Select all

[ -d /sys/firmware/efi ] && echo "Currently in EFI mode" || echo "Currently in Legacy mode
ls -R /boot/efi
Put the output between code tags, with the button looking like </> above the typing area.
asinoro
Level 6
Level 6
Posts: 1288
Joined: Mon Feb 12, 2018 11:43 am

Re: Can't get to grub to choose OS on boot

Post by asinoro »

Code: Select all

[ -d /sys/firmware/efi ] && echo "Currently in EFI mode" || echo "Currently in Legacy mode"]
yargew

Re: Can't get to grub to choose OS on boot

Post by yargew »

pbear:
bill@bill-Aspire-ES1-711 ~ $ sudo update-grub
[sudo] password for bill:
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
bill@bill-Aspire-ES1-711 ~ $

What does this tell us?

Thanks,

Bill
yargew

Re: Can't get to grub to choose OS on boot

Post by yargew »

fabien85:

Code: Select all

bill@bill-Aspire-ES1-711 ~ $ [ -d /sys/firmware/efi ] && echo "Currently in EFI mode" || echo "Currently in Legacy mode
> ls -R /boot/efi
> [ -d /sys/firmware/efi ] && echo "Currently in EFI mode" || echo "Currently in Legacy mode
Currently in Legacy mode
Seems to be in Legacy mode. Now what?

Thanks,

Bill
yargew

Re: Can't get to grub to choose OS on boot

Post by yargew »

asinoro:
bill@bill-Aspire-ES1-711 ~ $ [ -d /sys/firmware/efi ] && echo "Currently in EFI mode" || echo "Currently in Legacy mode"]
Currently in Legacy mode]
bill@bill-Aspire-ES1-711 ~ $

Still reporting legacy mode. What should I try next?

Thanks,

Bill
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can't get to grub to choose OS on boot

Post by pbear »

Sounds like fabien85's suspicion might be correct, i.e., you have a mismatch of installations, though I have no idea how that happens. Hopefully he will have more insights. In the meantime, let's see whether you can confirm the UEFI/BIOS state of the Windows install. If you could post a screenshot of the internal hard drive as it appears in GParted, that would be the clearest indicator. Failing that, run lsblk in Terminal and post the output. While we're at it, what was the original operating system (Win7, 8 or 10)? And what procedure did you use for installing Mint?
asinoro
Level 6
Level 6
Posts: 1288
Joined: Mon Feb 12, 2018 11:43 am

Re: Can't get to grub to choose OS on boot

Post by asinoro »

Try this.
Attach you live usb to your pc, laptop.
Enter, BIOS enable UEFI and disable secure boot.
Enable to boot from your live usb.
Boot from live usb and visit, https://help.ubuntu.com/community/Boot-Repair
2nd option : install Boot-Repair in Ubuntu
If something is not going well boot repair will inform you.
When it finished reboot and remove your live usb.
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Can't get to grub to choose OS on boot

Post by fabien85 »

+1 on asinoro's suggestion

What probably happened is that when you installed you had booted the live USB in Legacy mode, so it performed a Legacy install.
Live USBs can be booted both in Legacy and UEFI mode, for compatibility with a maximum of computers. The drawback is situations like these, which are not obvious to detect. When you boot the live USB, in the boot menu offered by your computer, you should choose the UEFI entry. How that's named depends on the BIOS/firmware, e.g. on my computer for a Kingston USB the Legacy entry will be called "Kingston blabla", while the UEFI entry will be called "UEFI: Kingston blabla, partition 1".

Boot-repair launched from a live USB booted in UEFI mode is the simplest way to repair this, with a GUI interface and just some button clicks.
However in my experience it tends to add useless entries in the grub menu. An other option, much more manual, is to reinstall grub from the command line : https://sites.google.com/site/easylinuxtipsproject/6. You can try it if you feel more adventurous and/or at ease with command line.
Locked

Return to “Installation & Boot”