Installing Slackware: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<h2>How to install Slackware on Bitfolk VPS</h2> | |||
How to install Slackware on Bitfolk VPS | |||
<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> | <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> | ||
| Line 6: | Line 5: | ||
<h4>Setup Partitions</h4> | <h4>Setup Partitions</h4> | ||
<pre style="background-color: #000000; color: #FFFFFF"; | |||
SSH into a xen console using: | SSH into a xen console using: | ||
ssh [USERNAME]@[USERNAME].console.bitfolk.com | ssh [USERNAME]@[USERNAME].console.bitfolk.com | ||
type: rescue and then login. | type: rescue and then login. | ||
# sudo su | # sudo su | ||
# apt-get install lvm2 | # apt-get install lvm2 | ||
# fdisk /dev/xvda | # fdisk /dev/xvda | ||
</pre> | |||
Create Boot Partition: | Create Boot Partition: | ||
| Line 59: | Line 54: | ||
====Create Boot EXT3 Filesystem==== | |||
mkfs -t ext3 /dev/xvda1 | mkfs -t ext3 /dev/xvda1 | ||
Revision as of 19:40, 10 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
<pre style="background-color: #000000; color: #FFFFFF"; 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
Network Settings
Edit this file with your VPS network settings
vim /etc/rc.d/rc.inet1.conf
- Config information for eth0:
IPADDR[0]="X.X.X.X" NETMASK[0]="X.X.X.X" USE_DHCP[0]="" DHCP_HOSTNAME[0]=""
- Config information for eth1:
IPADDR[1]="" NETMASK[1]="" USE_DHCP[1]="" DHCP_HOSTNAME[1]=""
- Config information for eth2:
IPADDR[2]="" NETMASK[2]="" USE_DHCP[2]="" DHCP_HOSTNAME[2]=""
- Config information for eth3:
IPADDR[3]="" NETMASK[3]="" USE_DHCP[3]="" DHCP_HOSTNAME[3]=""
- Default VPS gateway IP address:
GATEWAY="X.X.X.X"
DEBUG_ETH_UP="no"
Edit this file with your VPS
DNS settings
vim /etc/resolv.conf
BOOT YOUR VPS AND PRAY! :P