Thu Sep 21 10:26:56 2017 UTC

Preparation of the construction

If you are on NuTyX

Make sure the tools are installed:

get cards.devel git

If you are not on NuTyX

You need to download the NuTyX installation script install-nutyx.

To make this topic transparent for all readers (NuTyX or not NuTyX user), you will put the script in a standard directory. You can delete it at the end of the creation.

Switch to root mode:

su -
md5sum -c install-nutyx.md5sum
install-nutyx: OK
chmod -v 755 install-nutyx
mode of 'install-nutyx' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
mv -v install-nutyx /usr/bin/install-nutyx
'install-nutyx' -> '/usr/bin/install-nutyx'

Make shure you have the bsdtar command installed on your distribution.

You need to use the BASH interpreter.

Check that all the conditions are fullfill by checking this page

If you did already once the all process

It's necessary to remove the user (and its group it belong) and the home directory of the user lfs.

So if you need to do it, remove all existing stuff:

userdel lfs
rm -r /home/lfs

Normally, by remove the user, the group is removed as well. If not shure give a try, it will not hurt.

groupdel lfs

Partition preparation

To be able to start the first pass without major trouble, let's see what's has to be done. It's quite straigtforward.

Normaly if we build a linux distribution, it's necessary to plan a partition where to put it's construction. It's actually not a must, as it's possible to build the distribution in a folder and then make a backup of it on a USB key or directly use the command rsync to transfer it on the destination disk or partition.

So if you decide to use a dedicate partition, it's time to format it in the file system of your choice and then you mount it on the folder defined by the LFS variable.

In all the articles we will used the same folder, so let's define the LFS variable:

export LFS=/mnt/lfs
Ones your partition formated, it's time to create the folder and mount your partition on it. In my example, I choose the second partition of the first disk, you should adjust thoses settings to your choice.
mkdir -pv $LFS
mount /dev/sda2 $LFS

Remember to always mount this partition prior to start the pass 1 or 2. Ones the partition is monted, we can start the first pass.