Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Gentoo on USB stick + ZFS pool
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
Stefa
n00b
n00b


Joined: 19 Jan 2016
Posts: 2

PostPosted: Tue Jan 19, 2016 10:31 pm    Post subject: Installing Gentoo on USB stick + ZFS pool Reply with quote

I am trying to figure out the best way to install Gentoo as follows:
- boot and rootfs on USB stick
- /var /etc and /home on ZFS pool using encrypted hard drives

Questions:
1. Is there any other directory I should consider moving from rootfs to zfs pool to minimize writing to the USB stick?
2. What is the best way to approach this?

The server has almost 80GB RAM so I don't plan any swap partition.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jan 19, 2016 10:50 pm    Post subject: Reply with quote

Stefa,

Welcome to Gentoo.

/etc must be on root unless you want to do something unusual in the initrd.
When root is mounted, the init system reads /etc/fstab to find all the other filesystems.
If /etc isn't mounted, the boot will fail ...

Its worth moving /usr/portage off the USB stick. Its a lot of small files and there are writes every
Code:
emerge --sync

Speed wise it will be slow to read on USB2 but USB3 will be OK. USB3 gives you DMA providing its USB3 all the way.

If you are paranoid enough to want /usr encrypted, you probably want /opt to be encrypted too.

Put /var/tmp/portage in RAM. That's portages build space. It will save disc writes that will never be read.
_________________
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
Stefa
n00b
n00b


Joined: 19 Jan 2016
Posts: 2

PostPosted: Wed Jan 20, 2016 5:02 am    Post subject: Reply with quote

How about moving whole rootfs to ram upon boot and save back to usb stick upon shutdown to preserve the changes made? With just /var and /home on ZFS pool.
With 80GB ram this should be doable. Sure startup and shutdown would take more time but day to day operations should be quicker plus less read/write operations on the stick (the server runs 24/7).

Will initrd/initramfs work in this scenario or shall I look for other tools? Any crypt options for such loadable rootfs?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jan 20, 2016 6:12 pm    Post subject: Reply with quote

Stefa,

That works. For an encrypted root, you must have a separate /boot partition that is not encrypted.
The BIOS cannot read and decrypt the HDD, nor can it ask you for the password, thus you need some unencrypted space.

An initrd/initramfs will work but you will need to write your own init script for it and you will need a script to save root on shutdown.
There is no point in putting /usr/portage in RAM. Its only used for upgrading your install.

It perfectly possible to run with root and /usr read only. This is common in embedded systems.
You need to remount read/write for updates. Any user programs that want to write to root or /usr are broken by design.
_________________
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
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