HP laptop running Windows 10, Ubuntu and Mageia. No Grub. Must select F9 to get selection

shadrach

New Member
Credits
199
Greetings from a first time poster. I'm exploring the Linux word. As indicated in the title I'm running three OS versions. My HP laptop is a 15-bs244wm. I upgraded it to a 1TB SSD and up to 8GB RAM. I've reloaded Windows 10 before loading the two Linux versions. In Control panel - System - Advanced System Settings - Advanced - Start up and Recovery: Windows 10 is the only OS showing up. I suspect the HP BIOS is causing the issue. I can boot into Ubuntu and Mageia using the F9 key, but no Grub screen shows up at startup. I ran the efibootmgr to change the boot order without any success. I saw a post from Yara with a similar issue and tried the link suggested by Atanere. It completed successfully, but when I rebooted I still didn't get a Grub and the computer booted straight into Windows. I have legacy boot disabled and secure boot enabled in BIOS. Fedora is loaded somewhere (which could be my problem) but I can't find where on my SSD it's loaded so I can format that partition. I've been fighting this for many days. I hope you can help. Thank you. David
 


wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
14,528
G'day David and welcome to linux.org :)

Mageia sources indicate it may be one of the few LInux Distros that does not support the use of Secure Boot.

Have you tried
  1. Disabling Secure Boot
  2. Rebooting
tell us what you see?

Off for my evening in Australia

Chris Turner
wizardfromoz
 

Alexzee

Well-Known Member
Credits
6,978
I second what our Wizard say's:-
Disable the secure boot.

Try booting into Ubuntu and run:

sudo update-grub
 

Tolkem

Well-Known Member
Credits
5,467
I suspect the HP BIOS is causing the issue. I can boot into Ubuntu and Mageia using the F9 key, but no Grub screen shows up at startup. I ran the efibootmgr to change the boot order without any success.
Due to work, I'm back to dual booting Linux-Windows, and I faced a similar situation, in fact, I installed Linux twice since the first time it booted to windows right away, thinking something was wrong cause didn't see that GRUB menu you're expecting too, then I thought "Oh wait, this is UEFI...could it be..." Is your PC Legacy BIOS or UEFI? Mine's UEFI, secure boot is off, and I suspect yours might be UEFI based too. Turns out you'll only get that menu in BIOS Legacy(as far as I've read)computers, while in UEFI you have to press some key to enter that menu. I have to press Esc then F9 and select Linux using the arrow keys, finally press Enter to boot to Linux. Check whether your machine uses Legacy BIOS or UEFI first.
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
14,528
@shadrach , @Tolkem maybe you can both share with us the output of

Code:
cat /etc/default/grub
and I can take a look at them?

Cheers

Wizard
 

Tolkem

Well-Known Member
Credits
5,467
@shadrach , @Tolkem maybe you can both share with us the output of

Code:
cat /etc/default/grub
and I can take a look at them?

Cheers

Wizard
Here it is
Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#depreciated options: GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_HIDDEN_TIMEOUT=1 ; possible kernel parms: systemd.log_level, systemd.xxx
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=4
GRUB_DISTRIBUTOR="Q4OS Desktop `get-q4os-version | awk -F '.' '{ print $1"."$2 }'` 'Centaurus'"
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_backlight=vendor resume=UUID=5c1ef855-7c87-46d6-b81b-d7529beb5e62 loglevel=3 systemd.log_color=0 systemd.show_status=1"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to disable uefi setup
#GRUB_DISABLE_UEFIFW=true
I checked it too but didn't see anything, then I'm not expert, so I might've just missed it.
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
14,528

Tolkem

Well-Known Member
Credits
5,467
Found this https://askubuntu.com/questions/221...u-alongside-a-pre-installed-windows-with-uefi and there's a paragraph which states:
Another issue that could make the system boot directly to Windows (without even showing the GRUB menu) is if either Windows took hold of the boot manager or after installing Ubuntu, the EFI partition was not properly configured for Windows. To solve this, simply go to Windows and open a terminal, then type the following (Need Administrative Privileges):
Code:
bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi
This will configure the Windows Boot Manager to take into consideration the GRUB Boot Manager. This could still happen even after running the Boot Repair from within Ubuntu. So making sure that Windows reads the Ubuntu EFI partition, in case you are using an EFI boot system instead of the old BIOS will solve it. In the above command line, the difference between shimx64.efi and grubx64.efi is that shimx64 is the actual Microsoft signed binary that works with Secure Boot enabled while grubx64 is the normal grub binary (Not signed).
It's for Ubuntu, so it must be adapted for others. I might or might not try that :rolleyes: I mean, it's not really an issue for me so...
 

