Boot Custom Linux Kernel Using Grub
Posted: Thu May 10, 2012 2:13 pm
Hi,
I want to boot a self-compiled Linux kernel (nothing changed yet, still the original downloaded source code). It's not as simple as it seems, I'm quite desperate after days spent on figuring out how.
First of all, following your tutorial on Grub (http://wiki.osdev.org/GRUB), I successfully installed Grub (Legacy, 0.97) on a floppy disc. So I compiled the latest Linux kernel (3.3.5) and copied the generated bzImage to a FAT USB flash drive.
(1st try) It booted, until a certain point where the kernel said that it wants a ext2 file system. Okay, understandable that it doesn't run on FAT.
(2nd try) So I made the flash drive have an ext2 filesystem, copied the bzImage to it and triet to boot. However, Grub was not able to find the file (using "find /bzImage"). When typing "root (hd0,0)" etc. it says "Filesystem type unknown, partition type 0x7". Could be something wrong with the USB flash drive? I tried it with another one and even when I run "grub" in Ubuntu and try to "find" the file, it doesn't find anything.
(3rd try) I thought it might be something wrong with Grub, being unable to read ext2, so I downloaded Grub 1.99, built it and installed it on the USB flash drive successfully. This version finds the file (using the "search" command), but when typing "linux /bzImage root=..." it prints "error: cannot read the Linux header." Is something wrong with the bzImage? Would be very unlikely because it booted on FAT...
Does anyone know a solution to this problem?
Thanks in advance!
I want to boot a self-compiled Linux kernel (nothing changed yet, still the original downloaded source code). It's not as simple as it seems, I'm quite desperate after days spent on figuring out how.
First of all, following your tutorial on Grub (http://wiki.osdev.org/GRUB), I successfully installed Grub (Legacy, 0.97) on a floppy disc. So I compiled the latest Linux kernel (3.3.5) and copied the generated bzImage to a FAT USB flash drive.
(1st try) It booted, until a certain point where the kernel said that it wants a ext2 file system. Okay, understandable that it doesn't run on FAT.
(2nd try) So I made the flash drive have an ext2 filesystem, copied the bzImage to it and triet to boot. However, Grub was not able to find the file (using "find /bzImage"). When typing "root (hd0,0)" etc. it says "Filesystem type unknown, partition type 0x7". Could be something wrong with the USB flash drive? I tried it with another one and even when I run "grub" in Ubuntu and try to "find" the file, it doesn't find anything.
(3rd try) I thought it might be something wrong with Grub, being unable to read ext2, so I downloaded Grub 1.99, built it and installed it on the USB flash drive successfully. This version finds the file (using the "search" command), but when typing "linux /bzImage root=..." it prints "error: cannot read the Linux header." Is something wrong with the bzImage? Would be very unlikely because it booted on FAT...
Does anyone know a solution to this problem?
Thanks in advance!