OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Sep 16, 2019 10:21 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: How to set up iso directory grub.cfg
PostPosted: Thu Feb 07, 2013 9:51 pm 
Offline
User avatar

Joined: Thu Feb 07, 2013 9:47 pm
Posts: 20
Location: Durham, Kansas
I am following the steps in the C# OSDev series, except I am writing the kernel in C. I am using grub2. My directory layout:

Code:
.:
boot  kernel.bin

./boot:
grub2

./boot/grub2:
grub.cfg


Contents of grub.cfg:
Code:
multiboot /kernel.bin
boot


But I get a grub prompt when I run
Code:
grub2-mkrescue -o image.iso iso
and boot the image.iso.

Anyone have any ideas?


Top
 Profile  
 
 Post subject: Re: How to set up iso directory grub.cfg
PostPosted: Fri Feb 08, 2013 12:11 am 
Offline
Member
Member

Joined: Fri Nov 16, 2007 1:59 pm
Posts: 612
Quote:
Contents of grub.cfg:
Code:
multiboot /kernel.bin
boot

Is that all? Try this:
Code:
menuentry "Run my kernel" {
multiboot /kernel.bin
}

_________________
If you have seen bad English in my words, tell me what's wrong, please.


Top
 Profile  
 
 Post subject: Re: How to set up iso directory grub.cfg
PostPosted: Fri Feb 08, 2013 12:46 am 
Offline
Member
Member

Joined: Mon Apr 09, 2007 12:10 pm
Posts: 775
Location: London, UK
Grub2 looks for its configuration file in /boot/grub/grub.cfg (not /boot/grub2/grub.cfg).

Regards,
John.

_________________
Tysos | rpi-boot


Top
 Profile  
 
 Post subject: Re: How to set up iso directory grub.cfg
PostPosted: Fri Feb 08, 2013 7:55 am 
Offline
User avatar

Joined: Thu Feb 07, 2013 9:47 pm
Posts: 20
Location: Durham, Kansas
jnc100 wrote:
Grub2 looks for its configuration file in /boot/grub/grub.cfg (not /boot/grub2/grub.cfg).

Regards,
John.

Thanks!! That fixed it. I wonder why, but in Fedora 17 (what I currently run) the grub.cfg file is located only in /boot/grub2. The only file in /boot/grub is /boot/grub/splash.xpm.gz. Hmmm... Interesting.


Top
 Profile  
 
 Post subject: Re: How to set up iso directory grub.cfg
PostPosted: Fri Feb 08, 2013 1:14 pm 
Offline
Member
Member
User avatar

Joined: Wed Jul 13, 2011 7:38 pm
Posts: 549
BenjiWiebe wrote:
jnc100 wrote:
Grub2 looks for its configuration file in /boot/grub/grub.cfg (not /boot/grub2/grub.cfg).

Regards,
John.

Thanks!! That fixed it. I wonder why, but in Fedora 17 (what I currently run) the grub.cfg file is located only in /boot/grub2. The only file in /boot/grub is /boot/grub/splash.xpm.gz. Hmmm... Interesting.

The GRUB2 installer can take an argument to change the directory in which it looks for (some) things.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: alnyan and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group