LFS Version 9.1, 8.4.3. Setting Up the GRUB Configuration
2 Attachment(s)
Hello Users,
As i already posted a similar thread few days back, i was told to mention in the 40_custom file the entry of my new lfs, as i have already dual booted my system, with two ubuntu's, I've read that grub has some files in grub.d directory, and if we somehow run 30_os_prober, grub will auto find the OS in all disks, and put that in grub.cfg and by running grub2-mkconfig, it calls 30_os_prober. What is 30_os_prober? And how is it actually called? but as i navigated in the grub.cfg file on my host. I saw there's already an entry there of my lfs. with menuentry as unknown linux. all locations to kernel seem accurate. This is grub entry Code:
menuentry 'unknown Linux distribution (on /dev/sdc2)' --class linux --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-> I think it should be there, as intramfs is loaded first right? but when i restarted my OS. Attachment 33615 Attachment 33616 Sorry if the attachments aren't visible My OS doesn't boots Quote:
|
Did you make an initramfs in lfs? If not you don’t have all the drivers needed to boot compiled into your kernel and not as modules. If yes you haven’t included everthing needed to boot in the initramfs
|
Hello Sir,
There was no mention of initramfs in the book. Also there isnt any mention of that in the grub.cfg Quote:
I dont know how! Also when i restarted the system, i forgot to unmount the virtual file system. would that have created problem somehow? I didnt run these commands. Quote:
|
Then your missing drivers in your kernel
|
Ohh.
Sir what drivers? and is there any way to resolve this? I would really appreciate that. I am actually a newbie in linux. Most of the things go over my head |
You need to look at the links at the beginning of 8.3.1. The drivers that allow access to your hard drive and the file system need to be built into your kernel and not as a module. lspci -v will clue you in on what drivers your need. as well as running lsmod on the host system.
|
If the device is dropping into a Busybox (initramfs) shell (also sometimes known as a Grub shell) then it may be possible to force the system to boot via instructions found on the Kali Linux forums...
Code:
https://forums.kali.org/showthread.php?30915-How-to-boot-Kali-from-initramfs-or-Grub-prompt Paraphrased and re-formatted bellow... Find `hd` identifier (eg. `hd0` or `hd1`), then load the config file from the correct partition... Code:
ls Load the correct Grub configuration file... Code:
configfile (hdy,x)/boot/grub/grub.cfg > Note, in these examples the `y` of `hdy` is the HardDrive identifier, and `x` of the `hdy,x` bit denotes the partition number. Force system to boot... Code:
linux (hdy,x)/vmlinuz root=/dev/sdcx ___ Once system boots it'd be a good idea to rebuild the `initramfs` via... Code:
sudo update-initramfs -uv ... and update Grub... Code:
sudo update-grub ___ One additional tip if ya get dropped into the initramfs shell intermittently is assigning `rootwait` within the Grub config... /etc/default/grub Code:
GRUB_CMDLINE_LINUX_DEFAULT="rootwait" ... and updating Grup again... Code:
sudo update-grub ... which can help on devices that have an odd bit of mounting/un-mounting behavior during boot. |
Sir i compiled kernel again.
Starting with the command Quote:
Quote:
Quote:
Quote:
Those i couldnt find were Quote:
Quote:
and make install module when running grub-install Quote:
There is already an entry in grub.cfg Quote:
same error Quote:
Quote:
so ichanged it to sdb in grub.cfg. Also i generated device.map file in host machine It shows Quote:
But still nothing. Please help Thank You |
post the ouput of
Code:
sudo parted -l |
sudo parted -l of host system
Quote:
Quote:
|
Change your grub linux line to this
Code:
linux /boot/vmlinuz-5.5.3-lfs-9.1 root=UUID=42e174ea-46f1-4300-b5c5-870e7f9152f4 Code:
UUID=42e174ea-46f1-4300-b5c5-870e7f9152f4 / ext4 defaults 1 1 |
1 Attachment(s)
Sir i changed the grub.cfg
Quote:
now it has Quote:
Attachment 33620 |
The screenshot says uuid is wrong/doesn’t exist
You was only suppose to change the /dev/sdc2 /dev/sda3 to UUID= <uuid number> not delete the other lines The swap line in you file is wrong suppose to be the uuid of swap partition not copy/paste what I wrote |
With lfs on a usb did you add usb drivers to the kernel?
|
No Sir, i didnt add any drivers to it.
Also i edited the fstab now Quote:
|
All times are GMT -5. The time now is 11:21 PM. |