Grub autoboot

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
mohdumar
Posts: 7
Joined: Tue Aug 30, 2011 8:58 am

Grub autoboot

Post by mohdumar »

I'm using stage1 and stage2 plus my elf kernel.bin and the pad file. These combine into floppy .img and I can load it using qemu.

But i have to type on grub screen

Code: Select all

kernel 200+2
boot
every time. How can I avoid it?

Developing on ubuntu using fasm and tcc
Last edited by mohdumar on Mon Sep 12, 2011 6:42 am, edited 1 time in total.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Grub autoboot

Post by Combuster »

Use a FAT-formatted image and install GRUB legacy on it. That way you can add a config file as well as addressing your kernel by its name and have GRUB load the right amount of sectors as an added bonus. Setting up grub in that fashion from a build script is rather tricky, especially if you're using Windows. The fastest way is to grab someone else's FAT+GRUB image, remove their kernel from it and make a backup of the result. Then the only thing at build time you need to do is duplicate the backup, use mtools to copy the config and your kernel to the formatted image, and then you can just use the image like any other.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
mohdumar
Posts: 7
Joined: Tue Aug 30, 2011 8:58 am

Re: Grub autoboot

Post by mohdumar »

I found stuff about syslinux.cfg and mboot.c32 which i tried, and it booted the kernel after displaying copyrights.

Is that the solution \ alternative ?
Yargh
Member
Member
Posts: 56
Joined: Sat Jun 12, 2010 9:04 pm
Location: Somewhere else.

Re: Grub autoboot

Post by Yargh »

mohdumar wrote:I found stuff about syslinux.cfg and mboot.c32 which i tried, and it booted the kernel after displaying copyrights.

Is that the solution \ alternative ?
It's an alternative that uses Syslinux (with the multiboot module), instead of GRUB. Both are multiboot-compatible.
Wait... What?
Post Reply