[SOLVED] Won't boot: /etc/rc.d/init.d/rc: line 193: /var/log/boot.log: Read-only file system
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Won't boot: /etc/rc.d/init.d/rc: line 193: /var/log/boot.log: Read-only file system
When I try to boot Linux from Scratch using an external U.S.B. hard drive, it encounters errors right as it is entering runlevel 3:
Code:
/etc/rc.d/init.d/rc: line 193: /var/log/boot.log: Read-only file system
/etc/rc.d/init.d/rc: line 194: /var/log/boot.log: Read-only file system
INIT: Entering runlevel: 3
Starting system log daemon.../lib/lsb/init-functions: line 636: /run/var/bootlog: No such file or directory
/lib/lsb/init-functions: line 569: /run/var/bootlog: No such file or directory
Starting kernel log daemon.../lib/lsb/init-functions: line 636: /run/var/bootlog: No such file or directory
Apparently, it is missing some directories, or can't make them in the first place. I think that my /etc/fstab looks ok; my computer has 8GB RAM, so I haven't bothered activating swap space yet:
I am not sure what to do. My permissions for /run look ok (root has write access to it). I rechecked the section about configuring the boot scripts, but didn't see anything helpful there. I found reports of similar error messages on Google, but nothing in this context, and nothing that looked helpful.
/etc/rc.d/init.d/rc: line 193: /var/log/boot.log: Read-only file system
/etc/rc.d/init.d/rc: line 194: /var/log/boot.log: Read-only file system
A read only filesystem. Have a look at the bottom of the rc script (D.1. /etc/rc.d/init.d/rc), the copy step doesn't work due to the read-only statud of /var.
The other errors are probably related to this.
Only thing I can come up with right now: Is the USB HD writeable (some have a hardware "switch" to make them read-only)?
The main issue seems to be this: A read only filesystem. Have a look at the bottom of the rc script (D.1. /etc/rc.d/init.d/rc), the copy step doesn't work due to the read-only statud of /var.
The other errors are probably related to this.
Only thing I can come up with right now: Is the USB HD writeable (some have a hardware "switch" to make them read-only)?
Hope this helps.
Thanks for your reply. The drive is definitely writeable; I've installed other distributions on it (such as Mandriva) without a problem. I did find that when I added 'rw' to the GRUB line, the boot process went slight further, though not much: I got an extra message about ksyslogd segfaulting. After I removed all the symlinks for ksyslogd from the rcx.d directories (and left 'rw' in the GRUB line), it actually brought me to a login prompt.
I logged in, and tried to check what was mounted. cat /etc/mtab and cat /proc/mounts returned nothing. That's weird... so I went into /proc and found that nothing was there. The same was true of /sys. So it's not mounting those, which is probably what's causing all these problems. I checked /etc/fstab, and I'm really not sure what (if anything) is wrong with it.
You shouldn't have to add the rw option to grub. Normally the system is initially brought up in read only mode, to be re-mounted read-write at a later boot stage.
I do believe the error you posted is one of the symptoms of another problem that happened earlier in the boot process. Try booting to a prompt as you described and check the log files (might not be there due to the read-only problem ) and use the dmesg | more command to search for errors. We can only start guessing when there are no errors.
I'm assuming that you already checked for typo's and such in /boot/grub/grub.cfg and are reasonably sure you have a correct kernel configuration.
You shouldn't have to add the rw option to grub. Normally the system is initially brought up in read only mode, to be re-mounted read-write at a later boot stage...
I think that the root of the problem, or at least a deeper layer of the problem, is that it's not mounting the filesystems in fstab. It knows to mount /dev/sdb3 as / because of GRUB, but since GRUB normally loads this as read-only (I think), and it doesn't mount per fstab, it doesn't know to remount it as read/write unless I specify to do so in GRUB.
This is the GRUB entry (I didn't install GRUB 2 because I'm using my preinstalled GRUB. Also, loading the kernel 3.1 that I wrote specifically for L.F.S. from (hd1,0) (the external drive) makes no difference):
Code:
title Linux from Scratch
root (hd0,0)
kernel /boot/2639gentoor3b root=/dev/sdb3 rw rootdelay=3
I modified fstab a bit, but it still isn't working. Before, /dev/sdb3 was ext4. I thought that maybe there was a problem with it understanding some of the features that Gentoo was adding to the filesystem, so I compiled e2fsprogs in a temporary directory per 2.3 and ran './mke2fs -jv /dev/sdb3' to make it ext3 from that directory, but to no avail:
Major edit: I figured out the problem. /etc/inittab had an incorrect line in it. I changed line 5 to this:
Code:
si::sysinit:/etc/rc.d/init.d/rc S
Now it boots. I don't know how it ended up like that. Maybe I accidentally copied it from a different version of the LFS manual... I wonder what else could be wrong. I suppose that I'll find out.
Last edited by liquidkaleidoscopes; 11-11-2011 at 03:48 PM.
Hi,
The output shown by dmesg points to a Gentoo kernel:
Quote:
Linux version 2.6.39-gentoo-r3 (root@x) (gcc version 4.6.1 (Gentoo 4.6.1-r1 p1.0, pie-0.4.5) )
That can't be correct....
I'm not sure what you are trying to do, but this:
Code:
title Linux from Scratch
root (hd0,0)
kernel /boot/2639gentoor3b root=/dev/sdb3 rw rootdelay=3
does not point to the LFS kernel you talked about:
Quote:
This is the GRUB entry (I didn't install GRUB 2 because I'm using my preinstalled GRUB. Also, loading the kernel 3.1 that I wrote specifically for L.F.S. from (hd1,0) (the external drive) makes no difference):
The LFS 3.1 kernel isn't used.
EDIT: You edited your post while I was replying....
Although I'm still not sure what it is you are doing, I'm glad to see you seem to have it fixed
Hi,The output shown by dmesg points to a Gentoo kernel: That can't be correct....
I'm sorry about the confusion. What I meant is that I've been using the kernel that I wrote for Gentoo, but that I also tried the kernel that I wrote per the L.F.S. guide, which is Linux 3.1, and that this didn't fix the problem, so I went back to the Gentoo kernel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.