Jump to content











Photo
- - - - -

Grub2 Manual


  • Please log in to reply
26 replies to this topic

#1 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,049 posts
  •  
    Belgium

Posted 30 August 2010 - 07:36 PM

Finally there is an up to date Grub2 Manual:
http://www.gnu.org/s...re/grub/manual/

#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 10,547 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 31 August 2010 - 09:29 AM

Finally there is an up to date Grub2 Manual:
http://www.gnu.org/s...re/grub/manual/


Good. :cheers:
Is there also a release or not? ;)


:cheers:
Wonko

#3 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,049 posts
  •  
    Belgium

Posted 31 August 2010 - 10:20 AM

Of course.

Source code:
ftp://alpha.gnu.org/gnu/grub/grub-1.98.tar.gz

Compiled version of gru2 (Debian):
http://packages.debian.org/sid/grub-pc

I am not sure how useful grub2 will be regarding to Windows environments/booting.
AFAIK, there is no Windows installer. But you should ask Bean123. He is a grub2 developer.

SuperGrub Disk may be nice to look at too (didn't test it yet):
http://www.supergrubdisk.org/

Difference between Super GRUB Disk and Super GRUB2 Disk

GRUB2 is a complete rewrite of GRUB, and Super GRUB2 Disk is a complete rewrite as well. As Super GRUB2 Disk uses GRUB2, the differences between GRUB Legacy and GRUB2 also apply to the different versions of Super GRUB Disk.

Perhaps the most notable difference between Super GRUB Disk based on grub legacy and Super GRUB2 Disk is that Super GRUB2 Disk does not write to the disk at all, and so cannot rewrite the MBR. Super GRUB2 Disk can only be used to boot a broken system, it cannot fix it directly. Though once a system is booted, re-installing grub is usually just a matter of running “grub-install /dev/sda”.

While there are some features of Super GRUB Disk based on GRUB legacy that will never be included in Super GRUB2 Disk, the opposite is also true. For instance, Super GRUB2 Disk supports booting OSX, loop booting from iso files, booting an OS from USB without USB support in the BIOS, and other features that are not possible with GRUB legacy.

http://www.supergrub...per-grub2-disk/

Don't get too exited about GRUB2 USB support. It doesn't do the same a PLoP (adding INT13h access to USB drives). It is a more general USB driver, more like the Linux and Windows USB drivers. GRUB2 does support multiple architectures and other environments than BIOS based ones (EFI, coreboot, ...):

Enable GRUB2's USB support *experimental*

Many BIOSs do not support booting from USB, with this option you can use Super GRUB2 Disk (booted from a floppy, CD, or other media that your BIOS does support booting from) to boot an operating system from a USB drive despite your BIOSs limitation, using GRUB2's native USB drivers. This option will only allow you boot Free Operating Systems like GNU/Linux or FreeBSD, chainloading will not work with this option and so it cannot be used to boot Windows from a USB drive. This option, as stated, is still experimental.

http://www.supergrub.../SuperGRUB2Disk

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 10,547 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 31 August 2010 - 12:47 PM

Of course.


Of course my sock. :cheers:

I'll try to rephrase. :cheers:

Has someone made available a package comparable to to grub4dos containing a grub2 compiled and some minimal instructions or how to use it (for the less talented - when compared to Linux users - DOS/Windows users?

If yes, will you please post a link to it?

If no, you know where you can stuff your "of course". :cheers:

What about the bla-bla about "core.img":
http://www.boot-land...?showtopic=9882
http://www.boot-land...?...c=9882&st=6
(there isn't ANY "core.img" in the link you posted on Debian)

I know that for a Linux expert all the above seems like "natural" and "obvious", but believe me, I have (a little) experience in the PC field, and I have rarely seen such a fragmented, scarcely coordinated/documented (otherwise GREAT :) ) piece of software.

It still seems to me like the good Linux guys (and the GRUB 2 developers) are deliberately trying to make things much more complex than needed. :cheers:

And I still refuse to call "2" something named "1.98". :w00t:

You might want to notice that the good GNU guys in their simplicity have apparently decided to drop the distinction between GRUB (GRUB legacy) and GRUB 2:
http://www.gnu.org/s...grub/index.html
http://www.gnu.org/s...-legacy.en.html

GRUB Development

GRUB 2 has replaced what was formerly known as GRUB (i.e. version 0.9x), which has, in turn, become GRUB Legacy. Enhancements to GRUB are still being made, but the current released versions are quite usable for normal operation.

making the whole help reference to "GRUB" only , thus effectively multiplying the confusion and, consequently, the need for disambiguations. ;)

Basically, 1/2 of the internet is full of references to GRUB (the actual GRUB legacy) that will be found when searching for help/info about GRUB (GRUB 2) and that will lead to wrong places.


:w00t:
Wonko

#5 dog

dog

    Frequent Member

  • Expert
  • 233 posts

Posted 31 August 2010 - 02:09 PM

He said there's updated documentation, not that the version number has been bumped to 2.0, or that it replaces grub4dos, or that he'd renamed grub to grub legacy...
Don't shoot the messenger ;)

#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 10,547 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 31 August 2010 - 04:30 PM

He said there's updated documentation, not that the version number has been bumped to 2.0, or that it replaces grub4dos, or that he'd renamed grub to grub legacy...
Don't shoot the messenger :cheers:

I am not shooting the messenger about the actual message ;), the reference is ONLY to the IMHO gratuitious use of "of course" added by the messenger to the second message, and to the apparent foolishness of referring to "GRUB 2" as "GRUB" or viceversa by the developers.

