Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
Posted Jan 19, 2016 9:02 UTC (Tue) by mjg59 (subscriber, #23239)In reply to: Preparing for a merged /usr in Debian by walex
Parent article: Preparing for a merged /usr in Debian
That's certainly a thing you could do, but now you have two choices:
1) Have /var, /home and /etc be part of /, and so be unencrypted
2) Have /var, /home and /etc be separate partitions, and introduce additional complexity (how do you know where /etc is if /etc isn't already there?)
Both of these choices are bad, and so your solution is a bad solution and has not worked well for decades.
Posted Jan 19, 2016 19:25 UTC (Tue)
by walex (guest, #69836)
[Link] (2 responses)
It seems that I need to explain again the basics of how the boot process works and how UNIX/Linux sytems wor k in repect of the mount and pivot_root system calls, I'll try to keep it short: The outline boot sequence can therefore well be: That the above, which seems to me basic system knowledge, needs explaining again and again in detail is quite frustrating; as I wrote a few times already, the first-stage boot / (or kernel) does not need to be the very same as the the second-stage / (or kernel), and indeed in the current arrangement there are another two. Plus there is mount --bind for an alternative option. Anyhow in the current practice GRUB's root (first-stage root) /boot is inside an unencrypted partition distinct from that containing / (second/third stage root) and someone could replace anyhow its contents with suitably "improved" kernel images or "initramfs" snapshot images. I know people who understand boot processes and who keep /boot (only) on a USB storage device they carry with them at all times because they reckon that an encrypted / with an unencrypted /boot is not giving them peace of mind.
Posted Jan 19, 2016 19:38 UTC (Tue)
by mjg59 (subscriber, #23239)
[Link]
Posted Jan 20, 2016 9:00 UTC (Wed)
by anselm (subscriber, #2796)
[Link]
This is essentially what happens with initramfs, except that the initramfs is loaded using the boot loader/system firmware, and can in principle come from anywhere (including a remote server). Your approach forces you to have the first-stage “/” available locally as an actual file system on a storage medium, which sucks if you want to have a diskless system.
You still need to ensure that whatever is on the first-stage “/” matches the rest of the system, just like with an initramfs. The difference is that the process of making initramfses is fairly well-understood and there are good tools for it already.
Two points:
Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
Linux kernel is booted mounting /dev/sda1 as /, which contains a fully functional but "vanilla" / filesystem.
Anyhow in the current practice GRUB's root (first-stage root) /boot is inside an unencrypted partition distinct from that containing / (second/third stage root) and someone could replace anyhow its contents with suitably "improved" kernel images or "initramfs" snapshot images. I know people who understand boot processes and who keep /boot (only) on a USB storage device they carry with them at all times because they reckon that an encrypted / with an unencrypted /boot is not giving them peace of mind.
