Installing LFS on hd[x] for another machine

William kb0iic at charter.net
Sat Feb 12 07:46:04 PST 2005


On Sat, 12 Feb 2005 09:08:06 -0500, lanas wrote:

> Hello everyone,
> 
>   I'd like to do this: use my machine to configure (appropriately) and
> install LFS on /dev/hdb and then take this hdb drive and put it in
> another machine as its one-and-only hda drive so that it can boot from
> it.
> 
>   Build and configuring LFS is no problem, but I'm stumped at which lilo
> (or grub) options I should use to make hdb bootable so that it can also
> boot when it is put as hda in the other machine.
> 
>   Has anyone tried that already and if so, what would be the 'special'
> lilo (or grub) command to accomplish this ?
> 
> Cheers,
> 
> Al

Al,

   For grub, just make a grub bootdisk with the instructions in the LFS
book.  Install the drive in the other machine. Determine if you are
going to install it as {primary,secondary}/{master,slave} and make note
of it. Just boot from your floppy, if you have one, or use a live cd
since it is using grub, too, and then setup your drive just like in the
book but just changing the number ya use to locate the drive.
Do the good ole root = (hd0,0) and setup (hd0) and be done with it.
If you aren't sure which device you need to use, just do this if ya lost:
find /boot/nameofyourkernelhere and it'll search the drives for that. you
could have is earch for any file provided you know where it exactly is on
the drive.

    Now for lilo, it has been a while sine I have used it, but you can
put in the lilo.conf something like this, if you are going to put lilo
on it from the machine you built LFS on:

boot = /dev/hdb
disk = /dev/hdb

and then  you can set up the image, root, and label yourself, and all that
jazz. Alternatively, you could boot a cd that uses lilo and configure lilo
for the target drive in there and be done with it.

Hope this helps

William




More information about the lfs-support mailing list