LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-04-2009, 04:19 PM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Grub2 questions: need to know grub.cfg syntax for bootable grub_eltorito iso's??


OK
so, I'm deep into making a grub2 bootable CD

But, my only problem is

How do I go from the grub.cfg
to another grub.cfg??

Like, say I have a sub-menu
that branches off from grub.conf
like a grub-2.cfg, grub-3.cfg,etc??

With Old grub it was easy

Code:
title go to other menu.lst
root (hd0,0)
configfile /boot/grub/menu-2.lst
I dont know what the syntax is for grub2 or can it even do that??

anyone know grub2 very well??
thanks

Last edited by linus72; 12-04-2009 at 04:34 PM.
 
Old 12-04-2009, 05:59 PM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

well I am still learning myself but I think the easiest is to use a chainload...which will then find the next bootloader and therefore its cfg.

my menuentry on cd has some chainloads for you to try out...I know you will be burning your own disto.
http://sidux.com/index.php?module=Wikula&tag=Grub2slit

If you get into trouble pls study my section 9....stay at grub2 cdmenu...press c for commands and then
Code:
ls
...it was how I discovered hd111

Last edited by aus9; 12-04-2009 at 06:05 PM.
 
Old 12-04-2009, 06:08 PM   #3
Wifi-Fanatux
Member
 
Registered: Mar 2009
Location: Northwest
Distribution: LAPTOP->DreamStudio & Saline-Debian
Posts: 70

Rep: Reputation: 19
Two ways

If grub was installed on the distros partition:
rootnoverify (hd1,2)
makeactive
chainloader +1

If using the grub cds grub:
gfxmenu (hd1,6)/boot/message

Edit- Nope doesn't work, sorry!

Last edited by Wifi-Fanatux; 12-04-2009 at 06:39 PM. Reason: Tried it and didn't work
 
Old 12-04-2009, 06:23 PM   #4
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Thanks to both of you

The specific problem I'm having is two-fold

1) How to get to a sub.cfg file
I want to be able to go from grub.cfg to $NAME.cfg
How can I do this??

2) How to set CD/DVD Label?
using reg genisoimage with isolinux
I can set the cd name/label

How to do this when making a grub/grub2 iso??

Heres my partial grub.cfg
Note that I am not booting the iso's!
Code:
#
# Sample GRUB configuration file
#

insmod biosdisk
insmod pc
insmod gpt

# Boot automatically after 30 secs.
set timeout=30

# By default, boot the first entry.
set default=0

# Fallback to the second entry.
set fallback=1

# For booting GNU/Hurd
menuentry "Plop Bootmanager" {
    linux /boot/plpbt
}
menuentry "NetbootCD-3.1.2" {
    linux /boot/kexec.bzI quiet norestore base nolocal
    initrd /boot/nbinit3.gz
}
menuentry "Phalanx-9.04 32bit" {
    linux /casper/vmlinuz file=/cdrom/preseed/custom.seed nopersistent boot=casper initrd=/casper/initrd.gz quiet splash --
    initrd /casper/initrd.gz
}
menuentry "Fedora-12-GNOME-Live" {
    linux /isolinux/vmlinuz0 root=live:CDLABEL=CDROM rootfstype=auto ro liveimg quiet  rhgb rd_NO_LUKS rd_NO_MD noiswmd
    initrd /isolinux/initrd0.img
}
menuentry "boot to grub2.cfg" {
    configfile /boot/grub/grub2.cfg
}
the problem is the last entry
I can't get it to go to another .cfg menu!@?

This is all for this DVD
http://multidistro.com/dvd/ummenu.png

see how the menu goes to other menu's??

I need grub2 to do that too!
 
Old 12-04-2009, 07:25 PM   #5
Wifi-Fanatux
Member
 
Registered: Mar 2009
Location: Northwest
Distribution: LAPTOP->DreamStudio & Saline-Debian
Posts: 70

Rep: Reputation: 19
configfile /boot/grub/grub2.cfg

