page_header

donderdag 29 december 2011

Finished LFS chapter 5

Finished LFS chapter 5. Backed up the $LFS directory;


sudo tar -cvpzf ~/lfs_chptr5.tar.gz $LFS

dinsdag 27 december 2011

Linux from scratch

Hardware chosen for building LFS 7.0: Toshiba NB 100

Host OS Ubuntu 10.04 LTS (desktop version)

Partitioning HD;
- /dev/sda1 LFS 47GB
- /dev/sda2 Ubuntu (ext3) 47GB
- /dev/sda3 Empty 58GB
- /dev/sda4 Swap 8GB

Use sudo where needed (this is Ubuntu after all)!

Started by formating /dev/sda1 (section 2.3 of the LFS book)

Labeled the partitions;
- sudo e2label /dev/sda1 LFS
- sudo e2label /dev/sda2 Ubuntu

Mounted the new partition (section 2.4)

Downloaded the source tarballs in a separate directory (section 3.1)

Used this command to download the tarballs;
wget -i http://www.linuxfromscratch.org/lfs/view/stable/wget-lis -P $LFS/sources

Created the tools directory (section 4.2)

Added user lfs and switched to this user (sections 4.3 & 4.4)

Chapter 5: Creating a temporary system
To proceed work after reboot execute the following steps;
1. Open terminal window
2. export LFS=/mnt/lfs
3. sudo mount -v -t ext3 /dev/sda1 $LFS
4. su - lfs

Notes on the general compilation instructions (section 5.3);
1. Locate the relevant package ls package*
2. Unpack the source tarball;
- untar .tar.gz: tar -zxf package.tar.gz
- untar .tar.bz2: tar -jxf package.tar.bz2
- untar .tar.xz: tar -Jxf package.tar.xz
3. Enter the newly created directory containing the source code
4. Follow the instructions in the LFS book (configure, make & make install)
5. Leave the directory and remove it; rm -rf dirname

To complete chapter 5 it was necessary to install patch and bison;
- sudo apt-get install patch
- sudo apt-get install bison