Hello all,
I recently made the switch from linux to freeBSD. My installation (on a laptop) satisfies me so far but I realized I left out encryption in the installation process.
I read about GELI(8)() but I am not willing to re-install from scratch. My threat model is moderate and I was thinking to encrypt only the home partition (I do not care about an eventual thief at a coffee shop dumping the ram)
my relevant partitions are as follow :
my plan is :
1 - boot in single user mode
2 - mount the /home partition and the sdcard
3 - copy the data from home to the sdcard
4 - umount /home
5 - delete the home partition
5 - recreate the home partiton
6 - initialize geli provider
7 - attach the geli provider
8 - create a new file system on the geli device
9 - mount the encrypted home
10 - copy back the data from the sdcard to the new encrypted home partition
11 - add the options so the /home will be mounted at boot
So my questions are :
Anything I may have overlooked ?
Any better way to do this?
Worth repeating the process for /usr and /var (just thought about a few data I have in there... postgres...) ?
I recently made the switch from linux to freeBSD. My installation (on a laptop) satisfies me so far but I realized I left out encryption in the installation process.
I read about GELI(8)() but I am not willing to re-install from scratch. My threat model is moderate and I was thinking to encrypt only the home partition (I do not care about an eventual thief at a coffee shop dumping the ram)
my relevant partitions are as follow :
Code:
/dev/ada0p2 9.4G 506M 8.2G 6% /
/dev/ada0p1 260M 1.3M 259M 1% /boot/efi
/dev/ada0p5 172G 81G 77G 51% /home
/dev/ada0p3 29G 13G 13G 50% /usr
/dev/ada0p4 19G 3.0G 15G 17% /var
/dev/mmcsd0p1 225G 8.0K 207G 0% /mnt/sdcard
my plan is :
1 - boot in single user mode
2 - mount the /home partition and the sdcard
Code:
mount -o rw /dev/ada0p5 /home
mount -o rw /dev/mmcsd0p1 /mnt/sdcard
3 - copy the data from home to the sdcard
Code:
cp -rvp /home/* /home/sdcard/
4 - umount /home
Code:
umount /home
5 - delete the home partition
Code:
gpart delete -i 5 /dev/adao
5 - recreate the home partiton
Code:
gpart add -t freebsd-ufs -i 5 /dev/ada0
6 - initialize geli provider
Code:
geli init -g -b -l 256 -s 4096 ada0p5
7 - attach the geli provider
Code:
geli attach ad0p5
8 - create a new file system on the geli device
Code:
newfs /dev/ad0p5.eli
9 - mount the encrypted home
Code:
mount -o rw /dev/ad0p5.eli /home
10 - copy back the data from the sdcard to the new encrypted home partition
Code:
cp -rvp /home/sdcard/* /home/
11 - add the options so the /home will be mounted at boot
Code:
vim /boot/loader.conf
geom_eli_load="YES"
vim /etc/fstab (replace the old /home line with)
/dev/ada0p5.eli /home ufs rw 2 2
So my questions are :
Anything I may have overlooked ?
Any better way to do this?
Worth repeating the process for /usr and /var (just thought about a few data I have in there... postgres...) ?