:cheers:
Wonko

#7 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,049 posts
  •  
    Belgium

Posted 31 August 2010 - 04:32 PM

Has someone made available a package comparable to to grub4dos containing a grub2 compiled and some minimal instructions or how to use it (for the less talented - when compared to Linux users - DOS/Windows users?

I never said that grub2 is a replacement for grub4dos. grub2 can't map files (ramdisk or filedisk based). It only can look inside an image to see which files are there. Fore example it can mount an ISO image and access a kernel and initrd image inside this ISO and boot it. It can't boot ISO's which require INT13h access. You will need to use MEMDISK or grub4dos from grub2 to boot such ISO's, hard disk or floppy images.
grub2 is meant primarily for booting kernels that understand the multiboot specification. It also supports the older booting model for booting linux and BSD kernels. Proprietary kernels (such as DOS, Windows NT, and OS/2) are supported via a chain-loading function: by the partition boot sector, not booting ntldr, bootmgr, io.sys, ... directly (although bean wrote a module that can/could do it, if I remember right).

So in summary GRUB2 is not the ultimate tool to boot Windows/DOS.
Besides I posted in the Linux section :cheers: .

What about the bla-bla about "core.img":

core.img is build dynamically. You need to specify the stuff that you need (based on the place where you want to install grub2 and which partitions it should be able to access to read additional modules and its config file:

core.img
This is the core image of GRUB. It is built dynamically from the kernel image and an arbitrary list of modules by the grub-mkimage program. Usually, it contains enough modules to access /boot/grub, and loads everything else (including menu handling, the ability to load target operating systems, and so on) from the file system at run-time. The modular design allows the core image to be kept small, since the areas of disk where it must be installed are often as small as 32KB.

http://www.gnu.org/s...rub.html#Images

I know that for a Linux expert all the above seems like "natural" and "obvious", but believe me, I have (a little) experience in the PC field, and I have rarely seen such a fragmented, scarcely coordinated/documented (otherwise GREAT ;) ) piece of software.

It still seems to me like the good Linux guys (and the GRUB 2 developers) are deliberately trying to make things much more complex than needed. :cheers:

Documentation always will be the difficult part of any project. Developers don't want to spend/lose their time for writing boring documentation files.
It is just like many topics on boot-land (and other forums). The same questions are asked over and over again, because nobody wants to write a good tutorial and keep it up to date. Nobody wants to read topics with 10 pages to get all the needed pieces for solving a certain issue. You are the worst guy when it comes to "documentation" :cheers: :

Here you have 10 links, read all of them an all links within

That is not what people want. They want all food prepared for them and chewed.

@ all:
Grub2 documentation from Ubuntu:
https://help.ubuntu....community/Grub2

#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 10,547 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 31 August 2010 - 05:00 PM

I never said that grub2 is a replacement for grub4dos.

Good, since I also never said it, there are at least TWO of us. :cheers:


That is not what people want. They want all food prepared for them and chewed.

Exactly. ;)

