]> git.ipfire.org Git - thirdparty/systemd.git/blame - docs/SEPARATE_USR_IS_BROKEN.md
po: Translated using Weblate (Swedish)
[thirdparty/systemd.git] / docs / SEPARATE_USR_IS_BROKEN.md
CommitLineData
6b2a2776 1---
2title: Booting Without /usr is Broken
3category: Manuals and Documentation for Users and Administrators
4layout: default
5SPDX-License-Identifier: LGPL-2.1-or-later
6---
7
8# Booting Without /usr is Broken
9
d6f9d007 10You probably discovered this page because your shiny new systemd system referred you here during boot time,
11when it warned you that booting without `/usr` pre-mounted wasn't supported anymore.
12And now you wonder what this all is about.
13Here's an attempt of an explanation:
6b2a2776 14
d6f9d007 15One thing in advance:
16systemd itself is actually mostly fine with `/usr` on a separate file system that is not pre-mounted at boot time.
17However, the common basic set of OS components of modern Linux machines is not, and has not been in quite some time.
18And it is unlikely that this is going to be fixed any time soon, or even ever.
6b2a2776 19
d6f9d007 20Most of the failures you will experience with `/usr` split off and not pre-mounted in the initramfs are graceful failures:
21they won't become directly visible, however certain features become unavailable due to these failures.
22Quite a number of programs these days hook themselves into the early boot process at various stages.
23A popular way to do this is for example via udev rules.
24The binaries called from these rules are sometimes located on `/usr/bin`, or link against libraries in `/usr/lib`,
25or use data files from `/usr/share`.
26If these rules fail udev will proceed with the next one,
27however later on applications will then not properly detect these udev devices or features of these devices.
28Here's a short, very in-comprehensive list of software we are aware of that currently are not able to provide the full set of functionality when `/usr` is split off and not pre-mounted at boot:
29udev-pci-db/udev-usb-db and all rules depending on this
30(using the PCI/USB database in `/usr/share`),
31PulseAudio, NetworkManager, ModemManager, udisks, libatasmart, usb\_modeswitch,
32gnome-color-manager, usbmuxd, ALSA, D-Bus, CUPS, Plymouth, LVM, hplip, multipath, Argyll, VMWare,
33the locale logic of most programs and a lot of other stuff.
6b2a2776 34
d6f9d007 35You don't believe us?
36Well, here's a command line that reveals a few obvious cases of udev rules that will silently fail to work if `/usr` is split off and not pre-mounted:
37`egrep 'usb-db|pci-db|FROM_DATABASE|/usr' /*/udev/rules.d/*`
38-- and you find a lot more if you actually look for it.
39On my fresh Fedora 15 install that's 23 obvious cases.
6b2a2776 40
41## The Status Quo
42
d6f9d007 43Due to this, many upstream developers have decided to consider the problem of a separate
44`/usr` that is not mounted during early boot an outdated question,
45and started to close bugs regarding these issues as WONTFIX.
46We certainly cannot blame them, as the benefit of supporting this is questionable and brings a lot of additional work with it.
6b2a2776 47
48And let's clarify a few things:
49
d6f9d007 501. **It isn't systemd's fault.** systemd mostly works fine with `/usr` on a separate file system that is not pre-mounted at boot.
6b2a2776 512. **systemd is merely the messenger.** Don't shoot the messenger.
d6f9d007 523. **There's no news in all of this.** The message you saw is just a statement of fact, describing the status quo.
53 Things have been this way since a while.
6b2a2776 544. **The message is merely a warning.** You can choose to ignore it.
d6f9d007 555. **Don't blame us**, don't abuse us, it's not our fault.
56We have been working on the Linux userspace since quite some time,
57and simply have enough of the constant bug reports regarding these issues,
58since they are actually very hard to track down because the failures are mostly graceful.
59Hence we placed this warning into the early boot process of every systemd Linux system with a split off and not pre-mounted
60`/usr`, so that people understand what is going on.
6b2a2776 61
62## Going Forward
63
d6f9d007 64`/usr` on its own filesystem is useful in some custom setups.
65But instead of expecting the traditional Unix way to (sometimes mindlessly) distributing tools between `/usr` and `/`,
66and require more and more tools to move to `/`,
67we now just expect `/usr` to be pre-mounted from inside the initramfs, to be available before 'init' starts.
68The duty of the minimal boot system that consisted of `/bin`, `/sbin` and `/lib` on traditional Unix,
69has been taken over by the initramfs of modern Linux.
70An initramfs that supports mounting `/usr` on top of `/` before it starts 'init', makes all existing setups work properly.
6b2a2776 71
d6f9d007 72There is no way to reliably bring up a modern system with an empty `/usr`.
73There are two alternatives to fix it: move `/usr` back to the rootfs or use an initramfs which can hide the split-off from the system.
6b2a2776 74
d6f9d007 75On the Fedora distribution we have succeeded to clean up the situation and the confusion the current split between `/` and `/usr` has created.
76We have moved all tools that over time have been moved to `/` back to `/usr` (where they belong),
77and the root file system only contains compatibility symlinks for `/bin` and `/sbin` into `/usr`.
78All binaries of the system are exclusively located within the `/usr` hierarchy.
6b2a2776 79
d6f9d007 80In this new definition of `/usr`, the directory can be mounted read-only by default,
81while the rootfs may be either read-write or read-only (for stateless systems) and contains only the empty mount point directories,
82compat-symlinks to `/usr` and the host-specific data like `/etc`, `/root`, `/srv`.
83In comparison to today's setups, the rootfs will be very small.
84The host-specific data will be properly separated from the installed operating system.
85The new `/usr` could also easily be shared read-only across several systems.
86Such a setup would be more efficient, can provide additional security, is more flexible to use,
87provides saner options for custom setups, and is much simpler to setup and maintain.
6b2a2776 88
0d592a5e 89For more information on this please continue to [The Case for the /usr Merge](/THE_CASE_FOR_THE_USR_MERGE).