As the title says, I've installed LFS sucessfully on VirtualBox, with all system partitions on a separate virtual HDD, and it's booting OK. However, whenever I detach the host system's HDD (A CentOS 8 installation), I can't boot on LFS anymore, so I figured it was because I didn't populate my LFS-HDD's /boot partition with the GRUB code and the kernel, and was instead using the host's, so I fell back and installed the kernel and the bootloader on LFS's HDD /boot partition. And again, once I detached the host HDD, I couldn't boot into LFS anymore. I figured that if there was something missing in the other partition, I could just copy it to my partition of interest and problem solved, so I copied the whole /boot partition content from the host to LFS-HDD, and again tried to boot into LFS without the host HDD attached, and still no good. So here's where I ran out of ideas. What I want is a completely independent LFS system, with only LFS HDD attached, and no dependence on the host OS HDD whatsoever. I'd kindly appreciate any help. Thanks in advance!

  • What exactly happens when it doesn't boot? It sounds like you haven't run grub-install to install the boot loader on your LFS drive, note that installing the grub boot loader is different than populating /boot. linuxfromscratch.org/lfs/view/stable/chapter10/grub.html Where it says grub-install /dev/sda ... sda needs to be changed to the LFS drive. Also note that when you detach the CentOS drive, your LFS drive may now be (hd0) which needs to be reflected in /boot/grub/grub.cfg and sda which needs to be reflected in /etc/fstab. – rfmodulator Jan 5 at 16:37
  • Thanks for your response. Not much, VirtualBox just pops a window saying there has been an error and the machine has been stoped (the windows says Guru Meditation). I recall I already tried changing the names on /etc/fstab with no result, as well as doing grub-install on LFS-HDD. Let me try again anyways and I'll report back. – Daniel Casañas Jan 5 at 22:25
  • @rfmodulator I tried everything again and just got so far as to see the "GRUB Loading" legend on screen, and then the "Guru Meditation" window pops up again. I did edit the files to point to the proper hard disk and installed grub on the correct HDD. So far no luck at all. – Daniel Casañas Jan 6 at 0:06
  • What is the error? – rfmodulator Jan 11 at 17:25

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.