My assumption is that GRUB 2 is a very good loader/bootmanager/whatever (opinion), and a lot of distro's seem like starting to use it (fact).

Since it is not "the ultimate tool to boot Windows/DOS" (which is right now EITHER Sislinux/Isolinux OR grub4dos) I presume that most members of boot-land are using one of these two and find some difficulties when they have to add to the whatever they have working one of these new distro.

A possibility would be to have a definitive, simple, How-to related to chainloading GRUB 2 (as stand-alone or the one included in the said distros using it) from BOTH Syslinux/Isolinux AND grub4dos.

I had gathered that from grub4dos it was as easy as something like:

title Linux (GRUB 2)
find --set-root --ignore-floppies --ignore-cd /boot/grub/core.img
kernel /boot/grub/core.img


and I assume that a similar .cfg entry exists for Syslinux/Isolinux.

What the Documentation says:
http://www.gnu.org/s...rub.html#Images
is that basically (and if I get it right) this is NOT recommended and/or it won't work if GRUB 2 is not installed.

So i'll risk another few questions:
  • HOW can be GRUB 2 be chainloaded from grub4dos and Syslinux/Isolinux? (if it is possible)
  • Are there different ways for different distro's?
  • And for different media (like CD, installed on Hard Disk, etc.)?

Though it seems like not being largely appreciated, what I am trying to do is to contribute (a little) in the process of bringing down the current absurd IMHO barriers between the (good) "Linux guys" and the "MS fanboys". :)

And yes, besides my usual grumpyness :w00t: I am currently a bit pi§§ed off by this :cheers::
http://www.911cd.net...o...24023&st=10

And obviously the "messenger", Icecube :cheers: in this case, has no responsability in this, but still he is our UNofficial communication officer and sometimes to "translate" correctly one needs some :cheers:.

:)
Wonko

#9 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,049 posts
  •  
    Belgium

Posted 11 September 2010 - 07:59 PM

burg may be a more interesting grub2 fork for Windows users (in the future).

burg is a brand-new boot loader based on grub2. It uses a new object format which allows it to be built in a wider range of OS, including Linux/Windows/OSX/Solaris/FreeBSD, etc. It also has a highly configurable menu system which works in both text and graphic mode.
http://code.google.com/p/burg/

Windows installation method:
http://code.google.c.../InstallWindows

burg is a project of bean123 and he wants to gradually add some grub4dos features like the mapping function.
http://www.burgloade....php?topic=42.0


It is more than a year ago, when I looked closely at Parted Magic. I don't partition my disk every day :hyper: . But maybe I should repartition one of my PCs soon :) .

#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 10,547 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 12 September 2010 - 09:33 AM

burg may be a more interesting grub2 fork for Windows users (in the future).

Sure :w00t:, but a bird in the hand is worth two in the bush.

We (DOS/WINDOWS primitive users) ALREADY have two exceptionally good bootloaders/bootmanagers:
  • grub4dos
  • Syslinux/isolinux/memdisk/pxelinux
to which you add that they are very easily "cross-chainloadable" between them and with PLoP, another very handy one for a number of "pesky" hardware.

For - if I am not mistaken - something like two years :), we have been waiting for a GRUB2 binary release as it has been "advertised" as the "ultimate solution" for Linux Distro's.

Now a number of Linux Distro's use GRUB2 as "default" or "built in" bootloader/bootmanager.

It is IMHO - to say the least - frustrating to see that apparently there is no easy way to also include "at the same level" GRUB2 in this cross-chainloading or that it is possible but the good Linux guys are not going to explain clearly how it is possible or provide any simplified way ( for the fellow DOS/WINDOWS cavemen) to achieve that.

BURG, as far as I can see, seems a very nice thingy, as I have to say anything bean123 ever released :hyper: and possibly it will become the actual "next generation" of grub4dos ;) , but still, I would like to have an answer to these three questions:

  • HOW can be GRUB 2 be chainloaded from grub4dos and Syslinux/Isolinux? (if it is possible)
  • Are there different ways for different distro's?
  • And for different media (like CD, installed on Hard Disk, etc.)?


Straight answers to them would help me (and I presume a number of fellow cavemen) greatly. :)

:)
Wonko

#11 Giraffe

