Baho Utot baho-utot at columbus.rr.com
Sat Mar 6 19:54:01 PST 2010

clydew at clydew.org wrote:
> Is it possible to build Linux from Scratch on a USB Flash Drive.  I 
> did build it there but am having a time getting Grub to recognize it.
Yes I built LFS-6.5 on my desktop and transfered it to a USB drive with 
Building directly on the usb drive is slow and not necessary.
Don't do the rsync while booted into LFS.
You need the USB stuff built into the kernel as well as the filesystem ( 
I used ext2) and necessary hardware drivers, not as modules.

The sequence should go something like the following:

partition and format the usb drive
mount the the drive
mount /dev/sdXn  <mount point>
rsync -var /mnt/lfs/  <mount point/>
install grub to the usb drive MBR
Then setup /boot

The following is from my bootable usb thumb drive (mount at /media/LFS):

/boot should look like this

~$ ls /media/LFS/boot/
System.map-         config-  lfskernel-
config-  grub/

~$ ls /media/LFS/boot/grub
default        ffs_stage1_5      minix_stage1_5     ufs2_stage1_5
device.map     iso9660_stage1_5  reiserfs_stage1_5  vstafs_stage1_5
e2fs_stage1_5  jfs_stage1_5      stage1             xfs_stage1_5
fat_stage1_5   menu.lst          stage2

/boot/grub/menu.lst should be like this

# Begin /boot/grub/menu.lst

# By default boot the first menu entry.
default 0

# Allow 30 seconds before booting the default.
timeout 30

# Use prettier colors.
color green/black light-green/black

# The first entry is for LFS.
title LFS 6.5
root (hd0,0)
kernel /boot/lfskernel- ro rootdelay=10

More information about the lfs-support mailing list