LFS Version 9.1, 8.4.3. Setting Up the GRUB Configuration
by Shah404 from LinuxQuestions.org on (#55HQE)
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->
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 42e174ea-46f1-4300-b5c5-870e7>
else
search --no-floppy --fs-uuid --set=root 42e174ea-46f1-4300-b5c5-870e7f9152f4
fi
linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdc2
}
submenu 'Advanced options for unknown Linux distribution (on /dev/sdc2)' $menuentry_id_option 'osprober-gnulinux-advanced-42e174ea-46f1-4300-b5c5-870>
menuentry 'unknown Linux distribution (on /dev/sdc2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/>
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 42e174ea-46f1-4300-b5>
else
search --no-floppy --fs-uuid --set=root 42e174ea-46f1-4300-b5c5-870e7f9152f4
fi
linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdc2
}
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fialso there was no intramfs mentioned anywhere there.
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:
Attached Thumbnails


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->
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 42e174ea-46f1-4300-b5c5-870e7>
else
search --no-floppy --fs-uuid --set=root 42e174ea-46f1-4300-b5c5-870e7f9152f4
fi
linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdc2
}
submenu 'Advanced options for unknown Linux distribution (on /dev/sdc2)' $menuentry_id_option 'osprober-gnulinux-advanced-42e174ea-46f1-4300-b5c5-870>
menuentry 'unknown Linux distribution (on /dev/sdc2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/>
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 42e174ea-46f1-4300-b5>
else
search --no-floppy --fs-uuid --set=root 42e174ea-46f1-4300-b5c5-870e7f9152f4
fi
linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdc2
}
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fialso there was no intramfs mentioned anywhere there.
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:
end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) |
Attached Thumbnails