service partition
target audience
People with older boxen without CDROM and want to avoid the three or four floppy boot sequence.
contents
overview
An alternate boot method for those systems without the option of booting from CDROM. A separate service partition is setup using files from the slackware install CDROM. Includes the PCMCIA and network boot options allowing for re-install main OS via NFS network based install as well as local hard drive install source.
As a service option it allows one to perform tasks such as repartitioning and/or adding labels to partitions for new kernel options. I used it for repartitioning firewall box, keeping the box 'on-air' for most of the process -- using the service boot option to copy /var and / partitions and transfer control to them which must be performed on a 'dead' OS.
requirements
You need a network connection to the target machine in order to transfer the files. This discussion assumes you already installed slackware the 'hard way' using a floppy boot and you wish to avoid the floppy boot sequence next time.
This discussion uses /dev/hda1 for the service boot partition. Slackware 13.0 is the OS. The source files come from the first install CDROM, or via the local hard disk or NFS mounted /home/mirror/slackware-13.0, adjust target drive, partition and file source to suit your setup.
the result, updated for Slackware-13.0
~# tree /home/service/ /home/service/ |-- boot | |-- boot.0301 | |-- bzImage | |-- initrd.img | `-- map |-- dev |-- etc | `-- lilo.conf |-- mnt |-- proc `-- tmp 6 directories, 5 files
the method
- build empty tree
- format and mount the service partition to
/home/service
~# mkreiserfs /dev/hda1 ~# mkdir /home/service ~# mount /dev/hda1 /home/service ~# mkdir /home/service/{boot,dev,etc,mnt,proc,tmp} - grab a kernel
~# cp /home/mirror/slackware-13.0/kernels/huge.s/bzImage /home/service/boot/
- grab the initrd
~# cp /home/mirror/slackware-13.0/isolinux/initrd.img /home/service/boot/
- write a lilo.conf
~# vim /home/service/etc/lilo.conf ~# cat /home/service/etc/lilo.conf # /etc/lilo.conf for service boot on /dev/hda1 -- 2009-10-04 # boot = /dev/hda1 root = /dev/hda1 read-only # load initrd above the 15M memory hole large-memory # faster kernel loading compact image = /boot/bzImage label = service initrd = /boot/initrd.img #
- install the service boot kernel
~# mount --bind /dev /home/service/dev ~# lilo -r /home/service/ Warning: Partition 1 on /dev/hda is not marked Active. Added service * ~# umount /home/service/dev ## Important! ~# umount /home/service/
- append 'service' boot option to main /etc/lilo.conf
other = /dev/hda1 label = service
- run main lilo to link the service boot partition
~# lilo Added 2.6.31.1a Added 2.6.30.8a Added 2.6.27.35a * Added slack-2.4.33.3 Added service Added alt
- reboot and test
- Please report any technical bludners :o)
example
recap procedure
- check target partition is available
- clear, format and mount target partition
- create target directories
- mount source and copy files to target
- write target /etc/lilo.conf
- mount /dev to target
- run lilo on target
- unmount target /dev
- edit main /etc/lilo.conf, run lilo
example paths
The target service partition is /dev/hda1 and the install source is NFS mounted on /home/mirror/slackware-11.0. Adjust these from the example below to suit your own setup.
example run
root@deltree:~# [ -d /home/service/ ] || mkdir /home/service/
root@deltree:~# dd if=/dev/zero bs=4k of=/dev/hda1
dd: writing `/dev/hda1': No space left on device
64253+0 records in
64252+0 records out
263176704 bytes (263 MB) copied, 8.57175 seconds, 30.7 MB/s
root@deltree:~# mkreiserfs /dev/hda1
mkreiserfs 3.6.19 (2003 www.namesys.com)
[...]
ReiserFS is successfully created on /dev/hda1.
root@deltree:~# mount /dev/hda1 /home/service/
root@deltree:~# mkdir /home/service/{boot,dev,etc,mnt,proc,tmp}
root@deltree:~# cp /home/mirror/slackware-13.0/kernels/huge.s/bzImage /home/service/boot/
root@deltree:~# cp /home/mirror/slackware-13.0/isolinux/initrd.img /home/service/boot/
root@deltree:~# vim /home/service/etc/lilo.conf
root@deltree:~# cat /home/service/etc/lilo.conf
# /etc/lilo.conf for service boot on /dev/hda1 -- 2009-10-04
#
boot = /dev/hda1
root = /dev/hda1
read-only
# load initrd above the 15M memory hole
large-memory
# faster kernel loading
compact
image = /boot/bzImage
label = service
initrd = /boot/initrd.img
#
root@deltree:~# mount --bind /dev /home/service/dev
root@deltree:~# lilo -r /home/service/
Warning: Partition 1 on /dev/hda is not marked Active.
Added service *
root@deltree:~# umount /home/service/dev
root@deltree:~# umount /home/service/
root@deltree:~# vim /etc/lilo.conf
root@deltree:~# lilo
Added 2.6.31.1a
Added 2.6.30.8a
Added 2.6.27.35a *
Added slack-2.4.33.3
Added service
Added alt
credits
Based on a method reported by Ray to newsgroup alt.os.linux.slackware and followup posts.