Giraffe

    Silver Member

  • Advanced user
  • 505 posts
  •  
    United Nations

Posted 12 September 2010 - 11:47 AM

It seems i read more of Wonko's :) replies these days (something weird) Whenever i try to read, I end up...
:w00t:

... always a bashing day ;) (i've never seen someone loving to bash others the way you do)



Of course my sock. :hyper:

...
And obviously the "messenger", Icecube :) in this case, has no responsability in this, but still he is our UNofficial communication officer and sometimes to "translate" correctly one needs some :).

:w00t:
Wonko


:)

#12 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,049 posts
  •  
    Belgium

Posted 12 September 2010 - 05:11 PM

[quote]HOW can be GRUB 2 be chainloaded from grub4dos and Syslinux/Isolinux? (if it is possible)[/quote]
grub4dos:
title Grub2

kernel /boot/grub/core.img
Syslinux (doesn't work ==> use patched chain.c32 for Syslinux 4.03 attached in post #21):
LABEL grub2

MENU LABEL Grub2

LINUX /boot/grub/core.img
If you want to do the work of the grub2 installer manually, you probably can chainload one of the next files too, when you modify them at the right places:
[quote]diskboot.img
This image is used as the first sector of the core image when booting from a hard disk. It reads the rest of the core image into memory and starts the kernel. Since file system handling is not yet available, it encodes the location of the core image using a block list format.
cdboot.img
This image is used as the first sector of the core image when booting from a CD-ROM drive. It performs a similar function to diskboot.img.[/quote]
[quote]Are there different ways for different distro's?[/quote]
Not that I know of.
[quote]And for different media (like CD, installed on Hard Disk, etc.)?[/quote
You will need to build a different core.img (with the necessary modules build in), so it can access and understand the device and filesystem.

BTW, I like Syslinux a lot more than grub(2). grub(2) is more like the Windows installer: I am the only one in charge and I only care about myself and will do it my way. grub invents its own standards (like the odd partition numbering of the multiboot protocol).

#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 10,547 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 12 September 2010 - 06:50 PM

BTW, I like Syslinux a lot more than grub(2). grub(2) is more like the Windows installer: I am the only one in charge and I only care about myself and will do it my way. grub invents its own standards (like the odd partition numbering of the multiboot protocol).


I share the same feelings as you do, though I find (with all due respect to P.Anvin and Syslinux ;) ) that GRUB (legacy) and grub4dos have a more "logical" syntax to my Vulcan eyes. :)

So can we conclude agreeing that a the moment GRUB (the badly misnamed GRUB2) which should be:
  • Grand
  • Unified
  • Boot
  • Loader
is NOT all that "Grand", definitely NOT "Unified" but simply a "Boot" "Loader" and that right now both grub4dos and Syslinux/Etc. offer more flexibility?

:hyper:
Wonko

#14 Giraffe

Giraffe

    Silver Member

  • Advanced user
  • 505 posts
  •  
    United Nations

Posted 12 September 2010 - 07:15 PM

... and that right now both grub4dos and Syslinux/Etc. offer more flexibility?

I'm very attracted to Syslinux now, I'm going to wiki around a little... thanks.


edit: so its a collection of boot loaders, and there another collection of boot loader "iso Linux"?

#15 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 10,547 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 September 2010 - 07:32 AM

edit: so its a collection of boot loaders, and there another collection of boot loader "iso Linux"?


Not really a collection.
It is the same project that uses different tools to achieve booting on different media/setups, the boot-land section has a nice sum up , even in the title:
http://www.boot-land...hp?showforum=71

The Syslinux Project
SYSLINUX, ISOLINUX, PXELINUX, EXTLINUX and MEMDISK are boot loaders for the Linux operating system which operates off an MS-DOS/Windows FAT filesystem. It is intended to simplify first-time installation of Linux, and creation of rescue and special-purpose boot disks.

http://www.boot-land...hp?showforum=92
http://www.boot-land...?showtopic=8545

:hyper:
Wonko

#16 breaker

breaker

    Frequent Member

  • Advanced user
  • 108 posts
  •  
    United States

Posted 10 November 2010 - 09:04 AM

In reference to a bootable UFD I have with Syslinux 4.03 in the mbr and the usual /boot/syslinux/ldlinux.sys and various comboot modules installed. The menu attempts to do what is shown below with GRUB2 in /boot/grub/core.img -