What about:
configfile /grub/grub2.cfg

without looking for /grub in the /boot directory?
 
Old 12-04-2009, 08:18 PM   #6
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
I'll try it
 
Old 12-04-2009, 09:15 PM   #7
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

forgive me if you already know this but...in your cd cfg

Where is this new config file?

if its on the cd....pathway begins /pathway etc

if its on the hd....set root=(hdx,y) please.

--------
Assuming I have not made an error?? your fedora and other entries need to be burnt on dvd. And that appears to match your multidistro image.

BTW is how big is that iso so far?
 
Old 12-04-2009, 09:38 PM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
LOL
well fedora doesn't seem to be working...?

the grub.cfg's are on the iso/dvd

earlier today i made a super ubuntu
grub2 dvd
with ubuntu 9.04-9.10
kubuntu 9.04-9.10
xubuntu-9.04-9.10

so, 6 iso's to grub2 dvd
and I just installed kubuntu-9.04
off the dvd
pretty cool

still cant get any sub-cfg's to work...?!

any ideas?

OH
what all distros are grub2 bootable iso?
ubuntu-9.04-9.10
grml-2009.10
what else?
 
Old 12-04-2009, 10:00 PM   #9
Wifi-Fanatux
Member
 
Registered: Mar 2009
Location: Northwest
Distribution: LAPTOP->DreamStudio & Saline-Debian
Posts: 70

Rep: Reputation: 19
Why Grub2

I feel your pain.... I make Grub CDs to boot distros on usb drives, and I don't know how many cds I burned and threw away. But what makes Grub2 the choice?
 
Old 12-04-2009, 11:23 PM   #10
Wifi-Fanatux
Member
 
Registered: Mar 2009
Location: Northwest
Distribution: LAPTOP->DreamStudio & Saline-Debian
Posts: 70

Rep: Reputation: 19
(cd)

I figure you tried:

menuentry "boot to grub2.cfg" {
configfile (cd)/boot/grub/grub2.cfg

-----------------------------------------
Also, is it possible to use the setgrubdevice command in the grub2.cfg file, and then use the configfile command using (grub_device).....just wondering if it can not find the file.

Last edited by Wifi-Fanatux; 12-04-2009 at 11:26 PM.
 
Old 12-06-2009, 02:40 AM   #11
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
Wifi-Fanatux

if you have a bootable cd and a bootable hd....and run ls in grub2 command mode....you will see cd is not an option.
the cd is hd.

To no-one in particular....ATM
There does not appear to be any real mainstream bootable cd/dvds burnt with grub2. AFAIK they tend to use isolinux but if you install they have grub2 files.
 
Old 02-11-2010, 06:20 PM   #12
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi ....mainly a note to linus72

I have started to make a grub2 rescue iso = cd

its currently 14 megs

if interested here is the download page and the explanation page.

grub2.iso is all you need to download.....the other scripts are for building your own distro with your own grub2 files (and any extras you choose to put into the unpack)

I am hoping you will have a look at how I burnt it.....and if possible feel free to test it.

http://www.mediafire.com/?sharekey=e...33a677fb8f98ef

http://techpatterns.com/forums/about1477-20.html

You can also copy and paste the scripts/files from techpatterns

The grub2.iso has a new root password its based on acronym
I am Grub 2 fan Smxi

IaG2fSmxi

smxi may not mean much to you....but is easily remembered by anyone using techpatterns site

Last edited by aus9; 02-11-2010 at 06:25 PM. Reason: correct size of iso
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to I make a bootable CD that contains grub2? Mountain Linux - General 3 08-06-2010 01:28 AM
Grub2 ignoring my grub.conf? dbulka Linux - Newbie 3 11-24-2009 06:33 PM
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
syntax for grub.conf to add win98 to bootloader menu 7689mich Linux - Newbie 3 08-26-2004 12:13 AM
grub.conf questions taoweijia Red Hat 1 02-04-2004 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration