Combuster wrote:
MTools?
NVM I got it to work with GrubOnFloppy and FASM
God I'm happy!
I edited the "floppy.asc" file so it would add my module in there :
Code:
include "mkfloppy.inc"
STAGE1_5 equ 0
file "content/boot/grub/stage1", 3
db "MKFLOPPY"
dw 512
db 1
dw 1
db 2
dw 14*512/32
dw 2*80*18
db 0F0h
dw 9
dw 18
dw 2
dd 0
dd 0
db 0
db 0
db 29h
dd 55555555h
db 11 dup 32
db "FAT12", 32, 32, 32
file "content/boot/grub/stage1": $, 512-$
if STAGE1_5
kernel_address=2000h
kernel_sector=fatstage_base/512
kernel_segment=200h
else
kernel_address=8000h
kernel_sector=stage2_base/512
kernel_segment=800h
end if
; store byte 0 at 40h ; boot_drive cell
store word kernel_address at 42h
store dword kernel_sector at 44h
store word kernel_segment at 48h
; fat1
db 0F0h, 0FFh, 0FFh, 9*512-3 dup 0
; fat2
db 0F0h, 0FFh, 0FFh, 9*512-3 dup 0
; root
dent kernel, "KERNEL BIN", FA_ARC
dent module, "INITRD IMG", FA_ARC
dent boot, "BOOT", FA_DIR
; ...
rb 33*512-$
defdir boot
{
dent grub, "GRUB", FA_DIR
}
defdir grub
{
if STAGE1_5
lent fatstage, "FAT_ST~1", FA_ARC, "fat_stage1_5"
end if
dent menu, "MENU LST", FA_ARC
dent stage2, "STAGE2", FA_ARC
}
; data
stof kernel, "content/kernel.bin"
stof module, "content/initrd.img"
stod boot, root
stod grub, boot
if STAGE1_5
stof fatstage, "content/boot/grub/fat_stage1_5"
store dword fatstage_base/512+1 at fatstage_base+1F8h
store word (fatstage_size+511)/512-1 at fatstage_base+1FCh
store word 220h at fatstage_base+1FEh
end if
stof menu, "content/boot/grub/menu.lst"
stof stage2, "content/boot/grub/stage2"
store dword stage2_base/512+1 at stage2_base+1F8h
store word (stage2_size+511)/512-1 at stage2_base+1FCh
store word 820h at stage2_base+1FEh
; ...
rb 2*80*18*512-$
initrd=my module file