From 0515650c1d33b9d4f2e4af79579be70d874826f4 Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Sat, 25 May 2002 00:24:08 +0000 Subject: third wave - remove old files git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1899 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter05/creatingdirs.xml | 66 ---------------------------------------- chapter05/kernel-exp-headers.xml | 35 --------------------- chapter05/kernel-exp.xml | 31 ------------------- chapter05/kernel-inst.xml | 22 -------------- chapter05/kernel.xml | 15 --------- chapter05/proc.xml | 23 -------------- chapter05/pwdgroup.xml | 41 ------------------------- 7 files changed, 233 deletions(-) delete mode 100644 chapter05/creatingdirs.xml delete mode 100644 chapter05/kernel-exp-headers.xml delete mode 100644 chapter05/kernel-exp.xml delete mode 100644 chapter05/kernel-inst.xml delete mode 100644 chapter05/kernel.xml delete mode 100644 chapter05/proc.xml delete mode 100644 chapter05/pwdgroup.xml (limited to 'chapter05') diff --git a/chapter05/creatingdirs.xml b/chapter05/creatingdirs.xml deleted file mode 100644 index 45f717a54..000000000 --- a/chapter05/creatingdirs.xml +++ /dev/null @@ -1,66 +0,0 @@ - -Creating directories - - -Let's now create the directory tree on the LFS partition based on -the FHS standard, which can be found at -. -Issuing the following commands will create a default directory layout: - -cd $LFS && -mkdir -p bin boot dev/pts etc/opt home lib mnt proc root sbin tmp var opt && -for dirname in $LFS/usr $LFS/usr/local -    do -    mkdir $dirname -    cd $dirname -    mkdir bin etc include lib sbin share src -    ln -s share/man -    ln -s share/doc -    ln -s share/info -    cd $dirname/share -    mkdir dict doc info locale man nls misc terminfo zoneinfo -    cd $dirname/share/man -    mkdir man{1,2,3,4,5,6,7,8} -done && -cd $LFS/var && -mkdir -p lock log mail run spool tmp opt cache lib/misc local && -cd $LFS/opt && -mkdir bin doc include info lib man && -cd $LFS/usr && -ln -s ../var/tmp - -Normally, directories are created with permission mode 755, which isn't -desired for all directories. The first change is a mode 0750 for the -$LFS/root directory. This is to make sure that not just everybody can -enter the /root directory (the same a user would do with /home/username -directories). The second change is a mode 1777 for the tmp -directories. This way, any user can write data to the /tmp or /var/tmp -directory but cannot remove another user's files (the latter is caused -by the so-called "sticky bit" - bit 1 of the 1777 bit mask). - -cd $LFS && -chmod 0750 root && -chmod 1777 tmp var/tmp - -Now that the directories are created, copy the source files that were -downloaded in chapter 3 to some subdirectory under $LFS/usr/src (you -will need to create the desired directory yourself). - - -FHS compliance notes - -The FHS stipulates that the /usr/local directory should contain the -bin, games, include, lib, man, sbin, and share subdirectories. You can -alter your /usr/local directory yourself if you want your system to be -FHS-compliant. - -Also, the standard says that there should exist a /usr/share/games -directory, which we don't much like for a base system. But feel free to -make your system FHS-compliant if you wish. The FHS isn't precise as -to the structure of the /usr/local/share subdirectories, so we took the -liberty of creating the directories that we felt were needed. - - - - - diff --git a/chapter05/kernel-exp-headers.xml b/chapter05/kernel-exp-headers.xml deleted file mode 100644 index de1256f3c..000000000 --- a/chapter05/kernel-exp-headers.xml +++ /dev/null @@ -1,35 +0,0 @@ - -Why we copy the kernel headers and don't symlink them - -In the past, it was common practice for people to symlink the -/usr/include/linux and asm directories to /usr/src/linux/include/linux -and asm respectively. This is a bad idea as -this extract from a post by Linus Torvalds to the Linux Kernel -Mailing List points out: - -I would suggest that people who compile new kernels should: - - - not have a single symbolic link in sight (except the one that the - kernel build itself sets up, namely the "linux/include/asm" symlink - that is only used for the internal kernel compile itself) - -And yes, this is what I do. My /usr/src/linux still has the old 2.2.13 -header files, even though I haven't run a 2.2.13 kernel in a _loong_ -time. But those headers were what glibc was compiled against, so those -headers are what matches the library object files. - -And this is actually what has been the suggested environment for at -least the last five years. I don't know why the symlink business keeps -on living on, like a bad zombie. Pretty much every distribution still -has that broken symlink, and people still remember that the linux -sources should go into "/usr/src/linux" even though that hasn't been -true in a _loong_ time. - -The relevant part here is where he states that the headers should -be the ones which glibc was compiled against. These are -the headers which should remain accessible and so by copying them, we ensure -that we follow these guidelines. Also note that as long as you don't have -those symlinks, it is perfectly fine to have the kernel sources -in /usr/src/linux. - - diff --git a/chapter05/kernel-exp.xml b/chapter05/kernel-exp.xml deleted file mode 100644 index a5a7e9a63..000000000 --- a/chapter05/kernel-exp.xml +++ /dev/null @@ -1,31 +0,0 @@ - -Command explanations - -make mrproper: This will ensure that the kernel -tree is absolutely clean. We do this because the kernel team recommend -that this is done prior to each kernel compilation, -and that we shouldn't rely on the source tree being automatically clean -after untarring. - -make include/linux/version.h and -make symlinks: This creates the -include/linux/version.h, as well as the include/asm symlink. - -mkdir $LFS/usr/include/asm -and cp include/asm/* $LFS/usr/include/asm: -This copies the platform-specific assembler kernel header files to -$LFS/usr/include/asm - -cp -R include/linux $LFS/usr/include: -This command copies the cross-platform kernel header files to -$LFS/usr/include - -touch $LFS/usr/include/linux/autoconf.h: Some -kernel header files include this autoconf.h file, but -outside the Linux source tree, that file has no meaning so we just create -an empty one so we don't get compile errors whenever it happens to be a -dependency of another kernel header file. - - - diff --git a/chapter05/kernel-inst.xml b/chapter05/kernel-inst.xml deleted file mode 100644 index 522035354..000000000 --- a/chapter05/kernel-inst.xml +++ /dev/null @@ -1,22 +0,0 @@ - -Installation of the Linux Kernel - -We won't be compiling a new kernel image yet. We'll do that after we -have finished the installation of the basic system software in this -chapter. But because certain software needs the kernel header files, we're -going to unpack the kernel archive now and set it up so that we can -compile the packages that need the kernel. - -The kernel configuration file is created by running the following -command: - -make mrproper && -make include/linux/version.h && -make symlinks && -mkdir $LFS/usr/include/asm && -cp include/asm/* $LFS/usr/include/asm && -cp -R include/linux $LFS/usr/include && -touch $LFS/usr/include/linux/autoconf.h - - - diff --git a/chapter05/kernel.xml b/chapter05/kernel.xml deleted file mode 100644 index 07839f118..000000000 --- a/chapter05/kernel.xml +++ /dev/null @@ -1,15 +0,0 @@ - -Installing Linux-&kernel-version; - - -Estimated build time: &kernel-time-static; -Estimated required disk space: &kernel-compsize-static; - -&c5-kernel-inst; -&c5-kernel-exp; -&c5-kernel-exp-headers; -&aa-kernel-desc; -&aa-kernel-dep; - - - diff --git a/chapter05/proc.xml b/chapter05/proc.xml deleted file mode 100644 index 56231f0e4..000000000 --- a/chapter05/proc.xml +++ /dev/null @@ -1,23 +0,0 @@ - -Mounting $LFS/proc file system - - -In order for certain programs to function properly, the proc file -system must be mounted and available from within the chroot'ed environment -as well. It's not a problem to mount the proc file system (or any other -file system for that matter) twice or even more than that. - -If you're still logged in as user "lfs", you should log out and log -in again as user root. The reason for this is simple: only root is allowed -to mount filesystems and to run chroot. - -The proc file system is mounted under $LFS/proc by running the -following command. We'll also chown it to user root/group root while we're -at it (the rest of the filesystem is chown'ed to root:root in a minute when -we start with chapter 6). - -chown root:root $LFS/proc && -mount proc $LFS/proc -t proc - - - diff --git a/chapter05/pwdgroup.xml b/chapter05/pwdgroup.xml deleted file mode 100644 index f1c5e2176..000000000 --- a/chapter05/pwdgroup.xml +++ /dev/null @@ -1,41 +0,0 @@ - -Creating passwd and group files - - -In order for the user and group root to be recognized and to be able to -login, there needs to be an entry in the /etc/passwd and /etc/group file. -Besides the group root, a couple of other groups are recommended and needed by -packages. The groups created below aren't part of any standard. -The LSB only recommends a group bin with GID 1 to be present besides -group root. Other group names and GID's can be chosen by the user. Well -written packages don't depend on GID numbers but just use the group -name, so it doesn't matter which GID a group has. Since there -aren't any standards for groups the groups created here are the groups the -MAKEDEV script (the script that creates the device files in the /dev -directory) mentions. - -Create a new file $LFS/etc/passwd by running the -following command: - -echo "root:x:0:0:root:/root:/bin/bash" > $LFS/etc/passwd - -Create a new file $LFS/etc/group by running the -following command: - -cat > $LFS/etc/group << "EOF" -root:x:0: -bin:x:1: -sys:x:2: -kmem:x:3: -tty:x:4: -tape:x:5: -daemon:x:6: -floppy:x:7: -disk:x:8: -lp:x:9: -dialout:x:10: -audio:x:11: -EOF - - - -- cgit v1.2.3-54-g00ecf