🇩🇪 Deutsch 🇬🇧 English

11 Oct 2024

Gentoo Linux: change split profile to merged profile

Change your Split-Profile to Merged-Profile on Gentoo Linux. The underlying motivation for this change is compatibility: in theory this change should allow increased interoperability between Linux distributions.


Split-usr was the default in 17.1, but now merged-usr is default in 23.0. That is why the table says to choose the split-usr profile if you want to remain split. Merged-usr has to do with /usr, /sbin, etc., not partitions.

See also https://wiki.gentoo.org/wiki/Merge-usr


  • Systems with OpenRC can still use a split-usr Profile.
    • I use OpenRC but also changed to merged-usr


select a suitable merged-usr profile

eselect profile list
...
[23]  default/linux/amd64/23.0/desktop (stable)
...
[46]  default/linux/amd64/23.0/split-usr/desktop (stable) 
...

fehmarn ~ # eselect profile set 23

fehmarn ~ # eselect profile show
Current /etc/portage/make.profile symlink:
  default/linux/amd64/23.0/desktop

start the merge, first via dryrun

fehmarn / # merge-usr --dryrun
INFO: Migrating files from '/bin' to '/usr/bin'
ERROR: Conflict for file '/bin/gawk': 
  [Errno 17] File exists: '/usr/bin/gawk'
INFO: Skipping symlink '/bin/awk'; '/usr/bin/awk' already exists
INFO: Skipping symlink '/bin/plymouth'; '/usr/bin/plymouth' already exists
ERROR: Leaving '/bin' as a directory due to prior errors
INFO: Migrating files from '/sbin' to '/usr/bin'
INFO: No problems found for '/sbin'
INFO: Migrating files from '/usr/sbin' to '/usr/bin'
INFO: No problems found for '/usr/sbin'
INFO: Migrating files from '/lib' to '/usr/lib'
ERROR: Conflict for file '/lib/systemd/system/slim.service': 
  [Errno 17] File exists: '/usr/lib/systemd/system/slim.service'
ERROR: Leaving '/lib' as a directory due to prior errors
INFO: Already a symlink: '/lib32'
INFO: Migrating files from '/lib64' to '/usr/lib64'
INFO: No problems found for '/lib64'

Correct all problems manually, YMMV

fehmarn / # ls -lha /bin/|grep gawk
-rwxr-xr-x  2 root     root     279K Jun 20  2018 gawk

fehmarn / # ls -lha /usr/bin/|grep gawk
lrwxrwxrwx   1 root root         4 Apr  1  2023 awk -> gawk
-rwxr-xr-x   1 root root      707K Nov 14 00:06 gawk
-rwxr-xr-x   1 root root      6.5K Nov 14 00:06 gawkbug

fehmarn / # rm /bin/gawk
fehmarn / # cd /bin
fehmarn /bin # ln -s /usr/bin/gawk gawk
fehmarn /bin # cd
fehmarn ~ # merge-usr --dryrun
...
rm /usr/lib/systemd/system/slim.service
...
fehmarn ~ # merge-usr --dryrun

do the merge then

  • only if no problems are encountered anymore
fehmarn / # merge-usr
[...]
  • Enjoy the result!
fehmarn / # tree -L 1 /
/
|-- bin -> usr/bin
|-- boot
|-- dev
|-- etc
|-- home
|-- lib -> usr/lib
|-- lib32 -> lib
|-- lib64 -> usr/lib64
|-- lost+found
|-- media
|-- mnt
|-- opt
|-- proc
|-- root
|-- run
|-- sbin -> usr/bin
|-- sys
|-- tmp
|-- usr
`-- var
  • Yeeha!