LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi
User Name
Password
Bodhi This forum is for the discussion of Bodhi Linux.

Notices


Reply
  Search this Thread
Old 04-17-2019, 10:36 PM   #1
madmax25
Member
 
Registered: Aug 2018
Posts: 202

Rep: Reputation: Disabled
BL4.5.0 64bit - How to reinstall GRUB, please?


On my laptop, I installed Xubuntu 18.04.2-64bit next to BL 4.5.0-64bit, but I want to have Bodhi back as my default system.
I tried the following commands, but they don't work anymore.

Code:
sudo grub-install /dev/sda1
sudo update-grub
Please note:
sda1 is the efi partition of my UEFI system.

After these two commands, the version of GRUB from Xubuntu is still enabled.
So, Xubuntu is my default system, but I want to have the version of GRUB from Bodhi back again, in order to have Bodhi as my default system.

How can I do it, please?
 
Old 04-17-2019, 10:45 PM   #2
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,440

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
In UEFI environments it's the BIOS that controls whose boot menu will be first displayed, and which other(s) to fall back to upon failure. While booted to Linux you can change this order via the efibootmgr command.
 
Old 04-17-2019, 10:50 PM   #3
madmax25
Member
 
Registered: Aug 2018
Posts: 202

Original Poster
Rep: Reputation: Disabled
That's not exactly what I was looking for.

BL4.5.0 has created it's own GRUB, it's one with a grey background.

Xubuntu gave me one with a black background, but I want the grey one back.
 
Old 04-17-2019, 11:01 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,757

Rep: Reputation: 2810Reputation: 2810Reputation: 2810Reputation: 2810Reputation: 2810Reputation: 2810Reputation: 2810Reputation: 2810Reputation: 2810Reputation: 2810Reputation: 2810
Re-read post #2, particularly the last sentence.
 
Old 04-17-2019, 11:56 PM   #5
madmax25
Member
 
Registered: Aug 2018
Posts: 202

Original Poster
Rep: Reputation: Disabled
This is not what I want.

I don't want to edit
GRUB_DEFAULT=0
to another number.

I want to replace the grub from Xubuntu (the black one) with the one from BL4.5.0 (the grey one).

Usually, I do this with...
Code:
sudo grub-install /dev/sda1
sudo update-grub
...from within the wanted system,
but it doesn't work.
I still have the black one.

Last edited by madmax25; 04-17-2019 at 11:58 PM.
 
Old 04-18-2019, 01:20 AM   #6
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,440

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Originally Posted by madmax25 View Post
it doesn't work
because you are using UEFI to boot. Read post #2, particularly the last sentence. Then act accordingly.

One alternative is to reinstall both BL and Xubuntu using legacy mode, Xubuntu first. Then you will have the one with the gray background in control, until you upgrade Xubuntu.

Also you could change the one with the black background to use gray.

Last edited by mrmazda; 04-18-2019 at 01:21 AM.
 
Old 04-18-2019, 02:04 AM   #7
madmax25
Member
 
Registered: Aug 2018
Posts: 202

Original Poster
Rep: Reputation: Disabled
Is there a way to totally remove GRUB (and maybe all instances that may have been installed recently) and reinstall the one from Bodhi, without having to reinstall the entire Bodhi?

I tried efibootmgr. I got (among others) two entries, one for Bodhi and one for Ubuntu?

After removing the one for Ubuntu, nothing changed.
After removing the one for Bodhi, I wasn't able to boot to Bodhi anymore.
Booting (to Bodhi) was possible only by means of a SuperGrub2 thumbdrive.

Is there any chance to fix this without reinstalling Bodhi?

Last edited by madmax25; 04-18-2019 at 02:12 AM.
 
Old 04-18-2019, 02:12 AM   #8
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,440

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
What is the output from
Code:
sudo efibootmgr -v
while booted to Bodhi from the thumbdrive?
 
Old 04-18-2019, 05:53 AM   #9
madmax25
Member
 
