LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Bedrock Linux (https://www.linuxquestions.org/questions/bedrock-linux-118/)
-   -   Gentoo mounts read-only (https://www.linuxquestions.org/questions/bedrock-linux-118/gentoo-mounts-read-only-4175622256/)

pressman57 01-23-2018 03:00 PM

Gentoo mounts read-only
 
Hi all. Thanks for reading.

I've got Ubuntu-Mate and Arch getting along together on one box and I'd like Gentoo and Arch on another. With Ubuntu it was just a matter of adding rw to Grub, but for the life of me I can't keep Gentoo from changing back to read-only, and there it stays.

I have enjoyed myself immensely with this distribution. Many thanks.

Emerson 01-23-2018 03:49 PM

What you mean by "changing back"? Kernel mounts root filesystem ro, this is a feature. Then kernel runs init system and it is supposed to remount root filesystem rw. So either there is filesystem corruption (then it remains ro as precaution) or your init system does not run properly.

pressman57 01-23-2018 04:10 PM

The kernel boots as rw and a line on the screen reads "Changing to ro" or words to that effect. It's as though it's trying to mount as rw and then changes to ro.

Whether or not this is the case the init system ran fine without Bedrock installed.

ParadigmComplex 01-24-2018 06:22 AM

Quote:

Originally Posted by Emerson (Post 5810511)
What you mean by "changing back"? Kernel mounts root filesystem ro, this is a feature. Then kernel runs init system and it is supposed to remount root filesystem rw. So either there is filesystem corruption (then it remains ro as precaution) or your init system does not run properly.

Bedrock Linux tries to squeeze its own initialization code between the initrd and init-proper. As of the current release, this relies on the filesystem being read-write. Since many initrds support telling the initrd to mount the filesystem read-write by putting `rw` on the boot loader kernel line, the Bedrock Linux installation instructions indicate a user should do this. However, apparently that's not a universal standard. No filesystem corruption issues necessary here, nor issues with the (eventual) init.

Rather than require people mess with the bootloader, I plan on having the early Bedrock Linux code remount the filesystem read-write itself in the next release.

Quote:

Originally Posted by pressman57 (Post 5810470)
Hi all. Thanks for reading.

I've got Ubuntu-Mate and Arch getting along together on one box and I'd like Gentoo and Arch on another. With Ubuntu it was just a matter of adding rw to Grub, but for the life of me I can't keep Gentoo from changing back to read-only, and there it stays.

I have enjoyed myself immensely with this distribution. Many thanks.

It looks like Gentoo's initrd uses different flags from the other initrds I've tested when I wrote those instructions. Most Gentoo people apparently figured out what they needed to do to make it work and fixed it themselves such that I never noted the fact I need to change the instructions there. Looking at IRC logs, I found someone who I think uses a Gentoo initrd stating:

Code:

linux/kernel-genkernel-x86_64-4.4.26-gentoo root=UUID=<...> rw rootflags=rw init=/bedrock/sbin/brn real_init=/bedrock/sbin/brn resume=UUID=<...>
In part of Gentoo where the instructions indicate you should put `rw init=/bedrock/sbin/brn`, try putting `rw rootflags=rw init=/bedrock/sbin/brn real_init=/bedrock/sbin/brn` instead. See if that does it. If it does, let me know and I'll update the installation instructions to mention it accordingly.

If not, we can get the Bedrock Linux subsystem that expects read-write to just remount it itself. This is probably what I should have done originally instead of asking people to mess with their boot loader. I didn't realize at the time that `rw` in the kernel line was not a universal standard. So, if the above proposal fails, let's try getting `brn` to mount the filesystem read-write. Open up `/bedrock/sbin/brn` (or maybe boot with some other medium if required then mount bedrock into it then `<mount-point>/bedrock/sbin/brn>`. You should see something like this:

https://github.com/paradigm/bedrockl...drock/sbin/brn

On line 419, just after the `print_logo` statement:

https://github.com/paradigm/bedrockl.../sbin/brn#L419

try adding

Code:

mount -o remount,rw /
That should resolve it.

pressman57 01-24-2018 07:18 PM

Thanks very much for the information, I'll have time over the weekend to give it a try so I'll report back then.

pressman57 01-27-2018 02:19 PM

The first option worked. Thanks a lot.

I've got another issue with networking. Is there anything special I have to do or did I screw I up re-installing Gentoo?

ParadigmComplex 01-27-2018 02:41 PM

Happy to hear it worked for you.

I can't confidently comment on your issue with networking without more detail. Ideally you shouldn't have to do anything special, but it's possible you ran into a bug in Bedrock Linux. There are some known quirks with how it handles /etc/resolv.conf which may be a likely culprit. I'm experimenting with clean solutions for them for the next release, but it'll be a bit.

EDIT: If you are doing a hijack install, you should be able to test networking before hijacking. If it works before hijack, but not immediately afterwards, that's probably Bedrock's fault.

pressman57 01-28-2018 12:25 PM

Networking did work before Bedrock was installed (I had to emerge git), but I found a work around: I just run dhcpcd enp0s3 and it's up.

ParadigmComplex 01-28-2018 01:09 PM

Excellent, glad you got it working. Don't hesitate to let me know if you run into anything else.

pressman57 01-31-2018 08:02 PM

Actually, no default services were started using the grub-line method.
Adding the mount command to brn resulted in a stable system.

ParadigmComplex 01-31-2018 08:18 PM

Could you elaborate? I don't know what you mean by "the grub-line method", nor which "mount command" to which you are refering.

pressman57 01-31-2018 08:53 PM

Sorry I wasn't clear. I was referring to the above explained methods of mounting Gentoo as read-write.

As i understand the instructions in the first method I was to add : init=/bedrock/sbin/brn real_init=/bedrock/sbin/brn` grub's command line.

In the second I was to insert 'mount -o remount,rw /' in line 419 to /bedrock/sbin/brn.

ParadigmComplex 02-01-2018 05:48 AM

Ahh, gotcha. I lost context, sorry. Okay, that's good to know - I'll make sure the 'mount -o remount,rw /' method is in use for the next release. Even if you could get it working by messing with the bootloader, that's one installation step we can remove.

belledaphy 08-19-2020 04:30 PM

How to disable avatar?
 
Hello i am new user and i would to ask you, How to disable avatar?


All times are GMT -5. The time now is 04:01 PM.