LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 09-10-2012, 10:14 PM   #1
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
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?
 
Old 09-29-2012, 09:18 PM   #2
fmillion
Member
 
Registered: Nov 2006
Posts: 93

Rep: Reputation: 27
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.)

F

Last edited by fmillion; 09-29-2012 at 09:19 PM.
 
Old 10-01-2012, 04:50 AM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting VHD with minix Hosenfeld Linux - Virtualization and Cloud 3 07-26-2012 03:21 PM
partitioning qemu-img; share your wisdom and what you got on vhd? linus72 Linux - General 3 06-14-2009 10:41 AM
Possible to transfer files to/from portable vhd from/to PC? linus72 Linux - Newbie 2 05-26-2009 09:22 PM
Ubuntu freezing at boot on qemulator vhd-how to fix? linus72 Linux - Newbie 0 05-17-2009 08:41 PM
Expanding a VHD's size? Mark_667 Linux - Software 0 12-11-2008 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration