Installing Slackware64 15.0
This page is a Work In Progress
Installing Slackware 15.0 on a Bitfolk VPS
Before you start
The default recommended install for slackware is everything except for kdei, ref for which you usually just install your locale. The space used can obviously be reduced by not installing things like X, or servers that are not going to be used, but this how-to doesn't assume what you will or won't use. That is left to you in the usual [http://www.slackware.com slackware] way.
If you have a set of tagfiles, you can make them available via the web for ease of access during the installation.
Anything less than 20GB of storage is going to be a squeeze because you are going to need some space for recompiling the kernel in addition to all the other packages you want to install. You might just about be able to get away with 10GB but that will require a lot of maintenance to keep it under control.
Part 1. preparing the virtual drives
Log in to the xen shell via ssh
ssh yourserver@yourserver.console.bitfolk.com
You will need to use the ssh key you supplied when ordering the VPS (or the password if you did not provide a key).
By default bitfolk allocate two virtual disks for your virtual machine. xvda (the main amount) and xvdb (an amount equal to the ram you have allocated) for swap.
Type disks to view and change the arrangement of virtual drives made up out of your purchased disk space.
Current disk layout:
1. xvda 20,480MiB
2. xvdb 1,024MiB
Total disk capacity 21,504MiB
Reserved for backups 2,048MiB
Available for allocation 0MiB
Unless you have specific requirements to alter this, it should be fine as is. When you are happy with the virtual disk allocation, you can get back to the xen-shell prompt and continue....
For this install we are assuming at least 20GB of space allocated to the first virtual disk /dev/xvda
Part 2. partitioning drives and obtaining the install files
Partitioning the drive
- type rescue
- log on as user with password given
- type sudo fdisk -l to check the drive of the virtual machine.
On mine it is /dev/xvda - type fdisk /dev/xvda
- then n for a new partition
- then p for a primary partition
- then 1 for the partition number
- accept the default start position, and the default end position.
- then a to toggle the boot status
- then 1 to select that partition
- Finally press w to write the changes and quit fdisk.
- type fdisk /dev/xvdb
- then n for a new partition
- then p for a primary partition
- then 1 for the partition number
- Accept the default start position and end position, then press t and then 1 and then 82 to set this as a swap partition
- Finally press w to write the changes and quit fdisk.
Now to format the new root partition as ext4 (or other FS as you wish)
sudo /usr/sbin/mkfs.ext4 -m 1 /dev/xvda1 -L root
Now to create a mount point
sudo mkdir -p /mnt/slackware
and to mount
sudo mount /dev/xvda1 /mnt/slackware
Lets also format and activate the swap partition we just created
sudo mkswap -L SWAP /dev/xvdb
Note that if you want to use any LVM partitions during the installation you will need to install the lvm2 system in the rescue environment:
sudo apt update sudo apt install lvm2
This will provide the necessary commands to create the phsical volumes, volume groups and logical volumes.
Setting up the file structure and getting the install files
Now to create a boot point and a location for the install files
sudo mkdir -p /mnt/slackware/{boot/grub,slackdisk}
sudo chown user /mnt/slackware/slackdisk
Now to download the slack files (this takes around 5 mins)
rsync -az --exclude source/ rsync.mirrorservice.org::ftp.slackware.com/pub/slackware/slackware64-15.0/ /mnt/slackware/slackdisk
(If you have over 20GB of storage then you can omit the --exclude 'source/' to include the source code as well. This will increase the space used from 2.5G to 6.1G at this point of the installation.
Installing the packages
When that is done we can do some more prep, and then install. If you did download the source, use
cp /mnt/slackware/slackdisk/source/a/pkgtools/scripts/installpkg /usr/local/sbin/
Otherwise the following three lines..
cd /usr/local/sbin sudo rsync -a rsync.mirrorservice.org::ftp.slackware.com/pub/slackware/slackware64-15.0/source/a/pkgtools/scripts/installpkg ./ sudo chmod 0755 installpkg
Now you can download your tagfiles, if you have any and unpack them into /mnt/slackware/slackdisk/ (ignore the benign tar warning)
cd /mnt/slackware/slackdisk sudo apt install wget wget https://www.example.com/slackware15.tagfiles.tar tar xvf slackware15.tagfiles.tar -C slackware64
Note: If you have less than 20GB and did download the source files you will have to do rm -r /mnt/slackware/slackdisk/source to delete the source files, otherwise you'll run out of space in the install.
We could also remove all unwanted kdei packages at this point for the same reason.
cd /mnt/slackware/slackdisk/slackware/kdei rm `ls|grep -v en_GB`
(change the en_GB to your locale)
If your virtual storage is only 10GB then we will need to delete the install packages when they have been installed to free space
- Option 1. limited storage space (<15G)
- This installs all the packages to the mount point, deleting the install packages as we go to free up space.
cd /mnt/slackware/slackdisk/slackware for i in `ls|grep "/"`; do installpkg --root /mnt/slackware/ /mnt/slackware/slackdisk/slackware/${i}*.t?z rm -r /mnt/slackware/slackdisk/slackware/$i done- (this will take some while. ignore the warning about tar >1.13 )
- Option 2. (15G or more storage)
- This just installs everything.
./installpkg --root /mnt/slackware/ /mnt/slackware/slackdisk/slackware/*/*.t?z
- (this will take some while. Ignore the warning about tar >1.13 )
The install uses about 8.5GB (assuming you choose option 1. )
Extra configuration
Because we are not using the slackware main setup installer, we will have to manually do a little bit of extra configuration.
Keymap for console access
All the keymappings can be found in /mnt/slackware/usr/share/kbd/keymaps and their subdirectories. For example, the uk one is found at /mnt/slackware/usr/share/kbd/keymaps/i386/qwerty/uk.map.gz For this example I'll use uk.map
sudo -s cat > /mnt/slackware/etc/rc.d/rc.keymap #!/bin/sh # Load the keyboard map. More maps are available under /usr/share/kbd/keymaps if [ -x /usr/bin/loadkeys ]; then /usr/bin/loadkeys uk.map fi ^D exit sudo chmod 0755 /mnt/slackware/etc/rc.d/rc.keymap
Set the timezone
To find the name and location of your timezone, look in /mnt/slackware/usr/share/zoneinfo/xxx/yyy where xxx is the region and yyy is the city. For the uk the location is /mnt/slackware/usr/share/zoneinfo/Europe/London.
To apply it we type
cd /mnt/slackware/etc sudo ln -s ../usr/share/zoneinfo/Europe/London localtime sudo rm localtime-copied-from
More to follow ...