Content-type: text/html
/sbin/silo [-r root_path] [-b secondary] [-i primary] [-C config-file] [-S backup-file] [-s backup-file] [-J flash-image ] [-p {0|2}] [-fFtuUvV]
SILO can be used to boot Linux, SunOS, and/or Solaris. It is a program that runs from the PROM on your SPARC machine and allows for loading of operating systems. It also has extended features like the ability to load Linux kernels arbitrarily from an ext2, ufs, romfs or iso9660 filesystem.
The PROM in the SPARC at boot time loads a bootblock from a boot device. This bootblock is quite short, so a full featured boot loader does not fit into it, especially since filesystems like ext2 reserve only 1024 bytes for it and the partition table itself takes 512 bytes. That's why SILO consists of a collection of first stage loaders which are just able to load a second stage loader which already understands all supported filesystems and handles the config file, input line editing and actual loading of operating systems.
The program /sbin/silo is used to install the first stage loader by copying the right first stage loader into the bootblock (unless the correct first stage is already installed and the -f option is not used to force it), writes the block number of the first block of the second stage loader (usually /boot/second.b) into it and into the second stage loader it records all the block numbers of second.b and the name and location of the configuration file. The configuration file itself is parsed by the boot loader at boot time. See silo.conf(5) for details.
This means that the /sbin/silo program must be run only if you install a new version of SILO or if you move the second stage loader on the disk. Unlike the LILO bootloader on the Intel platform, you don't have to rerun it every time you make a change into /etc/silo.conf or when you install new kernels.
/sbin/silo used to assist in creating SPARC bootable CDs, but this feature has been moved into the mkisofs(8) program and you only need to put SILO first and second stage loaders and the configuration on the CD before running it.
genromfs -d directory/ -f device -a 512 -A 2048,/..
mount -t romfs device mountpoint
silo -r mountpoint -i /boot/fd.b -F
umount mountpoint
dd if=/dev/zero of=flash.img bs=1k count=1
genromfs -a 512 -f romfs.img -d flash/
cat romfs.img >> flash.img
rm -f romfs.img
losetup /dev/loop0 -o 1024 flash.img
mount -t romfs -o ro /dev/loop0 /mnt
silo -J flash.img -i /boot/ieee32.b -r /mnt
umount /mnt
losetup -d /dev/loop0
jsflash flash.img
At the prompt, you can enter the label or alias of some image present in the config file, plus additional arguments you want to give it and SILO will boot such image, give it all the arguments specified in the config and all the arguments you gave on the command line. Entering an empty line will cause the default image to be loaded. Examples:
boot: linux
boot: linux.old init=/bin/sh
The arguments you pass on the line after the name of the image to be loaded are basically kernel arguments which are normally specified in the append variable in silo.conf(5). In addition to that, several special arguments are handled by SILO internally and are not passed to the kernel. These include initrd, initrd-size=number, initrd-prompt, pause-after and show-arguments. show-arguments causes the arguments which will be passed to the kernel to be printed on the screen before the kernel is loaded, the other options ressemble flags and string variables of the same names from silo.conf(5).
You can also enter one of the special keywords, halt or help. halt causes SILO to return PROM, help prints some short incomplete help message.
If you want to load some image or other operating system not mentioned in the config file (or if the config file could not be loaded because it has not been found or had syntax errors in it - SILO will print a message about this in such a case), you can load arbitrary image from any local ext2, ufs, romfs or iso9660 filesystem and give it arbitrary arguments. SILO will handle transparent decompression of gzipped images. You type in the fully qualified SILO file name or partition name and arguments. For the syntax of the fully qualified SILO file names and partition names see silo.conf(5). Examples:
boot: /pci@1f,4000/ide/ata@0,0/cmdk@0,0;4/boot/vmlinux.new root=/dev/hda4
boot: 2/boot/vmlinux initrd=/boot/initrd.img
boot: sd(0,2,0)2/boot/vmlinux.gz root=/dev/sdc2 init=/bin/sh ro
If there are single-key images in the config file, then they will be loaded as soon as you press that key at the beginning of the input line. If you want to give them arguments or load a different image which starts with that letter, you can type a space at the beginning of the input line so that the image is not autostarted.
You can also view short files and see directory listings. Details are listed in silo.conf(5), here just a few examples:
boot: cat /etc/silo.conf
boot: cat /sbus/espdma@1,280000/esp/sd@2,0;5/etc/inittab
boot: ls -lt /lib/modules/
boot: ls /pci@1f,4000/ide/ata@0,0/cmdk@0,0;2/lib/
SILO operation can be password protected in two different ways (in addition to no password protection at all). Either a password will be required to load any image, or password will be required to load any image not mentioned in silo.conf or if the user gives some arguments to some image mentioned there.