LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 7.2: Read-only file system error (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-7-2-read-only-file-system-error-4175440578/)

druuna 12-08-2012 12:54 PM

Is the following the exact message that appears after booting?
Quote:

EXT3-fs (sda6): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) readonly on device 8:6.
Freeing unused kernel memory: 452k freed
Write protecting the kernel text: 7812k
Write protecting the read-only data: 2344k
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash-4.2#
- You didn't leave out anything?
- Are you able to recall what was printed before the EXT3-fs (sda6): mounted filesystem with writeback data mode line?

When you are logged in, are you able to execute the following command
Code:

/bin/dmesg
(might give you an insight in what happens during the boot.

erkant 12-08-2012 01:09 PM

I just booted it again, and here are the lines that I am able to see while booting, before getting to bash-4.2#:

Quote:

(there come some lines regarding my USB mouse, and then comes those)
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays
md: Scanned 0 and added 0 devices
md: autorun ...
md: ... autorun DONE.
kjournald starting. Commit interval 5 seconds.
Then comes the lines that you have posted in your last post. If I execute /bin/dmesg , I get all the messages that appear when booting the system, but they appear so fast that I am not able to read anything, expect those lines that I tell you, the last few ones. So all I can see are those.

druuna 12-08-2012 01:22 PM

Quote:

Originally Posted by erkant (Post 4845307)
If I execute /bin/dmesg , I get all the messages that appear when booting the system, but they appear so fast that I am not able to read anything, expect those lines that I tell you, the last few ones. So all I can see are those.

Try:
Code:

/bin/dmesg | /bin/more
or substitute more for less if you like that one better.

Although it is probably unrelated to your issue I do see one thing that can probably be disabled in the kernel:
Quote:

md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays
md: Scanned 0 and added 0 devices
md: autorun ...
md: ... autorun DONE.
Those are for RAID and LVM support ( Device Drivers ---> Multiple devices driver support (RAID and LVM))

erkant 12-08-2012 02:44 PM

I tried "/bin/dmesg | /bin/more", and there are awful lot of messages, I cannot write all of them here. As long as I understand there isn't anything interesting, the only difference from later is that now I have a message saying: "devtmpfs: initialized" and another saying that devtmpfs is mounted. If you could tell me what to look for, maybe can I search for it and tell you what I see.

druuna 12-09-2012 04:33 AM

You need to look for errors, warnings and messages that look out of place. I would start by focusing on disk related entries, which seem to be read-only.

You do have a minimal shell after the boot which might give you access to some commands. The following might give you an indication of what is going on:
- error/warning related:
Code:

dmesg | egrep -A2 -B2 -i "error|warn"
- disk related:
Code:

dmesg | egrep -A2 -B2 -i "sd[a-z]|ext[234]|mount"
Also have a look at the output of the following commands (might not work at this stage):
Code:

df -h
mount


erkant 12-09-2012 05:31 AM

I did used the commands that you said, and here are some of the outputs:

For dmesg | egrep -A2 -B2 -i "error|warn", I got some of those and some others too, without any error or warning in the messages:

Quote:

ACPI Warning: 32/64 FACS address mismatch in FADT two FACS tables (20120320/tbfadt-378)
ACPI Warning: 32/64x FACS address mismatch in FADT ... \_SB_.PCI0:_OSC invalid UUID
pci 0000:00 ACPI _OSC request failed (AE_ERROR), returned control mas 0x1d
[drm: i915_init]*ERROR* drm/i915 can't work without intel-agp module!
(some other ACPI Warnings regarding SystemIO and Region conflicts.)
(note that in the place of "...", there was a hexadecimal value)
For dmesg | egrep -A2 -B2 -i "sd[a-z]|ext[234]|mount", I got some of those messages:

Quote:

sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500GB/465GiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is Off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3 <sda5 sda6> sda4
sd 0:0:0:0: [sda] Attached SCSI disk
EXT3-fs (sda6): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) readonly on device 8:6.
devtmpfs mounted
Output of df -h:

Quote:

df: cannot read table of mounted file systems
Output of mount:

Quote:

mount: warning: /etc/mtab is not writable (e.g. read-only file system). It's possible that information reported by mount(8) is not up to date. For actual information about system mount points check the /proc/mounts file.

druuna 12-09-2012 06:09 AM

Stepping through the boot sequence I just noticed this:
Quote:

# Begin /etc/inittab

id:5:initdefault:

si::sysinit:/etc/rc.d/init.d/rc S

l0:0:wait:/etc/rc.d/init.d/rc 0
l1:S1:wait:/etc/rc.d/init.d/rc 1
.
.
.
5? Why? That isn't what the LFS book says and might come into play when dealing with BLFS and graphical logins.

erkant 12-09-2012 06:11 AM

I finished LFS before a week or so, and have already started with BLFS, I have already installed X Windows System and KDE. The point is that I was getting this read-only error before I had started with BLFS, meaning just when I finished with LFS, but didn't bother to solve it. Then continued with BLFS, and I'm still getting this error. So I already have started with BLFS. But I cannot start my graphical interface, while when I type "startx", I get the error regarding my read-only file system, it cannot write some files.

druuna 12-09-2012 06:16 AM

Quote:

Originally Posted by erkant (Post 4845611)
I finished LFS before a week or so

You obviously did not finish LFS as booting is not possible....

