I recently attempted (and failed) at building LFS (linux from scratch) 8.4. The problem ended up being that GRUB wouldn't recongize where the vmlinuz file was.

I did some digging and found out that the install has to be done on the same hdd than the host OS in order to be able to boot. Or is this incorrect? I say this because, to my understanding, GRUB2 has to be installed on the main drive, and then the files of the other OS have to be "linked" to it via specifying the paths in the grub.cfg. The thing is, I used 2 separate drives but I specified the paths of the built kernel to grub, though it didn't work (screenshots at the end).

The host OS I used was Ubuntu 18.04.5 LTS on a VM using virtual box. The host OS was installed on a virtual hard disk (VHD) of fixed size. The other hard disk (where LFS was built) was a VHD of size 25GB. I am at a loss of what happened, since from the screenshot, it looks to all be fine.

Attached are some screenshots of the failed attempt.

Grub console and grub.cfg file;

Host OS drive; Host OS

LFS drive; LFS drive

Any help is much appreciated!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.