Help with GRUB --EDIT: Stupid Mistake
Help with GRUB --EDIT: Stupid Mistake
Hey everyone,
EDIT:
Apparently I mis-crafted my makefile, and it was compiling source from my backup directory... don't you just hate it when you make stupid mistakes?
I'm just switching over from a custom bootloader to grub. (using windows) Grub was working fine the first couple of times, but now when I replace the kernel.bin file, I have to reconfigure the entire bootdisk every time. Also, grub doesn't want to boot the correct version of my kernel. What's wrong, and is there any way to permanently config grub?
Thanks,
--Michael
EDIT:
Apparently I mis-crafted my makefile, and it was compiling source from my backup directory... don't you just hate it when you make stupid mistakes?
I'm just switching over from a custom bootloader to grub. (using windows) Grub was working fine the first couple of times, but now when I replace the kernel.bin file, I have to reconfigure the entire bootdisk every time. Also, grub doesn't want to boot the correct version of my kernel. What's wrong, and is there any way to permanently config grub?
Thanks,
--Michael
Last edited by t0xic on Fri Jun 29, 2007 1:19 pm, edited 1 time in total.
- Kevin McGuire
- Member
- Posts: 843
- Joined: Tue Nov 09, 2004 12:00 am
- Location: United States
- Contact:
I have to use the "install (fd0)/boot/stage1 (fd0) (fd0)/boot/stage2 (fd0)/boot/menu.cfg", on my aux disk each time to configure the boot disk.
When I want to put an updated kernel on the disk, grub doesn't start and I get the "non-system disk" fat12 error.
What I mean about an old version is: For instance: if I add a new line saying: "printk("Testing Grub");" It's like it never happens. The kernel is compiling right (im using gcc cross i586-elf), so I think it's a Fat error (not really overwriting or something)
Hope this helps,
Thanks,
--Michael
When I want to put an updated kernel on the disk, grub doesn't start and I get the "non-system disk" fat12 error.
What I mean about an old version is: For instance: if I add a new line saying: "printk("Testing Grub");" It's like it never happens. The kernel is compiling right (im using gcc cross i586-elf), so I think it's a Fat error (not really overwriting or something)
Hope this helps,
Thanks,
--Michael
- Kevin McGuire
- Member
- Posts: 843
- Joined: Tue Nov 09, 2004 12:00 am
- Location: United States
- Contact:
I have never heard of or had GRUB delete or modify the contents of my floppy disk before..
We need more information:
We need more information:
- What are the contents of the disk after GRUB supposedly screws it up? Are the GRUB stage files including the grub.conf still there and not corrupted?
- Have you verified that you actually placed the newly compiled kernel image onto the disk by reading back the file to double check?
Grub just started this yesterday
I wouldn't call it corrupted, but something else. Everything is still on the image, and even after I fully format and try again, still same error.
Here is an example of what I'm doing:
mount image
copy kernel to a:\boot\kernel.bin
dismount image
copy image to bochs folder
run bochs
I can tell there is an error because I made my entry function only do a loop, took out all text and everything, recompiled it and did the steps above after formating the image, and bochs will load an old kernel that still starts up. It's confusing. If I switch back to my custom bootloader, everything works fine... may just have to screw grub
Thanks for listening to me rant,
--Michael
I wouldn't call it corrupted, but something else. Everything is still on the image, and even after I fully format and try again, still same error.
Here is an example of what I'm doing:
mount image
copy kernel to a:\boot\kernel.bin
dismount image
copy image to bochs folder
run bochs
I can tell there is an error because I made my entry function only do a loop, took out all text and everything, recompiled it and did the steps above after formating the image, and bochs will load an old kernel that still starts up. It's confusing. If I switch back to my custom bootloader, everything works fine... may just have to screw grub
Thanks for listening to me rant,
--Michael
Here's an example GRUB 0.97 image (check the attachment), it immediately boots your 'kernel.bin' without waiting.
Put 'kernel.bin' in the root of the floppy disk.
Put 'kernel.bin' in the root of the floppy disk.
- Attachments
-
- grub-0.97.zip
- GRUB 0.97 image
- (61.17 KiB) Downloaded 53 times
Thanks for the grub disk... But now grub assures me that my kernel is below the 1 MB mark... here is my linker script:
Is there anything obviously wrong here that I'm missing?
Thanks,
--Michael
Code: Select all
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(start)
SECTIONS
{
. = 0xC0000000;
.text :
{
code = .; _code = .;
*(.text)
. = ALIGN(4096);
}
.data :
{
data = .; _data = .;
*(.data)
. = ALIGN(4096);
}
.bss :
{
bss = .; _bss = .;
*(.bss)
. = ALIGN(4096);
}
.rodata :
{
rodata = .; _rodata = .;
*(.rodata)
. = ALIGN(4096);
}
. = ALIGN(4096);
end = .; _end = .;
}
Thanks,
--Michael