LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Understanding the installation routine of slackware (https://www.linuxquestions.org/questions/slackware-14/understanding-the-installation-routine-of-slackware-445118/)

zhjim 05-15-2006 05:06 PM

Understanding the installation routine of slackware
 
Like the title says I always wanted to understand the installation process of slackware a bit better. Main point was which packets are needed to have a working installation.

Here is my approach. It can also be used to build a functional chroot. Also one could use busybox to need less diskspace I wanted to achived the installation with only packets from the a series (or other series if needed but they arent).

Process follows in next post.

zhjim 05-15-2006 05:07 PM

Deployment
  • Working installation of a recent slackware version.
  • A recent slackware CD or a directory with the exact directory structure beginning from slackware on the CD with all (most) of the packets from the a directory.
  • 70MB of free space.

Mission Objectives
Primary: Working bash in destination folder
Secondary: Booting from destination folder

Mission Plan
Creation of destination folder and creation of variable to destination folder
root@trial:~# mkdir -p desination_folder
root@trial:~# DST=desination_folder


Creation of variable to source folder
root@trial:~# SRC=source_folder

Creation of list of names of packets that are marked REQUIRED in $SRC/a/maketag and redirection into file
root@trial:~# cat $SRC/a/maketag | grep REQUIRED | cut -d \" -f 2 > filename_req



Installation of REQUIRED packets
root@trial:~# for i in `cat filename_req; do installpkg -root $DST $SRC/a/$i*tgz; done


Trial of bash in chroot[!--Trying to start bash in chroot--]
root@trial:~# chroot $DST /bin/bash
chroot: cannot run command `/bin/sh': No such file or directory



Checking files existens
root@trial:~# ls $DST/bin/bash
$DST/bin/bash



Checking for needed librarys
root@trial:# ldd $DST/bin/bash
/mnt/hd/bin/bash: /lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /mnt/hd/bin/bash)
libtermcap.so.2 =] /lib/libtermcap.so.2 (0x4001a000)
libdl.so.2 =] /lib/libdl.so.2 (0x4001e000)
libc.so.6 =] /lib/libc.so.6 (0x40021000)
/lib/ld-linux.so.2 =] /lib/ld-linux.so.2 (0x40000000)



Checking library existens
root@trial:~# ls $DST/lib/{libtermcap.*,lidbl.*,libc.*,ld-linux.*}
ls: /tmp/main/lib/lidbl.*: No such file or directory
ls: /tmp/main/lib/libc.*: No such file or directory
ls: /tmp/main/lib/ld-linux.*: No such file or directory
/tmp/main/lib/libtermcap.so.2 /tmp/main/lib/libtermcap.so.2.0.8



Installation of package that contains missing librarys and automatic creation of $DST/lib/ld-linux through

$SRC/sbin/ldconfig
root@trial:~# installpkg -root $DST $SRC/a/glibc-solibs*tgz
root@trial:~# $DST/sbin/ldconfig -r $DST



Trial of bash in chroot
root@trial:~# chroot $DST /bin/bash


Primary objective achieved!

Installation of kernel and update of /etc/lilo.conf to show new system
root@trial:~# installpkg -root $DST $SRC/a/kernel-ide*.tgz
root@trial:~# echo -e "image = /boot/vmlinuz\n root = /dev/hd
??\n label = minimal\n read-only\n" ]] /etc/lilo.conf
root@trial:~# lilo




Restart
Kernel loads normal, but we get a warning that /etc/fstab cannot be found. That leads to the kernel thinking we have an ext2 and

failure of /sbin/e2fsck. Copy /etc/fstab into $DST and edit it to reflect filesystem


Restart
Beside that /sbin/modprobe does not find /lib/modules/kernelname/modules.dep, because it does not exist, we are

presented a nice login screen. Login as root does not prompt for a password, because we did not set one. And we find our self on a nice

bash prompt



Secondary Objective achived

zhjim 05-15-2006 05:08 PM

So if anyone has some questions or suggestion...

I also have some small bash scripts that added into the installation in the first place. If needed i can provide them.

Alien Bob 05-15-2006 05:22 PM

Quote:

Originally Posted by zhjim
So if anyone has some questions or suggestion...

I suggest you change the name of your host to something that does not offend a lot of people surfing here unknowingly. Also I guess your post will not survive the automatic scan for badwords unharmed.

Eric

XavierP 05-15-2006 05:25 PM

I also think you should edit your hostname - remember, it may seem funny when you use it at home, but it tends not to withstand scrutiny. Change it to "localhost".

zhjim 05-16-2006 02:16 AM

Thanks guys I totaly forget that I have that odd name. I have two machines here with the names of the twins from "Austin Powers III". So i hope no real offence was taken.

So was it any good for you?


All times are GMT -5. The time now is 03:42 PM.