-   Linux From Scratch (
-   -   VHD booting question (

ReaperX7 09-10-2012 11:14 PM

VHD booting question
I'm currently using this to make my LFS 7.2 system:

50GB VHD /dev/sdb mounted to /mnt/lfs

If I use GRUB2 as a bootloader is there anything special I have to do inside of LFS to avoid GRUB2 detecting Slackware so I can detach the VHD drive and either boot from it from another virtual machine or from Windows 7's BCD as it's own device?

fmillion 09-29-2012 10:18 PM

You can compile LFS anywhere. I've built an LFS by mounting a flash drive on /mnt/lfs.

When you install grub you should just be able to execute grub-install /dev/sdb (instead of /dev/sda) and then write your config file and such. This will put the boot files in /boot/grub so make sure you've set up your partitions the way you want (i.e. if you want a separate /boot partition that you've set it up and mounted it) and that you run this from within the chroot environment so that the proper /boot will be used.

When you write your config file, write it as if your VHD is /dev/sda, since that's what the device will be called when you boot the VHD somewhere else. (i.e. if your root partition is, say, /dev/sdb2 right now, then use /dev/sda2 in your config file.)


ReaperX7 10-01-2012 05:50 AM

Cool, thanks man. I have the system booted up in VirtualBox which I used to build it using the Slackware64 Huge Kernel, and I'm going to write in a BCD entry for it tomorrow for a full hardware level test. Afterwards it will go back into VirtualBox for the second phase of adding BLFS packages for a complete system.

All times are GMT -5. The time now is 09:11 PM.