Installing Slackware 8.1. Create a big root filesystem file.
# Create a sparse file
dd if=/dev/zero of=root_fs_slack81 bs=1024k count=1 seek=1024
Format it:
mke2fs -F root_fs_slack81
Mount it:
mount -o loop root_fs_slack81 /mnt
fdisk it:
fdisk /dev/loop0
# Press 'o' to create a new disk label
# Press 'n' to create a new partition. Make it a primary one that takes up
the whole disk.
# Press 'w' to write out the partition info
Remount it:
mount -o remount /mnt
Mount the slackware 8.1 cdrom :
mount -t iso9660 /dev/sr0 /cdrom
Now install all the packages
cd /cdrom/slackware
export ROOT=/mnt
for i in `ls -F1 | grep /`
do
cd $i && sh ./install-packages && cd ..
done
# You'll get the usual Slackware pkgtool type menus now. Select or deselect the bits you want
unset ROOT
Running install-packages as above doesn't seem to work from Slackware 10.0 onwards. Possibel idea is something like:
installpkg -root /mnt a/*.tgz ap/*.tgz n/*.tgz
Now fix up Slackware so that it will work under UML
chroot /mnt /bin/bash
# You are inside the slackware install now
vi /etc/fstab
# Add the following into /etc/fstab
/dev/ubd/0 / ext2 defaults 1 1
/proc /proc proc defaults
# Make sure the /dev/pts and swap entries are in your /etc/fstab too
# Now set the root password
passwd root
# Now Fix the inittab so that the virtual console works better.
# Comment out all the virtual consoles except the first one and then
# change its terminal to ttys/0:
c1:1235:respawn:/sbin/agetty 38400 ttys/0 linux
# As a matter of fact you might want to change the termtype from linux
# to vt100 or xterm or something
# Edit /etc/securetty to allow root to login from ttys/0. You just need
# to add a line with 'ttys/0' on it.
# Edit some of the startup/shutdown scripts to get rid of the
# references to hwclock
Now try booting it:
./linux ubd0=root_fs_slack81 con=pty con0=fd:0,fd:1
You should be able to log in as root.pablo , 2005-03-26 04:21:08