Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-12-2015, 09:49 PM
|
#1
|
Member
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582
Rep:
|
grub-install and grub-update are ignored
Hi,
I have a 750GB SATA drive with GPT and 13 partitions, the last of which is a BIOS partition EF02.
I installed Mint 17.1 KDE, and it works, mostly. KDE startup is a bit flaky.
Then I installed Gentoo. No systemd. I ran
Code:
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub/grub.cfg
When I rebooted, the menu I got only had Mint 17.1 entries.
I booted Mint, ran update-grub, and rebooted. This time I got an entry for Gentoo.
Next I installed Ubuntu 14.04.1. Same procedure with grub, same result. I booted Mint again, ran update-grub, rebooted, and got an Ubuntu entry.
It seems that Mint has done something that requires that only it can install and configure grub. Not Nice!
When Mint was installed there was no BIOS partition and no problem. When I tried to install grub under Gentoo it complained that it was missing so I created it. No more erros, but no result either.
My HP Pavilion dv6 gives me a Setup option when booting which gives the usual abbreviated BIOS type menu. Secure Boot is greyed and disabled. The GPT disk works OK.
What do I need to do to allow Gentoo and Ubuntu to update grub's configuration?
thanks
Jim
|
|
|
01-13-2015, 12:54 AM
|
#3
|
Member
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582
Original Poster
Rep:
|
Thanks. It's informative, but not what I need.
|
|
|
01-13-2015, 01:26 PM
|
#4
|
Senior Member
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187
|
Please post the output of:
If your disk was GPT when you installed Mint and no BIOS boot partition (ef02) was present, it must be booting in EFI-mode -- it is not possible to boot a GPT disk in non-EFI mode without a BIOS boot partition.
If you have an EFI system partition (ef00) in the output of parted then you will need to install GRUB in EFI-mode:
Code:
# grub2-install --target=x86_64 /dev/sda
http://wiki.gentoo.org/wiki/GRUB2#UEFI_with_GPT
EDIT: You will need to mount /boot at the EFI system partition.
http://wiki.gentoo.org/wiki/Handbook...ion#Using_UEFI
Last edited by Head_on_a_Stick; 01-13-2015 at 01:29 PM.
|
|
|
01-13-2015, 01:38 PM
|
#5
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
|
You may just not have installed GRUB to the master boot record when you installed the other OSs besides Mint. However, even if you did you need to decide which OS is "in charge" of the GRUB setup you can't, that I've seen or heard of, update the GRUB installed by one OS with another just to add an entry for it -- the OS which installed GRUB updates all the GRUB related files.
|
|
|
01-13-2015, 08:11 PM
|
#6
|
Member
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582
Original Poster
Rep:
|
Code:
# parted -l
Model: ATA WDC WD7500BPVX-0 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
13 17.4kB 1049kB 1031kB BIOS boot partition bios_grub
1 1049kB 200MB 199MB fat32 boot, esp
2 200MB 8393MB 8193MB linux-swap(v1)
3 8393MB 49.4GB 41.0GB ext4
4 49.4GB 90.3GB 41.0GB ext4
5 90.3GB 121GB 30.7GB ext4
6 121GB 152GB 30.7GB ext4
7 152GB 162GB 10.2GB ext4
8 162GB 203GB 41.0GB ext4
9 203GB 223GB 20.5GB ext4
10 223GB 633GB 410GB ext2
11 633GB 654GB 20.5GB ext4
12 654GB 664GB 10.2GB ext2
# gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sda: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 47B630FC-BE27-414E-BC50-6AED591BB1B6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 8-sector boundaries
Total free space is 168752847 sectors (80.5 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 391167 190.0 MiB EF00
2 391168 16392191 7.6 GiB 8200
3 16392192 96393215 38.1 GiB 8300
4 96393216 176394239 38.1 GiB 8300
5 176394240 236394495 28.6 GiB 8300
6 236394496 296394751 28.6 GiB 8300
7 296394752 316395519 9.5 GiB 8300
8 316395520 396396543 38.1 GiB 8300
9 396396544 436396031 19.1 GiB 8300
10 436396032 1236396031 381.5 GiB 8300
11 1236396032 1276395519 19.1 GiB 8300
12 1276395520 1296396287 9.5 GiB 8300
13 34 2047 1007.0 KiB EF02 BIOS boot partition
Partition 1 has EFI, and is mounted at /booot/efi by Mint.
Where does grub get installed when "grub2-install /dev/sda" is run?
In all cases with non-Mint distros I ran grub2-install before grub2-mkconfig, which should give the new distro control...
Code:
# grub2-install --target=x86_64 /dev/sda
grub2-install: error: /usr/lib/grub/x86_64/modinfo.sh doesn't exist. Please specify --target or --directory.
Changing x86_64 to x86_64-efi gives
Code:
# grub2-install --target=x86_64-efi /dev/sda
Installing for x86_64-efi platform.
Installation finished. No error reported.
# grub2-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.17.7-gentoo-03
Found Linux Mint 17.1 Rebecca (17.1) on /dev/sda4
Found Ubuntu 14.04.1 LTS (14.04) on /dev/sda8
done
One would think that this would give a grub menu with Gentoo first, yet when I reboot I get the same old menu with Mint & Mint with options entries first.
|
|
|
01-13-2015, 08:23 PM
|
#7
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,391
|
You have a BIOS boot partition at the beginning of your drive which is used for GPT when you are not using UEFI.
You also have an efi partition, the 200MB partition which is for GPT/UEFI. These conflict and is the probably cause of your problem.
When you use the BIOS boot with GPT, you install Grub to the MBR.
When you use UEFI, you do not install Grub to the mbr.
You might try running the bootinfoscript or the boot repair script and posting the output. I don't use UEFI myself so don't know how to repair the problem but you might be able to do it from boot repair.
https://help.ubuntu.com/community/Boot-Repair
|
|
|
01-13-2015, 08:30 PM
|
#8
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,843
|
Did you mount partition 1 at /boot/efi in gentoo before running grub install? Maybe going into bios efi boot menu to select gentoo as first boot. The grub.cfg may also have to be in directory on efi partition that gentoo boot files are in. This might help http://croutchie.blogspot.com/2013/0...in-gentoo.html
|
|
|
01-14-2015, 12:43 AM
|
#9
|
LQ Addict
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841
|
Quote:
Originally Posted by yancek
You have a BIOS boot partition at the beginning of your drive which is used for GPT when you are not using UEFI.
You also have an efi partition, the 200MB partition which is for GPT/UEFI. These conflict and is the probably cause of your problem.
When you use the BIOS boot with GPT, you install Grub to the MBR.
When you use UEFI, you do not install Grub to the mbr.
You might try running the bootinfoscript or the boot repair script and posting the output. I don't use UEFI myself so don't know how to repair the problem but you might be able to do it from boot repair.
https://help.ubuntu.com/community/Boot-Repair
|
Also Bios boot partition will not work unless efi is disabled.
|
|
|
01-14-2015, 01:00 AM
|
#10
|
Member
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582
Original Poster
Rep:
|
I will check out Boot-Repair.
grub2-install requires that the EFI partition be mounted at /boot/grub/efi, so yes, it was mounted.
I deleted the BIOS partition with gdisk and tried installing again, with the same bad result. I ran gdisk to delete the BIOS partition, rebooted to use the new table, grub2-install, and reboot.
Last edited by CollieJim; 01-14-2015 at 01:03 AM.
|
|
|
01-14-2015, 01:22 AM
|
#11
|
Senior Member
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187
|
As I said, you are booting in EFI-mode and the reason the Gentoo GRUB menu is not displayed is because /boot is not mounted at the EFI system partition -- the firmware ("BIOS") can only read the FAT formatted EFI system partition and this is where GRUB must be installed: check the Gentoo documentation on this that I have linked.
There is no conflict between the BIOS boot partition and the EFI system partition, which one is used depends on which mode is selected from your firmware ("BIOS") menu options -- if you enable "CSM" or "Legacy" mode the BIOS boot partition will be read, otherwise the EFI system partition will be used.
Here is my table:
Code:
Number Start (sector) End (sector) Size Code Name
1 233394176 234441614 511.4 MiB EF00 EFI System
2 2048 201326579 96.0 GiB 8300 Linux filesystem
3 34 2047 1007.0 KiB EF02 BIOS boot partition
4 209712510 233394175 11.3 GiB 8300 Linux filesystem
5 201326592 209711103 4.0 GiB 8200
It will boot up just fine in either EFI-mode or "Legacy" mode.
EDIT: We can check the mount point is correct using:
Code:
empty@Arch ~ % lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 vfat 9669-102D /boot
├─sda2 ext4 dc7b15ff-6725-4918-b0fd-4bfcc5560ffa /
├─sda3
├─sda4 ext4 Debian 191c641f-66ed-47fc-9adb-df2b189ed367 /debian
└─sda5 swap 7fac1c92-59df-40c9-b602-49cba7b5110d [SWAP]
Last edited by Head_on_a_Stick; 01-14-2015 at 01:25 AM.
|
|
1 members found this post helpful.
|
01-14-2015, 02:25 AM
|
#12
|
Member
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582
Original Poster
Rep:
|
Thank you all for your help. Sorry I'm so thick!
BIOS Legacy mode was set. I cleared it and all is well now.
Until I turn the computer on again...
|
|
|
All times are GMT -5. The time now is 05:31 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|