LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 09-04-2019, 01:34 PM   #1
madmax25
Member
 
Registered: Aug 2018
Posts: 348

Rep: Reputation: Disabled
BL5.0-64bit - How to repair grub, please?


I'm running a multi boot laptop with the following 64bit systems:
Bodhi 5.0
Win10Pro
Xubuntu 18.04.3

I'm also using UEFI.

Today, I fixed some issues about the kernel and the wifi driver on Xubuntu.

To do this, it was necessary to reinstall grub and I did
Code:
sudo grub-install /dev/sda
followed by
Code:
sudo update-grub
Now, I have the following folders in my efi-partition:

bodhi
Boot
HP
Microsoft
ubuntu


I want to get rid of the bodhi folder and get the boot files of bodhi into the ubuntu folder.

I deleted the bodhi folder several times ans reinstalled grub on
/dev/sda1 (not the number 1!) instead of /dev/sda,
but it doesn't help.

In the end, I have the wrong bodhi folder again, which is why the laptop uses the grub of Xubuntu, but I want it to use the grub of Bodhi.

How can I fix this, please?
 
Old 09-04-2019, 02:01 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
The first thing is to sort out boot directories.

I have one common /boot. But the secret is to only mount it via the distribution you want to control it. So you might have
Bodhi: /boot # with the boot drive mounted
Xubuntu: /boot not mounted, so the /boot directory fills has the Xubuntu kernel(s), initrds, etc.

If you occasionally mount the Xubuntu / from Bodhi, you can copy that stuff over to the actual /boot and update grub when it updates the kernel.

That's what I do. I notice you also boot M$ windows. It's your choice but I have it relegated to a VM so it doesn't get near my drive.
 
Old 09-04-2019, 02:19 PM   #3
madmax25
Member
 
Registered: Aug 2018
Posts: 348

Original Poster
Rep: Reputation: Disabled
Sorry, I got no idea what you are talking about and what you want me to do.
I just want to replace the grub of Xubuntu by the one of Bodhi, but I don't know how,
because I cannot remove the one which is accidently installed in

/dev/sda

where it actually belongs to

/dev/sda1

I need some guide about how to remove Xubuntu's grub from

/dev/sda

and how to install Bodhi's grub in

/dev/sda1
 
Old 09-04-2019, 05:39 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
If you have a 'bodhi' directory as well as an 'ubuntu' directory on your EFI partition, you should be able to use efibootmgr to change the boot order. Explained at the link below. Since we don't know what your entries are it is not possible to be more specific. If efibootmgr fails as it will on some computers, you will need to access the BIOS setup on boot and make the change there.

Not sure why you want to delete the Bodhi directory if you want to use Bodhi to boot? When you ran grub-install, you did it from Bodhi, correct?

https://www.linuxbabe.com/command-li...otmgr-examples
 
Old 09-05-2019, 05:15 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
Originally Posted by madmax25 View Post
Sorry, I got no idea what you are talking about and what you want me to do.
I just want to replace the grub of Xubuntu by the one of Bodhi, but I don't know how,
because I cannot remove the one which is accidently installed in

/dev/sda

where it actually belongs to

/dev/sda1

I need some guide about how to remove Xubuntu's grub from

/dev/sda

and how to install Bodhi's grub in

/dev/sda1

In the old days, The BIOS used to just boot by starting to read your hard disk at sector 0. This gave rise to boot viruses which DOS/Windows had no protection against. Now, with UEFI, it's more complicated and everything has boot loaders. But UEFI or not, the standard command to install grub is
Code:
grub-install /dev/sda
and not sda1, unless I am mistaken. This was the M$ way of avoiding boot viruses. The UEFI elephant is, in fact, a mouse built to M$ specifications..

I don't think the grub in sda1 will be referenced. Others will correct me if I'm wrong. There's no need to remove the grub in sda1 - it should be ignored. Just install Bodhi grub as indicated above.

The first 2 partitions are an efi partition, and a boot partition, which has the kernels. I wanted you only to have one /boot partition. Some guys confuse themselves with multiple boot partitions. If you want Bodhi to control it, reinstall grub in Bodhi, and only mount the boot partition in Bodhi. Xubuntu will treat the /boot directory in Xubuntu as it's /boot directory, and you can copy any kernel/initrd changes there to the boot partition from Bodhi.
 
Old 09-05-2019, 01:29 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
https://www.supergrubdisk.org/ has saved me a few times; not sure if it does UEFI stuff, too. Can't hurt to try.
 
  


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
BL5-64bit - How to find MAC-address of bluetooth adapter, please? madmax25 Bodhi 2 04-29-2019 10:46 AM
BL5.0-64bit - How to set up vino, please? madmax25 Bodhi 4 04-27-2019 01:02 PM
BL5.0-64bit - How to fix eSudo, please? madmax25 Bodhi 30 04-25-2019 08:31 PM
BL5.0-64bit - How to install .DEB, please? madmax25 Bodhi 6 04-22-2019 10:55 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:29 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
Open Source Consulting | Domain Registration