Gentoo Archives: gentoo-user

From: karl@××××××××.se
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Separate /usr partition
Date: Wed, 14 Sep 2022 16:12:25
Message-Id: 20220914161218.CB45983BDE11@turkos.aspodata.se
In Reply to: [gentoo-user] Separate /usr partition by Peter Humphrey
1 Peter:
2 > I'm thinking of separating /usr onto its own partition so that I can have it
3 > mounted read-only except while updating it. I'd prefer not to have to make an
4 > init thingy, not having needed one up to now. Besides, some machines have
5 > things like early-ucode or amd-uc.
6 >
7 > I've found a few guides on the Web, but I'm still confused. Is there a simple
8 > guide to doing this? I know of at least one subscriber here who's done it. :)
9
10 I'm using separate /usr, it was the default historically and I just
11 continued useing it, partly because it is unconvenient to repartion
12 long running remote systems.
13
14 There are a few things to look out for.
15 If you are not using initrd/initramfs, you need all drivers to access
16 / to be compiled in. Easiest is if don't use devices with dynamic
17 minors. Once / is mounted you have all drivers available
18 in /lib/modules, then the next possible hurdle is to survive long
19 enought till /usr is mounted. For that you a suitable mount command
20 which does not depend on /usr, i.e. it or any programs previous it
21 in the bootup cannot depend on libs in /usr. The easiest way to
22 accomplish that is to use busybox.
23
24 It is also possible to use sys-fs/static-dev, if you want to opt
25 to not use udev.
26
27 Regards,
28 /Karl Hammar