Home

Linux Fom Scratch

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.

 

Grey Heron

A grey heron tries to swallow a koi carp caught in a pond in Dublin. It took several minutes for the heron to get to grips with the struggling fish and even then it almost choked as it tried to swallow it.

The Telegraph Picture Of The Day

Terry Moore: Why is 'x' the unknown?

From TED Talks Terry Moore explains why the letter x is the 'unknown' in mathematical equations contemporary culture (X-files etc).
It's only four minutes and definately worth watching.

Description: Why is 'x' the symbol for an unknown? In this short and funny talk, Terry Moore gives the surprising answer.

Terry Moore is the director of the Radius Foundation, a forum for exploring and gaining insight from different worldviews.

 

Creative Commons License

The current economic situation in one quote

As many economists have pointed out, America is currently suffering from a classic case of debt deflation: all across the economy people are trying to pay down debt by slashing spending, but, in so doing, they are causing a depression that makes their debt problems even worse.

Paul Krugman in The New York Times

Set symlink for the data folder on Apache

Every time I set up a server I forget the syntax for the symlinks. Usually the data folder is somewhere in the root folder and I have more space in /home. So I search Google and find the short answers 'm looking for. But that's usually wrong. The official man page of ln says:

ln [OPTION]... [-T] TARGET LINK_NAME

But that's where the confusion starts: what's the TARGET folder and what's the LINK_NAME?

Suppose, on a XAMPP stack I have the data folder in /opt/lampp/htdocs and I want the data to be in ~/public_html. What to do?
The answer (and this detail is seldom found) is starting with deleting the /opt/lampp/htdocs folder. Then do:

sudo ln -s /opt/lampp/htdocs/ ~/pubic_html

This assumes the folder ~/public_html already exists. This setup gives a great pleasure while developing websites. The ~/public_html folder is owned by you so you can add and change files on the fly. Also there aren't anyownership related issues while FTP-ing your files to this server.

If you stll hit 403 errors, check the Apache config files (perhaps in /opt/lampp/etc/httpd.conf or on an Arch server in /etc/httpd/conf/httpd.conf). Somewhere on 1/3 of the file you find the section where you can set Options Indexes FollowSymLinks. That should be set correctly. Security is great but not always practical.