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

Notices


Reply
  Search this Thread
Old 05-26-2015, 07:29 AM   #1
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Rep: Reputation: 28
How do I tell boot process to use gentoo partition?


The scene:
Three weeks ago my computer went to the repair shop. For security and access to my data I kept the hard drive and put it in a cheap laptop. The drive has Gentoo, Mint Linux 17.1, and Ubuntu 14.04.

The cheapie came with Windows 8.1 and UEFI. I removed its drive, disabled UEFI secure boot, and put my hard drive in.

Mint and Ubuntu booted, but Gentoo just gave me a blank screen.
I used Mint, and, during the 3 weeks, updated it. Mistake!

The problem:
Mint has somehow captured the boot process. I cannot get grub2 to use the grub.cfg I create in Gentoo.

I have tried
Code:
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub/grub.cfg
from within Gentoo, but when I reboot I get the Mint configuration missing the kernel just installed. I have to boot Mint and run grub2-mkconfig from there.

How do I get control back with Gentoo?

Thanks

The computer is an HP Pavilion dv6 and the disk has GPT partitioning.
Code:
/ # efibootmgr
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 3003,3004,2002,2001,2003
Boot0000* Notebook Hard Drive
Boot0001* Internal CD/DVD ROM Drive
Boot0002* Internal CD/DVD ROM Drive (UEFI)
Boot0003* Ubuntu
Boot0004* gentoo
Boot2001* USB Drive (UEFI)
Boot2002* Internal CD/DVD ROM Drive (UEFI)
Boot3003* Internal Hard Disk or Solid State Disk
Boot3004* Internal Hard Disk or Solid State Disk
I tried changing BootCurrent to 0004 but that had no effect.

Last edited by CollieJim; 05-26-2015 at 07:40 AM. Reason: More info
 
Old 05-26-2015, 07:44 AM   #2
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Run this command from Mint:
Code:
# efibootmgr -o 0004,0003,0002,0001,0000
This should set Gentoo as first in the boot order -- see efibootmgr(8)

EDIT: Sorry, missed the bottom of your edit...

Last edited by Head_on_a_Stick; 05-26-2015 at 07:45 AM.
 
Old 05-26-2015, 07:44 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Hmmm - UEFI generally implies gpt. The Linux installers are a little brain-dead in this regard although its been years since I did gentoo. What does "parted -l" show ?.
 
Old 05-26-2015, 07:46 AM   #4
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
You could try deleting the "Ubuntu" entry with:
Code:
# efibootmgr -b 0003 -B
 
Old 05-26-2015, 08:22 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Don't edit your post(s), just confuses everybody.
You are trying to update the (protected) MBR; won't work on gpt. See the gentoo wiki.
 
Old 05-26-2015, 08:52 AM   #6
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Original Poster
Rep: Reputation: 28
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
 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
13      664GB   707GB   42.9GB                  Linux filesystem


Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.
Model: hp BD RW BD-5750H (scsi)
Disk /dev/sr0: 1733MB
Sector size (logical/physical): 2048B/2048B
Partition Table: mac
Disk Flags: 

Number  Start   End     Size    File system  Name   Flags
 1      2048B   6143B   4096B                Apple
 2      1722MB  1724MB  2327kB               EFI
Gentoo is on partition 3, and Mint is on 4.
 
  


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
Boot process slow after formatting partition to ext3 robbbert Linux - Hardware 2 04-18-2006 03:23 PM
Gentoo istallation doesn't mount boot partition. Alkibiades Linux - Newbie 5 02-22-2006 02:14 PM
dual boot xp/gentoo (selecting boot for each partition) saif__r Linux - Newbie 8 08-13-2005 10:23 AM
Removing boot partition check in Gentoo dinolinux Linux - Distributions 1 07-05-2005 07:19 AM
Dual boot w/ Gentoo/xp pro vs. gentoo-invalid partition table bobbear Linux - Software 3 02-10-2004 04:28 PM

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

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