<>

3.2. $WORK/iso/install/INSTALL

Once you completed your own lfs/blfs, you can tar it and put the tarball onto a bootcd and distribute it by the way listed below:

  1. fdisk to create partition1 and partition2 (at least)

    fdisk /dev/sdb << "EOF"
    n
    p
    1
    1
    +500M
    n
    p
    2
    
    
    w
    q
    EOF
    
    
  2. setup swap

    mkswap /dev/sda1
    swapon /dev/sda1
    
  3. prepare target partition

    mkfs -t ext3 /dev/sda2
    mount -t ext3 /dev/sda2 $LFS
    
  4. extract the tarball

    cd $LFS
    tar jxvpf /install/blfs-6.3.tar.bz2
    
  5. some files might need to be modified, in case like using hda but not sda

    $LFS/boot/grub/menu.lst
    $LFS/etc/fstab
    
  6. setup grub

    mount --bind /dev $LFS/dev
    chroot $LFS
    grub
    grub> root (hd0,1)
    grub> setup (hd0)
    grub> quit
    exit
    umount $LFS/dev
    
  7. the end

    cd /
    umount $LFS
    
  8. reboot and enjoy!

Here comes the file $WORK/iso/install/INSTALL from my bootcd

Install

/install/misc/partationing is for step 1 ~ 3
/install/misc/grubing is for step 6

1. fdisk to create partition1 and partition2 (at least)
fdisk /dev/sdb << "EOF"
n
p
1
1
+500M
n
p
2


w
q
EOF

2. setup swap
mkswap /dev/sda1 &&
swapon /dev/sda1

3. prepare target partition
mkfs -t ext3 /dev/sda2
mount /dev/sda2 $LFS

4. extract the tarball
cd $LFS
tar jxvpf /install/blfs-6.3.tar.bz2

5. some files might need to be modified, in case like using hda but not sda
$LFS/boot/grub/menu.lst
$LFS/etc/fstab

6. setup grub
mount --bind /dev $LFS/dev
chroot $LFS
grub
grub> root (hd0,1)
grub> setup (hd0)
grub> quit
exit
umount $LFS/dev

7. the end
cd / && umount $LFS

8. reboot and enjoy!