home / linux / llilo (navigation links)

After you modify /etc/lilo.conf, run /sbin/lilo !

w2k | lcp90 Links | End | mapa

Lilo (Linux loader)

go 2 top

The boot= directive in /etc/lilo.conf tells Lilo where it should place its primary boot loader. [knoppix]: Specifies the boot device. This is where Lilo installs its boot block.

In general, you can either specify

Para detectar un sistema operativo, Partition Magic comprueba

Warning : to make an operating system installed on a non-first disk visible for Boot Magic, write the boot loader onto a partition (hdc1, hdc2, etc) and not onto the MBR (hdc).

MBR size and contents

When the computer is powered on, a mechanism is required to manipulate interrupts, find the hard disk(s), and launch code necessary to load drivers located on the boot drive.

The MBR of a hard disk resides at the first physical sector of the disk : track 0, side 0, sector 1.

An MBR has 3 parts:

  1. (000000 - 0001BD) The boot code which is 446 bytes long
  2. (0001BE - 0001FD) The partition table which is 64 bytes long
  3. (0001FE - 0001FF) The boot code signature of 55aa which is 2 bytes long

url

So, just for fun, let's


Read uSoft about MBR and partition signature != 55AA. Solution = FDISK /MBR.


Bootsector

The Boot Sector is the first sector of every logical drive, and contains a table of that drive's characteristics, and the code that boots the o.s.

The structure of the Bootsector ( from HELPPC 2.x by David Jurgens )



 
Offset Size (bytes) Description ---------------------------------------------------------------------------- 00h 03 jump to executable code (E9h 3Bh 7Bh) 03h 08 OEM name and version (if wanted) 0Bh 02 bytes per sector 0Dh 01 sectors per cluster (allocation unit size) 0Eh 02 number of reserved sectors (starting at 0) 10h 01 number of FAT's on disk 11h 02 number of root directory entries (directory size) 13h 02 number of total sectors (0 if partition > 32Mb) 15h 01 media descriptor byte (see MEDIA DESCRIPTOR) 16h 02 sectors per FAT 18h 02 (DOS 3+) sectors per track 1Ah 02 (DOS 3+) number of heads 1Ch 02 (DOS 3+) number of hidden sectors 20h 04 (DOS 4+) number of sectors if offset 13h was 00h 24h 01 (DOS 4+) physical drive number 25h 01 (DOS 4+) reserved 26h 01 (DOS 4+) signature byte (29h) 27h 02 (DOS 4+) volume serial number 2Bh 11 (DOS 4+) volume label 36h 08 (DOS 4+) reserved 3Eh-1FDh Bootstrap loader (< 445 bytes) - code + load kernel (COMMAND.COM) 1BEh-1FDh Partition table (only the primary partitions) 1FEh 02 bootsector identifier (AA55h)
To display an existing one (under Linux), you can use "fdisk /dev/hda" plus "x" plus "d"

The values displayed by Partition Info are :


 
1. Jump EB5980 15. Big Sectors per FAT 2025 2. OEM Name MSWIN4.1 16. Extended Flags 0000 3. Bytes per Sector 512 17. FS Version 0000 4. Sectors per Cluster 8 18. First Cluster of Root 3387 5. Reserved Sectors 32 19. FS Info Sector 1 6. Number of FATs 2 20. Backup Boot Sector 6 7. Reserved 0000 21. Reserved 000000000000000000000000 8. Reserved 0000 22. Drive ID 80 9. Media Descriptor F8 23. Reserved for NT 00 10. Sectors per FAT 0 24. Extended Boot Sig 29 11. Sectors per Track 63 25. Serial Number 37B9C73D 12. Number of Heads 240 26. Volume Name C_DRIVE 13. Hidden Sectors 63 27. File System ID FAT32 14. Big Total Sectors 2101617 28. Signature AA55

Linux + W2000

LILO

So, the /etc/lilo.conf looks like this :
     boot=/dev/hda
     timeout=50
     prompt
         default=linux
         vga=normal
         read-only
     image=/boot/vmlinuz-2.2.12-20
         label=linux
         root=/dev/hda3
     other=/dev/hda1
         label=nt

BOOT.INI

If lilo was installed to hda5, ( use tomsrtbt plus fdisk plus df ) then

own /etc/lilo.conf

