The officially official Devuan Forum!

You are not logged in.

#1 2021-02-24 13:19:08

tlathm
Member
Registered: 2017-11-25
Posts: 78  

Converting from Buster and usr merge

I recently converted a Rackspace server from Buster to Beowulf mostly based on this:

https://www.devuan.org/os/documentation … owulf.html

Worked really well. One thing I noticed is that this ends up with a usr merged system:

ls -l /bin
lrwxrwxrwx 1 root root 7 Feb  6 05:30 /bin -> usr/bin

Two questions about this:

1. I'm assuming there's probably no way to change that...or at least nothing I'd want to attempt(?).

2. Are there any possible issues going forward because of that?...for example with updates etc.

Thanks!
Tom

Offline

#2 2021-02-24 14:51:03

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: Converting from Buster and usr merge

I cant answer you questions but here is a good read on the situtation from the debian side of things. I would say what is done is done in regards to your system unless you reinstall and choose the option not to merge.

https://lists.debian.org/debian-devel/2 … 00374.html

Last edited by dice (2021-02-24 14:52:36)

Offline

#3 2021-02-24 15:21:45

tlathm
Member
Registered: 2017-11-25
Posts: 78  

Re: Converting from Buster and usr merge

Thanks! I'm sure you're correct, and given that this was starting with a rackspace server I really have no option to do an install from scratch. Having said that, it's actually a rather simple LAMP server for the most part and I seriously doubt it would ever cause me any problems.

The only reason I noticed was that I set up a user specifically for rsync backups that's restricted to a chroot in it's home. That requires having a few binaries and libraries installed in the home. That failed at first because I had /bin/sh as the users shell and needed to change that to /usr/bin/bash.

Only the systemd and freedesktop.org asshats could manage to make such an asinine decision to screw with shit that's been in place as long as that. I use Gentoo on my own machines which, by default, doesn't do that BS either. Thank God for distros like that, and for the wonderful maintainers of Devuan!

Thanks
Tom

Offline

#4 2021-02-24 15:57:25

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Converting from Buster and usr merge

tlathm wrote:

That failed at first because I had /bin/sh as the users shell and needed to change that to /usr/bin/bash

/bin/sh is linked to dash in Debian and Devuan. The usr merge does not break /bin/sh in any way — all of the system scripts have a /bin/sh shebang so nothing would work if the usr merge broke that.


Brianna Ghey — Rest In Power

Offline

#5 2021-02-24 23:56:23

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 1,106  

Re: Converting from Buster and usr merge

1. I'm assuming there's probably no way to change that...or at least nothing I'd want to attempt(?).

It's not too hard. You start by copying /usr/bin into a new drectory /A, then make that become /bin by a careful juggle

rm /bin && /usr/bin/mv /A /bin

Thereafter it's a matter of removing from /bin and /usr/bin those that are mentioned differently in the content lists of installed packages. (You must of course also make sure your PATH includes both /usr/bin and /bin)
For example, if living on the edge you would use the following command pipeline

 cat /var/lib/dpkg/info/*.list | \
    grep -E '^(/usr)?/bin/' | \
    sed 's/^/\/usr/;s/^\/usr\/usr//' | \
    xargs -r rm

i.e. from the content lists reduce to the /bin/* and /usr/bin/* pathnames and change each pathname by adding prefix /usr to it but then remove /usr/usr if it becomes that, and then give these pathnames to rm

Then do the similar for /sbin and /usr/sbin (but using /bin/mv).

I haven't looked into unmerging /usr/lib. This might involve something more since there is a cache of pathnames for finding dynamic libraries and you wouldn't want to invalidate that willy nilly.

Offline

#6 2021-02-25 19:36:44

tlathm
Member
Registered: 2017-11-25
Posts: 78  

Re: Converting from Buster and usr merge

Head_on_a_Stick wrote:
tlathm wrote:

That failed at first because I had /bin/sh as the users shell and needed to change that to /usr/bin/bash

/bin/sh is linked to dash in Debian and Devuan. The usr merge does not break /bin/sh in any way — all of the system scripts have a /bin/sh shebang so nothing would work if the usr merge broke that.

To clarify what actually happened to me there: I have a script that copies the minimum of executable programs and libraries I need in a users home to allow rsync to work in that chroot...and because of the nature of the usr merge and the way my script works I didn't have any /bin/sh in that chroot home.

Thanks for the replies! I don't think I'll attempt any conversion to the separate usr here, as the server's already in use and serving it's purpose just fine. Thanks!

Tom

Offline

Board footer