Make LFS bootable
1 Attachment(s)
Hi All,
I have currently setup LFS ( LFS 7.9 ) with custom modules and all looks fine so far. But needed assistance in making it bootable. Since I am running it in a virtual machine ( OpenSuse 13.2 ), I can break, crash , restore n number of times. I am unable to make it boot. Goal here is to boot the machine, and have grub give me an option to boot into LFS and actual host installation ( dual boot ). Quote:
fstab ( as seen when logged into chroot ) Quote:
root:/# cat /boot/grub/grub.cfg Quote:
So, the problem with this is, I dont have menu entry during boot to choose the lfs installation. I have tried booting into HD2 directly but it gives error as shown in attachment. |
When in your chroot, is vmlinuz-4.4.2-lfs-7.9 in /boot?
|
yes
Quote:
|
Probably booting directly into HD2 will not work because of the way how fstab has been updated ( guessing ). So my main goal as of now is to update the entry of lfs so that when I reboot, I get to choose Opensuse + LFS .
|
OpenSUSE is installed on /dev/sda in the vm? Presumably, grub was installed on /dev/sda when you installed OpenSUSE and /dev/sda is probably the default boot device. Thus, you would need to add the menu entry to the grub.cfg on /dev/sda2.
|
Quote:
I managed to update the entry by following method edit this file on opensuse : /etc/grub.d/40_custom with menuentry "GNU/Linux, Linux 4.4.2-avanish-7.9" { savedefault insmod ext2 set root='(hd1,2)' linux /boot/vmlinuz-4.4.2-lfs-7.9 root=/dev/sdb2 ro } and run this command as root. grub2-mkconfig -o /boot/grub/grub.cfg By doing this, I was able to get the entry updated in grub. But ended up with another error. This time kernel panic when booting into LFS. VFS: unable to mount root fs on unknown block(0,0) Any idea whhat went wrong here? |
Did you see this
http://www.linuxfromscratch.org/~kre...sic-kernel.txt Code:
# Optional, required for VMware virtual machines Code:
# Optional, required for VMware virtual machines You also said you are using "opensuse grub" to boot They tend to use alot of modules and an intrid to boot there systems. When using lfs grub sdb set root=(hd1,2) should be set root=(hd0,2) IF booting from 2nd/usb drive. As grub see it as the 1st drive mbr (sda) with the root on 2nd drive sdb2 |
Quote:
grub-install /dev/sda ( I did this purposefully ) I believe I managed to fix it by installing the low level drivers. So now, when I log into lfs ( My first custom built Linux yipeeee !! ), I am getting bash 4.3 prompt. None of the credentials are working. The only one that seemed to work is the one when I configured Shadow. Is this normal? I need some assistance here now. 1. I reverted the changes made so far back to the time when I began Chapter 8. Making the LFS System Bootable. Reason : I wanted dual boot option. So I guess, I must configure grub. I am no longer able to achieve this. Can you help me on this please? If I run grub-install /dev/sda in my chroot environment, I only get to log into my LFS system. My opensuse host is lost. |
Yes do Ch1,2,3 of BLFS 1st. Then move on to what you need/want.
yes the bash prompt is correct at 1st. |
For my other OS,s I just copy from there grub.cfg and put it in lfs grub.
Code:
menuentry "Centos" { You can install "os prober" that will assit in locating OS,s. If you want to use opensuse grub you could build an initrd http://www.linuxfromscratch.org/blfs...initramfs.html |
Thanks.
This is just beginning. There's still lot more to compile in BLFS. I am specifically interested in configuring GUI. Might need all of your assistance when it comes to it and I am sure members here would be there to back me up when time comes. :) Closing this thread! :) |
All times are GMT -5. The time now is 02:01 AM. |