Installing Slackware: Difference between revisions
(Created page with "<b><h2>How to install Slackware on Bitfolk VPS</h2></b>") |
No edit summary |
||
| Line 1: | Line 1: | ||
<b><h2>How to install Slackware on Bitfolk VPS</h2></b> | <b><h2>How to install Slackware on Bitfolk VPS</h2></b> | ||
<p>This guide will show you how to get Slackware running on a Bitfolk VPS. You will not notice any performance benefits running 64-bit Slackware so I will be installing Slackware-13.37 32-bit with LVM. This guide is based on a VPS with 512MB of RAM and 10GB Disk Space, your settings might vary.</p> | |||
<h4>Setup Partitions</h4> | |||
SSH into a xen console using: | |||
ssh [USERNAME]@[USERNAME].console.bitfolk.com | |||
type: rescue and then login. | |||
sudo su | |||
apt-get install lvm2 | |||
fdisk /dev/xvda | |||
Create Boot Partition: | |||
Command (m for help): n | |||
p primary partition (1-4) | |||
Partition number (1-4, default 1): 1 | |||
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519): +100M | |||
Create LVM Parition: | |||
Command (m for help): n | |||
Partition number (1-4, default 2): 2 | |||
OK everything after that to use remain space! | |||
Command (m for help): t | |||
Partition number (1-4): 2 | |||
Hex code (type L to list codes): 8e | |||
Your partitions should look something like this: | |||
Command (m for help): p | |||
Device Boot Start End Blocks Id System | |||
/dev/xvda1 1 13 104391 83 Linux | |||
/dev/xvda2 14 1305 10377990 8e Linux LVM | |||
Save and Quit | |||
Command (m for help): w | |||
<h4>Create Boot EXT3 Filesystem</h4> | |||
mkfs -t ext3 /dev/xvda1 | |||
e2fsck -f /dev/xvda1 | |||
<h4>Create LVM Volumes & EXT3 File System</h4> | |||
pvcreate /dev/xvda2 | |||
vgcreate slackware /dev/xvda2 | |||
lvcreate -L6G -nroot slackware | |||
lvcreate -L2G -nhome slackware | |||
lvcreate -L2G -nvar slackware | |||
mkfs -t ext3 /dev/slackware/root | |||
mkfs -t ext3 /dev/slackware/home | |||
mkfs -t ext3 /dev/slackware/var | |||
e2fsck -f /dev/slackware/root | |||
e2fsck -f /dev/slackware/home | |||
e2fsck -f /dev/slackware/var | |||
<h4>Mount</h4> | |||
mkdir /mnt/slackware | |||
mount /dev/slackware/root /mnt/slackware | |||
mount /dev/slackware/home /mnt/slackware/home | |||
mount /dev/slackware/var /mnt/slackware/var | |||
mount /dev/xvda1 /mnt/slackware/boot | |||
mount -o bind /proc /mnt/slackware/proc/ | |||
mount -o bind /dev /mnt/slackware/dev/ | |||
mount -o bind /sys/ /mnt/slackware/sys/ | |||
<h4>Install Slackware</h4> | |||
lftp -e 'mirror /slackware/slackware-13.37/slackware/a /mnt/slackware/tmp/a' slackware.org.uk | |||
lftp -e 'mirror /slackware/slackware-13.37/slackware/ap /mnt/slackware/tmp/ap' slackware.org.uk | |||
lftp -e 'mirror /slackware/slackware-13.37/slackware/d /mnt/slackware/tmp/d' slackware.org.uk | |||
lftp -e 'mirror /slackware/slackware-13.37/slackware/l /mnt/slackware/tmp/l' slackware.org.uk | |||
lftp -e 'mirror /slackware/slackware-13.37/slackware/n /mnt/slackware/tmp/n' slackware.org.uk | |||
lftp -e 'mirror /slackware/slackware-13.37/slackware/x /mnt/slackware/tmp/x' slackware.org.uk | |||
cd /usr/local/sbin | |||
wget 'ftp://ftp.slackware.org.uk/slackware/slackware-13.37/source/a/pkgtools/scripts/installpkg' | |||
chmod +x installpkg | |||
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/a/*.t?z | |||
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/ap/*.t?z | |||
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/d/*.t?z | |||
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/l/*.t?z | |||
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/n/*.t?z | |||
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/x/*.t?z | |||
<h4>CHROOT</h4> | |||
cd /mnt/slackware | |||
chroot . | |||
<h4> Compile Kernel</h4> | |||
cd /usr/src | |||
wget 'ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.6.tar.gz' | |||
gunzip *.gz | |||
tar xvf *.tar | |||
make menuconfig | |||
1) If building 32 bit kernel make sure you have CONFIG_X86_PAE enabled (which is set by selecting CONFIG_HIGHMEM64G) | |||
2) non-PAE mode doesn't work in 2.6.25, and has been dropped altogether from 2.6.26 and newer kernel versions. Enable these core options (Processor type and features| Paravirtualized guest support] | |||
3) Xen's bzImage loaded can only handle compressed gzip, not compressed LZMA | |||
Paste this at end of .config | |||
CONFIG_PARAVIRT=y | |||
CONFIG_XEN=y | |||
CONFIG_PARAVIRT_GUEST=y | |||
CONFIG_PARAVIRT_SPINLOCKS=y | |||
CONFIG_HVC_DRIVER=y | |||
CONFIG_HVC_XEN=y | |||
CONFIG_XEN_FBDEV_FRONTEND=y | |||
CONFIG_XEN_BLKDEV_FRONTEND=y | |||
CONFIG_XEN_NETDEV_FRONTEND=y | |||
CONFIG_XEN_PCIDEV_FRONTEND=y | |||
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y | |||
CONFIG_XEN_FBDEV_FRONTEND=y | |||
CONFIG_XEN_XENBUS_FRONTEND=y | |||
CONFIG_XEN_SAVE_RESTORE=y | |||
CONFIG_XEN_GRANT_DEV_ALLOC=m | |||
CONFIG_XEN_TMEM=y | |||
CONFIG_CLEANCACHE=y | |||
CONFIG_FRONTSWAP=y | |||
CONFIG_XEN_SELFBALLOONING=y | |||
make all -j2 | |||
make modules_install -j2 | |||
cp arch/x86/boot/bzImage /boot/ | |||
cp .config /boot/config | |||
cp -a System.map /boot/ | |||
<h4>Grub</h4> | |||
cd /boot | |||
mkdir grub | |||
vim grub/menu.lst | |||
default 0 | |||
timeout 2 | |||
title Slackware 13.37 | |||
root (hd0,1) | |||
kernel /boot/bzImage root=/dev/mapper/slackware-root ro | |||
initrd /boot/initrd.img | |||
<h4>INITRD</h4> | |||
mkinitrd -k 2.6.37.6 -f ext3 -r /dev/slackware/root -m ehci-hcd:uhci-hcd:jbd2:mbcache:ext3 -L -R -u -o /boot/initrd.img | |||
<h4>FSTAB</h4> | |||
/etc/fstab | |||
/dev/xvda1 /boot ext3 noatime,nodiratime,errors=remount-ro,barrier=0 0 1 | |||
/dev/system/root / ext3 noatime,nodiratime,errors=remount-ro,barrier=0 0 1 | |||
/dev/system/home /home ext3 noatime,nodiratime,errors=remount-ro,barrier=0,usrquota 0 1 | |||
/dev/system/var /var ext3 noatime,nodiratime,errors=remount-ro,barrier=0 0 1 | |||
LABEL=linux-swap none swap barrier=0,sw 0 0 | |||
devpts /dev/pts devpts barrier=0,gid=5,mode=620 0 0 | |||
proc /proc proc barrier=0,defaults 0 0 | |||
<h4>Network Settings</h4> | |||
Revision as of 20:41, 9 July 2012
How to install Slackware on Bitfolk VPS
This guide will show you how to get Slackware running on a Bitfolk VPS. You will not notice any performance benefits running 64-bit Slackware so I will be installing Slackware-13.37 32-bit with LVM. This guide is based on a VPS with 512MB of RAM and 10GB Disk Space, your settings might vary.
Setup Partitions
SSH into a xen console using:
ssh [USERNAME]@[USERNAME].console.bitfolk.com
type: rescue and then login.
sudo su
apt-get install lvm2
fdisk /dev/xvda
Create Boot Partition:
Command (m for help): n
p primary partition (1-4)
Partition number (1-4, default 1): 1
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519): +100M
Create LVM Parition:
Command (m for help): n
Partition number (1-4, default 2): 2
OK everything after that to use remain space!
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 8e
Your partitions should look something like this:
Command (m for help): p
Device Boot Start End Blocks Id System
/dev/xvda1 1 13 104391 83 Linux
/dev/xvda2 14 1305 10377990 8e Linux LVM
Save and Quit
Command (m for help): w
Create Boot EXT3 Filesystem
mkfs -t ext3 /dev/xvda1
e2fsck -f /dev/xvda1
Create LVM Volumes & EXT3 File System
pvcreate /dev/xvda2
vgcreate slackware /dev/xvda2
lvcreate -L6G -nroot slackware
lvcreate -L2G -nhome slackware
lvcreate -L2G -nvar slackware
mkfs -t ext3 /dev/slackware/root
mkfs -t ext3 /dev/slackware/home
mkfs -t ext3 /dev/slackware/var
e2fsck -f /dev/slackware/root
e2fsck -f /dev/slackware/home
e2fsck -f /dev/slackware/var
Mount
mkdir /mnt/slackware
mount /dev/slackware/root /mnt/slackware
mount /dev/slackware/home /mnt/slackware/home
mount /dev/slackware/var /mnt/slackware/var
mount /dev/xvda1 /mnt/slackware/boot
mount -o bind /proc /mnt/slackware/proc/
mount -o bind /dev /mnt/slackware/dev/
mount -o bind /sys/ /mnt/slackware/sys/
Install Slackware
lftp -e 'mirror /slackware/slackware-13.37/slackware/a /mnt/slackware/tmp/a' slackware.org.uk
lftp -e 'mirror /slackware/slackware-13.37/slackware/ap /mnt/slackware/tmp/ap' slackware.org.uk
lftp -e 'mirror /slackware/slackware-13.37/slackware/d /mnt/slackware/tmp/d' slackware.org.uk
lftp -e 'mirror /slackware/slackware-13.37/slackware/l /mnt/slackware/tmp/l' slackware.org.uk
lftp -e 'mirror /slackware/slackware-13.37/slackware/n /mnt/slackware/tmp/n' slackware.org.uk
lftp -e 'mirror /slackware/slackware-13.37/slackware/x /mnt/slackware/tmp/x' slackware.org.uk
cd /usr/local/sbin
wget 'ftp://ftp.slackware.org.uk/slackware/slackware-13.37/source/a/pkgtools/scripts/installpkg'
chmod +x installpkg
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/a/*.t?z
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/ap/*.t?z
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/d/*.t?z
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/l/*.t?z
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/n/*.t?z
installpkg --root /mnt/slackware/ /mnt/slackware/tmp/x/*.t?z
CHROOT
cd /mnt/slackware
chroot .
Compile Kernel
cd /usr/src
wget 'ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.6.tar.gz'
gunzip *.gz
tar xvf *.tar
make menuconfig
1) If building 32 bit kernel make sure you have CONFIG_X86_PAE enabled (which is set by selecting CONFIG_HIGHMEM64G)
2) non-PAE mode doesn't work in 2.6.25, and has been dropped altogether from 2.6.26 and newer kernel versions. Enable these core options (Processor type and features| Paravirtualized guest support]
3) Xen's bzImage loaded can only handle compressed gzip, not compressed LZMA
Paste this at end of .config
CONFIG_PARAVIRT=y CONFIG_XEN=y CONFIG_PARAVIRT_GUEST=y CONFIG_PARAVIRT_SPINLOCKS=y CONFIG_HVC_DRIVER=y CONFIG_HVC_XEN=y CONFIG_XEN_FBDEV_FRONTEND=y CONFIG_XEN_BLKDEV_FRONTEND=y CONFIG_XEN_NETDEV_FRONTEND=y CONFIG_XEN_PCIDEV_FRONTEND=y CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y CONFIG_XEN_FBDEV_FRONTEND=y CONFIG_XEN_XENBUS_FRONTEND=y CONFIG_XEN_SAVE_RESTORE=y CONFIG_XEN_GRANT_DEV_ALLOC=m CONFIG_XEN_TMEM=y CONFIG_CLEANCACHE=y CONFIG_FRONTSWAP=y CONFIG_XEN_SELFBALLOONING=y
make all -j2
make modules_install -j2
cp arch/x86/boot/bzImage /boot/
cp .config /boot/config
cp -a System.map /boot/
Grub
cd /boot
mkdir grub
vim grub/menu.lst
default 0
timeout 2
title Slackware 13.37
root (hd0,1)
kernel /boot/bzImage root=/dev/mapper/slackware-root ro
initrd /boot/initrd.img
INITRD
mkinitrd -k 2.6.37.6 -f ext3 -r /dev/slackware/root -m ehci-hcd:uhci-hcd:jbd2:mbcache:ext3 -L -R -u -o /boot/initrd.img
FSTAB
/etc/fstab
/dev/xvda1 /boot ext3 noatime,nodiratime,errors=remount-ro,barrier=0 0 1
/dev/system/root / ext3 noatime,nodiratime,errors=remount-ro,barrier=0 0 1
/dev/system/home /home ext3 noatime,nodiratime,errors=remount-ro,barrier=0,usrquota 0 1
/dev/system/var /var ext3 noatime,nodiratime,errors=remount-ro,barrier=0 0 1
LABEL=linux-swap none swap barrier=0,sw 0 0
devpts /dev/pts devpts barrier=0,gid=5,mode=620 0 0
proc /proc proc barrier=0,defaults 0 0