Syslinux:

LABEL grub2

MENU LABEL Grub2

LINUX /boot/grub/core.img

Did you get this to work? I built a core.img using a recent Live CD, then I tried on an installed system, but when I use a working UFD with Syslinux in the mbr, and core.img in /boot/grub along with the other modules and images normally found in /boot/grub, and try to boot on the same PC I get a message - Invalid or corrupt kernel image.

If you want to do the work of the grub2 installer manually, you probably can chainload one of the next files too, when you modify them at the right places:

Ummmm, huh? You mean grub-install? But that makes you install GRUB to a mbr or pbr, which makes the syslinux chainload pointless. Chainload one of the next files... modify? I'm lost. :D

I love Syslinux and GRUB4DOS but I also love the iso booting feature of GRUB because it doesn't load the iso into ram and is very fast. Of course it is only good for loading Linux isos. The mapping the iso to a memdisk or whatnot makes booting an iso way slower than with GRUB(2).

Of course when making a bootable UFD from say an Ubuntu Live CD, with syslinux one may simply copy the files from the iso and rename isolinux to syslinux and drop the proper vesmenu.c32 in there, and of course install syslinux, so the whole iso booting thing becomes moot, but I still like it.

thanks :lol: :confused1:

breaker

P.S. I was looking over the GRUB manual and you can build a pxe ready core.img... interesting.

Edited by breaker, 10 November 2010 - 09:06 AM.


#17 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,049 posts
  •  
    Belgium

Posted 10 November 2010 - 11:01 AM

@ breaker
No, I didn't try it (yet).

You might need the mboot.c32 COM32 module (loads images using multiboot protocol):
http://syslinux.zyto...x.php/Mboot.c32
http://syslinux.zyto...une/014434.html

#18 breaker

breaker

    Frequent Member

  • Advanced user
  • 108 posts
  •  
    United States

Posted 11 November 2010 - 02:29 AM

@Icecube I got it working!

First, from an Ubuntu based Linux I backed up the Syslinux mbr from my UFD (has working syslinux.cfg booting various things; Parted Magic, etc) using dd
sudo dd if=/dev/sdx of=syslinux.mbr bs=512 count=1
then from a Linux system with GRUB 1.98 ( I used Mint 10 RC Live USB), I installed GRUB to the UFD -
sudo grub-install --root-directory=/media/SYSLIN --no-floppy /dev/sdx
where /media/SYSLIN is my mounted UFD, and /dev/sdx is the Linux device name.

This of course installs GRUB to the mbr of /dev/sdx and puts the necessary GRUB files in /media/SYSLIN/boot/grub, including boot.img, core.img, and all of the modules.

Then I restored my syslinux mbr
sudo dd if=syslinux.mbr of=/dev/sdx bs=512 count=1

I made an entry for my /boot/syslinux/syslinux.cfg file
LABEL grub2

MENU LABEL Chainload Grub2

com32 chain.c32

append file=/boot/grub/boot.img
This works because on a PC BIOS based computer, normally boot.img is what GRUB puts in the mbr which in turn calls the rest of GRUB (core.img) etc.

Finally I had to make a simple /boot/grub/grub.cfg with a menu entry to test booting an iso, in this case Tinycore.
menuentry "tinycore Live CD" {

 loopback loop /boot/iso/tinycore_2.7.iso

 linux (loop)/boot/bzImage --

 initrd (loop)/boot/tinycore.gz

}

It worked in 3/3 computers I tested, however...

It does take a few more seconds to load than when GRUB is in the mbr, so I probably would prefer to start with GRUB there and chainload syslinux, which is my next experiment...

Thanks to the GRUB 1.98 manual, and the Syslinux wiki I was able to figure this out!

have fun!

breaker

#19 pokemon1

pokemon1

    Member

  • Members
  • 87 posts
  •  
    United Kingdom

Posted 23 November 2010 - 05:37 PM

Hi Icecube,
Post#12 the example of chainloading Grub2 from Grub4Dos you have shown; is there any way to pass a parameter to bypass default burg.cfg and open another custom.cfg?

title Grub2
kernel /boot/grub/core.img

This by default opens up the burg.cfg.

