LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bedrock Linux
User Name
Password
Bedrock Linux This forum is for the discussion of Bedrock Linux.

Notices


Reply
  Search this Thread
Old 06-30-2016, 07:13 AM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock
Posts: 90
Blog Entries: 11

Rep: Reputation: 9
lilo and nyla


So I finally stopped re-reading docs and planning and actually went and installed bedrock.

Has anyone gotten Bedrock (Nyla) working with lilo? In other words: is bedrock capable of being used with lilo?

The reason I ask is, no matter what, bedrock complains that the / partition is read-only.

The key section of my lilo.conf, note the use both of the "read-write" kernel paremter *and* the "rw" passed as part of the command line to the kernel.
Code:
## Linux bootable partition config begins
image = /boot/vmlinuz-generic-4.1.13
  initrd=/boot/initrd_slack.gz
  root = /dev/cryptvg/dawn
  read-write
  label = Bedrock
  addappend="rw init=/bedrock/sbin/brn waitforroot=4"
# Linux bootable partition config ends
Bedrock does boot and I *can* log in but it's all wrong apparently until bedrock can get early write-access to the partition.

Thank you in advance.
 
Old 06-30-2016, 04:44 PM   #2
ParadigmComplex
Bedrock Linux Founder
 
Registered: Feb 2016
Distribution: Bedrock Linux
Posts: 26

Rep: Reputation: Disabled
I don't have much experience with lilo. That looks like it should work - no idea why it isn't.

While it's probably better to actually fix that, we can probably work around it. Once you've logged in, try running (as root)

Code:
brs preenable init
Ideally that should be run before the stratum is enabled, but it's *probably* okay if it runs after. This will run the various bits of code Bedrock Linux wanted to run early on but couldn't. While you'll still see error messages on boot, everything should be good at that point. Consider placing that command in /etc/rc.local so it is run every boot.

If you do figure out why it isn't properly mounting the filesystem as writable, do let me know so I can make a note of it for the future. I do want to ensure options such as lilo are supported.

Background: Bedrock Linux wants to be able to write to the early file system so it can enforce a few standards needed to keep the various distros in sync. For example, some distros use /etc/machine-id while others use /var/lib/dbus/machine-id. Bedrock Linux tries to ensure one of those two locations is a symlink to the other, which naturally requires write access.

For the next release I'd really like to remove the requirement of touching the bootloader at all for hijack installs. I'm planning on removing this read-write requirement by having brn try to figure out which mount points it needs write access, remount with write access, do its stuff, then remount again as read-only to resume prior state. This'll be a non-issue at that time. May take a bit before we get there, though, and it'd be better to understand why this is an issue in the first place.
 
Old 06-30-2016, 06:01 PM   #3
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock
Posts: 90
Blog Entries: 11

Original Poster
Rep: Reputation: 9
Thank you for the reply. In the meantime, I thought of something to tell me more of what is going on. What I did was boot into bedrock again, then cat /proc/cmdline to show the parameters in the form they were after being handed off to the kernel from lilo. Now recall that I had a single "rw" parameter in there and also had the lilo "read-write" line. Upon examination of the /proc/cmdline parameter I saw no "read-write" but I *did* see that "rw" was now in there *twice*. Aha: lilo translating its "read-write" into the "rw" kernel parameter.

So that gets lilo off the hook: the kernel is being passed what it ought to be. That leaves (a) randomness (b) an undiscovered problem in bedrock or (c) the initrd is doing something to make the root device mount as read-only.

Next I looked at the unpacked slackware initrd and saw this line near the end of the init script:
Code:
  mount -o ro -t $ROOTFS $ROOTDEV /mnt
It's mounting it read-only. Note: ROOTFS is the file system type (ext4 in this case) and ROOTDEV is the device to mount. Nothing odd there.

The last line of the script:
Code:
exec switch_root /mnt $INIT $RUNLEVEL
Aha. Bam. Eureka. And other such sayings. Looks like the slackware initrd is the problem.

So, in conclusion: lilo seems to work with bedrock.

Last edited by jr_bob_dobbs; 06-30-2016 at 06:03 PM.
 
1 members found this post helpful.
Old 06-30-2016, 06:06 PM   #4
ParadigmComplex
Bedrock Linux Founder
 
Registered: Feb 2016
Distribution: Bedrock Linux
Posts: 26

Rep: Reputation: Disabled
Nice investigation!

I'll need to make a note, then, that Slackware's initrd doesn't respect rw and recommend either people adjust it or use another initrd for the time being. Another point in favor of removing the need for "rw" and other bootloader adjustments.
 
Old 06-30-2016, 06:46 PM   #5
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock
Posts: 90
Blog Entries: 11

Original Poster
Rep: Reputation: 9
OK. I am in bedrock right now as I am posting this. Yay! Modifying the slackware initrd to *not* force a read-write mount *is* the solution.

HOLY CRAP I'M IN BEDROCK!!!!!!!
 
Old 06-30-2016, 06:48 PM   #6
ParadigmComplex
Bedrock Linux Founder
 
Registered: Feb 2016
Distribution: Bedrock Linux
Posts: 26

Rep: Reputation: Disabled
Excellent, enjoy it!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Edit lilo.conf, run /sbin/lilo, but lilo won't take changes lukameen Slackware 2 02-10-2012 12:10 PM
trying to update lilo on my usb hdd tells me /etc/lilo.conf wasn't found daweefolk Slackware 8 04-23-2010 01:20 AM
[SOLVED] Before Install: Slackware over Ubuntu (Grub to LILO), Dual w/Vista: LILO question Ubunoob001 Slackware - Installation 3 03-01-2010 03:01 PM
[SOLVED] LILO fails when run from live CD after installing Slack (skipped LILO during setup) sysfce2 Linux - Newbie 7 08-04-2009 12:16 AM
Lilo lost, Install disk failing to restore Lilo on dual boot? Dobie Linux - Newbie 2 05-05-2004 05:00 PM


All times are GMT -5. The time now is 03:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration