Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing on a USB stick.
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
maanvol
n00b
n00b


Joined: 12 Oct 2019
Posts: 1

PostPosted: Sat Oct 12, 2019 2:00 pm    Post subject: Installing on a USB stick. Reply with quote

I do want to install Gentoo on a USB stick, and want the bootloader to be on /dev/sda1 on my HDD, where my efi is for my other operating systems.

The file-system table ought to look like this:
Code:
#USB stick
/dev/sdb  /  ext4 errors=remount-ro   0  1


#boot partition on hard disk

/dev/sda1  /boot/efi  vfat  umask=0077  0  1

/swapfile                           none  swap  sw  0 0


Are the following installing commands correct?:
Code:

    root #echo 'GRUB_PLATFORMS="efi-64"' >> /etc/portage/make.conf

    root #emerge --ask sys-boot/os-prober

    root #emerge --ask sys-boot/grub:2

    root #grub-install --target=x86_64-efi --efi-directory=/dev/sda1/boot

    root #grub-mkconfig -o /boot/grub/grub.cfg


[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7602
Location: Goose Creek SC

PostPosted: Sun Oct 13, 2019 12:59 pm    Post subject: Reply with quote

Code:
root #grub-install --target=x86_64-efi --efi-directory=/dev/sda1/boot
is suspect. Maybe grub-install can handle that call; but ls can't. IMHO, whatever file system you run those commands in should have the efi partition (ESP) mounted and the grub-install command should point to the ESP in terms of that file system. If you are in the USB's gentoo file system
Code:
mount /dev/sda1 /boot
grub-install --target=x86_64-efi --efi-directory=/boot

I have done usb gentoo, even 2 usb raid gentoo and 2 usb lvm gentoo but I used rEFInd vice grub to avoid having to run grub-mkconfig for every kernel upgrade on the usb or semi-random change in usb device name.
_________________
Defund the FCC.
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