Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/boot partition on USB?
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
ghostsofrzgrz
n00b
n00b


Joined: 09 Sep 2016
Posts: 2

PostPosted: Fri Sep 09, 2016 7:40 pm    Post subject: /boot partition on USB? Reply with quote

Im going to be doing a fresh install, where i want full disk encryption but since i need /boot unencrypted i was wondering if i could put it on a USB drive. Something i could keep separate from my pc and only connect it when i need to power up the system. how would i do this?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44020
Location: 56N 3W

PostPosted: Fri Sep 09, 2016 8:12 pm    Post subject: Reply with quote

ghostsofrzgrz,

Welcome to Gentoo.

Yes, you can do that. You set your PC to boot from USB.
You install everything needed to mount your root filesystem into /boot (on the USB)
Everything being your boot loader, kernel and initrd.

Other than setting the PC to boot from USB, there are no special steps.

You boot loader has to make its own arrangements for reading the kernel and initrd, since it can't use the kernel.
This means that /boot need never be mounted by the Gentoo system unless you need to update the kernel.
In /etc/fstab, /boot is by default, noauto, so you can safely remove the USB stick once the kernel has started.
No special action on your part required.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Fri Sep 09, 2016 8:49 pm    Post subject: Re: /boot partition on USB? Reply with quote

You just create a partition/filesystem on your USB stick, mount it to /boot, fstab entry like this:

Code:

LABEL=boot /boot ext2 noauto,noatime 0 0


(If you use a filesystem label by that name... otherwise UUID)

Filesystem is up to you. Should be noauto unless you keep it connected at all times. You'll have to remember to plug it in & mount when updating kernels.

When /boot is mounted, grub-install the USB Stick.

From that point it's the same as having a regular /boot partition on the internal disk. You need to put a kernel/initramfs into /boot and add a boot entry for it. There's various methods to do that depending which flavour of initramfs you prefer...

I also use encrypted keyfiles for mine. And since the USB stick is large enough, also a bunch of LiveCDs and other stuff.
Back to top
View user's profile Send private message
ghostsofrzgrz
n00b
n00b


Joined: 09 Sep 2016
Posts: 2

PostPosted: Thu Sep 15, 2016 11:56 am    Post subject: Reply with quote

I just want to thank you both for the replies. I followed your instructions and with a bit more research I put everything together. :D
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