Как NetBSD грузится с HDD на x86
Статья обновлена и перенесена в NetBSD wiki: , здесь старый вариант.
- MBR is read and validated (checked for 0xaa55 at the end) by BIOS. If validation fails, BIOS may print evil error message.
source:
sys/arch/i386/stand/mbr/mbr.S
binary:/usr/mdec/mbr_* - MBR is executed; unless compiled with NO_BANNER, prints "NetBSD MBR Boot"
- MBR loads PBR from 1st sector of active partition (or another disk, or another partition — if bootselector is used)
CHS vs LBA: convert CHS start address to LBA, if matches LBA start - use CHS reads; otherwise - use LBA reads.
"Error x"
"No active partition" - self-explanatory
"Disk read error"
"No operating system" - first sector of active partition does not have magic number (0xaa55)
"Invalid CHS read" - CHS vs LBA check selected LBA reads, but BIOS does not support them - PBR loads phase 1 bootstrap from next 15 sectors on disk, checks magic and runs it
sys/arch/i386/stand/bootxx/pbr.S,/usr/mdec/bootxx_*
'2' "Disk read"
'B' "Not a bootxx image" - magic number wrong
'P' "No NetBSD partition"
'L' "Invalid CHS read" - CHS vs LBA check selected LBA reads, but BIOS does not support them - bootxx is executed, prints "NetBSD/{machine} {filesystem} Primary Bootstrap"
sys/arch/i386/stand/bootxx/bootxx.S - bootxx loads phase 2 bootstrap (
/boot): * from the start of MBR partition; or
* from the start of MBR partition + raidframe offset; or
* from the start of partition 'a' in disklabel.
»
- Страница для печати
- Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии
- 5011 просмотра
Да на
Да на английском, очень познaвательно :)