To be specific what I wanted to have is;
Boot into Grub4Dos with multiple menus pointing to multiple grub2 xxx.cfg files. Is it possible?

Thanks

#20 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 10,547 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 December 2010 - 04:48 PM

OT :ph34r:, but not much :unsure:, it seems like GRUB2 can also read "old style" GRUB legacy menu.lst:
http://www.msfn.org/...artition-grub2/

:w00t:
Wonko

#21 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,049 posts
  •  
    Belgium

Posted 21 December 2010 - 05:57 AM

I just wrote a patch for chain.c32 of Syslinux. Now it supports chainloading the core.img file of GRUB2.

GRUB2 allows to specify another "GRUB home dir" than the standard /boot/grub/
GRUB2 doesn't allow to change the configfile 'grub.cfg' name itself. That string is in the compressed part of core.img

GRUB Legacy allows you to change the whole filename of the configfile.

Usage with GRUB2 (BURG should work too, not tested):
# boot GRUB2 on the same partition as Syslinux

chain.c32 grub=/boot/grub/core.img fs



# boot GRUB2 on hard disk 1, primary partition 1

chain.c32 grub=/boot/grub/core.img hd0,1



# boot GRUB2 on hard disk 2, second logical partition, and set the GRUB2 home directory (which contains all the *.mod files) to /boot/grub2/

chain.c32 grub=/boot/grub2/core.img grub2dir=/boot/grub2 hd1,6
Usage with GRUB Legacy:
chain.c32 grub=/boot/grub/stage2 grubcfg=/boot/grub/grub.lst hd0,2

core.img of GRUB2 can also be booted with mboot.c32:
mboot.c32 core.img
mboot.c32 currently doesn't support passing the partition info MultiBoot format, so your GRUB2 core.img might look at the wrong partition for its *.mod/config file.
chain.c32 binary and modified source code in the attachment. The module is compiled for Syslinux 4.03.

Attached Files



#22 pokemon1

pokemon1

    Member

  • Members
  • 87 posts
  •  
    United Kingdom

Posted 28 March 2011 - 04:00 PM

Hi Icecube, thanks for the patched chain.c32. It is working with GRUB2 but not with BURG. Please refer below for detail tests;
Single partition [Folder Structure] with BURG & BURG2 directories with 2 diff burg.cfg for testing.

boot/burg/...
boot/burg2/...folder name does not matter as I tested with xyz and it worked.

Syslinux is installed on mbr and there are following 4 menus in syslinux.cfg to call 2 different burg.cfgs respectively residing within burg & burg2 folders. I have run following 4 tests

LABEL B1
MENU LABEL BURG1
KERNEL chain.c32 file=/boot/burg/boot.img fs

Success: Working fine with BURG so I am assuming it will work well with grub2
--------------------------------------------
LABEL B2
MENU LABEL BURG2 [Argument grub & grub2 core.img]
KERNEL chain.c32 grub=/boot/burg2/core.img grub2dir=/boot/burg2 fs

Success: I mean it is calling the grub2 menu (core.img has been specified)
--------------------------------------------
LABEL B3
MENU LABEL BURG2 [Argument file]
KERNEL chain.c32 file=/boot/burg2/boot.img grub2dir=/boot/burg2 fs

Error - grub2dir=<dirname> must be used together with grub=<loader>
--------------------------------------------
LABEL B4
MENU LABEL BURG2 [Argument grub]
KERNEL chain.c32 grub=/boot/burg2/boot.img grub2dir=/boot/burg2 fs

Error - the file specified by grub=<loader> is to small to be core.img of GRUB2
--------------------------------------------

From my limited knowledge I think -
test3: using argument 'grub2dir' is forcing it look for boot image argument 'grub=...' not 'file=...'

& test4 - using same argument 'grub2dir' is forcing it look for core.img (hardcoded?) & not accepting boot.img.

So is it possible to add another option i.e. 'burg2dir=...' that accepts 'file=...boot.img' so that multiple burg directories can be supported? Or can you please tell me how can I do it own my own?

Regards.

Edited by pokemon1, 28 March 2011 - 04:32 PM.


#23 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,049 posts
  •  
    Belgium

Posted 28 March 2011 - 05:13 PM

Hi Icecube, thanks for the patched chain.c32. It is working with GRUB2 but not with BURG.

It looks to me that it works:

