8

tl;dr: In Ubuntu 20.04, folders such as /bin and /sbin are now symlinks to the same folders in /usr. Why was this change made and shouldn't the release notes mention it?

This took a few days, but I tracked down some issues I was having in system setup. As part of a preseed post-install set of commands, I unpack a .tar.gz onto new systems, which puts some files in various folders, including /bin. I've been doing this since Ubuntu 14.04. With Ubuntu 20.04, my systems weren't bootable after install (various failure to mount errors).

I finally narrowed the issue down to this unpacking step, and realized that I'm replacing the /bin folder and making many things inaccessible. What a lovely surprise. The fix is easy enough; dump files in /usr/bin, instead.

Specifically, the following symlinks are new in 20.04, apparently (below via multiple fresh installs):

$ lsb_release -ds
Ubuntu 20.04 LTS
$ ls -l / | grep -E "usr|bin|lib"
lrwxrwxrwx   1 root root     7 Apr 23 15:02 bin -> usr/bin/
lrwxrwxrwx   1 root root     7 Apr 23 15:02 lib -> usr/lib/
lrwxrwxrwx   1 root root     8 Apr 23 15:02 sbin -> usr/sbin/
drwxr-xr-x  11 root root  4096 Apr 23 15:05 usr/

Compare with 19.10 (edit: this system was upgraded from 18.04 I think; whoops):

$ lsb_release -ds
Ubuntu 19.10
$ ls -l / | grep -E "usr|bin|lib"
drwxr-xr-x   2 root root  4096 Dec 11 07:41 bin
drwxr-xr-x  20 root root  4096 Nov  4  2019 lib
drwxr-xr-x   2 root root  4096 Nov  3  2019 lib64
drwxr-xr-x   2 root root 12288 Apr  6 13:29 sbin
drwxr-xr-x  11 root root  4096 Aug  5  2019 usr

Arch does this, apparently starting years ago, and the overall topic is the Filesystem Hierachy Standard . It's not in the release notes: https://wiki.ubuntu.com/FocalFossa/ReleaseNotes

7
  • 1
    Possible duplicate of 2014's unix.stackexchange.com/questions/121235/…. Interestingly, my 20.04 systems (upgraded from 19.10 and earlier) are NOT linked, so the change for new installs might be several releases old.
    – user535733
    May 21, 2020 at 15:34
  • Thanks for the additional link! I would not consider this a duplicate, as there's two unanswered questions here: Why did Ubuntu just now make this change, and why did they not include it in release notes.
    – Gertlex
    May 21, 2020 at 15:39
  • Probably this is the case in fresh installs of LTS version. I have the links in 18.04, in 20.04 but not in an install off 19.04. Just an observation... I only do fresh installs, never release-upgraded.
    – mook765
    May 21, 2020 at 15:49
  • 1
    Right. The hope is that someone who has tracked down e.g. relevant mailing list discussion will use that as an answer.
    – Gertlex
    May 21, 2020 at 16:15
  • 1
    All this is great until someone run dpkg -x file.deb /. Then the system will be ruined almost completely.
    – N0rbert
    Jun 9, 2020 at 7:08

1 Answer 1

13
+50

I hadn't noticed this change, so I dug into it a little bit. I'm guessing it was not in the release notes because it was really an upstream change in Debian:

This Ubuntu announcement is the only official notification of the change I've seen

Merged-usr is now the default in Disco for new installations only

Some other general info

3
  • 1
    Good sleuthing! It sounds like this possibly took effect with 19.04, and based on other comments, mayyybe got included in a later point release of 18.04, so could affect fresh installs of that, too.
    – Gertlex
    Jun 9, 2020 at 21:29
  • Thanks for finding this!! I’ll test older Ubuntu from before. With docker you can try this easily. On Ubuntu 18.04 it certainly didn’t have this feature.
    – morhook
    Jun 10, 2020 at 5:48
  • Since 19.04 this feature is enabled on Ubuntu, I've re-checked answer with this command docker run -it ubuntu:19.04 ls -la
    – morhook
    Jun 15, 2020 at 7:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .