This memo describes how to build SFS or slackware from scratch using a small set of scripts. The first time you use these scripts, you have to do the following: NOTE: You need to: - be root to execute the main operations below, 1) This step assumes you know how to create a disk partition and have already done so. The following instructions assume this is /dev/sdb2, substitute your actual partition. Create and mount a partition for your system to be built on: # mount -t auto /dev/sdb2 /mnt/sfs # export SFS=/mnt/sfs # mkdir -pv $SFS/scripts # mkdir -pv $SFS/tools # cd $SFS/scripts 2) git clone the scripts of the project: # git clone https://github.com/nobodino/slackware-from-scratch.git # cd slackware-from-scratch # mv * .. # cd ..; rm -rf slackware-from-scratch # chmod +x * 3) Edit "myprofile" to adjust to your fstab characteristics, root partition, and swap partition. In the example the options for the root partition are applicable to my ssd disk. "defaults,noatime,discard", may not be applicable to your disk if it is a standard HDD. SAMPLE /etc/fstab SETUP (Only the first two lines need modifying for your setup.) /dev/sdb1 swap swap defaults 0 0 /dev/sdb2 / ext4 defaults,noatime,discard 1 1 /dev/fd0 /mnt/floppy auto noauto,owner 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 proc /proc proc defaults 0 0 tmpfs /dev/shm tmpfs nosuid,nodev,noexec 0 0 # End /fstab In addition, several other things in "myprofile" may need adjusting. Time zone information in "localtime ()" and "root_profile ()", for instance. "myprofile" comes with LANGUAGE (and several other variables) set to "fr_FR.UTF-8". This may not be ideal for your system. "rc_keymap ()" may also need changing, as may the server data in "ntp_conf ()". 4) Edit "export_variable_perso" to adjust PATDIR, DNDIR1, RDIR1 and RDRIR3. This script is personal for your own convenience. If you update the script from github, you must keep this one unchanged. - PATDIR: the directory where you store eveything about sfs (tools, others...) - DNDIR1: the directory where are stored everything else slackware (gnuada, ..) - RDIR1: the directory where is stored the resynced slackware32 sources - RDIR3: the directory where is stored the resynced slackware64 sources # export PATDIR=/mnt/ext4/sda4/sfs (for example) # mkdir -pv $PATDIR/tools (to store the "tools" build further on x86 -current branch) # mkdir -pv $PATDIR/tools_dev (to store the "tools" build further on x86 -development branch) # mkdir -pv $PATDIR/tools_64 (to store the "tools" build further on x86_64 -current branch) # mkdir -pv $PATDIR/tools_64_dev (to store the "tools" build further on x86_64 -development branch) # mkdir -pv $PATDIR/others (to store what the sub-script of "sfs-bootstrap" grabs to "populate_others", get the different repositories) NOTE: a smart way to populate 'others' directory is to choose on your first SFS building, the 'rsync' option and then copy it $DNDIR1. 5) Edit "export_variable" to adjust RSYNCDIR. You can adjust the mirrors to your own convenience, this may depend on your location. Choose mirrors closer to you if you're on another continent than mine. - RSYNCDIR: the rsync mirror from which you get the slackware source tree 6) Now you are ready to begin building slackware from scratch. Just execute the following command: # ./sfs-bootsrap You will be presented with two choices: "slackware" or "quit". If you choose slackware, then you will see three more choice: "x86", "x86_64" or "quit" Then you will be presented with tow choices: "current" or "developemnt". Then it will clean up the previous installation building if any. Then four kinds of choice: "rsync", local, dvd, or "quit". If the choice is: rsync) it will rsync with a slackware distant rsync repository. At the first building it can take some time if your ADSL line (or other way to access internet) is not very performant (for me it's about 2 Mb/s). local) it will use a local rsynced directory provided by the user. dvd) it will use a Blu-Ray dvd provided by the user containing the slackware data. quit) is self-explanatory. Then it will alter the sources with patches necessary for "two pass building" packages: you'd better accept the choice than not. Following that it will generate the 4 lists of packages which are for the following purpose: - list1 : a bare system just able to boot - list1+2: a bare x11 system with blackbox as DE. - lists1+2+3: system with xfce and seamonkey as web browser. You can build firefox thunderbird : everything is in to build them. - list5: builds all the available packages of slackware. 7) If it's your first time building SFS, you will have to build the "tools" which are compulsory to build SFS. It will use the "sfs-tools" script. The "tools" have been built thanks to LFS chapter 5 (Linux From Scratch) and adapted to slackware: some packages needed to perform tests in chapter 6 of LFS have been skipped. Once the "tools" is finished you can save the "tools" directory by doing the following. In another console: # cd /mnt/sfs # chown -R root:root tools/ # tar czf tools.tar.gz tools/ # move it to $PATDIR/tools or tools_dev (for x86) or $PATDIR/tools_64 or tools_64_dev (for x86_64) 8) from now you can build SFS either list by list or completely with a unique script "full-sfs". Either by executing: # time (./sfsbuild list1) # time (./sfsbuild list2) # time (./sfsbuild list3) # time (./sfsbuild list4) Or by executing: # time (./full-sfs) or time (./sfsbuild list5) On my machine the full build takes about 27h30 hours. (nobodino) On my machine the full build takes about 37 hours. (worsel) Your connection to internet must be active. notice1: if you build SFS on slackware-14.2, you won't be able to build ipset. While building you need to have the same kernel, which is generally not the case with SFS (4.14.x series) and slackware-14.2 (4.4.x series). You may disable it in build4_s.list by adding '#' in front of 'n ipset' line. You will able to build it in real environment, after you reboot your new SFS system. notice2 (12/2021): it hasn't been tested with slackware-14.2 for more than a year now, I'm not sure it's still feasible to build slackware -current with SFS. 9) at the end of the building, adjust "my_profile" to your needs, and execute the script before rebooting. You wil have to update grub (or whatever bootloader you use) so that your boot loader allow you to boot in your new system. 10) 3 scripts are not really used by the process of building SFS ("mount-sfs", "umount-sfs" and "chroot1). Their purpose is: - after building the list1, you reboot in your new system and test it. - if you want to go on building your system in your chrooted environment you will need to execute the following commands: # cd $SFS/scripts # ./mount-sfs # ./chroot1 # cd /scripts You can go on building your system. # at the end to umount the $SFS/{dev,run,proc,sys} # ./umount-sfs