Registered: Aug 2018
Posts: 202

Original Poster
Rep: Reputation: Disabled
Currently, I have only Bodhi 4.5.0 and Win10 Home on my laptop, but GRUB is ruined.

When Win10 is at 1st place in the boot order of my BIOS, booting into Win10 is ok.
But in my BIOS there are entries for Windows, Bodhi and Ubuntu.

When Bodhi is at 1st place, booting ends up in a console with "grub>" as prompt.
I can boot into Bodhi using a SuperGrub2 thumbdrive.

The only chance to give you the wanted output, is when Bodhi is booted by the SuperGrub2 thumbdrive.
Here it is:

Code:
efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 2001,0000,3000,0001,0004,2002,2004
Boot0000* ubuntu        HD(1,GPT,d1b43d87-d7a1-4691-818b-97ad41b44b0b,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)RC
Boot0001* bodhi HD(1,GPT,d1b43d87-d7a1-4691-818b-97ad41b44b0b,0x800,0x82000)/File(\EFI\bodhi\shimx64.efi)
Boot0002* USB Hard Drive (UEFI) - Generic Flash Disk    PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(2,GPT,0d29a6d7-b087-4ddf-95a0-75b9d3f4d39c,0x114,0x1680)RC
Boot0003* USB Hard Drive (UEFI) - Generic Flash Disk    PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(2,GPT,0d29a6d7-b087-4ddf-95a0-75b9d3f4d39c,0x114,0x1680)RC
Boot0004* Windows Boot Manager  HD(1,GPT,d1b43d87-d7a1-4691-818b-97ad41b44b0b,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...FS...............
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot3000* Internal Hard Disk or Solid State Disk        RC
I just found a "how to" here, with the system installed at sda1 and efi installed at sda2.
It says:

Quote:
sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sda
update-grub
Here, in the 5th line, I don't understand, why is grub installed at /dev/sda (without a number),
when grub usually has to be installed at /dev/sda1 (in this example)?

Last edited by madmax25; 04-18-2019 at 01:41 PM.
 
Old 04-18-2019, 01:40 PM   #10
madmax25
Member
 
Registered: Aug 2018
Posts: 202

Original Poster
Rep: Reputation: Disabled
Now, I reinstalled Xubuntu 18.04.2-64bit and got a working triple boot system back (with Win10-Home-64bit, Ubuntu18.04.2-64bit and Bodhi4.5.0-64bit).
But, what I don't understand is this:
Why is it not possible to overwrite GRUB anymore, while running Bodhi again after Xubuntu has been installed?

I mean, when I install two distributions of an Ubuntu based Linux and I do...

Code:
sudo grub-install /dev/sda1
sudo update grub
...the GRUB is usually created in the version of the particular distribution currently in use.

By doing so, I can switch between the GRUB versions.

This doesn't seem to be true for Bodhi4.5.0-64bit (the 32bit of it seems to be ok, though).

When I run Bodhi after Xubuntu is installed, and when I do the above mentioned commands,
GRUB is not overwritten anymore, which I would have expected.

Instead, all I can do is giving...

GRUB_DEFAULT=

another number than the 0.
 
Old 04-18-2019, 06:09 PM   #11
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,440

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Originally Posted by madmax25 View Post
I mean, when I install two distributions of an Ubuntu based Linux and I do...

Code:
sudo grub-install /dev/sda1
sudo update grub
...the GRUB is usually created in the version of the particular distribution currently in use.

By doing so, I can switch between the GRUB versions.
That PC is not booting in UEFI mode, is it?

On your UEFI PC, open any sector editor to examine the first disk sector and the first sector of the ESP partition. On the first sector, you should find no code bytes, only several disk ID bytes, a protective (type 0xEE) partition table entry, and 55 AA at the end. On the ESP, you'll find some code, but none of it Grub, and, viewed in ASCII mode, the string "This is not a bootable disk".

Grub2 and Grub2-EFI work very differently up to the point you see a boot menu. If you're going to continue multibooting with UEFI, you'll either have to learn how to configure boot using efibootmgr and your UEFI BIOS, and/or build and use custom.cfg, or do a lot of OS re-installations.
 
Old 04-19-2019, 05:24 AM   #12
madmax25
Member
 
Registered: Aug 2018
Posts: 202

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
That PC is not booting in UEFI mode, is it?
Actually, it is in UEFI mode.

Here's what it's usually like on my computer:
Let's say, you have two distributions installed, called Linux1 and Linux2 (both of them after Windows was installed).
When you install Linux1, it's the 1st one in GRUB, so it's the default system, which is booting automatically.
Then you install Linux2.
Now, Linux2 is the 1st one in GRUB, and so Linux2 is the default system, booting automatically.
When I want Linux1 to be the default system again, I reboot, stop the GRUB countdown by choosing Linux1
wait for it to be booted and do

Code:
sudo grub-install /dev/sda1
sudo update grub
After the next reboot, Linux1 is the 1st one in GRUB again.
When I want Linux2 to be default again, I boot Linux2 to the two terminal commands and I get back Linux1 as default system.

So, by booting in the wanted Linux, and do the two terminal commands I can switch between these two systems.
what I just tried to describe is,

But, this doesn't work on the machine we are talking about here.

As long as Bodhi was installed (after Windows was installed), everything was great.
Bodhi was the default system, and when I wanted Windows, I used to choose it in GRUB.

Then I installed Xubuntu as a 3rd system.
Now, Xubuntu was default.

Because I still wanted Bodhi to be default, I booted Bodhi, did the two terminal commands rebooted the computer and...

...no, Bodhi was not default.
Xubuntu still was.

Then I tried to uninstall Xubuntu and that's when I got stuck in the GRUB console.

I fixed this, be reinstalling Xubuntu, but still, I cannot get Bodhi to be at the 1st position of GRUB.

So, in the end, what I want to do is, I want the default system to be at the 1st position of GRUB,
because only then, I don't have to change the number of...
Code:
GRUB_DEFAULT=
 
1 members found this post helpful.
Old 04-19-2019, 06:57 AM   #13
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,440

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Please show content of /etc/fstab from both bodhi and xubuntu on the problem PC, along with the output of
Code:
sudo parted -l
run from either. Optionally, show the same from the PC where the grub behavior you desire works.
 
1 members found this post helpful.
Old 04-19-2019, 07:18 AM   #14
madmax25
Member
 
Registered: Aug 2018
Posts: 202

Original Poster
Rep: Reputation: Disabled
I just checked the GRUB menu with Grub-Customizer while running Bodhi.
Bodhi is in the 1st place, so, it's exactly where I want it to be.

Then, why am I not able to overwrite GRUB in that way?
The Xubuntu version of GRUB (with "Ubuntu" at 1st place) is still there, with Bodhi at 3rd place.
Almost looks to me like some kind of writing protection.

The wanted information will follow as soon as possible...

Last edited by madmax25; 04-19-2019 at 07:24 AM.
 
1 members found this post helpful.
Old 04-19-2019, 07:49 AM   #15
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,860

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
You will need to change boot order in bios setup. When you first turn on computer hit esc or one of the f-keys to get into bios set up use arrow keys to get to boot order section to change order
 
  


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
BL4.5.0-64bit with latest Skypeforlinux - How to remove being asked to unlock keyring, please? madmax25 Bodhi 10 11-20-2018 12:10 PM
BL4.5.0-64bit - How to create a link to folder, please? madmax25 Bodhi 6 09-25-2018 12:00 PM
BL4.5.0.64bit - Vino tray icon missing madmax25 Bodhi 2 09-23-2018 09:34 AM
BL4.5.0-64bit - ukuu doesn't show what it is doing. madmax25 Bodhi 2 09-23-2018 09:29 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi

All times are GMT -5. The time now is 05:37 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration