Build and enhance my first LFS 7.0 custom Linux distribution |
|
Package LFS
mount /dev/sda13 /mnt/lfs
cd /mnt/lfs
tar -zcvf /mnt/lfs-current.tar.gz --exclude=./usr/src/ --directory=/mnt/lfs/ .
mv /mnt/lfs-current.tar.gz /nwq/admin/www/data/mrcore_files/lfs/i686/build/
Package Kernel
mount /dev/sda13 /mnt/lfs
cd /mnt/lfs/boot
tar -zcvf /mnt/boot-current.tar.gz System.map-3.1 config-3.1 vmlinuz-3.1-lfs-7.0
mv /mnt/boot-current.tar.gz /nwq/admin/www/data/mrcore_files/lfs/i686/build/
chroot
mount -v --bind /dev /mnt/dev
mount -vt devpts devpts /mnt/dev/pts
mount -vt tmpfs shm /mnt/dev/shm
mount -vt proc proc /mnt/proc
mount -vt sysfs sysfs /mnt/sys
chroot /mnt /usr/bin/env -i HOME=/root TERM="$TERM" /bin/bash --login
/boot/grub/grub.cfg
cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext2
set root=(hd0,2)
menuentry "GNU/Linux, Linux 3.1-lfs-7.0" {
linux /boot/vmlinuz-3.1-lfs-7.0 root=/dev/sda2 ro
}
EOF
I removed the LFS /usr/share/doc/* and /tools and /source directories after the final page in the LFS 7.0 manual since they are not needed for an actual deployment. Those files are in NOT on /nwq but in archdev /home/mreschke/Projects/lfs/lfs-final-source-tools-backup |
chroot
mount /dev/sda13 /mnt/lfs
mount -v --bind /dev /mnt/lfs/dev
mount -vt devpts devpts /mnt/lfs/dev/pts
mount -vt tmpfs shm /mnt/lfs/dev/shm
mount -vt proc proc /mnt/lfs/proc
mount -vt sysfs sysfs /mnt/lfs/sys
chroot /mnt /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin /bin/bash --login
compile and install the kernel
make
make modules_install
cp -v arch/x86/boot/bzImage /boot/vmlinuz-3.1-lfs-7.0
cp -v System.map /boot/System.map-3.1
cp -v .config /boot/config-3.1