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.
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?
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.
Last edited by druuna; 12-09-2012 at 01:43 PM.
Reason: fixed weird sentence
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).
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?
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.
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?
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.