Linux Fom Scratch
- Gegevens
- Categorie: Linux
- Gepubliceerd op zaterdag 08 september 2012 02:18
- Geschreven door Foppe
- Hits: 639
I'm trying Linux From Scratch for the first time. Two years ago, for some course I've already compled a kernel so I'm feeling fairly confident this project will succeed.
So far I've set up the hard-drive partitions (100 Mb Home, 10Gb root and an existing 40Gb home plus the existing swap), downloaded the sources and the patches. I've manually created a file with the download URLs for wget and a file with md5sums for md5sum to check the downloads. This nables whet to downlaod all the files from the source-file like:
# wget -c wgte-list -P $LFS/sources
An interesting issue with checking the downloads with md5sum. You can put the expected md5sums in a file but this is the infamous error to expect:
no properly formatted MD5 checksum lines found
The fromatting of the file with md5sums is like so:
e82d2200e82aa28640299bbcad140361 bash-4.2-fixes-8.patch ddc5a9a170ed6ba23b8eb7d808e609ee binutils-2.22-build_fix-1.patch 6a5ac7e89b791aae556de0f745916f7f bzip2-1.0.6-install_docs-1.patch ...
Note there are exacty two spaces and nothing else (no tab) between de md5sum and the filename.
Only one file failed the check. I downloaded a more recent version of the kernel (3.5.3) which was bzipped where the LFS book suggsted a . Never mind.
Intersting to note the bash commands to do te md5sum check:
pushd $LFS/sources md5sum -c md5sums popd
I haden't seen the pushd and popd before. Should I be doing this myself I would start with:
#! /bin/bash
for file in `ls ${LFS}/sources` do:
..
done
pushd however is just a clever cd tool where popd takes you back to where you came from. This concludes chapter 3.


