WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: (solved) Start ISOs via Grub -> extlinux -> Grub4DOS  (Read 18375 times)

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: Linux ISOs and memdisk are compatible?
« Reply #15 on: October 09, 2011, 02:09:55 AM »
Easiest way would be to put a menu.lst in the root of sdb1 containing
Code: [Select]
configfile /boot/diverse/menu.lst

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: Linux ISOs and memdisk are compatible?
« Reply #16 on: October 09, 2011, 10:24:16 AM »
Thanks, this is nearly working with the help of you and of the .. "plop" bootloader.
I explain.

My PC is going at boot into the first HDD which is sda1 with Grub (standard) on it.
I can go to my CF 8GB (on IDE adapter) with

in the menu.lst of /boot/grub/
...
title           Go to Syslinux of the CF on sdb1
root            (hd1,0)
chainloader     +1
...

So, my extlinux menu appear with different submenues on it.
In this extlinux.conf, I included

   ...
label start grub
      kernel /boot/diverse/grub.exe 
# from grub4dos

LABEL bootloader plop for usb etc.
   MENU LABEL bootloader plop for usb etc.
   linux /boot/diverse/plpbt.bin
# you will  understand later why
   ...

and in the root directory of sdb1 a menu.lst with the content
configfile /boot/diverse/menu.lst  (where in this new menu.lst are different submenues for starting ISOs directly from the grub4dos).

Result:
- grub dont forget the menu.lst on my sda1 (a bug? memory because chainload+1 was used in the first menu.lst?) till...
- I start plop and boot via plop in my CF 8GB card

It seems plop make a memory cleaning of the first menu.lst and then grub4dos dont come back again to my first menu.lst. So, I can boot later the ISOs which are found.

The question now is: by this type of command
title           Go to Syslinux of the CF on sdb1
root            (hd1,0)
chainloader     +1
... can we "clean" the grub memory in order that no grub (started later) will remember this menu.lst (and the place where it is) has existed?
« Last Edit: October 09, 2011, 10:32:02 AM by floppy »
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: Linux ISOs and memdisk are compatible?
« Reply #17 on: October 09, 2011, 11:17:17 AM »
... and in the root directory of sdb1 a menu.lst with the content
configfile /boot/diverse/menu.lst  (where in this new menu.lst are different submenues for starting ISOs directly from the grub4dos).

I am not sure why your configuration did not work.

Once you are executing grub4dos, you can control which partition is used as the grub4dos default with the "find --set-root ..." command:

Code: [Select]
find --set-root /boot/diverse/menu.lst
configfile /boot/diverse/menu.lst

The find command searches all partitions for one that contains the file /boot/diverse/menu.lst and then uses that partition as the default for subsequent commands.  That should force the configfile command to use the right partition.

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: Linux ISOs and memdisk are compatible?
« Reply #18 on: October 09, 2011, 11:49:10 AM »
in
http://diddy.boot-land.net/grub4dos/files/README_GRUB4DOS.txt

is written:
===============
   Update 3(2006-12-23): By default, GRUB.EXE will locate its
      config file in the following order:

         (DOS file) .\menu.lst, the MENU.LST in the current dir.

         (DOS file) \menu.lst, the MENU.LST in the root dir of
                  the current drive.
         (GRUB file) /menu.lst, the MENU.LST in the root dir of
                  the boot device.

      The default boot device is still (hd0,0).
=================
it mean grub.exe seems to search everything first in the defined hd(0,0).. (which is probably defined with the first grub legacy which was started at the first boot).
I will try now to make parameters overtaken by grub.exe in my extlinux.conf

label start grub
      kernel /boot/diverse/grub.exe
# grub.exe from grub4dos
      append config-file="find --set-root /boot/diverse/menu.lst; configfile /boot/diverse/menu.lst"
     
let see...

update: it doesnt work... it goes back to the menu.lst of the hd(0,0). Inside the "label start grub" of the extlinux.conf file above, I should put something, so that any hd(x,y) are lost/deleted. I will think again about a solution (prio 2 because "plop" is probably cleaning any hd(0,0) reference). Perhaps I should go to a grub4dos + extlinux forum and ask them how to pass parameters to grub.exe when extlinux is on the screen.
« Last Edit: October 09, 2011, 12:04:30 PM by floppy »
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: Linux ISOs and memdisk are compatible?
« Reply #19 on: October 09, 2011, 12:38:42 PM »
Execute "strings grldr" or "strings grub.exe" to see the actual embedded grub4dos configuration file.

Remove the "append config-file=..." text from the extlinux.conf stanza that executes grub.exe.

Create a menu.lst file in the root directory of your sdb1 partition that contains

Code: [Select]
find --set-root /boot/diverse/menu.lst
configfile /boot/diverse/menu.lst

See if that works.  If not, change that menu.lst file in the root directory of sdb1 to be

Code: [Select]
configfile (hd1,0)/boot/diverse/menu.lst

See if that works.  If not, create a menu.lst file in the root directory of your sda1 partition that contains

Code: [Select]
find --set-root /boot/diverse/menu.lst
configfile /boot/diverse/menu.lst

See if that works.  If not, change that menu.lst file in the root directory of sda1 to be

Code: [Select]
configfile (hd1,0)/boot/diverse/menu.lst

See if that works.

One of those experiments should solve your problem.

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: Linux ISOs and memdisk are compatible?
« Reply #20 on: October 09, 2011, 01:54:00 PM »
The "strings grub.exe" show an embedded grub4dos configuration file as per the previous link of "Grub4dos Guide - Embedded Menu".

With a menu.lst file in sda1
find --set-root /boot/diverse/menu.lst
configfile /boot/diverse/menu.lst

it works. Thanks.

My understunding:
- the first grub (install year 2010) load some defaults and use only the (hd0,0)/boot/grub/menu.lst (not the (hd0,0)/menu.lst)
- the second started grub4dos (latest version), started via extlinux, search first the menu.lst on / then /grub then /boot/grub in the (hd0,0) (it dont forget where it is)
- "plop" cleaned anything; in this case grub4dos was searching for menu.lst on the boot place of the extlinux
- the grub4dos people should make possible grub.exe to consider parameters
     kernel /../grub.exe
     append config-file="find --set-root /boot/diverse/menu.lst; configfile /boot/diverse/menu.lst"

.. or whatever..
I can now boot ISOs, started with grub4dos (CDrom emulation), which was started via extlinux.. started before with the TCL grub (see extension).
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed