LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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

Reply
 
Search this Thread
Old 12-08-2012, 09:18 AM   #1
erkant
Member
 
Registered: Oct 2012
Posts: 51

Rep: Reputation: Disabled
LFS 7.2: Read-only file system error


I have created LFS 7.2 using the book, and it successfully boots up, but when I try to create a new file or directory, I cannot, while it says that my file system is read-only. Although I can list the files and directories, change the directory or so. How can I overcome this? Below you can find the last few lines while my LFS system is booting up:

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#

And for example, if I try to create a new directory I get the following error message:

bash-4.2# mkdir test
mkdir: cannot create directory 'test': Read-only file system

For your knowledge, I have created my kernel using "make defconfig" command, and just did a few small changes to the default configuration. I'm using ext3 file system, mounted in /dev/sda6. Also in my /etc/fstab I have the following line:

/dev/sda6 /mnt/lfs ext3 defaults 1 1

If you could help me overcome the problem, I would be glad.

Last edited by erkant; 12-08-2012 at 09:20 AM.
 
Old 12-08-2012, 09:25 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by erkant View Post
For your knowledge, I have created my kernel using "make defconfig" command, and just did a few small changes to the default configuration. I'm using ext3 file system, mounted in /dev/sda6. Also in my /etc/fstab I have the following line:

/dev/sda6 /mnt/lfs ext3 defaults 1 1
That doesn't look correct. There is no /mnt/lfs when you boot into lfs.

It should be:
Code:
/dev/sda6     /     ext3     defaults     1     1
(mentioned here)
 
Old 12-08-2012, 09:51 AM   #3
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
That's the /etc/fstab of my host machine. In my LFS system's /etc/fstab file it is exactly as you have provided. I will try to delete that line from my host machine's /etc/fstab, and try to boot like that, but I don't know whether whether it will boot, whether it will be able to find my kernel. Because if my mount my /mnt/lfs just using the mount command from my host machine, it won't be there when I restart my PC, so I don't know whether it will find the kernel.

Last edited by erkant; 12-08-2012 at 09:55 AM.
 
Old 12-08-2012, 10:04 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
No need to tinker with your host at this point. The problem is lfs related.

I personally think you are missing some kernel options based on this: [SOLVED] LFS: Error during Linux-3.5.2 kernel compilation and this:
Quote:
I have created my kernel using "make defconfig" command, and just did a few small changes to the default configuration.
We might be able to point you in the right direction if you post more of the boot messages (as much as possible up to the read-only prompt).

BTW: Have you seen this post: [SOLVED] Booting stops after kernel starts. Related and also mentions a kernel option.

EDIT: Are you 100% sure that this kernel option is set: Maintain a devtmpfs filesystem to mount at /dev (mentioned in the LFS book and not set by make defconfig)

Last edited by druuna; 12-08-2012 at 10:34 AM.
 
Old 12-08-2012, 12:19 PM   #5
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
I checked that Booting stops after kernel starts thread, but I couldn't find something useful for me. I'm sure that devtmpfs filesystem is mainted. Can the fact that I have in my host /etc/fstab used my /mnt/lfs as a mount point cause the problem?
 
Old 12-08-2012, 12:24 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by erkant View Post
Can the fact that I have in my host /etc/fstab used my /mnt/lfs as a mount point cause the problem?
Not if you are talking about your hosts fstab file. As stated before: No need to tinker with your host at this point. The problem is lfs related.
 
Old 12-08-2012, 12:35 PM   #7
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
This is my host /etc/fstab:

Quote:
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda4 during installation
UUID=a7e0dedf-5ffb-4851-a76f-2cd10b83bf81 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=9777ecf8-8991-4fc4-9798-5451a1d9b8c3 none swap sw 0 0
/dev/sda6 /mnt/lfs ext3 defaults 1 1
And this is my LFS /etc/fstab

Quote:
# file system mount-point type options dump fsck
# order

