Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [24]

By Root 2688 0
you rerun lilo.

LILO multiboot configuration


To configure a multiboot system that uses LILO in the MBR (e.g., Linux with Windows 98), begin with the standard LILO configuration as outlined on page 18. You can then go back and add entries for the other operating systems to /etc/lilo.conf.

Here’s the lilo.conf entry you need to boot Windows from the first partition of your first IDE disk:

other = /dev/hda1

label = windows

table = /dev/hda

A complete lilo.conf file that boots Windows from partition 1, Linux from partition 2, and FreeBSD from partition 3 would look something like this:

boot = /dev/hda # install on the MBR of 1st IDE drive

delay = 20 # Wait 2 sec. for user's boot choice

default = linux # If no input, boot linux from 2nd partition

image = /boot/vmlinuz-2.3.41

root = /dev/hda2

label = linux

read-only

other = /dev/hda1 # boot from 1st partition

label = windows

table = /dev/hda

other = /dev/hda3 # boot from 3rd partition

label = freebsd

table = /dev/hda

You’ll need to rerun lilo after putting these entries into lilo.conf. Remember to run lilo -t first to test the config file.

FreeBSD multiboot configuration


FreeBSD’s boot loader automatically tries to detect bootable partitions. However, you can also declare the bootable partitions explicitly with boot0cfg’s -m mask option. The mask should be a bitmask of the partitions you would like to be able to boot from. The first partition is represented by binary 0001 (hex 0x1), the second partition is binary 0010 (0x2), and so on. For example, the command

# boot0cfg -B -m 0x7

installs a new first-stage boot loader and tells it that partitions 1, 2, and 3 are bootable (binary 0111 = hex 0x7). When the system starts up, the boot menu will include at least three options, one for each bootable partition you specified.

2.3 BOOTING IN SINGLE-USER MODE


The following sections give the nitty-gritty details of single-user booting on each of our example operating systems.

Solaris single-user mode


To interrupt the boot procedure and enter the boot PROM on Sun hardware, press the L1 and ‘a’ keys simultaneously. L1 is sometimes labeled STOP on modern Sun keyboards. From the boot PROM, you can type boot -s to boot to single-user mode.

To boot an alternate kernel under Solaris, you usually have to type the full Solaris name of the device and the file. The Solaris device name is the long, bizarre string of characters you see when you do an ls -l on the /dev file:

% ls -l /dev/rdsk/c0t0d0s0

lrwxrwxrwx 1 root root 55 Jan 15 1998 /dev/rdsk/c0t0d0s0 ->

../../devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a,raw

To boot the kernel stored as /kernel/backup on this disk, you’d need to enter the following command at the boot PROM monitor:

boot /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a,raw/kernel/backup

Table 2.1 lists some of the more useful commands you can enter from Sun’s boot PROM and a brief description of their functions.

Table 2.1 Boot PROM commands on Sun hardware

HP-UX single-user mode


The procedure for booting single-user on an HP-UX machine seems to depend on the exact type of machine. The following example is from an HP 9000/735.

First, interrupt the boot process when prompted to do so. You’ll receive a prompt. At that prompt, type boot pri isl to get to a smarter prompt that will let you boot single-user. This prompt should look something like this:

ISL> prompt:

The following command selects a kernel and boots the system into single-user mode:

ISL> prompt: hpux -iS /stand/vmunix

Linux single-user mode


You’ll usually enter Linux’s single-user mode through LILO. At the LILO prompt, enter the label of the configuration you want to boot (as specified in lilo.conf), followed by -s or single. For example, the default configuration shipped with Red Hat is called “linux”, so to boot that configuration into single-user mode, you’d use

LILO: linux single

LILO accepts a variety of other command-line options; Table 2.2 shows examples.

Table 2.2 Examples of LILO’s boot time options

Return Main Page Previous Page Next Page

®Online Book Reader