From 7df987a652b93d55dd8eca363706d3bacc469b55 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 27 Nov 2014 16:29:31 -0600 Subject: Initial commit message for lfs live howto. --- book/about_media.html | 8 + book/aufs.html | 8 + book/bootable_iso.html | 11 + book/bootable_usb.html | 16 ++ book/building.html | 22 ++ book/building_iso.html | 95 +++++++ book/busybox.html | 60 ++++ book/ch02.html | 2 + book/ch03.html | 2 + book/ch04.html | 2 + book/ch05.html | 2 + book/ch06.html | 2 + book/ch07.html | 2 + book/ch08.html | 2 + book/ch09.html | 2 + book/ch10.html | 2 + book/ch11.html | 2 + book/essential.html | 4 + book/git.html | 3 + book/images/caution.png | Bin 0 -> 1250 bytes book/images/important.png | Bin 0 -> 722 bytes book/images/note.png | Bin 0 -> 490 bytes book/images/tip.png | Bin 0 -> 449 bytes book/images/warning.png | Bin 0 -> 1241 bytes book/index.html | 2 + book/initrd.html | 102 +++++++ book/legalnotice.html | 17 ++ book/license.html | 392 ++++++++++++++++++++++++++ book/links.html | 6 + book/longindex.html | 2 + book/pt01.html | 2 + book/pt02.html | 2 + book/pt03.html | 2 + book/pt04.html | 2 + book/pt05.html | 2 + book/pt06.html | 2 + book/pt07.html | 2 + book/pt08.html | 2 + book/squashfs.html | 4 + book/stylesheets/lfs-print.css | 9 + book/stylesheets/lfs.css | 604 +++++++++++++++++++++++++++++++++++++++++ book/why.html | 4 + 42 files changed, 1405 insertions(+) create mode 100644 book/about_media.html create mode 100644 book/aufs.html create mode 100644 book/bootable_iso.html create mode 100644 book/bootable_usb.html create mode 100644 book/building.html create mode 100644 book/building_iso.html create mode 100644 book/busybox.html create mode 100644 book/ch02.html create mode 100644 book/ch03.html create mode 100644 book/ch04.html create mode 100644 book/ch05.html create mode 100644 book/ch06.html create mode 100644 book/ch07.html create mode 100644 book/ch08.html create mode 100644 book/ch09.html create mode 100644 book/ch10.html create mode 100644 book/ch11.html create mode 100644 book/essential.html create mode 100644 book/git.html create mode 100644 book/images/caution.png create mode 100644 book/images/important.png create mode 100644 book/images/note.png create mode 100644 book/images/tip.png create mode 100644 book/images/warning.png create mode 100644 book/index.html create mode 100644 book/initrd.html create mode 100644 book/legalnotice.html create mode 100644 book/license.html create mode 100644 book/links.html create mode 100644 book/longindex.html create mode 100644 book/pt01.html create mode 100644 book/pt02.html create mode 100644 book/pt03.html create mode 100644 book/pt04.html create mode 100644 book/pt05.html create mode 100644 book/pt06.html create mode 100644 book/pt07.html create mode 100644 book/pt08.html create mode 100644 book/squashfs.html create mode 100644 book/stylesheets/lfs-print.css create mode 100644 book/stylesheets/lfs.css create mode 100644 book/why.html (limited to 'book') diff --git a/book/about_media.html b/book/about_media.html new file mode 100644 index 0000000..beb7020 --- /dev/null +++ b/book/about_media.html @@ -0,0 +1,8 @@ + +5.1. Creating a linux Filesystem

5.1. Creating a linux Filesystem

[Note]

Note

The commands in the remainder of this book must be performed while logged in as user root

The rest of this chapter assumes you already installed needed packages. If it's not the case, you should go to squashfs 4.2 + You should also have configured your kernel properly, as described in Section 3.1, “Reconfiguring the Kernel” +

Now it's time to assemble our live system.

First let's define the name of our system, this name will be given to our media: cd/dvd/usbkey/usbdrive.

The cd/dvd choice will be further mentioned as the ISO live system, the usbkey, usbdrive or usbstick will be mentioned as the usb live system

export the name of our system:

export LFSLIVE=lfslive

create and export the mount point:

export LFSMOUNT=/mnt/LFS
+mkdir -pv $LFSMOUNT

If you plan to create an ISO live system, create some space to store the complete system plus some extra space. App. 1,5 times the size of the system will do, +after you reserved some space, create a link to the folder:

mount --bind <path to LFSspace> $LFSMOUNT

Or if you use a dedicated partition mount it:

mount /dev/<device> $LFSMOUNT

you can now continue with Section 8.1, “Building the ISO live system”

For use of the usb live system, it's time to create some free space on it and create partitions, just like we do in the LFS book; +Make an ext2 or ext3 file system on it and a small swap partition.

First, open the key with your favorite partitioning program, eg. cfdisk or fdisk or some other, and remove any partition already existing on it. +Then, create one primary partition on the usb stick.

You will then have to create ext2/ext3 filesystem on the partition you created, using:

mke2fs -j -L $LFSLIVE /dev/<sd?1>

Where sd?1 is the flash drive partition for the livekey

And mount it:

mount /dev/<device> $LFSMOUNT

Now that the filesystem has been set up on the usb-media, go to Section 6.1, “Building the USB live system”

diff --git a/book/aufs.html b/book/aufs.html new file mode 100644 index 0000000..97dea86 --- /dev/null +++ b/book/aufs.html @@ -0,0 +1,8 @@ + +2.3. aufs

2.3. aufs

[Note]

Note

This chapter is mandatory for building the livecd. The livekey doesn't need it as we will show later

2.3.1. Introduction to aufs

AUFS (Another Union File System) is as the name states, an union filesystem service. It allows files and directories of separate file systems, known as branches, to be transparently overlaid, forming a single coherent file system. Contents of directories which have the same path within the merged branches will be seen together in a single merged directory, within the new, virtual filesystem.

Versioning of AUFS is parallel to the kernel version. For kernel 2.x you'll need AUFS2 and for the new kernel 3.x you'll need AUFS3.

As stated in the previous chapter, we need to checkout AUFS from GIT.

2.3.2. Checking out AUFS

Assuming we are using kernel 3.0.4:

git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git aufs3-standalone.git
+cd aufs3-standalone.git
+git checkout origin/aufs3.0

2.3.3. Copying the sources

cp -r fs <location of kernel source>
+cp -r include <location of kernel source>
+cp config.mk <location of kernel source>

2.3.4. Patching the kernel

Now, cd to your kernel source top level directory and run the following command:

patch -Np1 -i <location of patch>/aufs3-base.patch 
+patch -Np1 -i <location of patch>/aufs3-kbuild.patch
+patch -Np1 -i <location of patch>/aufs3-standalone.patch

diff --git a/book/bootable_iso.html b/book/bootable_iso.html new file mode 100644 index 0000000..cca52fc --- /dev/null +++ b/book/bootable_iso.html @@ -0,0 +1,11 @@ + +9.1. Making the ISO live system bootable

9.1. Making the ISO live system bootable

This chapter assume you use grub2 for your LFS. Issue the following to modify the file grub.cfg:

cd $LFSMOUNT
+echo 'menuentry "LFS" {' > boot/grub/grub.cfg  
+echo "   search -n -l $LFSLIVE -s" >> boot/grub/grub.cfg
+echo "        linux   /boot/lfskernel root=LABEL=$LFSLIVE quiet" >> boot/grub/grub.cfg
+echo "        initrd  /boot/initrd.gz" >> boot/grub/grub.cfg
+echo "}" >> boot/grub/grub.cfg
+

Rename kernel, according to menu.lst:

mv -v boot/lfskernel-<version> boot/lfskernel

Where <version> is your kernel version

Create our ISO::

export ISODIR=<path to the dir where you want to store your ISO>
+cd $LFSMOUNT
+grub-mkrescue -o $ISODIR/livecd.iso -V $LFSLIVE $LFSMOUNT &&
+unset ISODIR

Now, you can burn your image on a cd or dvd, and enjoy the livecd !

