LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-27-2022, 06:53 PM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 22.04
Posts: 2,151

Rep: Reputation: 73
How to reinstall grub as my main boot loader?


I am using Ubuntu 20.04

Recently, I my HDMI port wasn't working. I took the laptop to HP. They very nicely said, "You still have guarantee, we will replace the whole motherboard, because the HDMI is an integral part of the motherboard."

Thanks!

Yesterday, I got my laptop back, but Ubuntu seemed to be gone, no grub bootloader, just Windows boot.

I called the guy, he said, press F9 on boot.

Sure enough, up comes an HP bootloader, showing Windows as number one and Ubuntu as number 2. Press the down arrow, and enter and grub boot loader starts.

How can I get back to the situation just grub bootloader, with Ubu at the top? Or change the HP bootloader to have Ubu at the top?

I should say, "without risking destroying the MBR" I need this laptop every day!
 
Old 09-27-2022, 06:59 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675

Rep: Reputation: Disabled
You say HP bootloader, sounds like EFI menu to me. For EFI use efibootmgr command line application, it allows you to change boot order and much more.
 
Old 09-27-2022, 07:33 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,776

Rep: Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677
Press f10 to get into firmware/bios settings, find the boot menu, select os-manager, move Ubuntu to the top with f5 f6 keys, press f10 to save.

Last edited by colorpurple21859; 09-27-2022 at 07:34 PM.
 
Old 09-28-2022, 01:09 AM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,346
Blog Entries: 1

Rep: Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197
Pedroski, colorpurple's and Emerson's directions are two completely different methods of achieving the same desired result, assuming F10 is the correct key for getting into your laptop's UEFI BIOS' settings.
 
Old 09-28-2022, 01:44 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
So, if the m/board was replaced, how did the Ubuntu entry get into the NVRAM on the motherboard ???.

Paint my cynical ...
 
Old 09-28-2022, 01:45 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
So, if the m/board was replaced, how did the Ubuntu entry get into the NVRAM on the motherboard ???.

Paint me skeptical ...

Last edited by syg00; 09-28-2022 at 01:45 AM. Reason: typo
 
Old 09-28-2022, 01:57 AM   #7
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,346
Blog Entries: 1

Rep: Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197
Computers want to boot. They look for something apparently bootable, and if they find something fulfilling requirements, they proceed. UEFI didn't change this basic behavior.
 
Old 09-28-2022, 03:07 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
No EFI variables, no boot entry. If it was (re)set to factory, there is no way a linux entry would be present.

But, if it now works, all's good ...
 
Old 09-28-2022, 07:30 AM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,233

Rep: Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671
efibootmgr generally won't work on an HP for whatever reason. I've been able to use it to add an entry but cannot delete or change the order with efibootmgr. I've seen numerous threads here and on other forums describing this problem with HP.

The method described in post 3 will work.
 
Old 09-28-2022, 07:38 PM   #10
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 22.04
Posts: 2,151

Original Poster
Rep: Reputation: 73
Ok, thanks everyone, I will try the bios first, that is F10 on boot.

How that got into the NVRAM, I don't know! The techs at HP must have changed something!
 
Old 09-28-2022, 10:35 PM   #11
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 22.04
Posts: 2,151

Original Poster
Rep: Reputation: 73
Well that worked great:

Go to bios -> boot options -> UEFI Boot Order

Up comes a little window. Windows was on top. Press F6 and Windows moves down, F10 to save and then grub starts!!

Thanks for your tips and advice!
 
Old 09-29-2022, 11:58 AM   #12
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
With linux there are many ways to skin that cat.

Many of us started using linux in the beginning and bios settings (legacy or uefi) are often your friend.
 
Old 09-29-2022, 01:53 PM   #13
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,346
Blog Entries: 1

Rep: Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197
Quote:
Originally Posted by Pedroski View Post
How that got into the NVRAM, I don't know! The techs at HP must have changed something!
They changed the motherboard, thus the default BIOS settings came along for the ride. If they wished to verify the new motherboard operated correctly, they would almost certainly have booted Windows, not Linux.
 
Old 09-29-2022, 09:52 PM   #14
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 22.04
Posts: 2,151

Original Poster
Rep: Reputation: 73
Yes, I didn't give them a password for Linux, just for Windows.

I haven't met any Chinese who use Linux. There must be some!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Not able to reinstall grub boot loader in rescue mode gauravbhatkar Linux - Server 1 06-05-2016 12:51 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 11:56 PM
How to change from grub boot loader to lilo boot loader linuxjamil Linux - Software 1 05-27-2008 02:47 PM
installing grub, or other boot loader, after XP reinstall. andrews240 Debian 3 06-07-2006 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:07 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