Alexzee

Well-Known Member
Credits
6,978
Boot into Ubuntu and run this command so we can see your partitions.

sudo fdisk -l (small letter L)
 

shadrach

New Member
Credits
199
I second what our Wizard say's:-
Disable the secure boot.

Try booting into Ubuntu and run:

sudo update-grub
Thanks for your and Wizard's reply. After disabling secure boot and restarting, my laptop booted into windows without a grub. After running "sudo update-grub" in Ubuntu's terminal window, the results showed that it found Ubuntu, Mageia, and Windows boot mgr. It completed the application with "done". After rebooting it booted into Windows without a grub.
Since my original post, I found that Fedora and Mageia OS's won't boot. I'm considering formatting my SSD, reloading Windows 10 and Ubuntu in hopes this will give a grub screen at boot. I have not tried any of the other suggestions Due to the currupted Mageia and Fedora OS's. I don't know how to uninstall these OS's without formatting my SSD. If there is a way to uninstall these, please let me know.
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
14,528
I don't know how to uninstall these OS's without formatting my SSD. If there is a way to uninstall these, please let me know.
Won't get an idea until you give us the output for

Code:
sudo fdisk -l
That Alex asked for before. Or else if you have GParted installed, you could give us a screenshot of the partition setup. And be prepared if you know to tell us which partitions house the root OS for which Distro.

If you want to try editing /etc/default/grub and updating grub again, then the steps would be

1. Edit /etc/default grub - take the line which says

GRUB_TIMEOUT_STYLE=hidden

and replace the word hidden with the word menu.

2. Save and exit the file.
3. Run

sudo update-grub
4. Reboot

The above is all to do with being in Ubuntu - which Ubuntu is it - Ubuntu Desktop (GNOME), Ubuntu MATE or other?

Depending on your answer, you can edit /etc/default/grub using Nano in a Terminal or else launch the appropriate GUI-based Text Editor from Terminal, and make and save the changes.

If either of Fedora or Mageia however is currently holding the spot of Primary Partition, then it is one of their /etc/default/grub that needs editing and updating. If either or both of those is broken that will be harder to do.

I don't use Windows, only Linux, but you can remove Linux from a Windows computer, follow the steps here if you wish to take that course of action.

https://itsfoss.com/uninstall-ubuntu-linux-windows-dual-boot/

Cheers

Wizard
 

shadrach

New Member
Credits
199
With the results of the "fdisk" I'm not sure what to do next. Are my file system too messed up? Not being that familiar (and wanting to learn more) about Linux, how do I fix this? I'm running Ubuntu-Mate.
The line you wrote, "Depending on your answer, you can edit /etc/default/grub using Nano in a Terminal or else launch the appropriate GUI-based Text Editor from Terminal, and make and save the changes." I'm not sure what is meant by 'using Nano in a terminal window' or how to launch the GUI-based text editor. Sorry for being so ignorantin Linux, I'm trying to learn.
In the task bar, there is a window for "Low Disk Space", could this be adding to the madness?
Pending your reply, I'll wait on unistalling Linux from Windows based on the web site given.
Thanks for your continued assistance.
 

Attachments

Alexzee

Well-Known Member
Credits
6,978
With the results of the "fdisk" I'm not sure what to do next. Are my file system too messed up? Not being that familiar (and wanting to learn more) about Linux, how do I fix this? I'm running Ubuntu-Mate.
The line you wrote, "Depending on your answer, you can edit /etc/default/grub using Nano in a Terminal or else launch the appropriate GUI-based Text Editor from Terminal, and make and save the changes." I'm not sure what is meant by 'using Nano in a terminal window' or how to launch the GUI-based text editor. Sorry for being so ignorantin Linux, I'm trying to learn.
In the task bar, there is a window for "Low Disk Space", could this be adding to the madness?
Pending your reply, I'll wait on unistalling Linux from Windows based on the web site given.
Thanks for your continued assistance.
Looking at the screenshot you have 7 different Linux partitions varying in size and 2 swap partitions.
That would explain the low disk space.