/dev/sda6 / ext3 defaults 1 1
/dev/sda5 swap swap pri=1 0 0
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
(of course both with spacing, I don't know why I cannot get the spacings here)
I don't know what it can be LFS related, maybe something in the kernel, but I don't know how can I show you the full kernel booting log.

Last edited by erkant; 12-08-2012 at 12:36 PM.
 
Old 12-08-2012, 12:35 PM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
This question is still unanswered:
Quote:
Originally Posted by druuna
We might be able to point you in the right direction if you post more of the boot messages (as much as possible up to the read-only prompt).
Can you also post the output of the following commands (from your host, lfs mounted under /mnt/lfs):
Code:
ls -l /mnt/lfs/dev/{console,null}

grep CONFIG_DEVTMPFS /mnt/lfs/boot/config-3.5.2

cat /mnt/lfs/etc/fstab posted while replying
 
Old 12-08-2012, 12:41 PM   #9
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
Output of "ls -l /mnt/lfs/dev/{console,null} :

Quote:
crw------- 1 root root 5, 1 Dec 1 18:49 /mnt/lfs/dev/console
crw-rw-rw- 1 root root 1, 3 Dec 1 18:49 /mnt/lfs/dev/null
Output of "grep CONFIG_DEVTMPFS /mnt/lfs/boot/config-3.5.2 :

Quote:
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set
 
Old 12-08-2012, 12:48 PM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by erkant View Post
Output of "grep CONFIG_DEVTMPFS /mnt/lfs/boot/config-3.5.2 :
Code:
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set
Quote:
Originally Posted by erkant
I'm sure that devtmpfs filesystem is mainted.
You are wrong. Maintain a devtmpfs filesystem to mount at /dev is _not_ set.
 
Old 12-08-2012, 12:50 PM   #11
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
As long as I remember, when I made "make defconfig", I then did "make menuconfig", loaded the default config, and checked that options, but I will try to do it again, and tell you the result.
 
Old 12-08-2012, 01:07 PM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by erkant View Post
As long as I remember, when I made "make defconfig", I then did "make menuconfig", loaded the default config, and checked that options, but I will try to do it again, and tell you the result.
I might have jumped the gun......

CONFIG_DEVTMPFS=y --> Maintain a devtmpfs filesystem to mount at /dev is set (sorry about that!!)
CONFIG_DEVTMPFS_MOUNT --> is not set.

Try setting the CONFIG_DEVTMPFS_MOUNT

Also: what does your /mnt/lfs/etc/inittab look like?

Last edited by druuna; 12-08-2012 at 01:09 PM.
 
Old 12-08-2012, 01:26 PM   #13
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
Now the output of "grep CONFIG_DEVTMPFS /mnt/lfs/boot/config-3.5.2" looks like:

Quote:
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
And /mnt/lfs/etc/inittab looks like 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
l2:2:wait:/etc/rc.d/init.d/rc 2
l3:3:wait:/etc/rc.d/init.d/rc 3
l4:4:wait:/etc/rc.d/init.d/rc 4
l5:5:wait:/etc/rc.d/init.d/rc 5
l6:6:wait:/etc/rc.d/init.d/rc 6

ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

su:S016nce:/sbin/sulogin

1:2345:respawn:/sbin/agetty --noclear tty1 9600
2:2345:respawn:/sbin/agetty tty2 9600
3:2345:respawn:/sbin/agetty tty3 9600
4:2345:respawn:/sbin/agetty tty4 9600
5:2345:respawn:/sbin/agetty tty5 9600
6:2345:respawn:/sbin/agetty tty6 9600

# End /etc/inittab
kd:5:respawn:/opt/kde/bin/kdm
 
Old 12-08-2012, 01:34 PM   #14
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
The inittab file looks OK.

Guess you are ready to reboot again (you did compile/place the kernel and not just set the option using make menuconfig as described in 8.3.1??)
 
Old 12-08-2012, 01:37 PM   #15
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
I edited the kernel config file to make CONFIG_DEVTMPFS_MOUNT=y and then recompiled and placed everything where they belong. But again I cannot create file or directory. Still seeing the error message, regarding read-only file system. :/
 
  


Reply

Tags
filesystem, lfs, mkdir, read only, readonly


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read-only file system - ERROR ramecare Linux - Server 5 02-08-2012 12:22 PM
read-only file system error when editing a config file smallfrowne Linux - Newbie 5 02-19-2008 07:06 PM
Read only file system error! xardas Linux - Desktop 1 05-14-2007 11:18 PM
LFS 6.2 a read-only file system? tryLinux&see Linux From Scratch 7 03-13-2007 08:14 PM
read only file system error surfduke Linux - General 3 09-30-2005 08:04 PM


All times are GMT -5. The time now is 06:05 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration