Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub2-install efi & boot to usb partition, NOT boot (solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
x220tux
n00b
n00b


Joined: 09 Apr 2015
Posts: 19

PostPosted: Thu Sep 10, 2015 9:57 am    Post subject: grub2-install efi & boot to usb partition, NOT boot (sol Reply with quote

I am trying to put /boot and EFI into a usb stick say sdc.

/dev/sdc: 1GB in size
Code:
  mklabel gpt
  mkpart primary fat32 0% 700MiB
  mkpart primary fat32 700MiB 100%
  set 2 BOOT on
  mkfs.vfat -F32 /dev/sdc1
  mkfs.vfat -F32 /dev/sdc2


I want /dev/sdc2 (around 256MiB) to be my Gentoo /boot && efi partition. In chroot, sdc2 is mounted at /boot:
Code:
grub2-install --target=x86_64-efi --efi-directory=/boot --boot-directory=/boot --bootloader-id=grub2 --removable --modules=part_gpt


In /boot (sdc2), I can see: kernel, initramfs, EFI/BOOT/BOOTX64.EFI, grub/grub.cfg etc. The normal item 'gentoo/grubx64.efi' does not exist.
I have set USB the first, and Windows the 2nd in BIOS. But when booting, it defaults to Windows. This means, the sdc2 EFI is not recognized by UEFI firmware in BIOS.

I don't know if I should use sdc1 iinstead of sdc2. What is wrong?


Last edited by x220tux on Sat Sep 12, 2015 8:00 am; edited 2 times in total
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Thu Sep 10, 2015 10:29 am    Post subject: Reply with quote

I had a similar issue on my machine. It did not fallback to find the boot Folder with bootx64.efi. I needed to use a uefi bootentry with efibootmgr.
_________________
// valid again: I forgot about the git access. Now 1.2GB big. Start: 2015-06-25
git daily portage tree
Web: https://portage.schorsch-tech.de
git clone https://portage.schorsch-tech.de/portage.git
Back to top
View user's profile Send private message
x220tux
n00b
n00b


Joined: 09 Apr 2015
Posts: 19

PostPosted: Thu Sep 10, 2015 11:10 am    Post subject: Reply with quote

schorsch_76 wrote:
I had a similar issue on my machine. It did not fallback to find the boot Folder with bootx64.efi. I needed to use a uefi bootentry with efibootmgr.


What do you mean by 'use a uefi bootentry with efibootmgr'?
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Thu Sep 10, 2015 11:21 am    Post subject: Reply with quote

I needed to Setup a entry in the UEFI variables on my board.

Like
Code:

root #efibootmgr -v
BootCurrent: 0002
Timeout: 3 seconds
BootOrder: 0003,0003,0002,0000,0004
Boot0000* CD/DVD Drive  BIOS(3,0,00)
Boot0001* Hard Drive    BIOS(2,0,00)
Boot0002* Gentoo        HD(1,800,61800,6d98f360-cb3e-4727-8fed-5ce0c040365d)File(\EFI\boot\bootx64.efi)
Boot0003* Hard Drive    BIOS(2,0,00)P0: ST1500DM003-9YN16G


See
https://wiki.gentoo.org/wiki/Efibootmgr/en
_________________
// valid again: I forgot about the git access. Now 1.2GB big. Start: 2015-06-25
git daily portage tree
Web: https://portage.schorsch-tech.de
git clone https://portage.schorsch-tech.de/portage.git
Back to top
View user's profile Send private message
x220tux
n00b
n00b


Joined: 09 Apr 2015
Posts: 19

PostPosted: Thu Sep 10, 2015 11:26 am    Post subject: Reply with quote

schorsch_76 wrote:
I needed to Setup a entry in the UEFI variables on my board.

Like
Code:

root #efibootmgr -v
BootCurrent: 0002
Timeout: 3 seconds
BootOrder: 0003,0003,0002,0000,0004
Boot0000* CD/DVD Drive  BIOS(3,0,00)
Boot0001* Hard Drive    BIOS(2,0,00)
Boot0002* Gentoo        HD(1,800,61800,6d98f360-cb3e-4727-8fed-5ce0c040365d)File(\EFI\boot\bootx64.efi)
Boot0003* Hard Drive    BIOS(2,0,00)P0: ST1500DM003-9YN16G


See
https://wiki.gentoo.org/wiki/Efibootmgr/en


Thanks, so we need to manually add a boot option to UEFI firmware. I will try.

BTW, do you use the 2nd partition as the efi & boot as well?
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Thu Sep 10, 2015 12:21 pm    Post subject: Reply with quote

Yes, i have
Code:
/dev/sda1 EFI       (EF00 + vfat 32)
/dev/sda2 boot     (8300 + ext2)
/dev/sda3 System (8300 + ext4)

_________________
// valid again: I forgot about the git access. Now 1.2GB big. Start: 2015-06-25
git daily portage tree
Web: https://portage.schorsch-tech.de
git clone https://portage.schorsch-tech.de/portage.git
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum