The officially official Devuan Forum!

You are not logged in.

#1 2021-12-19 02:31:05

Cheerful Charlie
Member
Registered: 2017-01-30
Posts: 18  

New Chimaera install /home Problem

I just struggled through an Devuan Chimaera install and managed to get it running.  This is on a 2 Tb hard disk.  I had copied my large /home directory over to this hard disk,  However the Devuan istall seems to hane it's own /home in the root directory.  My fstab does not seem to show that.  How do I go about setting up Devuan to use my preferred  /home directory and tell it not to look to the newly installed .home directory?  I installed to a 57 GB directory (which fits on a 64 GB flash drive).  From the file manager under Xface I can see and mount the desired /home directory so it is good to go.

Debian - Devuan is an alien system to me.

Offline

#2 2021-12-19 08:44:49

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

Re: New Chimaera install /home Problem

Dirty hack (run as root, replace X & Y with the letter & partition number for the new disk):

mount /dev/sdXY /home
tee -a /etc/fstab <<!
$(grep home /proc/self/mounts)
!
sed -i s!/dev/sdXY!$(lsblk -o mountpoint,uuid|awk '/home/{print $2}')! /etc/fstab

Alternative, slightly less hacky method (again, as root; this method over-writes /etc/fstab):

apt install arch-install-scripts
mount /dev/sdXY /home
tee /etc/fstab <<!
$(genfstab -U /)
!

If you want try either of those backup /etc/fstab first so it can be restored if necessary:

cp /etc/fstab{,.orig}

To do it properly read man fstab and make a new entry for /home yourself.


Brianna Ghey — Rest In Power

Offline

#3 2021-12-19 09:57:23

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: New Chimaera install /home Problem

Note that @Head_on_a_Stick jumped into the particular solution(s) of how to get the saved filesystem mounted at boot time onto /home, under on an assumption like that users Billy and Kate had their home directories saved at top level as /billy and /kate on the save partition.

Since I often find myself in some different situation (with old home directories somewhere down deeper on the save partition) I need to do a little bit more and different things.

Perhaps it's useful for the OP to first conceive the distinction between

  • a partition which is a portion of a disk, and

  • the filesystem a partition contains.

On bootup, the kernel sets up one selected partition's filesystem as root filesystem, and any other partition's filesystem gets mounted (as declared in /etc/fstab) onto some directory (to become that subdirectory tree). The pathnames of that second filesystem are then appended to the pathname prefix leading to the mount point.

For example, if the saved data gets mounted on a directory named /old, then it'll be accessible under the saved pathname following the prefix /old. In other words, if Biily's old home directory got saved as /home/billy on the save partition, then that will be found as /old/home/billy when that partition is mounted onto /old. Or it is found as /home/home/billy if the partition is mounted onto /home.

Thus, if Billy's home directory got saved as /billy on the save partition, then mounting that partition onto /home makes the saved directory accessible as /home/billy.

The home directory for a user is registered in the file /etc/passwd. This has one line for each user, with the line divided into parts separated by ":", and the second last part of a line tells the home directory for the user named as first part of the line.

In some other scenarios, such as when mounting the save partition onto /old because the save path is /home/billy on that partition, one might edit /etc/passwd to tell that billy has /old/home/billy as home directory.

And then, even in that scenario, it is possible to instead use an additional "bind mount" to make the path /old/home/billy (also) accessible as path /home/billy, and thereby avoid editing /etc/passwd. To do this you'll need two separate entries in /etc/fstab: one to mount the partition, and a second one to declare the bind mount.

Offline

#4 2021-12-19 15:58:31

Cheerful Charlie
Member
Registered: 2017-01-30
Posts: 18  

Re: New Chimaera install /home Problem

Thanks for the clues.  Ny daily driver hard disk seemed to have cratered.  It was an old install anyway. I had just partitioned two new hard disks, and I have been backing up home to 2 ssds.  So I have saved /homes up to date in spades.

It looks like I may have to do the right thing and set up a fstab entry for my /home on this hard disk I am booting from.  And set my users to make sure it boots from that.

Next to do is purge Devuan of the /home it has in my Devuan partition and make it stop trying to mount it at all.  I was hoping the installer would be more straight forward in allowing setting the proper home directory to use.  Should perhaps that ,ight be a propoer bug report? Just before the crash, I was trying to understand udev rules.

And now back to fighting setting up Plasma and browsers and getting synaptic working.  Amazingly, to install VLC it wants to rip out my newly installed Vivaldi browser.  I need a beer.

Last edited by Cheerful Charlie (2021-12-19 16:09:41)

Offline

Board footer