Cleaning up the filesystem

"Testing" Reality

As an explanation, the TC discussed the advantages and disadvantages, as well as the future planning for Debian 11 Bullseye. People who install Debian 10 Buster or derivatives thereof can look forward to a system with a unified /usr directory and symbolic links of /bin, /sbin, /lib to the /usr/bin, /usr/sbin, and /usr/lib directories (Figure 2).

Figure 2: Before /usr merge (above): The /bin, /lib, /lib64, and /sbin directories reside directly below root and are duplicated in the /usr directory. After the conversion (below): The /bin, /lib, /lib32, /lib64, and /sbin directories exist as symbolic links to the physical directories in /usr.

The setup does not affect existing systems unless this is desired by the user. In this case, you just need to install the usrmerge package, which moves the corresponding directories and makes further adjustments. During the install, Debian explicitly asks for confirmation, since the change cannot be reversed.

After the change, check to see whether the /etc/dpkg/dpkg.cfg.d/usrmerge directory exists and if it contains package names. If it does, this means that there are still conflicts with these remaining packages. If it is empty or does not exist, you can remove usrmerge; otherwise wait until the list is empty (Figure 3).

Figure 3: The root directory in the terminal also reflects the new relationships and displays the symbolic links.

Unlike Debian, other distributions switched to a unified /usr directory on deadline. Debian's transition issues largely resulted from the decision by developers to leave older systems untouched and give users a choice. For an in-depth analysis of why Debian has had more problems with this migration than other distributions, see LWN.net [13].

Conclusions and Outlook

Switching to a merged /usr directory eliminates the historical duplication of directories and paves the way for modern techniques, such as stateless systems and atomic updates, thus facilitating the handling of snapshots. However, most desktop users are unlikely to notice any changes. The symbolic links to the subdirectories in /usr, on the other hand, will probably remain with us for some years. For Debian 11, the aim is for Debian packages that can be built on systems with and without the /usr merge and that still will work on the other system without restrictions.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • SpiderOak

    Back up, synchronize, version, and collaborate with SpiderOak.

  • Dgit

    Dgit combines the Debian archive with a Git repository, giving package maintainers some totally new options for managing Debian source packages.

  • Next Gen Distributions

    With systemd poised to revolutionize the init process, we look at Linux distributions that have left the familiar path, use new approaches and techniques, and are paving the way for the next generation of Linux distros.

  • This Month's DVD

    Debian 9 and Tails 3

  • Ask Klaus!

    Klaus Knopper is the creator of Knoppix and co-founder of LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News