GNU/ 1, qkim@pecetrirekr GNU/ 1 1 2 2 3 4 31 MS-DOS 5 32 LOADLIN 5 33 DOS- LILO 6 34 DOS- 6 35 LILO 6 4 7 41 BIOS 7 42 8 43 8 44 8 45 9 46 9 47 2 9 5 X86 GNU/LINUX 10 1 GNU/, GNU/ 2, 3, 1 : V 11, 2001 3 4 ( RAM )
4 x86 PC GNU/ 5,, "LINUX hacker UNIX KERNEL " Werner Almesberger, "LILO Technical overview", [1] 2 PC, LILO GNU/ "LILO User's guide" [1],,, FAT (File Allocation Table), (super block),, GNU/ /dev/fd0 Boot sector Data area 1 -, MS-DOS 0x000 0x003 Jump to the program code Disk parameters 0x02C/0x03E Program code 0x1FE Magic number (0xAA55) 2 - MS-DOS LILO, (disk parameters) 2
0x000 Program code 0x1BE 0x1FE Partition table Magic number (0xAA55) 3 - LILO Minix, Ext2,, MS-DOS LILO MS-DOS LILO MS-DOS LILO SYSLINUX [2] MS-DOS (primary partitions), (extended partition) (logical partitions), /dev/hda, /dev/hdb, /dev/sda, /dev/hda1, /dev/hda2 Partition table Partition 1 /dev/hda /dev/hda1 Partition 2 /dev/hda2 4-3
Partition table Partition 1 /dev/hda /dev/hda1 Partition 2 /dev/hda2 Extended partition table Logical partition table Partition 3 /dev/hda3 /dev/hda5 Logical partition table Partition 4 /dev/hda6 5 -,,,, (Master Boot Record), 3 LILO LILO, LILO (/dev/fd0, etc) (/dev/hda, /dev/sda, etc) (/dev/hda1, /dev/hda2, etc) (/dev/hda1, etc) 2 ( : MS-DOS ) 3 4 3 2 FDISK LILO activate, GNU/ fdisk 3 LILO -b, 4,, 4
MS-DOS,, 0, 0, 1 3 0x000 0x1BD 446, 64 2 (magic number),, MS-DOS, "DOS-": MS-DOS "active", MS-DOS fdisk fdisk LILO activate active "MS-DOS": IOSYS, MS-DOSSYS, COMMANDCOM MS-DOS "COMMANDCOM": MS-DOS "LOADLIN": MS-DOS RAM, CONFIGSYS, BOOTSYS CONFIGSYS "LILO": 31 MS-DOS 6 MS-DOS Boot sector Operating system DOS- MS-DOS COMMANDCOM 6 - MS-DOS DOS- (active partition) MS-DOS IOSYS MSDOSSYS MS-DOS, MS-DOS COMMANDCOM 32 LOADLIN LOADLIN MS-DOS MS-DOS, CONFIGSYS AUTOEXECBAT LOADLIN [3] Boot sector Operating system DOS- MS-DOS COMMANDCOM LOADLIN 7 - LOADLIN 5
CONFIGSYS AUTOEXECBAT BOOTSYS, [4] 33 DOS- LILO DOS- LILO, LILO, fdisk activate "active" Boot sector Operating system DOS- LILO other OS 8 - DOS- LILO LILO fdisk activate active active LILO and/or 34 DOS- MS-DOS, 33 LILO Boot sector Operating systems DOS- MS-DOS COMMANDCOM LOADLIN LILO MS-DOS COMMANDCOM 9 - DOS- 35 LILO LILO, LILO, LILO LILO Operating system other OS LILO 10 - LILO 6
, dd if=/dev/hda of=/fd/ bs=512 count=1 LILO LILO, dd if=/fd/ of=/dev/hda bs=446 count=1 LILO, LILO (liloconf "boot=" ) 4 LILO, GNU/ /etc/liloconf boot = /dev/hda2 compact image = /vmlinuz image = /vmlinuzold other = /dev/hda1 table = /dev/hda label = msdos LILO /vmlinuz, /vmlinuzold /dev/hda1 MS-DOS compact map installer 41 BIOS 20GB, PC BIOS 18 LILO, 1024 LILO, BIOS BIOS LILO BIOS IED 504MB 1024 10GB BIOS 1024 LILO linear 5 5 /usr/src/linux/documentation/idetxt 7
1024, DOS/Windows, LILO LOADLIN LILO BIOS /boot/bootb /boot/map 6 LILO /boot, /boot, /boot 42, LILO, 11, boot MS-DOS /dev/hda /dev/hda1 /dev/hda2 11 - One disk, on a primary partition 43 LILO, 12 MS-DOS Extended /dev/hda /dev/hda1 /dev/hda2 /dev/hda5 /dev/hda6 12 - One disk, on a logical partition active activate, LILO 44 6 /sbin/lilo 8
,,,,, /boot/bootb, /boot/map 45 LILO 13 First Disk Second Disk /dev/hda /dev/hdb MS-DOS /dev/hda1 /dev/hdb1 Extended /dev/hda2 /dev/hdb2 /dev/hda5 /dev/hda6 13 - Two disks, on second disk, first disk has an extended partition active LILO activate 46, LILO LILO 14 First Disk Second Disk /dev/hda /dev/hdb MS-DOS /dev/hda1 /dev/hdb1 /dev/hda2 /dev/hdb2 14 - Two disks, on second disk, first disk has no extended partition LILO, LILO LILO /etc/liloconf boot, 4 liloconf boot=/dev/hda2 boot=/dev/hda 47 2 LILO BIOS 9
0xnnnn 16 Warning: BIOS drive 0xnnnn may not be accessible BIOS 5 x86 GNU/ GNU/ x86 CPU PC ROM BIOS (Basic Input/Output System) BIOS POST (Power-On Self Test) I/O ROM (bootstrap routine) RESET, CPU 0FFFF0H, x86 0FFFF0H ROM POST ROM POST ROM RAM 7 [5] BIOS, CD-ROM ROM, [6] ROM, MS-DOS IOSYS MSDOSSYS, IOSYS MSDOSSYS, RAM, IOSYS 8 Invalid system disk Replace the disk, and then press any key GNU/ LILO 0, 0, 1 LILO (entry point) 9 7 2 8 IOSYS, IOSYS MSDOSSYS 9 512,, 10
BIOS (boot loader) GNU/ LILO, LILO liloconf liloconf lilo LILO BIOS LILO LILO, 10, 11, init, init inittab sysinit, fsck,,, fstab, sysinit init, init inittab initdefault default runlevel runlevel tty getty, getty "login: ", login 0 10, LILO liloconf http://wwwlinuxdocorg/howto/bootprompt-howtohtml 11 RAM RAM RAM, RAM, RAM 11
[1] Werner Almesberger, "LILO User's guide", ftp://metalabuncedu/pub//system/boot/lilo/ [2] H Peter Anvin, "SYSLINUX - A boot loader for using MS-DOS floppies" [3] LOADLIN, ftp://sunsiteuncedu/pub//system/boot/dualboot/lodlin16tgz [4] BOOTSYS, ftp://ftpfunetfi/pub//tools/boot142zip [5] Microsoft PRESS, "2ed, Advanced MS DOS Programming", SOHNZS Research:, [6], "PC ", 12