LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Grub2 questions: need to know grub.cfg syntax for bootable grub_eltorito iso's?? (https://www.linuxquestions.org/questions/linux-general-1/grub2-questions-need-to-know-grub-cfg-syntax-for-bootable-grub_eltorito-isos-773543/)

linus72 12-04-2009 04:19 PM

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

aus9 12-04-2009 05:59 PM

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

Wifi-Fanatux 12-04-2009 06:08 PM

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!

linus72 12-04-2009 06:23 PM

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!

Wifi-Fanatux 12-04-2009 07:25 PM

configfile /boot/grub/grub2.cfg
 
What about:
configfile /grub/grub2.cfg

without looking for /grub in the /boot directory?

linus72 12-04-2009 08:18 PM

I'll try it:)

aus9 12-04-2009 09:15 PM

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?

linus72 12-04-2009 09:38 PM

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?

Wifi-Fanatux 12-04-2009 10:00 PM

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?

Wifi-Fanatux 12-04-2009 11:23 PM

(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.

aus9 12-06-2009 02:40 AM

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.

aus9 02-11-2010 06:20 PM

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


All times are GMT -5. The time now is 09:35 AM.