IF this were my machine I'd look at all of the partitions in a Live version of gparted.
From there you can decide which partitions to delete and which ones to keep.
 

captain-sensible

Well-Known Member
Credits
10,352
yes but before you do , would be nice to confirm which partitions not to delete and which Linux OS are using which partitions.

So definitely do not remove /dev/sda1 thats part of uefi

Then a simple way is to boot both Linux OS one at a time and when running from a terminal run just:

df either with sudo or in my case as root: lets see mine :

Code:
ash-5.0# df 
Filesystem     1K-blocks     Used Available Use% Mounted on
tmpfs              32768     1292     31476   4% /run
devtmpfs         1947296        0   1947296   0% /dev
/dev/sda3       56743956 33919192  19912716  64% /
tmpfs            1987516    24544   1962972   2% /dev/shm
cgroup_root         8192        0      8192   0% /sys/fs/cgroup
/dev/sda1         101590    23064     78526  23% /boot/efi
/dev/sdb1       30318592  8842272  21476320  30% /run/media/andrew/7569-5EFD
in there is /dev/sda3 thats the root install partition for slackware ; i only have one linux OS

/dev/sdb1 is an sd card

/dev/sda1 is efi

do it for both ubuntu and the other Linux OS ; that will narrow it down.


Also from a running Linux OS you an have a look in /etc/fstab

eg from my running slackware. Again root install / is on /dev/sda3

Code:
bash-5.0$ cat /etc/fstab
/dev/sda2        swap             swap        defaults         0   0
/dev/sda3        /                ext4        defaults         1   1
/dev/sda1        /boot/efi        vfat        defaults         1   0
then as Alexzee says you can use gParted. By the way actually you can put jiust about any Linux OS on a usb and gParted should be in the menu eg for sure Knoppix . If its not you install it for the length of live session .

I think you can get label to show which OS from other commands on which partition ; can't remember so if any body can remind me and make it simple for OP ...

Then when your left with whats needed can address boot loader. For grub2 and with uefi the command i think would be; get one linux OS up and run :
Code:
#grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub  --debug
i'm sure you will get more replies to confirm or disagree
 
Last edited:

shadrach

New Member
Credits
199
OK, attached are the file structures for both Ubuntu-Mate, Mageia-Gnome, and Window 10 (SSD) file structures. Fedora is loaded, but I don't know where. I wasn't able to expand the /boot/efi partition using Gparted in Mageia. After selecting a partition and resizing it, the resulting new unallocated partition, The resize/move option was grayed out. I must really be missing the boat here. I've worked on this issue for days. I'm just about ready to reformat and start over with a clean SSD. However, it's probably not worth that much trouble just to get a grub menu. Thank you for your help as i work through this and learn more about Linux.
 

Attachments

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
14,528
I am inclined to think that we can use Timeshift, I describe as my Swiss Army Knife, as a one-stop shop, but I will lead into it, with some questions and some preparatory steps.

David, you can give us text output from commands using the Code option in your Reply Pane toolbar - right of the Smilies, it's 3 dots and a down arrow, click and choose Code, then you can copy the outputs from Terminal to that popup window.

NOTE - I have just read your #18 above, I will finish this Post and then address the content of that one. Chris.

1. Is it Ubuntu MATE 18.04 or 20.04, (or other) if unsure give us the output of

cat /etc/issue

2. Use, from Ubuntu

df -h

This is better than Andy's df above as it gives more Human Readable format

3. From Ubuntu

cat /etc/fstab

2.a and 3.a - when you get time if Mageia still boots from the BIOS boot sequence, give us the outputs for Mageia, from within a running instance of Mageia.

One of the remaining Linux filesystems will be the busted Fedora, by elimination.

So if you answer for 1., 2., 3., 2.a and 3.a we'll be geeting more info on how you are set up.

Cheers

Wiz
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
14,528
David be sure you read carefully, or else copy and paste commands we give you from this Thread to your Terminal or Konsole.

Those commands you had in your 2 screenshots should have been

Code:
cat /etc/fstab

# NOT cd /etc/fstab
... from Mageia

and

Code:
sudo apt-get install gparted
... from Ubuntu to install GParted.

Mageia and Ubuntu appear to print output from

df

in two different ways, because they are from 2 different Families (RPM and Debian) so I suggest using

df -h

across the board to standardise and make the figures easier to read.

Wiz
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!


Top