Quote:

and have already started with BLFS,
You shouldn't have until you have a fully working LFS.

I assume you use the chrooted environment to build BLFS, which is wrong! You should build BLFS on top of LFS and not on top of your host (chrooted env uses the kernel and dev entries from your host and _not_ from LFS).

Quote:

I have already install X Windows System and KDE. The point is that I was getting this read-only error before I had started with BLFS, meaning just when I finished with LFS, but didn't bother to solve it. Then continued with BLFS, and I'm still getting this error. So I already have started with BLFS. But I cannot start my graphical interface, while when I type "startx", I get the error regarding my read-only file system, it cannot write some files.
Different problem altogether and not relevant at this point.

First finish building LFS!

erkant 12-09-2012 06:19 AM

I already followed the book about LFS, when I finished it I managed to boot without any kernel panic, some of the commands like ls, cat were working, but I was still getting the problem regarding read-only file system, when I tried to create a file or directory. I don't know what you mean with finish LFS. I already booted. I can start from all over again, and I will get the same problem when I will finish LFS. The point is that I don't know how to solve this read-only file system problem.

druuna 12-09-2012 06:24 AM

So if you change this id:5:initdefault: to this id:3:initdefault: you still have the same issue?

Quote:

Originally Posted by erkant
I don't know what you mean with finish LFS.

Do not start with BLFS until you resolve all the LFS issue's.

EDIT: Also remove this from your inittab: kd:5:respawn:/opt/kde/bin/kdm

erkant 12-09-2012 06:36 AM

Yes, I get the same problem. And to be sure again, I changed it to 3, and deleted the line regarding kde. Restarted, it again boots, other commands are working but still cannot create a directory or file. Still getting the problem regarding read-only file system.

druuna 12-09-2012 09:24 AM

Quote:

Originally Posted by erkant (Post 4845620)
Yes, I get the same problem. And to be sure again, I changed it to 3, and deleted the line regarding kde. Restarted, it again boots, other commands are working but still cannot create a directory or file. Still getting the problem regarding read-only file system.

You are presented by a minimal shell due to some problem (you never reach a login prompt). You can only use it to do very basic things.

I've re-read the posts in this thread an have a few questions:

1) You mention the following (p#1):
Quote:

I have created my kernel using "make defconfig" command, and just did a few small changes to the default configuration.
What changes did you make? Have you tried restoring them to the original setting?

2) Besides the changes in the inittab file, did you make any other changes regarding boot scripts?
I'm asking because the boot seems to execute /etc/rc.d/init.d/mountvirtfs (the VFS: Mounted root (ext3.... line) and shortly after that you're given the minimal shell, without an error/warning. modules, udev and swap don't seem to be executed (and all that follows).

You might want to revisit chapters 7.6, 7.7 and 7.12

Quote:

Originally Posted by erkant
I can start from all over again, and I will get the same problem when I will finish LFS.

You must be doing something wrong. If you've done this more then once and keep getting the same error/result then you probably misunderstand something (finding out what is the problem). LFS 7.2 does work, many have build it successfully. Pointing to anything specific isn't possible at this point, but are you sure you didn't ignore an error somewhere during the LFS build.

erkant 12-09-2012 10:02 AM

1) The small changes that I mean are, that I added support for udev as the book says, and enabled some graphic and input hardware support, regarding my laptop.
2) As long as I recall I didn't make any changes regarding boot scripts. I installed bootscripts in 7.6 as it says, then in section 7.7, I created the inittab exactly as it is written there, you can also see it in the earlier posts. And in section 7.12, I didn't do any changes to my rc.site file, because I think it was the same as the one already created during my LFS installation. I don't also recall any error messages during my LFS build, even the test results were similar like existing LFS test logs. I build it twice, and got the same problem. I don't know where I make mistake(s). But this is driving me crazy.

One off-topic question: When I start building LFS and when I have to mount my ext3 filesystem to /mnt/lfs, should I just use mount command for it? Or I should also add it to my host /etc/fstab file? While as long as I know if I don't mount it using my host /etc/fstab file, my partition will be unmounted from /mnt/lfs whenever I restart my computer.

druuna 12-09-2012 10:47 AM

Quote:

Originally Posted by erkant (Post 4845697)
1) The small changes that I mean are, that I added support for udev as the book says, and enabled some graphic and input hardware support, regarding my laptop.

Which udev settings? I don't recall seeing those in the LFS book (I checked chap 6.61, 7.4 and 8.3).

Quote:

Originally Posted by erkant
One off-topic question: When I start building LFS and when I have to mount my ext3 filesystem to /mnt/lfs, should I just use mount command for it? Or I should also add it to my host /etc/fstab file? While as long as I know if I don't mount it using my host /etc/fstab file, my partition will be unmounted from /mnt/lfs whenever I restart my computer.

Before you start working on your lfs system certain things need to be done. Adding a LFS mount entry to your hosts /etc/fstab file makes sure you don't forget to mount $LFS but you can also do it by hand, as long as it is done.

Once you reach chapter 6 you also need to remount certain stuff if you stop/start (reboot) (chapters 6.2.2 and 6.2.3) and use the correct chroot command (this one: 6.4. Entering the Chroot Environment or for chapter 7 and on: 6.65. Cleaning Up)

BTW: You never answered this question: error: no file found


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