29
loading...
This website collects cookies to deliver better user experience
sudo apt-get install build-essential nasm genisoimage bochs bochs-sdl
nasm -f elf32 loader.s
ld -T link.ld -melf_i386 loader.o -o kernel.elf
mkdir -p iso/boot/grub # create the folder structure
cp stage2_eltorito iso/boot/grub/ # copy the bootloader
cp kernel.elf iso/boot/ # copy the kernel
iso
|-- boot
|-- grub
| |-- menu.lst
| |-- stage2_eltorito
|-- kernel.elf
genisoimage -R \
-b boot/grub/stage2_eltorito \
-no-emul-boot \
-boot-load-size 4 \
-A os \
-input-charset utf8 \
-quiet \
-boot-info-table \
-o os.iso \
iso
bochs -f bochsrc.txt -q
cat bochslog.txt
29