diff --git a/book/bootable_usb.html b/book/bootable_usb.html new file mode 100644 index 0000000..13e20ad --- /dev/null +++ b/book/bootable_usb.html @@ -0,0 +1,16 @@ + +7.1. Making the USB live system bootable

7.1. Making the USB live system bootable

This chapter assume you use grub2 for your LFS.

Install the GRUB files into /boot/grub, assuming you are installing LFS on sda[x]:

mount --bind /dev $LFSMOUNT/dev
+mount --bind /sys $LFSMOUNT/sys
+mount --bind /proc $LFSMOUNT/proc
+chroot $LFSMOUNT
+grub-install /dev/sda
+exit
+umount $LFSMOUNT/proc
+umount $LFSMOUNT/sys
+umount $LFSMOUNT/dev

Issue the following to create the file grub.cfg:

cd $LFSMOUNT
+echo 'menuentry "LFS" {' > boot/grub/grub.cfg
+echo "   search -n -l $LFSLIVE -s" >> boot/grub/grub.cfg
+echo "        linux   /boot/lfskernel root=LABEL=$LFSLIVE quiet rootdelay=10" >> boot/grub/grub.cfg
+echo "        initrd  /boot/initrd.gz" >> boot/grub/grub.cfg
+echo "}" >> boot/grub/grub.cfg
+

Rename kernel, according to menu.lst:

mv -v boot/lfskernel-<version> boot/lfskernel

Where <version> is your kernel version

Enjoy the livekey !

diff --git a/book/building.html b/book/building.html new file mode 100644 index 0000000..68b6794 --- /dev/null +++ b/book/building.html @@ -0,0 +1,22 @@ + +6.1. Building the USB live system

6.1. Building the USB live system

Creating the USB live system is quite easy. Either install your LFS/BLS system on the USB media, if you used a package manager, or copy your system to the USB media:

Because you're propably running the wanted system now, let's repeat a little part of the LFS book; create the directory structure

mkdir -pv -m 755 $LFSMOUNT/{bin,boot,dev/{pts,shm},etc,home,include,lib,media,mnt,opt,proc,run,sbin,share,srv,sys,usr}
+mkdir -pv -m 755 $LFSMOUNT/var/{opt,cache,lib/{misc,locate},local,log,mail,spool} 
+install -dv -m 0750 $LFSMOUNT/root
+install -dv -m 1777 $LFSMOUNT/tmp $LFSMOUNT/var/tmp
+ln -s /run $LFSMOUNT/var/run
+ln -s /run/lock $LFSMOUNT/var/lock

Udev populates /dev so copying /dev is not necessary. However create some basic device nodes:

mknod -m 600 $LFSMOUNT/dev/console c 5 1
+mknod -m 666 $LFSMOUNT/dev/null c 1 3
+mknod $LFSMOUNT/dev/ram0 b 1 0 

Now copy the system:

cp -av /bin /boot /etc /include /lib /opt /sbin /share /srv /usr $LFSMOUNT

Modify mtab and fstab in etc

echo "" > $LFSMOUNT/etc/mtab
+echo "# Begin /etc/fstab" > $LFSMOUNT/etc/fstab
+echo >> $LFSMOUNT/etc/fstab
+echo "# file system   mount-point    type    options           dump  fsck" >> $LFSMOUNT/etc/fstab
+echo "#                                                              order" >> $LFSMOUNT/etc/fstab
+echo >> $LFSMOUNT/etc/fstab
+echo "LABEL=$LFSLIVE  /              ext3    defaults          1     1" >> $LFSMOUNT/etc/fstab
+echo "proc            /proc          proc    defaults          0     0" >> $LFSMOUNT/etc/fstab
+echo "sysfs           /sys           sysfs   defaults          0     0" >> $LFSMOUNT/etc/fstab
+echo "devpts          /dev/pts       devpts  gid=4,mode=620    0     0" >> $LFSMOUNT/etc/fstab
+echo "tmpfs           /run           tmpfs   defaults          0     0" >> $LFSMOUNT/etc/fstab
+echo >> $LFSMOUNT/etc/fstab
+echo "# End /etc/fstab" >> $LFSMOUNT/etc/fstab
+

Copy our previous created initrd.gz to /boot of the media.

cp <PATH-TO-INITRD>/initrd.gz $LFSMOUNT/boot

diff --git a/book/building_iso.html b/book/building_iso.html new file mode 100644 index 0000000..ed16be1 --- /dev/null +++ b/book/building_iso.html @@ -0,0 +1,95 @@ + +8.1. Building the ISO live system

8.1. Building the ISO live system

As we want to put a whole system on little space, we will squash some directories to have some more free space on the cd or dvd. +

+ Before squashing, we have some work to do +

Issue the following:

cd $LFSMOUNT

As the system won't be writable, we have to provide a directory that will be mounted on tmpfs and will, therefore, be writable to ensure a successful boot.

mkdir -v ro rw dev

Make sure you have support for loopback device in your kernel:

ls -l /dev | grep loop

You should see a few /dev/loopX, where X is a number from 0 to 7. If this is not the case, and the loopback is supported as a kernel module, try to modprobe the module and retry again:

modprobe loop
+ls -l /dev | grep loop

Create some essential files in the dev directory

mknod -m 600 dev/console c 5 1
+mknod -m 666 dev/null c 1 3
+cp -av /dev/loop[0-7] dev/
+mknod dev/ram0 b 1 0

Copy the /etc directory

cp -av /etc .

Modify some files in it

echo "" > etc/mtab
+cat > etc/fstab << "EOF"
+# Begin /etc/fstab
+
+# file system  	mount-point             type    options         	dump  fsck
+#                                                        		      order
+
+proc            /proc                   proc    defaults                0       0
+sysfs           /sys                    sysfs   defaults                0       0
+devpts          /dev/pts                devpts  gid=4,mode=620          0       0
+tmpfs           /run                    tmpfs   defaults                0       0
+usbfs           /proc/bus/usb           usbfs   devgid=14,devmode=0660  0       0
+
+# End /etc/fstab
+EOF

While booting, we will have to copy some directories in shared memory, and mount a root filesystem on it. This has to be done in the first bootscript.

8.1.1. Creating bootscript

issue the following to create a new bootscript:

cd etc/rc.d/init.d
+cat > mountrootfs << "EOF"
+#!/bin/sh
+
+# Set up variables
+
+dir_rw=/rw
+dir_ro=/ro
+
+# Source functions
+
+source /etc/rc.d/init.d/functions
+
+case "$1" in
+  start)
+          
+# Mount temporary files on $dir_rw
+
+    echo "Mounting tmpfs on $dir_rw..."
+    mount -t tmpfs tmpfs $dir_rw
+    evaluate_retval
+    sleep 1
+    
+# Create essential dirs in dir_rw
+
+    mkdir $dir_rw/{dev,etc,home,media,mnt}
+    mkdir $dir_rw/{opt,root,srv,tmp,usr,var}
+
+# If you have some other dirs in $LFSMOUNT/ like sources
+# Add them to that list, eg: mkdir -v $dir_rw/sources
+    
+mount -n -t squashfs root.sqsh ro -o loop
+mount -n -t aufs -o dirs=$dir_rw/etc=rw:$dir_ro/etc=ro aufs etc
+mount -n -t aufs -o dirs=$dir_rw/usr=rw:$dir_ro/usr=ro aufs usr
+mount -n -t aufs -o dirs=$dir_rw/tmp=rw:$dir_ro/tmp=ro aufs tmp
+mount -n -t aufs -o dirs=$dir_rw/var=rw:$dir_ro/var=ro aufs var
+mount -n -t aufs -o dirs=$dir_rw/dev=rw:$dir_ro/dev=ro aufs dev
+mount -n -t aufs -o dirs=$dir_rw/home=rw:$dir_ro/home=ro aufs home
+mount -n -t aufs -o dirs=$dir_rw/media=rw:$dir_ro/media=ro aufs media
+mount -n -t aufs -o dirs=$dir_rw/mnt=rw:$dir_ro/mnt=ro aufs mnt
+mount -n -t aufs -o dirs=$dir_rw/opt=rw:$dir_ro/opt=ro aufs opt
+mount -n -t aufs -o dirs=$dir_rw/root=rw:$dir_ro/root=ro aufs root
+mount -n -t aufs -o dirs=$dir_rw/srv=rw:$dir_ro/srv=ro aufs srv
+chmod 1777 /tmp
+         
+  ;;
+  *)
+    echo "Usage: $0 {start}"
+    exit 1
+  ;;
+esac
+EOF
+chmod 0754 mountrootfs

