LFS on USB?
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-184.108.40.206 config-220.127.116.11-2010-02-28 lfskernel-18.104.22.168
~$ 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.
# Allow 30 seconds before booting the default.
# Use prettier colors.
color green/black light-green/black
# The first entry is for LFS.
title LFS 6.5
kernel /boot/lfskernel-22.214.171.124 ro rootdelay=10
More information about the lfs-support