fdisk -u -C20 -H16 -S63 kido
c--> DOS Compatibility flag is set
n --> p --> 1
t --> b
a --> 1
ms-sys -9 -f kido
losetup -o32256 /dev/loop0 kido
mkfs.msdos -F 16 -n "KIDO" /dev/loop0
ms-sys -f -6 /dev/loop0
hexedit /dev/loop0
15h-F8
18h-3F (S63)
1Ah-10 (H16)
1Ch-1Dh (3f 00)
24h-80
cp command.com drvspace.bin io.sys msdos.sys to image
losetup -d /dev/loop0
mount -o loop,offset=32256 kido hdd --> 32256 = 63*512
shrink down image size by gzip
gzip kido
mv kido kido.img
PXE config
label dos
kernel /tool/memdisk
append initrd=/tool/kido.img harddisk c=20 h=16 s=63
mbr --> master boot record (at offset 0)
boot program (at offset 32256)
ms-sys --> http://ms-sys.sourceforge.net/
ms-sys --> http://ms-sys.sourceforge.net/
hexedit --> http://rigaux.org/hexedit.html
f2 to save
f10 to exit
沒有留言:
張貼留言