LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 01-10-2024, 05:22 AM   #1
hd99
Member
 
Registered: Aug 2022
Posts: 58

Rep: Reputation: 1
installation worked like a charm, but grub doesnt shows up at boot..


hello

here on two different laptops i have a problem :
there are already both on windows, but the simple attempt to install linux is a bit complicated.
the LMDE systems boot up well from liveusb. The installation works like a charm. But after a reboot, systematically the computer boot up into windows, with not showing the grub menu. Because it doesnt boot up directly on grub.efi

well, if I F9 the bios at startup, the bios itself can find within the HDD the both windows and grub efi files and boot up well on linux ; but my wish is to get the grub firstly (whom contains windows's entry) from bios. I can't change the efi variables from the bios, as it's a insydebios one.

how could i fix it?

i tried
a/ by distinguish both /boot/efi mount point and partition at the partition step of installation wizard, with no effect
b/ to install grub, in the step after, on the /dev/sda2 (instead of default /dev/sda), where sda2 is vfat efi partition (with windows), and sda8 the / root system partition,

with no effect..

i have well as the same as others computer with the same win8 and linux systems, the same /boot/efi/EFI variables, as Boot/debian/Microsoft.

im totally lost, im wondering why the computer always boot up directly on mswindows instead of grub..

i already tried those attempts, with no more success :

https://bbs.archlinux.org/viewtopic....28724#p1728724
https://askubuntu.com/a/831241
https://askubuntu.com/a/1069886
https://askubuntu.com/a/1203713

without forgetting the mount -t efivarfs efivarfs /sys/firmware/efi/efivars


what am i doing wrong?

the last time i observed a such issue, it was on a similar lenovo laptop, i did this (to separate /boot/efi by creating a completely new efi partition, then asking the installer to install grub on /dev/sda10 instead of /dev/sda) :



Quote:
=================================
had that problem too :
win8 installed by default, EFI mode, with GPT. Dont want to wipe all out.
Had several new partitions for nux/bsd. So I booted on my beloved LMDE5 liveusb.

I did about ten installs without understanding, why would that not work?
each time when installation started very well, it finishes on a grub-installation
failure, everytime.

Even by trying changing different settings.

Even using the grub-repair utility -whom, like gparted, is only on lmde5live, not lmde5 default install!-


so I finally went up to boot back on my beloved LMDE5 liveusb, and took a precaution regarding it :

1. before starting again and again the installation process, I just launched gparted
2. created a new EFI fat32-somthing type of partition (could be seen in fdisk /dev/sda)
in addition of the EFI-partitions made by default windows installation.
3. Means after getting at the end of the disk my several partitions (50GB /, home, +efi)
4. I attempted to install back LMDE5 with standard installer ; saying "no, dont use /dev/sda1
nor /dev/sda2 windows partitions to put your grub files/efi system, but only on /dev/sda8 new fat32 efi partition!"

[I already have exactly flex20405 laptop, whom grub is well on the "windows efi standard partition", like
all my others win8-10/lmde5/obsd laptops, working well since the beginning]

5. so after I did a such experience, told LMDE5 installer to use not only /, /home and swap partitions to use,
but also a efi-specific partition added only for it -about 500MB-, it worked immediately.
Dont know why the G50 laptop have this thing, but now, hope it would help some linuxians hearts

Conclusion : on my own, I have triboot of win/LMDE5/obsd, like on my previous laptop.
Yes, it really worth a post after those years (means hours/days of working on that problem/solution). Definitely
==================================
but here, it doesnt works at all... for two lenovo and HP laptops.
 
Old 01-10-2024, 12:23 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,535

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Do you have the Linux OS set to first boot priority in the BIOS? If you can use the F9 key for a one time boot option to boot Linux you need to make the change permanent. What is the boot order from: sudo efibootmgr -v?
 
Old 01-10-2024, 05:38 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
This is what works on my hp: f10 to access bios/firmware 'system configuration'>'boot options'>'os boot manager' use f5 f6 key to move items up and down to change order, f10 to save and exit.
 
Old 01-11-2024, 04:57 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,535

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Generally, the one time boot option for an HP is the F9 key and access to the BIOS is with the F10 key and you may find the options you are looking for under System Configuration or under Boot Options. I don't know about Lenovo but as pointed out above, it is a simple task to change the boot priority in the BIOS with HP.
 
Old 01-11-2024, 07:30 PM   #5
hd99
Member
 
Registered: Aug 2022
Posts: 58

Original Poster
Rep: Reputation: 1
hello

thank you all for your replies

Quote:
Originally Posted by yancek View Post
Do you have the Linux OS set to first boot priority in the BIOS? If you can use the F9 key for a one time boot option to boot Linux you need to make the change permanent. What is the boot order from: sudo efibootmgr -v?
well, on the HP G7/efi :
F9 could well boot into linux. BUT. Yes, there is a but :
using liveusb/mount/grub-install/update-grub/efibootmgr-o + boot-repair, did NOT repair it.
everytime, it boots back on windows's efi

im wondering about using the g50-70 trick, whom consists to create a vfat-formated efi partition and to install on /grub/sda8 at that time (it's the situation of the quoted part of my first post)

for the lenovo flex20405, for a huge time i had to F11 immediately at bootup to avoid going into windows's efi.
thus, since i did a simple :
Quote:
update-grub
grub-install --recheck /dev/sda
it worked well for that laptop.
here is the gparted thing for that flex20405 :
https://img.y-y.li/CK5XNnaj/OFIgpCEM.png

where here is the mount :
https://paste.debian.net/1303849/


thus, about the hp G7, im on it since almost three days, i tried everything :
bios update this evening (no change)
mount whole thing, as
Quote:
sudo mount /dev/sdXY /mnt
sudo mount /dev/sdXX /mnt/boot/efi

for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
mount -t efivarfs none /sys/firmware/efi/efivars
sudo chroot /mnt

grub-install /dev/sdX
update-grub
exit
plus :
Quote:
sudo mount /dev/sdb8 /mnt
sudo mount /dev/sdb6 /mnt/boot
sudo mount /dev/sdb2 /mnt/boot/efi

sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys
mount -t efivarfs none /sys/firmware/efi/efivars
sudo chroot /mnt

grub-install --target=x86_64-efi /dev/sdb

grub-install --recheck /dev/sdb

exit &&
sudo umount /mnt/sys &&
sudo umount /mnt/proc &&
sudo umount /mnt/dev/pts &&
sudo umount /mnt/dev &&
sudo umount /mnt
plus both mixed together (the grub-install --recheck /dev/sda permitted to flex20405 to boot directly on grub instead of win8 by default, i had during a f... year to F11 at each reboot)

for the hp g7 2257sf, i still have, after all those commands, plus the efibootmgr -o [debianfirst,then common order], still the computers boots up on windows'efi.

here are some links about this :
https://forums.linuxmint.com/viewtop...0eb6c&start=20

https://www.happyassassin.net/posts/...lly-work-then/

https://forums.linuxmint.com/viewtop...?f=46&t=371385

https://forum.ubuntu-fr.org/viewtopic.php?id=1944101

https://ubuntuforums.org/showthread.php?t=2102211

https://forums.linuxmint.com/viewtopic.php?t=370869

https://askubuntu.com/questions/2442...y-new-efi-file

https://ubuntuforums.org/archive/ind...t-2227889.html


i can use the F9 key to boot under linux, yes, at bios's boot up.

Quote:
Originally Posted by colorpurple21859 View Post
This is what works on my hp: f10 to access bios/firmware 'system configuration'>'boot options'>'os boot manager' use f5 f6 key to move items up and down to change order, f10 to save and exit.
unfortunately i have nothing to manage direct EFI entries into that insyde end-user bios/efi.


Quote:
Originally Posted by yancek View Post
Generally, the one time boot option for an HP is the F9 key and access to the BIOS is with the F10 key and you may find the options you are looking for under System Configuration or under Boot Options. I don't know about Lenovo but as pointed out above, it is a simple task to change the boot priority in the BIOS with HP.

the thing is, im not looking to "find a way to boot on linux by F9/EFI", almost all efi computers have it
im looking for a solution, where after a common linux's wizard installation including grub installation, after update-grub/grub-install with recheck option, after boot-repair tool attempt, after efibootmgr -o orders change, to get another way to avoid windows's boot first, than to replace directly msftwindows's efi file by grub's efi one.

hp is supposed to work, afhrew....

here are attempts with efibootmgr -o, all finishing by rebooting on windows8 directly :
https://paste.debian.net/1303850/
https://paste.debian.net/1303851/
https://paste.debian.net/1303852/
https://paste.debian.net/1303854/

only the -n option from F9-key booted linux/grub makes the computer booting directly on grub/linux. Not -o . Or anything else.
but i dont want to be restricted to such manipulation, just want if somebody without my password wants to reboot, the choice of win/nux should be made by grub, not windows directly if no keystroke is entered...

yepp, everytime i poweroff the computer completely (no reboot) to test if the latest manipulation could avoid windows efi boots directly.
until here, none worked on that hp g7.
Attached Thumbnails
Click image for larger version

Name:	Capture d'ecran du 2024-01-12 02-02-36.png
Views:	4
Size:	71.1 KB
ID:	42381  
Attached Files
File Type: txt 1.txt (968 Bytes, 3 views)
File Type: txt 2.txt (1.9 KB, 10 views)
File Type: txt 4.txt (911 Bytes, 3 views)
File Type: txt vv.txt (1.1 KB, 6 views)

Last edited by hd99; 01-11-2024 at 07:36 PM.
 
Old 01-12-2024, 05:33 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,535

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Quote:
im not looking to "find a way to boot on linux by F9/EF
And that is exactly what we were trying to explain to you. The F9 key is almost always a ONE TIME change. It is not a permanent change. It only makes the change for that boot and if you want to make it permanent, you need to not use the F9 one time boot option but another key which should show. On my HP it is the F10 key to actually access the BIOS to make a permanent change.

most efibootmgr changes do not work on HP computers but you can very easily make the change once you learn how to actually access the BIOS. Where you make the change will vary as an earlier post above says it is under System Configuration while on mine it is under Boot Options. You find OS Boot Manager and you can make the change there by using the F6 key to move a highlighted entry up or the F5 key to move an entry down. This information is printed on that page in your BIOS firmware. I don't have a Lenovo so I have no idea how that would work.

I see reference in your posts to boot repair. Is there any particular reason why you did not use the Create BootInfo Summary Option suggested on the boot repair page? That would give members here a link to view details on your system.

When you use the one time F9 boot option to boot LMDE, can you view your EFI partition? Can you see the proper files and directories there? Do you have a directory for LMDE? I don't know what it would be called, debian??

At this point I would suggest you run boot repair and post the link you get it when it finishes so there is some detailed information specific to your computer.
 
Old 01-12-2024, 02:10 PM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Maybe this will work: back up the EFI/BOOT/Bootx64.efi file on the efi partition and replace it by copying Slackware grubx64.efi on the efi partition to EFI/BOOT/Bootx64.efi on the efi partition
 
Old 01-12-2024, 03:08 PM   #8
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
Info:
https://wiki.archlinux.org/title/Dual_boot_with_Windows
 
Old 01-13-2024, 04:37 PM   #9
hd99
Member
 
Registered: Aug 2022
Posts: 58

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by colorpurple21859 View Post
Maybe this will work: back up the EFI/BOOT/Bootx64.efi file on the efi partition and replace it by copying Slackware grubx64.efi on the efi partition to EFI/BOOT/Bootx64.efi on the efi partition
this is what i want to avoid : not touching to efi files and fix the solution by grub-tools (i didnt had to touch .efi files on lenovo nor asus efi laptop)

Quote:
Originally Posted by yancek View Post
And that is exactly what we were trying to explain to you. The F9 key is almost always a ONE TIME change. It is not a permanent change. It only makes the change for that boot and if you want to make it permanent, you need to not use the F9 one time boot option but another key which should show. On my HP it is the F10 key to actually access the BIOS to make a permanent change.
i agree

Quote:
Originally Posted by yancek View Post
most efibootmgr changes do not work on HP computers but you can very easily make the change once you learn how to actually access the BIOS. Where you make the change will vary as an earlier post above says it is under System Configuration while on mine it is under Boot Options. You find OS Boot Manager and you can make the change there by using the F6 key to move a highlighted entry up or the F5 key to move an entry down. This information is printed on that page in your BIOS firmware. I don't have a Lenovo so I have no idea how that would work.
i agree

Quote:
Originally Posted by yancek View Post
I see reference in your posts to boot repair. Is there any particular reason why you did not use the Create BootInfo Summary Option suggested on the boot repair page? That would give members here a link to view details on your system.
i tried, no effect, i have the txt log report in attachment

Quote:
Originally Posted by yancek View Post
When you use the one time F9 boot option to boot LMDE, can you view your EFI partition? Can you see the proper files and directories there? Do you have a directory for LMDE? I don't know what it would be called, debian??
yes, i see "debian" just under windows, or grub.efi if i browse ; this is only available on the F9, not in the bios.

Quote:
Originally Posted by yancek View Post
At this point I would suggest you run boot repair and post the link you get it when it finishes so there is some detailed information specific to your computer.
yep, in attachment
Attached Files
File Type: log boot-repair.log (38.3 KB, 7 views)
File Type: txt Boot-Info_20240113_1645.txt (16.2 KB, 6 views)
 
Old 01-13-2024, 09:40 PM   #10
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Run this command to add a boot entry into the bios for LMDE.
Code:
sudo efibootmgr -c -d /dev/sda --part=2 -L LMDE -l \\EFI\\debian\\shimx64.efi
 
1 members found this post helpful.
Old 01-14-2024, 06:08 AM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,535

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
The Boot Info log you posted is interesting as I don't believe I have seen this before. Your efibootmgr output shows the current boot as 0002 which below shows debian as 0002 so that would be your LMDE. Curiously, 0002 does not show in the boot order so I see the problem. Obviously, you can't put it first if it does not show an entry. I don't know why that would happen. You could try the suggestion in the post above but if that fails, I expect it is hardware related. Is this the HP or the Lenovo?
 
Old 01-14-2024, 10:01 AM   #12
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
This solution only works as long as you boot into lmde. After booting into Windows will have to use f9 key to boot back into lmde.
Create a /etc/rc.local file with this in it:
Code:
#!/bin/bash
#a place to run local commands at boot
efibootmgr -n 0002


exit 0
Make it executable:
Code:
sudo chmod +x /etc/rc.local
Follow this web page to create a rc-local.service and enable it:
https://www.linuxbabe.com/linux-serv...l-with-systemd
On reboots from lmde should have the grub menu.

The real solution is to find where in the bios to make lmde/debian first in the boot order or do as suggested with the EFI/bootx64.efi file
 
Old 01-16-2024, 08:17 AM   #13
hd99
Member
 
Registered: Aug 2022
Posts: 58

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by yancek View Post
The Boot Info log you posted is interesting as I don't believe I have seen this before. Your efibootmgr output shows the current boot as 0002 which below shows debian as 0002 so that would be your LMDE. Curiously, 0002 does not show in the boot order so I see the problem. Obviously, you can't put it first if it does not show an entry. I don't know why that would happen. You could try the suggestion in the post above but if that fails, I expect it is hardware related. Is this the HP or the Lenovo?
here is the boot part of the bios :
https://img.y-y.li/gallery#uiCzKXXH/...s/mpzJoC7i.jpg

Last edited by hd99; 01-16-2024 at 08:20 AM.
 
Old 01-16-2024, 09:13 AM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
What is in os boot manager? There should be more items inside os boot manager.

Last edited by colorpurple21859; 01-16-2024 at 09:16 AM.
 
Old 02-22-2024, 01:21 PM   #15
niceflipper8827
Member
 
Registered: Sep 2023
Location: Washington State,USA
Distribution: ChromeOS,SlackWare,Android and Lubuntu
Posts: 68

Rep: Reputation: 2
As for the BIOS entry key on HP machines it is esc and the one time boot selector key is f9 however, the temporary boot option isn't a permanent solution.

I'd recommend that the OP consider investigate installing the grub II boot loader and let OS-Robber discover the windows 8 installation. Furthermore Windows 8 has long been EOLed

see included link

https://learn.microsoft.com/en-us/li...cts/windows-81
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware 14.1, full install, sound card worked OK, but microphone is not worked. zw963 Slackware 7 11-23-2013 06:57 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
USB flash drive works like a charm! wapcaplet LinuxQuestions.org Member Success Stories 3 07-10-2009 07:50 AM
SUSE 9.2 works like a charm! mimika SUSE / openSUSE 2 11-07-2004 02:44 PM
Mandrake 10 "Official"..installed like a charm! mikeCanada Mandriva 2 05-31-2004 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 02:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration