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/)

erkant 12-09-2012 11:01 AM

Sorry for my last post, I wrote udev but I meant devtmpfs, which is said in section 8.3. Thanks for answering my off-topic questions, because I always mount my LFS entry to my host /etc/fstab. On the other hand about the question that I had posted a few months before. I had forgotten to mount my LFS system at the beginning (what a shame! :().

Edit: One thing that came to my mind now, one thing that I didn't do while going through LFS 7.2 book is in section 8.4, using GRUB to set up the boot process. I have dual-booted my laptop with Windows 7 and Linux Ubuntu, and I already have Grub 2.0 on my system. So I thought that because I already have Grub 2.0, I don't need to reinstall it, and that's why in section 8.4, where it says to use "grub-install /dev/sda", I skipped that part, and didn't execute that command, meaning I didn't installed grub. Can it be a problem?

spiky0011 12-09-2012 01:12 PM

Hi

As you have added you lfs to ubuntu grub.
Would it be an idea to boot lfs from grub prompt, Any thoughts Druuna sorry to but in.

druuna 12-09-2012 01:24 PM

Quote:

Originally Posted by erkant (Post 4845725)
One thing that came to my mind now, one thing that I didn't do while going through LFS 7.2 book is in section 8.4, using GRUB to set up the boot process. I have dual-booted my laptop with Windows 7 and Linux Ubuntu, and I already have Grub 2.0 on my system. So I thought that because I already have Grub 2.0, I don't need to reinstall it, and that's why in section 8.4, where it says to use "grub-install /dev/sda", I skipped that part, and didn't execute that command, meaning I didn't installed grub. Can it be a problem?

It seems that LFS is found and starts booting and that indicates that the grub entry used seems correct. You either choose to use the grub (lilo) that came with your host or use the one in the LFS book.

You've choosen for the one that came with your host so you do not do the grub parts in the LFS book (use your host to add an entry for LFS, which you did).

Just to make sure, can you post the LFS related grub.cfg entry?

Quote:

Originally Posted by spiky0011
As you have added you lfs to ubuntu grub.
Would it be an idea to boot lfs from grub prompt, Any thoughts Druuna sorry to but in.

The LFS kernel is found and starts to boot in the current situation. No need to tinker with grub.

erkant 12-09-2012 01:56 PM

This is the part regarding LFS in my host machines grub.cfg:

Quote:

menuentry 'LFS' {
set default=0
set timeout=5

insmod ext2

set root='(hd0,msdos6)'
echo 'Loading LFS...'

linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sda6 ro init=/bin/bash
}

druuna 12-09-2012 02:03 PM

Quote:

Originally Posted by erkant (Post 4845811)
This is the part regarding LFS in my host machines grub.cfg:
Code:

menuentry 'LFS' {
 set default=0
 set timeout=5

 insmod ext2

 set root='(hd0,msdos6)'
 echo 'Loading LFS...'

 linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sda6 ro init=/bin/bash
 }


That is wrong.

Why is the init=/bin/bash part there? It shouldn't be. This explains the lack of errors, the read-only FS and the minimal shell.

Is my assumption correct that you added this entry by hand? If so, let ubuntu do the work with the update-grub command (must be root).

erkant 12-09-2012 02:05 PM

Yes, I added that command by hand. Should I delete it and try booting my LFS, or should I just do update-grub without making any chance to my host grub.cfg, and then try booting my LFS?

druuna 12-09-2012 02:17 PM

Quote:

Originally Posted by erkant (Post 4845815)
Yes, I added that command by hand. Should I delete it and try booting my LFS, or should I just do update-grub without making any chance to my host grub.cfg, and then try booting my LFS?

Use the update-grub command. If grub is updated by ubuntu at some point you will probably loose your manual edits.

erkant 12-09-2012 02:52 PM

Thank you very much druuna. I really appreciate it. You saved my day!
After doing update-grub, my host machines grub.cfg changed to:

Quote:

menuentry "GNU/Linux, Linux 3.5.2-lfs-7.2 (on /dev/sda6)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root b8748ba1-a41a-4af4-bc55-b501f70b736b
linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sda6 ro
}
And guess what, it boots successfully, and asks for lfs login, for the username and password. But the only problem is that I cannot remember my password, while I finished LFS a week or so ago. I checked /etc/passwd of my LFS directory, and there are a lot of entries, but two important users, namely one erkant, with uid 1000, and one lfs with uid 1001. Is there any way how can I check their password, or at least change them, so I can login to my LFS system?

druuna 12-09-2012 02:54 PM

You can (re)set password for a user as root with the following command:
Code:

passwd username
Can you put up the [SOLVED] tag if this is resolved.
- above the first post -> Please Mark this thread as solved if you feel a solution has been provided.
- -or- -
- first post -> Thread Tools -> Mark this thread as solved


All times are GMT -5. The time now is 07:37 PM.