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.
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.
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.
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.
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)
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?
(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.
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.
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?
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. :/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.