Inspect the contents of etc/rc.d/rcS.d

ls -l ../rcS.d

You should see a list beginning with S00mountvirtfs, S02consolelog, ...

Now, issue:

cd ../rcS.d
+mv -v S00mountvirtfs S01mountvirtfs
+ln -sv ../init.d/mountrootfs S00mountrootfs
+

The live system can not be checked with fsck so remove these bootscripts

rm S30checkfs
+rm S40mountfs
+rm S45cleanfs
+

8.1.2. About the var directory

As we are just copying our system, we will need the var directory while booting. We have to remove pid and sockets file from it.

cd $LFSMOUNT
+cp -av /var .
+cd var
+rm log/*.log
+for FILE in `find . -type f -name '*pid'`
+  do rm $FILE
+done
+for FILE in `find . -type s`
+  do rm $FILE
+done
+rm -rf tmp/*
+cd $LFSMOUNT

8.1.3. Squashing directories

Create tmp, root and other directories, then squash all. When squashing, you might not want to add some file or directory. Add files to the -e option of mksquashfs if you wish.

mkdir -pv home media mnt opt proc root run srv sys tmp usr ro/{dev,etc,home,media,mnt,opt,root,srv,tmp,usr,var}
+mksquashfs dev etc /home /media mnt /opt /root /srv tmp /usr var root.sqsh -keep-as-directory -info
+rm -r var/*
+

Copy dirs that won't be squashed:

cp -av /bin /boot /lib /sbin .

Copy our previous created initrd.gz to /boot of the media.

cp <PATH-TO-INITRD>/initrd.gz $LFSMOUNT/boot

diff --git a/book/busybox.html b/book/busybox.html new file mode 100644 index 0000000..adcbd96 --- /dev/null +++ b/book/busybox.html @@ -0,0 +1,60 @@ + +2.4. busybox 1.19.2

2.4. busybox 1.19.2

[Note]

Note

This chapter is mandatory for both the livecd and the livekey. Busybox is used in the initrd which will be discussed later in the book.

2.4.1. Introduction to busybox

Busybox is a utility that combines many common utilities in one. Although the functions provided by busybox would have limited options, in compare with the original utility, it would be often sufficient to do simple tasks. In this way you can save crucial space, like in a small initial ramdisk.

Busybox can be build staticly easily so we don't have to care about the shared libraries.

2.4.2. Building busybox

In the root of the sourcedir:

make mrproper 
+make allnoconfig 

"make mrproper" will cleanup the sourcedir, previous config files etc. will be removed.

"make allnoconfig" will make a simple config file with all options disabled.

Modify the config, so that we enable only the necessary functions. Note that this can be done by "make menuconfig" but for the sake of simplicity we modify the config with sed.

sed -e 's/# CONFIG_FEATURE_INSTALLER is not set/CONFIG_FEATURE_INSTALLER=y/' -i .config 
+sed -e 's/# CONFIG_INSTALL_NO_USR is not set/CONFIG_INSTALL_NO_USR=y/' -i .config 
+sed -e 's/# CONFIG_LONG_OPTS is not set/CONFIG_LONG_OPTS=y/' -i .config
+sed -e 's/# CONFIG_STATIC is not set/CONFIG_STATIC=y/' -i .config
+sed -e 's/# CONFIG_LFS is not set/CONFIG_LFS=y/' -i .config
+sed -e 's/# CONFIG_CAT is not set/CONFIG_CAT=y/' -i .config
+sed -e 's/# CONFIG_TEST is not set/CONFIG_TEST=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_TEST_64 is not set/CONFIG_FEATURE_TEST_64=y/' -i .config
+sed -e 's/# CONFIG_CUT is not set/CONFIG_CUT=y/' -i .config 
+sed -e 's/# CONFIG_ECHO is not set/CONFIG_ECHO=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_FANCY_ECHO is not set/CONFIG_FEATURE_FANCY_ECHO=y/' -i .config
+sed -e 's/# CONFIG_SLEEP is not set/CONFIG_SLEEP=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_FANCY_SLEEP is not set/CONFIG_FEATURE_FANCY_SLEEP=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_FLOAT_SLEEP is not set/CONFIG_FEATURE_FLOAT_SLEEP=y/' -i .config
+sed -e 's/# CONFIG_USLEEP is not set/CONFIG_USLEEP=y/' -i .config
+sed -e 's/# CONFIG_MODINFO is not set/CONFIG_MODINFO=y/' -i .config
+sed -e 's/# CONFIG_INSMOD is not set/CONFIG_INSMOD=y/' -i .config
+sed -e 's/# CONFIG_RMMOD is not set/CONFIG_RMMOD=y/' -i .config
+sed -e 's/# CONFIG_LSMOD is not set/CONFIG_LSMOD=y/' -i .config
+sed -e 's/# CONFIG_MODPROBE is not set/CONFIG_MODPROBE=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set/CONFIG_FEATURE_MODPROBE_BLACKLIST=y/' -i .config
+sed -e 's/# CONFIG_DEPMOD is not set/CONFIG_DEPMOD=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set/CONFIG_FEATURE_INSMOD_TRY_MMAP=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set/CONFIG_FEATURE_CHECK_TAINTED_MODULE=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MODUTILS_ALIAS is not set/CONFIG_FEATURE_MODUTILS_ALIAS=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set/CONFIG_FEATURE_MODUTILS_SYMBOLS=y/' -i .config
+sed -e 's/CONFIG_DEFAULT_MODULES_DIR=""/CONFIG_DEFAULT_MODULES_DIR="\/lib\/modules"/' -i .config
+sed -e 's/CONFIG_DEFAULT_DEPMOD_FILE=""/CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"/' -i .config
+sed -e 's/# CONFIG_FINDFS is not set/CONFIG_FINDFS=y/' -i .config 
+sed -e 's/# CONFIG_MOUNT is not set/CONFIG_MOUNT=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_MOUNT_FAKE is not set/CONFIG_FEATURE_MOUNT_FAKE=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_MOUNT_LABEL is not set/CONFIG_FEATURE_MOUNT_LABEL=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_MOUNT_FLAGS is not set/CONFIG_FEATURE_MOUNT_FLAGS=y/' -i .config 
+sed -e 's/# CONFIG_SWITCH_ROOT is not set/CONFIG_SWITCH_ROOT=y/' -i .config 
+sed -e 's/# CONFIG_UMOUNT is not set/CONFIG_UMOUNT=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_UMOUNT_ALL is not set/CONFIG_FEATURE_UMOUNT_ALL=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_MOUNT_LOOP is not set/CONFIG_FEATURE_MOUNT_LOOP=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set/CONFIG_FEATURE_MOUNT_LOOP_CREATE=y/' -i .config 
+sed -e 's/# CONFIG_VOLUMEID is not set/CONFIG_VOLUMEID=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_EXT is not set/CONFIG_FEATURE_VOLUMEID_EXT=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set/CONFIG_FEATURE_VOLUMEID_ISO9660=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_UDF is not set/CONFIG_FEATURE_VOLUMEID_UDF=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_ROMFS is not set/CONFIG_FEATURE_VOLUMEID_ROMFS=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_SYSV is not set/CONFIG_FEATURE_VOLUMEID_SYSV=y/' -i .config 
+sed -e 's/# CONFIG_ASH is not set/CONFIG_ASH=y/' -i .config 
+sed -e 's/# CONFIG_ASH_BASH_COMPAT is not set/CONFIG_ASH_BASH_COMPAT=y/' -i .config 
+sed -e 's/# CONFIG_ASH_JOB_CONTROL is not set/CONFIG_ASH_JOB_CONTROL=y/' -i .config 
+sed -e 's/# CONFIG_ASH_ALIAS is not set/CONFIG_ASH_ALIAS=y/' -i .config 
+sed -e 's/# CONFIG_ASH_GETOPTS is not set/CONFIG_ASH_GETOPTS=y/' -i .config 
+sed -e 's/# CONFIG_ASH_BUILTIN_ECHO is not set/CONFIG_ASH_BUILTIN_ECHO=y/' -i .config 
+sed -e 's/# CONFIG_ASH_BUILTIN_PRINTF is not set/CONFIG_ASH_BUILTIN_PRINTF=y/' -i .config 
+sed -e 's/# CONFIG_ASH_BUILTIN_TEST is not set/CONFIG_ASH_BUILTIN_TEST=y/' -i .config 
+sed -e 's/# CONFIG_ASH_CMDCMD is not set/CONFIG_ASH_CMDCMD=y/' -i .config 
+sed -e 's/# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set/CONFIG_ASH_OPTIMIZE_FOR_SIZE=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_SH_IS_ASH is not set/CONFIG_FEATURE_SH_IS_ASH=y/' -i .config 
+sed -e 's/# CONFIG_FEATURE_BASH_IS_ASH is not set/CONFIG_FEATURE_BASH_IS_ASH=y/' -i .config 
+sed -e 's/CONFIG_FEATURE_SH_IS_NONE=y/# CONFIG_FEATURE_SH_IS_NONE is not set/' -i .config 
+sed -e 's/CONFIG_FEATURE_BASH_IS_NONE=y/# CONFIG_FEATURE_BASH_IS_NONE is not set/' -i .config 

Build the executable:

make 

Now we have a static build busybox. Keep it for later use.

diff --git a/book/ch02.html b/book/ch02.html new file mode 100644 index 0000000..87728e5 --- /dev/null +++ b/book/ch02.html @@ -0,0 +1,2 @@ + +Chapter 2. packages

2. packages

diff --git a/book/ch03.html b/book/ch03.html new file mode 100644 index 0000000..c0177cc --- /dev/null +++ b/book/ch03.html @@ -0,0 +1,2 @@ + +Chapter 3. Essential step

3. Essential step

Table of Contents

diff --git a/book/ch04.html b/book/ch04.html new file mode 100644 index 0000000..2e1a7a7 --- /dev/null +++ b/book/ch04.html @@ -0,0 +1,2 @@ + +Chapter 4. initrd

4. initrd

diff --git a/book/ch05.html b/book/ch05.html new file mode 100644 index 0000000..ba8e1c1 --- /dev/null +++ b/book/ch05.html @@ -0,0 +1,2 @@ + +Chapter 5. Preparing install

5. Preparing install

diff --git a/book/ch06.html b/book/ch06.html new file mode 100644 index 0000000..abd9e2c --- /dev/null +++ b/book/ch06.html @@ -0,0 +1,2 @@ + +Chapter 6. Building the USB live system

6. Building the USB live system

diff --git a/book/ch07.html b/book/ch07.html new file mode 100644 index 0000000..cfe3aa4 --- /dev/null +++ b/book/ch07.html @@ -0,0 +1,2 @@ + +Chapter 7. Making the USB live system bootable

7. Making the USB live system bootable

diff --git a/book/ch08.html b/book/ch08.html new file mode 100644 index 0000000..13346d1 --- /dev/null +++ b/book/ch08.html @@ -0,0 +1,2 @@ + +Chapter 8. Building the ISO live system

8. Building the ISO live system

diff --git a/book/ch09.html b/book/ch09.html new file mode 100644 index 0000000..6924dc6 --- /dev/null +++ b/book/ch09.html @@ -0,0 +1,2 @@ + +Chapter 9. Making the ISO live system bootable

9. Making the ISO live system bootable

diff --git a/book/ch10.html b/book/ch10.html new file mode 100644 index 0000000..691f53d --- /dev/null +++ b/book/ch10.html @@ -0,0 +1,2 @@ + +Chapter 10. Bibliography

10. Bibliography

diff --git a/book/ch11.html b/book/ch11.html new file mode 100644 index 0000000..74af56b --- /dev/null +++ b/book/ch11.html @@ -0,0 +1,2 @@ + +Chapter 11. GNU Free Documentation License

11. GNU Free Documentation License

diff --git a/book/essential.html b/book/essential.html new file mode 100644 index 0000000..7f6af07 --- /dev/null +++ b/book/essential.html @@ -0,0 +1,4 @@ + +3.1. Reconfiguring the Kernel

3.1. Reconfiguring the Kernel

[Note]

Note

This chapter is mandatory for building the livecd. The livekey only need an new kernel if you haven't enabled support for USB,EXT2/EXT3,SCSI and initial ramdisk

After having patched your kernel sources with aufs, you will have to configure your kernel to enable the new features.

Use your favorite configuration tool, like “make menuconfig”.

[Important]

Important

As you will use your actual LFS system and maybe make a few changes in it, you should now backup your present kernel config, located in /boot/config-<kernel-version>.

Enable “Initial RAM filesystem and RAM disk (initramfs/initrd) support” in “General setup”.

If you want your live system to boot on most architectures, you will have to enable Block layer SG support v4 (in menuconfig->Enable the block layer).

In “Processor type and features”, select “386” as “Processor family

You will have to enable loopback device support and ramdisk support in “Device Drivers->Block devices

If you plan to build a live usb key, you will have to say yes to “USB support” and to “Support for Host-side USB”, as well as “UHCI HCD support”, “OHCI HCD support” and “EHCI HCD (USB 2.0) support”. Say yes (y) to “USB Mass Storage support” also.

You will also need “SCSI device support: SCSI disk support”.

If you plan to build a live cd or dvd, make sure you build the following modules direct into the kernel (* not m) :

*“SCSI device support->SCSI CDROM support

*“SCSI generic support

*“ISO 9660 CDROM file system support” in CD-ROM/DVD Filesystems

*“PATA support.

Last, but not least, enable AUFS and SquashFS, in “File systems->Miscellaneous filesystems” +

After configuration, just build and install your kernel. +

diff --git a/book/git.html b/book/git.html new file mode 100644 index 0000000..9fc4d32 --- /dev/null +++ b/book/git.html @@ -0,0 +1,3 @@ + +2.2. GIT

2.2. GIT

[Note]

Note

This chapter is mandatory for building the livecd.

2.2.1. Introduction to GIT

GIT is a version control system, mainly used by the linux kernel maintainers, but other developers use it as well as the developers of AUFS

To download AUFS in the next chapter we need to be able to checkout the AUFS branch. So we need to install GIT first

2.2.2. Install GIT

./configure --prefix=/usr 
+make

Now install GIT as root:

make install
diff --git a/book/images/caution.png b/book/images/caution.png new file mode 100644 index 0000000..5b7809c Binary files /dev/null and b/book/images/caution.png differ diff --git a/book/images/important.png b/book/images/important.png new file mode 100644 index 0000000..12c90f6 Binary files /dev/null and b/book/images/important.png differ diff --git a/book/images/note.png b/book/images/note.png new file mode 100644 index 0000000..d0c3c64 Binary files /dev/null and b/book/images/note.png differ diff --git a/book/images/tip.png b/book/images/tip.png new file mode 100644 index 0000000..5c4aab3 Binary files /dev/null and b/book/images/tip.png differ diff --git a/book/images/warning.png b/book/images/warning.png new file mode 100644 index 0000000..1c33db8 Binary files /dev/null and b/book/images/warning.png differ diff --git a/book/index.html b/book/index.html new file mode 100644 index 0000000..6819570 --- /dev/null +++ b/book/index.html @@ -0,0 +1,2 @@ + +LFS live howto

LFS live howto

Version 0.3

JP Hauradou

Jonathan Norman

Sander van Ginkel


Table of Contents

diff --git a/book/initrd.html b/book/initrd.html new file mode 100644 index 0000000..d92a5ed --- /dev/null +++ b/book/initrd.html @@ -0,0 +1,102 @@ + +4.1.  Building the initramfs image

4.1. Building the initramfs image

[Note]

Note

This chapter is mandatory for both the livecd and the livekey.

To boot our live system, we will need an initramfs image, which will contain a couple of utilities and kernel modules, necessary to find our rootfs and mount it. +

Create a directory structure:

mkdir -p initramfs/{bin,sbin,dev/{pts,shm},etc,proc,sys,rtmnt,lib}

Copy busybox which we created in the chapter busybox 1.19.2 to the bin directory

cp <path-to-busybox-builddir>/busybox initramfs/bin 

Busybox can install symlinks for the desired utilities itself, however this can be done until the init script is running. So for some utilities that we need before this stage, we need to create the symlinks our selfs.

ln -s /bin/busybox initramfs/bin/ash 
+ln -s /bin/busybox initramfs/bin/mount 

We need access to some devicenodes before udev starts:

mknod initramfs/dev/null c 1 3 
+mknod initramfs/dev/tty c 5 0 
+mknod initramfs/dev/console c 5 1 

Add the necessary kernel modules:

for filename in sd_mod usbcore ehci-hcd usb-storage usb-libusual uhci-hcd ext3 mbcache jbd 
+do
+	find /lib/modules/`uname -r` -name "$filename"* -exec cp -r --parents {} initramfs \;
+done

This will search for the given modules, and copy them to the initramfs

Now we need to create the initscript:

cat > initramfs/init << "EOF" 
+#!/bin/ash
+
+PATH=/bin:/sbin
+
+# Mount proc and sysfs
+
+mount -t proc none /proc 
+mount -t sysfs none /sys 
+mount -t devtmpfs none /dev
+
+# Unpack the busybox
+
+/bin/busybox --install -s
+
+# Add modules
+
+if [ -z $(ls /lib/modules/) ]; then
+
+	depmod -a
+
+	modprobe sd_mod
+	modprobe usbcore
+	modprobe ehci-hcd
+	modprobe usb-storage
+	modprobe ext3
+
+fi
+
+# Check the command line 
+
+initfile="/sbin/init"
+root=""
+
+# Check the parameterlist for rootdelay 
+
+for arg in $(cat /proc/cmdline); do
+	case $arg in
+
+	rootdelay=*)
+		dt=$(echo $arg | cut -d= -f2)
+		sleep $dt
+		;;
+	esac
+done
+
+# Check the parameterlist for UUID= and LABEL=
+
+for arg in $(cat /proc/cmdline); do
+	case $arg in
+
+	 root=*)
+		option=$(echo $arg | cut -d= -f2)
+
+		if [ $option == "LABEL" ] ; then
+			root=$(findfs LABEL=$(echo $arg | cut -d= -f3))
+		fi
+
+		if [ $option == "UUID" ] ; then
+			root=$(findfs UUID=$(echo $arg | cut -d= -f3))
+		fi
+
+		;;
+
+	init=*)
+		initfile=$(echo "$@" | cut -d "=" -f 2 )
+
+		;;
+
+	esac
+done
+
+if [ $root != "" ] ; then
+
+	mount "${root}" /rtmnt
+
+	if [[ -x "/rtmnt/${initfile}" ]] ; then
+
+		umount /dev
+		umount /sys 
+		umount /proc
+
+		exec switch_root /rtmnt "${initfile}"
+	fi
+fi
+
+# We shouldn't come here
+
+exec ash
+EOF
+chmod 0755 initramfs/init

Pack our stuff:

cd initramfs 
+find ./ | cpio -H newc -o > ../initrd 
+cd .. 
+gzip initrd

Keep our created initrd.gz for later use.

diff --git a/book/legalnotice.html b/book/legalnotice.html new file mode 100644 index 0000000..6301aa4 --- /dev/null +++ b/book/legalnotice.html @@ -0,0 +1,17 @@ + +Legal Notice

Copyright (c) 2011, JP Hauradou

LinuxFromScratch is Copyright (c) 1999-2011, Gerard Beekmans

All rights reserved.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, + BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled "GNU + Free Documentation License"

diff --git a/book/license.html b/book/license.html new file mode 100644 index 0000000..a78368a --- /dev/null +++ b/book/license.html @@ -0,0 +1,392 @@ + +11.1. GNU Free Documentation License

11.1. GNU Free Documentation License

+ Copyright (C) 2000, 2001, 2002 Free Software Foundation, + Inc. 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA. Everyone is permitted to copy and + distribute verbatim copies of this license document, but changing it is + not allowed. +

+ 0. PREAMBLE +

+ The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to assure + everyone the effective freedom to copy and redistribute it, with or + without modifying it, either commercially or noncommercially. + Secondarily, this License preserves for the author and publisher a way to + get credit for their work, while not being considered responsible for + modifications made by others. +

+ This License is a kind of "copyleft", which means that derivative works of + the document must themselves be free in the same sense. It complements + the GNU General Public License, which is a copyleft license designed for + free software. +

+ We have designed this License in order to use it for manuals for free + software, because free software needs free documentation: a free program + should come with manuals providing the same freedoms that the software + does. But this License is not limited to software manuals; it can be used + for any textual work, regardless of subject matter or whether it is + published as a printed book. We recommend this License principally for + works whose purpose is instruction or reference.

+ 1. APPLICABILITY AND DEFINITIONS +

+ This License applies to any manual or other work, in any medium, that + contains a notice placed by the copyright holder saying it can be + distributed under the terms of this License. Such a notice grants a + world-wide, royalty-free license, unlimited in duration, to use that work + under the conditions stated herein. The "Document", below, refers to any + such manual or work. Any member of the public is a licensee, and is + addressed as "you". You accept the license if you copy, modify or + distribute the work in a way requiring permission under copyright + law. +

+ A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with modifications + and/or translated into another language. +

+ A "Secondary Section" is a named appendix or a front-matter section of the + Document that deals exclusively with the relationship of the publishers or + authors of the Document to the Document's overall subject (or to related + matters) and contains nothing that could fall directly within that overall + subject. (Thus, if the Document is in part a textbook of mathematics, a + Secondary Section may not explain any mathematics.) The relationship + could be a matter of historical connection with the subject or with + related matters, or of legal, commercial, philosophical, ethical or + political position regarding them. +

+ The "Invariant Sections" are certain Secondary Sections whose titles are + designated, as being those of Invariant Sections, in the notice that says + that the Document is released under this License. If a section does not + fit the above definition of Secondary then it is not allowed to be + designated as Invariant. The Document may contain zero Invariant + Sections. If the Document does not identify any Invariant Sections then + there are none. +

+ The "Cover Texts" are certain short passages of text that are listed, as + Front-Cover Texts or Back-Cover Texts, in the notice that says that the + Document is released under this License. A Front-Cover Text may be at + most 5 words, and a Back-Cover Text may be at most 25 words. +

+ A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the general + public, that is suitable for revising the document straightforwardly with + generic text editors or (for images composed of pixels) generic paint + programs or (for drawings) some widely available drawing editor, and that + is suitable for input to text formatters or for automatic translation to a + variety of formats suitable for input to text formatters. A copy made in + an otherwise Transparent file format whose markup, or absence of markup, + has been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if used + for any substantial amount of text. A copy that is not "Transparent" is + called "Opaque". +

+ Examples of suitable formats for Transparent copies include plain ASCII + without markup, Texinfo input format, LaTeX input format, SGML or XML + using a publicly available DTD, and standard-conforming simple HTML, + PostScript or PDF designed for human modification. Examples of + transparent image formats include PNG, XCF and JPG. Opaque formats + include proprietary formats that can be read and edited only by + proprietary word processors, SGML or XML for which the DTD and/or + processing tools are not generally available, and the machine-generated + HTML, PostScript or PDF produced by some word processors for output + purposes only. +

+ The "Title Page" means, for a printed book, the title page itself, plus + such following pages as are needed to hold, legibly, the material this + License requires to appear in the title page. For works in formats which + do not have any title page as such, "Title Page" means the text near the + most prominent appearance of the work's title, preceding the beginning of + the body of the text. +

+ A section "Entitled XYZ" means a named subunit of the Document whose title + either is precisely XYZ or contains XYZ in parentheses following text that + translates XYZ in another language. (Here XYZ stands for a specific + section name mentioned below, such as "Acknowledgements", "Dedications", + "Endorsements", or "History".) To "Preserve the Title" of such a section + when you modify the Document means that it remains a section "Entitled + XYZ" according to this definition. +

+ The Document may include Warranty Disclaimers next to the notice which + states that this License applies to the Document. These Warranty + Disclaimers are considered to be included by reference in this License, + but only as regards disclaiming warranties: any other implication that + these Warranty Disclaimers may have is void and has no effect on the + meaning of this License. +

+ 2. VERBATIM COPYING +

+ You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the copyright + notices, and the license notice saying this License applies to the + Document are reproduced in all copies, and that you add no other + conditions whatsoever to those of this License. You may not use technical + measures to obstruct or control the reading or further copying of the + copies you make or distribute. However, you may accept compensation in + exchange for copies. If you distribute a large enough number of copies + you must also follow the conditions in section 3. +

+ You may also lend copies, under the same conditions stated above, and you + may publicly display copies. +

+ 3. COPYING IN QUANTITY +

+ If you publish printed copies (or copies in media that commonly have + printed covers) of the Document, numbering more than 100, and the + Document's license notice requires Cover Texts, you must enclose the + copies in covers that carry, clearly and legibly, all these Cover Texts: + Front-Cover Texts on the front cover, and Back-Cover Texts on the back + cover. Both covers must also clearly and legibly identify you as the + publisher of these copies. The front cover must present the full title + with all words of the title equally prominent and visible. You may add + other material on the covers in addition. Copying with changes limited to + the covers, as long as they preserve the title of the Document and satisfy + these conditions, can be treated as verbatim copying in other + respects. +

+ If the required texts for either cover are too voluminous to fit legibly, + you should put the first ones listed (as many as fit reasonably) on the + actual cover, and continue the rest onto adjacent pages. +

+ If you publish or distribute Opaque copies of the Document numbering more + than 100, you must either include a machine-readable Transparent copy + along with each Opaque copy, or state in or with each Opaque copy a + computer-network location from which the general network-using public has + access to download using public-standard network protocols a complete + Transparent copy of the Document, free of added material. If you use the + latter option, you must take reasonably prudent steps, when you begin + distribution of Opaque copies in quantity, to ensure that this Transparent + copy will remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. +

+ It is requested, but not required, that you contact the authors of the + Document well before redistributing any large number of copies, to give + them a chance to provide you with an updated version of the + Document. +

+ 4. MODIFICATIONS +

+ You may copy and distribute a Modified Version of the Document under the + conditions of sections 2 and 3 above, provided that you release the + Modified Version under precisely this License, with the Modified Version + filling the role of the Document, thus licensing distribution and + modification of the Modified Version to whoever possesses a copy of it. + In addition, you must do these things in the Modified Version: +

  1. + Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions (which + should, if there were any, be listed in the History section of the + Document). You may use the same title as a previous version if the + original publisher of that version gives permission. +
  2. + List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +
  3. + State on the Title page the name of the publisher of the Modified + Version, as the publisher. +
  4. + Preserve all the copyright notices of the Document. +
  5. + Add an appropriate copyright notice for your modifications adjacent to + the other copyright notices. +
  6. + Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +
  7. + Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +
  8. + Include an unaltered copy of this License. +
  9. + Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +
  10. + Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise the + network locations given in the Document for previous versions it was + based on. These may be placed in the "History" section. You may omit + a network location for a work that was published at least four years + before the Document itself, or if the original publisher of the + version it refers to gives permission. +
  11. + For any section Entitled "Acknowledgements" or "Dedications", Preserve + the Title of the section, and preserve in the section all the + substance and tone of each of the contributor acknowledgements and/or + dedications given therein. +
  12. + Preserve all the Invariant Sections of the Document, unaltered in + their text and in their titles. Section numbers or the equivalent are + not considered part of the section titles. +
  13. + Delete any section Entitled "Endorsements". Such a section may not be + included in the Modified Version. +
  14. + Do not retitle any existing section to be Entitled "Endorsements" or + to conflict in title with any Invariant Section. +
  15. + Preserve any Warranty Disclaimers. +

+ If the Modified Version includes new front-matter sections or appendices + that qualify as Secondary Sections and contain no material copied from the + Document, you may at your option designate some or all of these sections + as invariant. To do this, add their titles to the list of Invariant + Sections in the Modified Version's license notice. These titles must be + distinct from any other section titles. +

+ You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various parties--for + example, statements of peer review or that the text has been approved by + an organization as the authoritative definition of a standard. +

+ You may add a passage of up to five words as a Front-Cover Text, and a + passage of up to 25 words as a Back-Cover Text, to the end of the list of + Cover Texts in the Modified Version. Only one passage of Front-Cover Text + and one of Back-Cover Text may be added by (or through arrangements made + by) any one entity. If the Document already includes a cover text for the + same cover, previously added by you or by arrangement made by the same + entity you are acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous publisher + that added the old one. +

+ The author(s) and publisher(s) of the Document do not by this License give + permission to use their names for publicity for or to assert or imply + endorsement of any Modified Version. +

+ 5. COMBINING DOCUMENTS +

+ You may combine the Document with other documents released under this + License, under the terms defined in section 4 above for modified versions, + provided that you include in the combination all of the Invariant Sections + of all of the original documents, unmodified, and list them all as + Invariant Sections of your combined work in its license notice, and that + you preserve all their Warranty Disclaimers. +

+ The combined work need only contain one copy of this License, and multiple + identical Invariant Sections may be replaced with a single copy. If there + are multiple Invariant Sections with the same name but different contents, + make the title of each such section unique by adding at the end of it, in + parentheses, the name of the original author or publisher of that section + if known, or else a unique number. Make the same adjustment to the + section titles in the list of Invariant Sections in the license notice of + the combined work. +

+ In the combination, you must combine any sections Entitled "History" in + the various original documents, forming one section Entitled "History"; + likewise combine any sections Entitled "Acknowledgements", and any + sections Entitled "Dedications". You must delete all sections Entitled + "Endorsements". +

+ 6. COLLECTIONS OF DOCUMENTS +

+ You may make a collection consisting of the Document and other documents + released under this License, and replace the individual copies of this + License in the various documents with a single copy that is included in + the collection, provided that you follow the rules of this License for + verbatim copying of each of the documents in all other respects. +

+ You may extract a single document from such a collection, and distribute + it individually under this License, provided you insert a copy of this + License into the extracted document, and follow this License in all other + respects regarding verbatim copying of that document. +

+ 7. AGGREGATION WITH INDEPENDENT WORKS +

+ A compilation of the Document or its derivatives with other separate and + independent documents or works, in or on a volume of a storage or + distribution medium, is called an "aggregate" if the copyright resulting + from the compilation is not used to limit the legal rights of the + compilation's users beyond what the individual works permit. When the + Document is included in an aggregate, this License does not apply to the + other works in the aggregate which are not themselves derivative works of + the Document. +

+ If the Cover Text requirement of section 3 is applicable to these copies + of the Document, then if the Document is less than one half of the entire + aggregate, the Document's Cover Texts may be placed on covers that bracket + the Document within the aggregate, or the electronic equivalent of covers + if the Document is in electronic form. Otherwise they must appear on + printed covers that bracket the whole aggregate. +

+ 8. TRANSLATION +

+ Translation is considered a kind of modification, so you may distribute + translations of the Document under the terms of section 4. Replacing + Invariant Sections with translations requires special permission from + their copyright holders, but you may include translations of some or all + Invariant Sections in addition to the original versions of these Invariant + Sections. You may include a translation of this License, and all the + license notices in the Document, and any Warranty Disclaimers, provided + that you also include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of this + License or a notice or disclaimer, the original version will prevail. +

+ If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to Preserve its + Title (section 1) will typically require changing the actual title. +

+ 9. TERMINATION +

+ You may not copy, modify, sublicense, or distribute the Document except as + expressly provided for under this License. Any other attempt to copy, + modify, sublicense or distribute the Document is void, and will + automatically terminate your rights under this License. However, parties + who have received copies, or rights, from you under this License will not + have their licenses terminated so long as such parties remain in full + compliance. +

+ 10. FUTURE REVISIONS OF THIS LICENSE +

+ The Free Software Foundation may publish new, revised versions of the GNU + Free Documentation License from time to time. Such new versions will be + similar in spirit to the present version, but may differ in detail to + address new problems or concerns. See http://www.gnu.org/copyleft/. +

+ Each version of the License is given a distinguishing version number. If + the Document specifies that a particular numbered version of this License + "or any later version" applies to it, you have the option of following the + terms and conditions either of that specified version or of any later + version that has been published (not as a draft) by the Free Software + Foundation. If the Document does not specify a version number of this + License, you may choose any version ever published (not as a draft) by the + Free Software Foundation. +

+ ADDENDUM: How to use this License for your documents +

+ To use this License in a document you have written, include a copy of the + License in the document and put the following copyright and license + notices just after the title page: +

+ Copyright (C) YEAR YOUR NAME. +

+ Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 or + any later version published by the Free Software Foundation; with no + Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A + copy of the license is included in the section entitled "GNU Free + Documentation License". +

+ If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, + replace the "with...Texts." line with this: +

+ with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. +

+ If you have Invariant Sections without Cover Texts, or some other + combination of the three, merge those two alternatives to suit the + situation. +

+ If your document contains nontrivial examples of program code, we + recommend releasing these examples in parallel under your choice of free + software license, such as the GNU General Public License, to permit their + use in free software. +

diff --git a/book/links.html b/book/links.html new file mode 100644 index 0000000..ed7e44a --- /dev/null +++ b/book/links.html @@ -0,0 +1,6 @@ + +10.1.  Some useful links on the web

10.1. Some useful links on the web

+ http://www.culmination.org/Mike/2.6-udev-nptl-bootcd.txt +

+ http://tldp.org/HOWTO/SquashFS-HOWTO/ +

diff --git a/book/longindex.html b/book/longindex.html new file mode 100644 index 0000000..448a3d2 --- /dev/null +++ b/book/longindex.html @@ -0,0 +1,2 @@ + +Index

Index

diff --git a/book/pt01.html b/book/pt01.html new file mode 100644 index 0000000..e7ce14e --- /dev/null +++ b/book/pt01.html @@ -0,0 +1,2 @@ + +Part I. Introduction

I. Introduction

Table of Contents

diff --git a/book/pt02.html b/book/pt02.html new file mode 100644 index 0000000..95c23e2 --- /dev/null +++ b/book/pt02.html @@ -0,0 +1,2 @@ + +Part II. Needed packages

II. Needed packages

Table of Contents

diff --git a/book/pt03.html b/book/pt03.html new file mode 100644 index 0000000..75ef43a --- /dev/null +++ b/book/pt03.html @@ -0,0 +1,2 @@ + +Part III. Reconfiguring the Linux Kernel

III. Reconfiguring the Linux Kernel

Table of Contents

diff --git a/book/pt04.html b/book/pt04.html new file mode 100644 index 0000000..e1892d1 --- /dev/null +++ b/book/pt04.html @@ -0,0 +1,2 @@ + +Part IV. Preparing the build

IV. Preparing the build

Table of Contents

diff --git a/book/pt05.html b/book/pt05.html new file mode 100644 index 0000000..3b90a8f --- /dev/null +++ b/book/pt05.html @@ -0,0 +1,2 @@ + +Part V. the USB live system

V. the USB live system

Table of Contents

diff --git a/book/pt06.html b/book/pt06.html new file mode 100644 index 0000000..36b6100 --- /dev/null +++ b/book/pt06.html @@ -0,0 +1,2 @@ + +Part VI. the ISO live system

VI. the ISO live system

Table of Contents

diff --git a/book/pt07.html b/book/pt07.html new file mode 100644 index 0000000..cc944ac --- /dev/null +++ b/book/pt07.html @@ -0,0 +1,2 @@ + +Part VII. References

VII. References

Table of Contents

diff --git a/book/pt08.html b/book/pt08.html new file mode 100644 index 0000000..43c3dc1 --- /dev/null +++ b/book/pt08.html @@ -0,0 +1,2 @@ + +Part VIII. License

VIII. License

Table of Contents

diff --git a/book/squashfs.html b/book/squashfs.html new file mode 100644 index 0000000..aee6e1f --- /dev/null +++ b/book/squashfs.html @@ -0,0 +1,4 @@ + +2.1. Squashfs 4.2

2.1. Squashfs 4.2

[Note]

Note

This chapter is mandatory for building the livecd. The livekey doesn't need it as we will show later

2.1.1. Introduction to Squashfs

The Squashfs package contains a highly compressed read-only filesystem for Linux.

2.1.2. Installing squashfs-tools

Assuming you are in the squashfs 4.2 source directory, install Squashfs by running the following + commands:

cd squashfs-tools && make

Then, as user root, run the following: +

cp -v unsquashfs mksquashfs /usr/bin 
diff --git a/book/stylesheets/lfs-print.css b/book/stylesheets/lfs-print.css new file mode 100644 index 0000000..cf34933 --- /dev/null +++ b/book/stylesheets/lfs-print.css @@ -0,0 +1,9 @@ +/* +$LastChangedBy: manuel $ +$Date: 2007-07-05 23:18:33 +0200 (jeu, 05 jui 2007) $ +*/ +@import url(lfs.css); + +.navfooter, .headerlinks { + display: none; +} diff --git a/book/stylesheets/lfs.css b/book/stylesheets/lfs.css new file mode 100644 index 0000000..a56666f --- /dev/null +++ b/book/stylesheets/lfs.css @@ -0,0 +1,604 @@ +/* +$LastChangedBy: manuel $ +$Date: 2007-07-10 21:06:15 +0200 (mar, 10 jui 2007) $ +modified by jp, on sat may 31 13:58:00 CEST 2008 +*/ +/* Global settings */ +body { + font-family: vera, verdana, tahoma, helvetica, arial, sans-serif; + text-align: left; + background: #fff; + border: 1px; + color: #222; + margin: 1em; + padding: 0; + font-size: 1em; + line-height: 1.2em +} + + +/* Links */ +a:link { color: #22b; } +a.ulink:link { font-weight: bold; color: #55f; } +a:visited { color: #7e4988 ! important; } +a:hover, a:focus { color: #d30e08 ! important; } +a:active { color: #6b77b1 ! important;} + + +/* Book titlepage */ +.book .titlepage { + background: #e5f6f1; + margin: 0px auto; + padding: 0 1em; +} + +.book hr { + background: #dbddec; + height: .3em; + border: 0px; + margin: 0 -1em; + padding: 0; +} + +div.dedication { + padding-left: 1em; +} + + +/* Sections */ +div.sect1, div.appendix { + padding-left: .3em; +} + +.package, .kernel, .installation, .commands, .testing, .configuration, .content { + padding: 0 .5em .2em 0; + margin: 0; +} + +.lfs .package { + background: #f5f6f7; + border-bottom: 0.2em solid #dbddec; + padding-top: .1em; + margin-top: 0; +} + +.lfs .configuration { + background: #fefefe; + border-top: 0.2em solid #dbddec; +} + +.lfs .content { + background: #f6f7f8; + border-top: 0.2em solid #dbddec; + padding-bottom: .1em; + margin-bottom: 0; +} + + +/* Headers */ +h1, h2, h3, h4, h5, h6, b, .strong { + color: #000; + font-weight: bold; + line-height: 1em; +} + +h1 { + font-size: 173%; + text-align: center; +} + +.book h1 { + margin: 0; + padding: 0.4em; +} + +.preface h1, .part h1, .chapter h1, .appendix h1, .index h1, .sect1 h1 { + background: #f6f7f8; + border-bottom: .1em solid #dbddec; + margin-bottom: 1em; + margin-top: 0; + padding: .4em; +} + +.sect1 h1, .appendix h1 { + margin-left: -.2em; +} + +.wrap h1 { + background: #f6f7f8; + margin: 0; + padding: .4em; +} + +h1.title sup { + font-size: small; +} + +h2 { + font-size: 100%; +} + +.book h2.subtitle { + text-align: center; + background: #f6f7f8; + margin: 0; + padding: 0.2em; +} + +.appendix h2 { + font-size: 133%; + margin-top: .8em; + margin-bottom: 0.2em; +} + +h3 { + font-size: 120%; +} + +h4 { + font-size: 110%; +} + +.package h4, h5, h6 { + font-size: 100%; + font-style: italic; +} + + +/* Navigation */ +div.navheader, div.navfooter { + background: #ecedef; + margin: 0; + padding: 0.1em .5em; +} + +div.navheader { + border-bottom: 1px solid #dbddec; +} + +div.navfooter { + border-top: 1px solid #dbddec; +} + +div.navheader h4 { + margin-top: .4em; + margin-bottom: 0; + text-align: center; +} + +div.navheader h3 { + margin-top: .2em; + margin-bottom: 0; + text-align: center; +} + +div.navheader ul, div.navfooter ul { + padding: .2em .5em .5em 0; + margin: .5em 0; + position: relative; + background: #e5f6f1; +} + +div.navheader ul li, div.navfooter ul li { + display: inline; + width: 40%; +} + +div.navheader ul li.prev, div.navfooter ul li.prev { + position: absolute; + display: block; + left: auto; + text-align: left; + padding: 0.2em 1em; + margin-left: 6px; +} + +div.navheader ul li.next, div.navfooter ul li.next { + position: absolute; + display: block; + text-align: right; + right: 5px; + padding: 0.2em 0.5em; + margin-right: 7px; +} + +div.navheader ul li.prev p, div.navfooter ul li.prev p, +div.navheader ul li.next p, div.navfooter ul li.next p { + padding: 0; + margin: 1px 0px; +} + +div.navheader ul li.home, div.navheader ul li.up, +div.navfooter ul li.home, div.navfooter ul li.up { + text-align: center; + padding: 0; + margin: 0px auto; + display: block; + color: "grey"; +} + + +/* TOC */ +div.toc ul, div.index ul, div.navheader ul, div.navfooter ul { + list-style: none; +} + +div.toc { + padding-left: 1em; +} + +li.preface, .part li.appendix { + margin-left: 1em; +} + +div.toc h3 { + margin: 1em 0 .3em 0; +} + +li.appendix h3, li.glossary h3, li.index h3 { + margin: .5em +} + +div.toc h4 { + margin: .6em 0 .2em 0; +} + +li.chapter h4 a { + display: block; + margin-bottom: .4em +} + +.dummy { + display: block; + font-weight: bold; + font-size: 110%; + margin: .6em 0 .2em 0; +} + + +/* Index */ +.item { + float: left; + margin-right: 1em +} + +.secitem { + font-weight: normal; + float: left; + margin-right: 1em +} + +.indexref { + display: block; +} + +.item + .indexref { + margin-left: 20em; +} + +.secitem + .indexref { + margin-left: 19em; +} + + +/* Admonitions */ +div.admon img { + padding: .3em; +} + +div.admon h3 { + display: inline; + margin-left: 2em; +} + +div.admon p { + margin-left: .5em; +} + +div.admon pre { + margin: 0.5em 3em; +} + +div.note, div.tip { + background-color: #fffff6; + border: 2px solid #dbddec; + width: 90%; + margin: .5em auto; +} + +div.important, div.warning, div.caution { + background-color: #fffff6; + border: medium solid #400; + width: 90%; + margin: .5em auto; + color: #600; +} + +div.important h3, div.warning h3, div.caution h3 { + color: #900; +} + +div.important em, div.warning em, div.caution em { + color: #000; + font-weight: bold; +} + + +/* table */ +.table p.title { + text-align: center; + margin-top: 0; + margin-bottom: .3em; +} + +.table table { + margin-left: auto; + margin-right: auto; +} + +.table table th, .table table td { + padding: 0.2em 2em 0.2em 2em; + text-align: left; +} + +.revhistory { + padding-left: 1em; +} + +.revhistory th { + line-height: 2em; + text-align: left; +} + +.revhistory td { + padding-right: 1em; +} + + +/* variablelist as table */ +.variablelist table { + width: auto; + margin: 0 1em 0 1em; +} + +.variablelist td { + vertical-align: top; +} + +.variablelist td span, td p { + margin: 0.25em; +} + + +/* variablelist as list */ +dl { + padding-left: 1em +} + +dt { + font-weight: bold; + margin-left: 1em; +} + +dd { + margin-bottom: .6em; + margin-left: 1em; +} + +dd p { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} + +div.materials dt { + display: list-item; +} + +div.materials dd { + margin-left: 0; + padding-left: 0; +} + + +/* segmentedlist */ +.appendix .segmentedlist { + padding-left: 1em; +} + +.package .seg { + margin-bottom: 0em; + margin-top: 0em; + clear: left; +} + +.content .seg { + margin-bottom: .4em; + margin-top: .4em; + clear: left; +} + +.segtitle { + float: left; +} + +.package .segbody, .appendix .segbody { + display: block; + padding-left: 14em; +} + +.content .segbody { + display: block; + padding-left: 12em; +} + + +/* itemizedlist */ +ul { + padding-left: 1em +} + +.itemizedlist ul { + margin-left: 1em +} + +.itemizedlist li ul { + margin-bottom: 1.2em; +} + +.itemizedlist li ul li p { + margin-top: .5em; + margin-bottom: .5em; +} + +.itemizedlist li ul li:first-child p:first-child { + margin-top: -.6em; +} + +ul.compact { + list-style: none; +} + +.blfs ul.compact { + list-style: disc; +} + +ul.compact li { + margin: 0em; + padding: 0em; +} + +ul.compact li p { + padding: 0.3em; + margin: 0em; +} + +.blfs ul.compact li p { + background-color: #f0fff0; +} + +/* orderedlist */ +ol { + list-style: decimal; +} + +ol ol { + list-style: lower-alpha; +} + +ol ol ol { + list-style: lower-roman; +} + +ol.compact li { + margin: 0em; + padding: 0em; +} + +ol.compact li p { + padding: 0.3em; + margin: 0em; +} + + +/* Indented blocks */ +p, blockquote { + padding-left: 1em; + padding-right: 1em; +} + + +/* Monospaced elements */ +tt, code, kbd, pre, .command { + font-family: monospace; +} + +.systemitem { + font-style: italic; +} + +pre { + background-color: #e5e5e5; + border: 1px solid #050505; + padding: .5em 1em; + margin: 0 2em .5em 2em; + font-weight: bold; +} + +pre.userinput { + color: #101310; +} + +pre.root { + color: #101310; + border: 1px solid #11a; +} + +pre.screen { + color: #000; + background-color: #e9e9e9; + font-weight: normal; +} + +.literal, .prompt { + font-weight: normal; +} + + +/* Mixed tags */ +p.usernotes { + margin-left: -1em; + font-size: small; + font-weight: bold; + font-style: italic; +} + +.underlined { + text-decoration: underline; +} + + +/* Last edited info */ +p.updated { + font-size: small; + font-weight: bold; + font-style: italic; +} + + +/* Special colored blocks */ + /* OrangeRed4 */ +.feature-ssp { + color: #8B2500; +} + + /* RoyalBlue3 */ +.feature-aslr { + color: #3A5FCD; +} + + /* NavyBlue */ +.feature-pax { + color: #000080; +} + + /* VioletRed */ +.feature-hardened_tmp { + color: #d02090; +} + + /* PaleTurquoise4 */ +.feature-warnings { + color: #668b8b; +} + + /* RosyBrown */ +.feature-misc { + color: #bc8f8f; +} + + /* Sienna*/ +.feature-blowfish { + color: #8E6B23 +} diff --git a/book/why.html b/book/why.html new file mode 100644 index 0000000..75b912b --- /dev/null +++ b/book/why.html @@ -0,0 +1,4 @@ + +1.1. Why this howto ?

1.1. Why this howto ?

After building LFS and a lot of packages from BLFS (Desktop, ...), I wondered if I could just copy my system on a dvd or a usb key, so that I could run my usual apps on some other computer. +

I found some useful documentation on the web, and decided to write this little hint. See Section 10.1, “ Some useful links on the web ”. +

-- cgit v1.2.3-54-g00ecf