(Navigator)
1.* Photos * | 2.Best/Pano/Minis | 3.My Adventures | 4.Travels | 5.Questions/Answers | 6.Prog | 7.Maps | 8.Cool
(Programming)
1.Unix | 2.* Perl * | 3.PHP | 4.ASP.NET | 5.ASP | 6.Visual C++ | 7.Visual Basic | 8.JavaScript | 9.HTML | 10.CSS |
11.CGI, bin and Perl | 12.Cygwin | 13.Linux | 14.mySQL | 15.Python | 16.robertbody C++ & *.BAT |
17.Unix Notes (live) | 18.Perl Notes (live)

Linux

1.Setup | 2.Lilo | 3.Pingus
Lilo
LILO is a Linux Boot Loader. It loads Linux kernel from a hard drive or CDROM/floppy. Depending on the BIOS of the hard drive, it can also boot beyond cylinder 1024 (beyond 8.5GB). LILO is able to boot other operating systems such as Windows XP.
Lilo (Linux) booting Windows XP
The following is boot setup for my 2 SATA hard drives - Windows XP Hibernate is ok too  
  Linux
  Windows XP

The strangest thing happened -- This never worked for Windows XP, I was researching grub 
(another boot loader) and then once it worked, so I adjusted lilo and... it stopped working.
What I figured out was this: To make it work, I have to make sure the Windows XP hard disk
is in bootable order before the Linux hard disk, and that's when I get the complaint
      Warning: /dev/sda1 is not on the first disk
It is a warning that Lilo is not on a hard disk that is booted first.
Of course I have to rearrange the order of hard diskst in BIOS, or else Lilo would be bypassed,
because the Windows XP hard disk would boot.

It does not make sense, but if i have the hard disks in "right" order while setting up lilo,
Windows XP WILL NOT BOOT from the Lilo menu.
/etc> fdisk -l
Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1216     9767488+  83  Linux
/dev/sda2            1217        1338      979965   82  Linux swap
/dev/sda3            1339       24792   188394255    c  W95 FAT32 (LBA)

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *         594       24321   190595160    7  HPFS/NTFS
/dev/sdb2               1         593     4763241    b  W95 FAT32

Partition table entries are not in disk order
/etc> cat lilo.conf
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda1
message = /boot/boot_message.txt
prompt
timeout = 300

# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 1024x768x64k
vga = 791

# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda1
  label = Linux
  read-only

# Windows bootable partition config begins
other = /dev/sdb1
  label = Windows_XP
#  table = /dev/sdb

/etc> lilo
Warning: /dev/sda1 is not on the first disk
Added Linux *
Added Windows_XP

Windows XP booting Linux
I also setup the following (booting Linux from XP, but this is useless to me
(most of the time) since I prefer to leave Windows XP with Hibernate and next 
time XP would never show the bootup menu, it would just straight recover from Hibernate)

The advantage of exiting Windows XP via Hibernate is leaving things just as they were,
and returning to everything opened up already.
# XP booting linux (save first 512 bytes from boot sector of Linux drive, write to boot.lnx)
/root> dd if=/dev/sda1 of=boot.lnx bs=512 count=1
1+0 records in
1+0 records out

rem Bring the file over to Windows XP (save to a mounted Fat-32 partition or floppy)
C:\type boot.ini
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP Media Center Edition" /noexecute=optin /fastdetect
c:\robert\lilo\boot.lnx="Linux Slackware"
Counter:
Last Updated: Wed, December 7, 2005 23:58