Monday, September 25, 2006

Installing Linux from scratch

Heh, I have a hard-disk from my router here with idea to install there some later system (Mandrake 8 was there with absolutely no support nowadays). I put the disk in my local linux (Fedora Core rawhide – devel) installation, wiped and created partitions with fdisk, made filesystems and the work might start.

I was lazy to write boot image from CD/DVD to a disk partition as usual and reboot ;), so I mounted its root partition, made lib and bin dirs, copy bash, all ldd bash libraries plus some other stuff such as ls, mkdir, rpm (with libraries) and so on. I had iso of the distribution on my laptop, I exported it by nfs to here. Here I loop-mounted it to created mnt/fc dir and chrooted into this new root with shell and mounted iso.

I had a small system with almost nothing, I thought, I need to expand it, so I inited rpm database – rpm --initdb and started to install yum with all what it needs as dependecies from mounted iso. About 30 packages were needed to be installed (very long command line). Now I set a new yum repository pointing to a mounted iso up and run yum install whatever-I-needed. The final step was to setup daemons and finally grub. One well-aimed grub-install and the system was ready to boot, I rebooted.

Fine, just some misspells in /etc/fstab, otherwise OK. I tried all servers it would serve (httpd, dhcpd, named, sshd, proftpd) and it worked, also network was okay, so I am looking forward to try it back in the server tomorrow – there is no monitor and keyboard. I hope it'll work (I'm a little bit naive, I know).

No comments: