A few stupid questions regarding MBR and boot0
Aleksander Alekseev
afiskon at devzen.ru
Thu Apr 14 11:49:38 UTC 2016
Hello
I was trying to figure out how FreeBSD boot process works and noticed
something strange.
1) If I understand correctly first 512 bytes of /dev/ad0
and /boot/boot0 file should match, but they don't:
http://afiskon.ru/s/31/665dc9755c_mbr.txt
Could someone please explain why they don't match?
2) I tried to compile boot0 from source (r297956) but compilation
failed:
```
$ cd sys/boot/i386/boot0
$ make
Warning: Object directory not changed from
original /usr/home/eax/freebsd-src/sys/boot/i386/boot0
/usr/local/bin/clang38 -O2 -pipe -O2 -pipe -g -march=native
-DVOLUME_SERIAL -DPXE -DFLAGS=0x8f -DTICKS=0xb6 -DCOMSPEED="7 << 5 +
3" -march=i386 -ffreestanding -msoft-float -m32 -std=gnu99
-Qunused-arguments -m32 -c boot0.S -o boot0.o clang -cc1as: fatal
error: error in backend: invalid .org offset '430' (at offset '439')
*** Error code 1
Stop.
make: stopped in /usr/home/eax/freebsd-src/sys/boot/i386/boot0
```
Am I doing something wrong?
--
Best regards,
Aleksander Alekseev
http://eax.me/
More information about the freebsd-hackers
mailing list