--------------------------------------------

LABEL B2

MENU LABEL BURG2 [Argument grub & grub2 core.img]

KERNEL chain.c32 grub=/boot/burg2/core.img grub2dir=/boot/burg2 fs
Success: I mean it is calling the grub2 menu (core.img has been specified)
--------------------------------------------

LABEL B3

MENU LABEL BURG2 [Argument file]

KERNEL chain.c32 file=/boot/burg2/boot.img grub2dir=/boot/burg2 fs

Error - grub2dir=<dirname> must be used together with grub=<loader>
From my limited knowledge I think -
test3: using argument 'grub2dir' is forcing it look for boot image argument 'grub=...' not 'file=...'

Yes, this is true and there is a reason for it. grub2dir is only supported for core.img of grub2/burg. core.img needs to be loaded in a certain way (thats why you have the grub= parameter) and the grub2 dir string is patched inside core.img at a certain location. It makes no sense to support grub2dir for file= or another parameter.
Note: This won't work for grub2 (v1.99) atm, because they moved the grub2 directory string to the compressed part of core.img.

LABEL B4

MENU LABEL BURG2 [Argument grub]

KERNEL chain.c32 grub=/boot/burg2/boot.img grub2dir=/boot/burg2 fs

Error - the file specified by grub=<loader> is to small to be core.img of GRUB2
& test4 - using same argument 'grub2dir' is forcing it look for core.img (hardcoded?) & not accepting boot.img.

core.img is not hard coded, you can pass another filename, but it must be a binary that behaves like a core.img file.

So is it possible to add another option i.e. 'burg2dir=...' that accepts 'file=...boot.img' so that multiple burg directories can be supported? Or can you please tell me how can I do it own my own?

No, this is not possible. boot.img doesn't contain the grub2/burg directory. boot.img is a boot sector (512 bytes, at least the grub2 one) that just loads core.img.

To boot burg with a config file from a certain directory, use:
LABEL b1

MENU LABEL BURG2 (/boot/burg/ directory)

COM32 chain.c32

APPEND grub=/boot/burg/core.img grub2dir=/boot/burg fs



LABEL b2

MENU LABEL BURG2 (/boot/burg2/ directory)

COM32 chain.c32

APPEND grub=/boot/burg2/core.img grub2dir=/boot/burg2 fs



LABEL b3

MENU LABEL BURG2 (/boot/burg3/ directory)

COM32 chain.c32

APPEND grub=/boot/burg3/core.img grub2dir=/boot/burg3 fs
Note: This is the propper syntax. The parameters should go to the APPEND line. The syntax shown in my previous post is the syntax for using it from the Syslinux command line itself (boot: prompt).

#24 pokemon1

pokemon1

    Member

  • Members
  • 87 posts
  •  
    United Kingdom

Posted 28 March 2011 - 06:47 PM

Thanks Icecube for your prompt reply. I will test and confirm if everything works fine based on your suggestion.

It would really help me to finalise my fun projet! I will follow the proper syntax. One quick observation: Loading via core.img takes few more seconds more than loading via boot.img. Any idea why? Should not it be otherway?

I learned so many things here, I wish oneday I could write an easy multiboot tutorial (Using Syslinux, Burg & Grub4Dos) capturing all this bits and pieces so that others can get help.

Thanks again.

Edited by pokemon1, 28 March 2011 - 06:50 PM.


#25 pokemon1

pokemon1

    Member

  • Members
  • 87 posts
  •  
    United Kingdom

Posted 28 March 2011 - 09:04 PM

ok, syslinux to grub2/burg chainload is working fine!

I have one more question! Sorry for bothering you by asking so many noob questions may be.

How can i chanload grub2(burg) from grub2(burg)? Example -

From syslinux it is understood. Now suppose i have got same grub and grub2 folders under boot where grub2 (or burg) is primary boot loader that points to 'grub' folder to call grub.cfg.

How can i call grub.cfg that resides within boot/grub2/ folder? tried below commands but none of them worked (rather it opened up default grub.cfg under boot/grub/ folder)

a. linux /boot/grub2/core.img

b. multiboot /boot/grub2/core.img

So is there any way I can define/set the GRUB2 home directory as /boot/grub2/...?

Edited by pokemon1, 28 March 2011 - 09:20 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users