LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Bedrock Linux (https://www.linuxquestions.org/questions/bedrock-linux-118/)
-   -   Host home directory location (https://www.linuxquestions.org/questions/bedrock-linux-118/host-home-directory-location-4175678867/)

mubharad 07-16-2020 06:57 PM

Host home directory location
 
Hi,

I had void linux initially which i hijacked for bedrock install. Everything went through fine and was booted into bedrock however the original void linux home directories and files are no longer available/visible. I tried searching in documentation and internet to see if it is moved to another location or need to be remounted but haven't had any luck yet. Can anyone advise what i should be doing?

Also i have been trying other distros in live session and running bedrock hijack to see if they support. I did not get any error and got the msg to reboot into new bedrock install, does this mean if i install those distros and retry hijack, everything will work fine or there is no guarantee?

Thanks in advance.

frankbell 07-16-2020 07:43 PM

Did you have your Void Linux /home on a separate partition?

If not, it like was overwritten during the install process.

This article will tell you more.

ParadigmComplex 07-16-2020 09:53 PM

Quote:

Originally Posted by frankbell (Post 6146293)
Did you have your Void Linux /home on a separate partition?

If not, it like was overwritten during the install process.

This article will tell you more.

Whether /home was on a separate partition is likely relevant here, but it wouldn't be wiped either way; Bedrock should avoid wiping `/home` when hijacking a install. That fact is an important aspect of its unusual install process.

Quote:

Originally Posted by mubharad (Post 6146289)
I had void linux initially which i hijacked for bedrock install. Everything went through fine and was booted into bedrock however the original void linux home directories and files are no longer available/visible. I tried searching in documentation and internet to see if it is moved to another location or need to be remounted but haven't had any luck yet. Can anyone advise what i should be doing?

Like frankbell, I'm curious if your /home is on a separate partition. If so, /etc/fstab likely contains information on how to mount /home. Can you provide that?

Some background: Typically the init system mounts /etc/fstab when booting. Most /etc/fstab-mounting software skips mounting anything that already has a mount point, as it assumes if there's already a mount point the given item is already mounted. This is reasonable assumption for most situations, but not on Bedrock. Bedrock actually wants some locations to have multiple point points on them, and it will create special mount points in places like /home _expecting_ it to be mounted over. However, these mount points confuse /etc/fstab mounting software. Bedrock typically solves this by mounting /etc/fstab itself, before kicking off the init. However, its system to do this is much less sophisticated than that used by most init systems.

My guess on the issue: Maybe your /home mount point is doing something fancy Bedrock's /etc/fstab mounting logic can't handle, then when the init comes around it skips mounting /home because it already sees the special Bedrock mount point there.

If that's the issue, you can probably work around it by placing a mount command in /etc/rc.local which mounts your /home partition.

In the long term I hope to have the Bedrock use the selected init's /etc/fstab mounting logic instead of its own, but I haven't quite gotten there yet.

Quote:

Originally Posted by mubharad (Post 6146289)
Also i have been trying other distros in live session and running bedrock hijack to see if they support. I did not get any error and got the msg to reboot into new bedrock install, does this mean if i install those distros and retry hijack, everything will work fine or there is no guarantee?

That's not a guarantee. My bet is you didn't get any errors running the hijack script on Void either, right? It's only after you rebooted into it to try it that this particular issue arose. The issue here isn't with the hijacked distro: Void Linux gets of love from the Bedrock community. It's likely just a quirk of your specific filesystem/mount/lvm/raid setup.

A better test would be to install Bedrock in a VM or on a spare/test machine - actually install it, not just a live distro. Set it up exactly as you'd expect a potential production situation to go and exercise your expected routine with it.

If you're trying to figure out what distros Bedrock plays nicely with, see the distro compatibility page. Note Void Linux has no distro-specific known compatibility issues, and it's used heavily in the Bedrock community.

If the above /etc/rc.local mount proposal doesn't work for you and/or you're keen on reinstalling anyways, consider giving it a try Void again but this time without putting /home on a separate partition. At least not until I get the catch-22 of using the init to mount filesystems before the init runs figured out.

Quote:

Thanks in advance.
Happy to help! If this isn't sufficient to get you going, we can probably work around the issue once you provide your /etc/fstab.

mubharad 07-17-2020 07:20 PM

Quote:

Originally Posted by ParadigmComplex (Post 6146317)
Whether /home was on a separate partition is likely relevant here, but it wouldn't be wiped either way; Bedrock should avoid wiping `/home` when hijacking a install. That fact is an important aspect of its unusual install process.



Like frankbell, I'm curious if your /home is on a separate partition. If so, /etc/fstab likely contains information on how to mount /home. Can you provide that?

Some background: Typically the init system mounts /etc/fstab when booting. Most /etc/fstab-mounting software skips mounting anything that already has a mount point, as it assumes if there's already a mount point the given item is already mounted. This is reasonable assumption for most situations, but not on Bedrock. Bedrock actually wants some locations to have multiple point points on them, and it will create special mount points in places like /home _expecting_ it to be mounted over. However, these mount points confuse /etc/fstab mounting software. Bedrock typically solves this by mounting /etc/fstab itself, before kicking off the init. However, its system to do this is much less sophisticated than that used by most init systems.

My guess on the issue: Maybe your /home mount point is doing something fancy Bedrock's /etc/fstab mounting logic can't handle, then when the init comes around it skips mounting /home because it already sees the special Bedrock mount point there.

If that's the issue, you can probably work around it by placing a mount command in /etc/rc.local which mounts your /home partition.

In the long term I hope to have the Bedrock use the selected init's /etc/fstab mounting logic instead of its own, but I haven't quite gotten there yet.



That's not a guarantee. My bet is you didn't get any errors running the hijack script on Void either, right? It's only after you rebooted into it to try it that this particular issue arose. The issue here isn't with the hijacked distro: Void Linux gets of love from the Bedrock community. It's likely just a quirk of your specific filesystem/mount/lvm/raid setup.

A better test would be to install Bedrock in a VM or on a spare/test machine - actually install it, not just a live distro. Set it up exactly as you'd expect a potential production situation to go and exercise your expected routine with it.

If you're trying to figure out what distros Bedrock plays nicely with, see the distro compatibility page. Note Void Linux has no distro-specific known compatibility issues, and it's used heavily in the Bedrock community.

If the above /etc/rc.local mount proposal doesn't work for you and/or you're keen on reinstalling anyways, consider giving it a try Void again but this time without putting /home on a separate partition. At least not until I get the catch-22 of using the init to mount filesystems before the init runs figured out.



Happy to help! If this isn't sufficient to get you going, we can probably work around the issue once you provide your /etc/fstab.

Thanks for the detailed explanation.

My /etc/fstab entry looks like below (presumably from void and not from bedrock)

UID=53c6f08e-6e4f-4010-865f-1e9f49a8a186 / ext4 defaults 0 0
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0

I had only one root partition so home was not under separate partition. When i observed the missing directories i tried running the xdg-user-dirs-update command to recreate the folder structure and strangely i got an warning/error message (which i don't remember clearly) but was something around directories were removed and autorecover but it didn't do anything. The folders were still missing.

I did go through the compatibility list, but I tried the live version to see if i'll get any errors while running bedrock script just to get an idea if it will be successful or not. I want to install and hijack Nutyx linux (LFS based distro similar to Crux, though it is not officially supported). Might just take the chance and install and see how it goes. Will keep you posted if i get any success.

Thanks for your suggestions and help.

ParadigmComplex 07-21-2020 08:19 PM

Quote:

Originally Posted by mubharad (Post 6146644)
Thanks for the detailed explanation.

Happy to help :)

Quote:

Originally Posted by mubharad (Post 6146644)
My /etc/fstab entry looks like below (presumably from void and not from bedrock)

UID=53c6f08e-6e4f-4010-865f-1e9f49a8a186 / ext4 defaults 0 0
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0

I had only one root partition so home was not under separate partition.

Then I really have no idea what happened. I've never heard of one's /home disappearing on a hijack before.

If it was production stuff and you need help recovering the files, we could try that; however, if the option is open to just reinstall, that might be preferable.

Quote:

Originally Posted by mubharad (Post 6146644)
I want to install and hijack Nutyx linux (LFS based distro similar to Crux, though it is not officially supported).

Bedrock tries to do things in as general a manner as possible. It's very possible unlisted distros work fine.

If Nutyx uses a BSD-style init like CRUX, it might freeze on shutdown. If it does, there's a work around we can try until Bedrock support there is improved.

Quote:

Originally Posted by mubharad (Post 6146644)
Might just take the chance and install and see how it goes. Will keep you posted if i get any success.

Good luck!

Quote:

Originally Posted by mubharad (Post 6146644)
Thanks for your suggestions and help.

Happy to :)


All times are GMT -5. The time now is 03:09 PM.