Here's all the lilo.conf I have :


lilo -q -v -v


sfdisk -l


LILO problems

See LILO boot error codes

"LIL-", Oct 2002

Sudenly, 4-th October 2002, my SuSE went down : "LIL-" at boot. Here's what I did :
Solution : run /sbin/lilo

How to remove LILO

From here


GRUB Howto

Here's a quick guide to configuring Grub :

Before installing GRUB, you need to know how GRUB understands your hard drive and partition information.
First and most of all, counting starts from 0, not from 1.
In Linux, your first hard drive attached to the primary master controller is called "hda". In GRUB it becomes "hd0". Likewise, your first floppy drive in GRUB is "fd0". So the first, second and third partitions on the first hard disk (hda1, hda2 and hda3), become "hd0,0", "hd0,1" and "hd0,2" in GRUB.
NOTE: the comma is an integral part of GRUB partition nomenclature.
To integrate the two fields (disk drive number and partition number) around the comma into one, use parentheses.
For example: (hd0,0) (hd0,1) (hd0,2) and so on. (hd0,0) is first partition on first hard disk. Similarly, (hd1,5) is the sixth partition on second hard disk and (hd2,0) is first partition on third hard disk.
This said we can go into the gory bits ... Configuration
GRUB provides a menu-based interface that you can use. By default GRUB will install into /boot/grub and the configuration file will also reside there. The default configuration file is menu.lst. This is the GRUB equivalent of lilo.conf. This is the file where you define the various boot options, boot images etc.
Here is a sample menu.lst

 timeout 10
 default 0

 title MyLinux v1.0
 root (hd0,5)
 kernel /vmlinuz root=/dev/hda6 ro
 initrd /boot/initrd.gz

 title Windows
 rootnoverify (hd0,0)
 makeactive
 chainloader +1
OK, lets go through the file line by line:
timeout: the delay in seconds before the default entry is booted.
default: default entry that will be booted. Here the first entry, remember, start counting from 0 and not 1.
For each entry: title: name for the entry.
For Linux/Unix: root: partition where the OS is installed, named the 'grub' way.
kernel: point to the kernel to be loaded adding the root device the 'linux' way (/dev/hdax) and the read-only option (ro). This is much line the option you can pass at the lilo prompt.
initrd: point to the initrd file if you need one. Usually need for machine with scsi devices.
For Windows: rootnoverify: same as root above but to be used for Windows.
makeactive: activate the partition to be bootable, this is because we are chainloading Windows.
chainloader: chainload Windows, and tell the grub to read 1 sector from the start of the partition where Windows resides.
All right, there are more options to grub, check 'info grub' but here are the ones you might meet:
color: used to colorise the grub menu, for example: color black/yellow yellow/black. The first entry is the foreground and background for each menu entry, the second is for the highlighted entry.
password: this is to restrict access to your box, for example: password linuxrox
splashimage: this is to set a background picture to the grub menu, for example: splashimage=(hd0,0)/grub/splash.xpm.gz
Once you have made the changes that were need in menu.lst you need to copy that to the MBR. Use
 grub-install /dev/hda
or whichever /dev/hdx you want it to go to. Once this done, you can reboot and see the results of your change.
Good Luck!

grub-install --recheck recommended !

Truc

One simply puts the following in /etc/lilo.conf: serial=0,38400n ... image=/boot/vmlinuz-2.4.18-6mdk label=linux2418 root=/dev/hda1 append=" devfs=mount console=ttyS0,38400 console=tty0" read-only The console then appears on both `COM1' and on the VGA screen. In this situation, the machines may be located in another room, connected to a console server. One logins from one's (quiet) desktop to the console server, accessing each machine via a serial port. Serial interfacesd are readily available with either PCI or USB interfaces. This makes building a 6 port console server rather easy.
Thanks !
Install Win MBR using Free Dos (floppy on a CD)

(1) Burn free Dos Boot Cdrom image (this is about 7.1 MB in size) and boot it

http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/fdbasecd.iso

(2) Fix the master boot record [MBR] :

Press Enter Type 2 (for safe mode) cd FREEDOS\SETUP\ODIN FDISK /MBR

url

Similar description.


Links

Ep ! Site under construction. Escriu-me ! Actualitzat el 14 de Desembre de 2011. Uf !