Jump to content











Photo
- - - - -

Boot grdlr, SETUPLDR.BIN and bootmgr with chain.c32 (syslinux)


  • Please log in to reply
24 replies to this topic

#1 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 17 July 2009 - 12:43 AM

When I boot grdlr with chain.c32 from SYSLINUX:
LABEL -

MENU LABEL GRUB4DOS menu (chain.c32)

TEXT HELP

 This entry will bring you to the GRUB4DOS menu.

ENDTEXT

COM32 /boot/syslinux/chain.c32

APPEND ntldr=/boot/grub/grldr
It boots fine, when I run it from a USB stick (or hard drive).

When I run it from ISOLINUX, it won't find the menu.lst file. The root device is set wrong (is set to hd0,0). It will find the menu.lst file when I edit the embedded menu (removed --ignore-cd). I don't want to do this, because when grub4dos starts scanning all devices, there is no advantage at using grldr instead of grub.exe. When SYSLINUX/ISOLINUX is booted first, the root device from which grub4dos should read, is already determined, but if it needs to use the 'find --set-root' command, you don't know which menu.lst file it is going to use (not the right one).

So grub4dos should stop at the bold text of the embedded menu for my purpose.

default 0
timeout 1

title find /menu.lst, /boot/grub/menu.lst, /grub/menu.lst
errorcheck off
configfile /menu.lst
configfile /boot/grub/menu.lst
configfile /grub/menu.lst

find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
errorcheck on
commandline

title commandline
commandline

title reboot
reboot

title halt
halt

chain.c32 does load the whole grldr file (ntldr of Windows XP doesn't do this), so you can put grldr at any directory.
It also passes the boot device in register DL.

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 17 July 2009 - 07:58 AM

I am not sure to have understtod the problem. ;)

If you hypothetically modify the embedded menu.lst as follows:

default 0
timeout 1

title find /menu.lst, /boot/grub/menu.lst, /grub/menu.lst
errorcheck off
configfile /menu.lst
configfile /boot/grub/menu.lst
configfile /grub/menu.lst

the menu.lst is found or NOT found?

:lol:

jaclaz

#3 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 17 July 2009 - 08:09 AM

The menu.lst file is found when the chain.c32 command is run from SYSLINUX (HDD or USB drive).

When you run chain.c32 from ISOLINUX (from a CD or DVD), grub4dos does set the root device to (hd0,0) and it won't find the menu.lst on the CD/DVD.

It might be interesting if someone could test if it works when your USB drive is recognized as floppy (fd0) or that grub4dos sets the root device to (hd0,0) too. Any volunteers?

#4 tinybit

tinybit

    Gold Member

  • Developer
  • 1157 posts
  •  
    China

Posted 17 July 2009 - 08:49 AM

Good job, Icecube.

As we talk about the "devices" in grub4dos, we will have to get involved in two aspects: One is about the "BIOS drive number" and the other is of the "partition number".

The BIOS drive number can be passed through the DL register, whereas the partition number should be passed to the install_partition variable.

The GRLDR structure:

GRLDR=Header(16 sectors) + pre_stage2

install_partition is a 4 byte integer located at offset 0x08 of pre_stage2. So it is equivalently at offset 0x2008 of GRLDR.

The lower word of install_partition should be 0xFFFF, so you need not touch it. The highest byte(8-bit) of install_partition should be 0. The less significant byte is the actual partition number and should be adjusted, i.e., for 0x00PPFFFF, the PP should be adjusted. Some devices(floppy, cdrom) use the "whole drive"(read "unpartitioned"), so the PP should be FF.

If problem still exists, quickly press the Insert key at startup and enter the debug mode. You may notice the message about the CDROM_DRIVE.

At the command line, you may use root, geometry, ls, etc. just to be sure who is the current root device.

#5 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 17 July 2009 - 09:25 AM

chain.c32 doesn't seem to do its job right, if I understand the output of the debug output of grub4dos right, chain.c32 doesn't pass the root device correctly when booted from ISOLINUX (or something else is messing things up).
boot_drive=80 int13/4B01(80), err=0,drive=80, Not CD

get_cdinfo(E0), int13/4B01(E0), err=0,drive=E0,  cdrom_drive == E0.

When I chainload grdlr from grub4dos itself (grub.exe) (run from CD):

chainloader --force /grldr

chainloader /grldr


(it doesn't work without --force (unsupportable format), just like isolinux.bin (v3.73) some while ago. I think it should be fixed.)

boot drive=E0, int13/4B01(E0), err=0,drive=E0, Is CD

  cdrom_drive == E0.
It shows the correct device and sets the root device to the CD drive.

I think I have to talk to the syslinux developers :lol:.

#6 tinybit

tinybit

    Gold Member

  • Developer
  • 1157 posts
  •  
    China

Posted 17 July 2009 - 09:37 AM

enh, I also think so.

The default value for install_partition is 0x00FFFFFF, which is alright for the CDROM, and no need to touch it.

Notice your cdrom is detected as 0xE0 by grub4dos. Do you see the root is set to drive 0xE0 correctly at the command line?

Now that you have root set to drive 0xE0 correctly, then why the menu files are unaccessible?

You may try to find the right cdrom drive number manually, in this way:

root (0xff)

root (0xfe)

root (0xfd)

root (0xfc)

.................

root (0x83)

root (0x82)

root (0x81)

If succeeded, it should show you with a message including the "iso9660" word.

--force


You might have been using an old version of grub4dos, or the grldr to be chainloaded is an old one.

#7 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 17 July 2009 - 09:52 AM

I am on my other PC (on which I didn't have the last grub.exe). I just wanted to change my previous post, because I just tough about that fact, but you already posted :lol: .

Running ls from the grub4dos chainloaded grldr shows the content of the CD drive.
The root command shows:
(hd96): Filesystem type is iso9660, using whole disk
So thats pretty good ;) .

#8 tinybit

tinybit

    Gold Member

  • Developer
  • 1157 posts
  •  
    China

Posted 17 July 2009 - 09:59 AM

Then it is weird the
configfile /menu.lst

configfile /boot/grub/menu.lst

configfile /grub/menu.lst
command group failed. Try to insert a "root" and a "pause" command before the group, just to display the root device.

#9 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 17 July 2009 - 10:21 AM

Probably, I had to be more clear.

When I chainload grldr from chain.c32 (ISOLINUX: thus booting from CD):
LABEL -

MENU LABEL GRUB4DOS menu (chain.c32)

TEXT HELP

This entry will bring you to the GRUB4DOS menu.

ENDTEXT

COM32 /boot/syslinux/chain.c32

APPEND ntldr=/boot/grub/grldr
I get:
boot_drive=80 int13/4B01(80), err=0,drive=80, Not CD

get_cdinfo(E0), int13/4B01(E0), err=0,drive=E0,  cdrom_drive == E0.
The root drive is set to (hd0,0) in that case.
grub> root

 (hd0,0): Filesystem type is fat, partition type 0x0B
And grub4dos can't find its menu.lst

When I boot grub.exe from ISOLINUX and chainload grldr from grub4dos (grub.exe), the menu.lst file is found.

isolinux config file (/ubcd/menus/isolinux/main.cfg)
LABEL -

MENU LABEL GRUB4DOS menu (grub.exe)

TEXT HELP

 This entry will bring you to the GRUB4DOS menu.

ENDTEXT

LINUX /ubcd/boot/grub4dos/grub.exe

APPEND --config-file="find --set-root /ubcd/menus/grub4dos/main.lst;configfile /ubcd/menus/grub4dos/main.lst"

Relevant part of /ubcd/menus/grub4dos/main.lst
title GRUB4DOS menu (chainload)\n This entry will bring you back to the GRUB4DOS menu.

chainloader /boot/grub/grldr
I get:
boot drive=E0, int13/4B01(E0), err=0,drive=E0, Is CD

  cdrom_drive == E0.
The chainloaded grldr finds /boot/grub/menu.lst on the CD (root drive set to (0xE0)=(hd96)).
grub> root

 (hd96): Filesystem type is iso9660, using whole disk

So chain.c32 is doing something wrong.

#10 tinybit

tinybit

    Gold Member

  • Developer
  • 1157 posts
  •  
    China

Posted 17 July 2009 - 10:50 AM

Certainly if chain.c32 could set DL to the correct cdrom drive number, this problem will be solved utterly.

But it seems to be weird with the grldr boot process.

Consider the kernel loaded grub.exe could set cdrom(0xE0) to be the current root correctly, then the chain.c32 loaded grldr should also set cdrom(0xE0) to be the current root. But the latter failed, so this is weird.

#11 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 17 July 2009 - 11:55 AM

chain.c32 can pass the boot drive fine to the DL register if it wants it.

The following command works (explicitly set the harddrive number that should be passed to grldr):

LABEL -
MENU LABEL GRUB4DOS menu (chain.c32)
TEXT HELP
This entry will bring you to the GRUB4DOS menu.
ENDTEXT
COM32 /boot/syslinux/chain.c32
APPEND ntldr=/boot/grub/grldr hd96

(0xE0 = hd96)

So it will probably easy to fix this problem in chain.c32 :lol:.

#12 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 19 July 2009 - 07:07 PM

chain.c32 did always set the boot drive to 0x80 in the DL register when it was started from ISOLINUX, because it was assumed that chainloaded bootsectors are made for hard drives.

H. Peter Anvin (SYLINUX developer) tracked down this design assumption.

The following patch fixes the problem:
[codebox]$ diff -u ./com32/modules/chain.c.old ./com32/modules/chain.c.new--- ./com32/modules/chain.c.old 2009-07-19 20:33:16.468094540 +0200+++ ./com32/modules/chain.c.new 2009-07-19 20:26:54.636091513 +0200@@ -666,8 +666,7 @@ } else if (!strcmp(drivename, "boot")) { const union syslinux_derivative_info *sdi; sdi = syslinux_derivative_info();- if (sdi->c.filesystem == SYSLINUX_FS_PXELINUX ||- sdi->c.filesystem == SYSLINUX_FS_ISOLINUX)+ if (sdi->c.filesystem == SYSLINUX_FS_PXELINUX ) drive = 0x80; /* Boot drive not available */ else drive = sdi->disk.drive_number;[/codebox]With the chain.c32 attached to this post, the following works for SYLINUX and ISOLINUX (EXTLINUX should work too):[code]LABEL -MENU LABEL GRUB4DOS menu (chain.c32 ntldr=)TEXT HELPThis entry will bring you to the GRUB4DOS menu.ENDTEXTCOM32 /boot/syslinux/chain.c32APPEND ntldr=/boot/grub/grldr[/code]I just found out that the following works too for booting grldr from SYSLINUX and ISOLINUX:[code]LABEL -MENU LABEL GRUB4DOS menu (BOOT command)TEXT HELPThis entry will bring you to the GRUB4DOS menu.ENDTEXTBOOT /boot/grub/grldr[/code]
Some more info about the BOOT command:
BOOT image			- Bootstrap program (.bs, .bin)



  .bin	"CD boot sector" [ISOLINUX only]

  .bs	 Boot sector [SYSLINUX only]

Update:
chain.c32 is fixed in syslinux-3.83-pre1, so no need to download the attached version:
http://www.kernel.or...slinux/Testing/

Attached Files



#13 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 July 2009 - 09:41 AM

I just found out that the following works too for booting grldr from SYSLINUX and ISOLINUX:

LABEL -

MENU LABEL GRUB4DOS menu (BOOT command)

TEXT HELP

This entry will bring you to the GRUB4DOS menu.

ENDTEXT

BOOT /boot/grub/grldr
Some more info about the BOOT command:
BOOT image			- Bootstrap program (.bs, .bin)



  .bin	"CD boot sector" [ISOLINUX only]

  .bs	 Boot sector [SYSLINUX only]


This appears to me as a very "clean" and intuitive way. :lol:

;)

jaclaz

#14 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 20 July 2009 - 10:45 PM

This appears to me as a very "clean" and intuitive way. :lol:

The BOOT command only works in SYSLINUX and ISOLINUX, because grldr can be loaded as a hard disk boot sector and a no-emulation bootsector for CD/DVD (and as ntldr). It won't work for other no-emulation bootsectors, that aren't hard disk boot sectors at the same time (or vice versa) in ISOLINUX AND SYSLINUX. grldr is just an exception.

Because the BOOT command for loading grldr works on SYSLINUX (does load a regular boot sector from a file), grldr doesn't need to be loaded as ntldr. Loading it as regular boot file will work too. (You need the patched chain.c32, if you want to use it from ISOLINUX).
So another way:
LABEL -

MENU LABEL GRUB4DOS menu (chain.c32 file=)

TEXT HELP

This entry will bring you to the GRUB4DOS menu.

ENDTEXT

COM32 /boot/syslinux/chain.c32

APPEND file=/boot/grub/grldr


#15 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 23 July 2009 - 07:13 PM

With the patched chain.c32, you can also chainload:
  • SETUPLDR.BIN (Windows 2000/XP/2003)
  • bootmgr (Windows Vista/2008/7)
from ISOLINUX (non-patched version won't set the root drive to the booted CD/DVD).

Place menu.c32 and the patched chain.c32 in the same folder as the isolinux.cfg file (or adapt the paths in the config file).

Contents of the isolinux.cfg file:
UI menu.c32



LABEL winxp

MENU LABEL Boot Windows 2000/XP/2003 (SETUPLDR.BIN) from CD/DVD

COM32 chain.c32

APPEND ntldr=/I386/SETUPLDR.BIN



LABEL win7

MENU LABEL Boot Windows Vista/2008/7 (bootmgr) from CD/DVD

COM32 chain.c32

APPEND ntldr=/bootmgr


#16 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 24 July 2009 - 11:03 AM

chain.c32 is fixed in syslinux-3.83-pre1, so no need to download the attached version from above:
http://www.kernel.or...slinux/Testing/

#17 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 21 August 2009 - 11:33 AM

@ Tinybit
I have the following files (actually there are more files) on my first logical partition (hd0,4)=/dev/sda5 (has Syslinux installed on the drive):
if (filemax > 0x8000 && (*(short *)SCRATCHADDR) == 0x3EEB && (*(long *)(SCRATCHADDR + 0x40)) == 0x5B0000E8 &&       (*((unsigned short *) (SCRATCHADDR + BOOTSEC_SIG_OFFSET)) != BOOTSEC_SIGNATURE))    {	char tmp_buf[16];	filepos = 0x1FF8;	/* grldr signature, pre_stage2, etc */      	if (grub_read (tmp_buf, 16, 0xedde0d90) != 16)		goto failure_exec_format;	filepos = 0x200;	if (*(short *)tmp_buf < 0x40 || *(short *)tmp_buf > 0x1B8)		goto check_isolinux;	if (*(long *)(tmp_buf + 8) != 0x008270EA)		goto check_isolinux;	if (*(long *)(SCRATCHADDR + *(short *)tmp_buf) != *(long *)(tmp_buf + 4))		goto check_isolinux;	if ((*(long long *)(void *)((int)*(short *)tmp_buf + (int)SCRATCHADDR - 5) & 0xFFFFFFFFFFLL) != 0xB8661FFCBBLL)		goto check_isolinux;//	if (chainloader_load_segment == -1)//		chainloader_load_segment = 0x2000;//	if (chainloader_load_offset == -1)//		chainloader_load_offset = 0;	if (chainloader_load_length == -1)		chainloader_load_length = filemax;	if (! chainloader_edx_set)	{		chainloader_edx = current_drive | ((current_partition >> 8) & 0xFF00);		chainloader_edx_set = 1;	}	is_grldr = 1;	    	grub_close ();		if (debug > 0)	  grub_printf("Will boot GRLDR from drive=0x%x, partition=0x%x(hidden sectors=0x%x)\n", current_drive, ((current_partition >> 16) & 0xff), (long)part_start);    }
Why doesn't grub4dos use the contents of SI, to get the right partition (when chainloaded)?

If an active partition is found, that partition's boot record is read into 0000:7c00 and the MBR code jumps to 0000:7c00 with SI pointing to the partition table entry that describes the partition being booted. The boot record program uses this data to determine the drive being booted from and the location of the partition on the disk.

http://www.ata-atapi.com/hiwmbr.html

#18 homes32

homes32

    Gold Member

  • .script developer
  • 1030 posts
  • Location:Minnesota
  •  
    United States

Posted 19 November 2009 - 04:58 PM

LABEL -

MENU LABEL GRUB4DOS menu &#40;chain.c32 ntldr=&#41;

TEXT HELP

This entry will bring you to the GRUB4DOS menu.

ENDTEXT

COM32 /boot/isolinux/chain.c32

APPEND ntldr=/boot/grldr

LABEL -

MENU LABEL GRUB4DOS menu &#40;BOOT command&#41;

TEXT HELP

This entry will bring you to the GRUB4DOS menu.

ENDTEXT

BOOT /boot/grldr

both of these methods work nice for me as long as I don't use the -force-uppercase switch when building the ISO with mkISOfs.exe. if I use -force-uppercase then grub4dos will not find the menu.lst (located at /menu.lst). I do not have this issue when using grub4dos as my primary boot loader with the -force-uppercase switch. only when using the above method to load grub4dos from isolinux.

is this an issue with grub or do I need to change something with my iso structure? if you like I can provide an ISO for examination.

#19 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 19 November 2009 - 05:06 PM

both of these methods work nice for me as long as I don't use the -force-uppercase switch when building the ISO with mkISOfs.exe. if I use -force-uppercase then grub4dos will not find the menu.lst (located at /menu.lst). I do not have this issue when using grub4dos as my primary boot loader with the -force-uppercase switch. only when using the above method to load grub4dos from isolinux.

is this an issue with grub or do I need to change something with my iso structure? if you like I can provide an ISO for examination.


Read here :dubbio::
http://www.boot-land...?showtopic=9696
http://www.boot-land...?...c=9696&st=6

jaclaz

#20 homes32

homes32

    Gold Member

  • .script developer
  • 1030 posts
  • Location:Minnesota
  •  
    United States

Posted 19 November 2009 - 05:52 PM

Read here :dubbio::
http://www.boot-land...?showtopic=9696
http://www.boot-land...?...c=9696&st=6

jaclaz

adding rockridge and joliet extensions did the trick. thank you for your help. :cheers:

#21 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 07 January 2010 - 03:43 PM

As we talk about the "devices" in grub4dos, we will have to get
involved in two aspects: One is about the "BIOS drive number" and the
other is of the "partition number".

The BIOS drive number can be passed through the DL register, whereas
the partition number should be passed to the install_partition
variable.

The GRLDR structure:

GRLDR=Header(16 sectors) + pre_stage2

install_partition is a 4 byte integer located at offset 0x08 of
pre_stage2. So it is equivalently at offset 0x2008 of GRLDR.

The lower word of install_partition should be 0xFFFF, so you need not
touch it. The highest byte(8-bit) of install_partition should be 0.
The less significant byte is the actual partition number and should be
adjusted, i.e., for 0x00PPFFFF, the PP should be adjusted. Some
devices(floppy, cdrom) use the "whole drive"(read "unpartitioned"), so
the PP should be FF.

Hex representation of grldr from file offset 0x2000:
$ hexdump -C -n 64 -s 0x2000 ./grldr

00002000  ea 70 82 00 00 00 03 02  ff ff ff 00 e2 84 00 00  |.p..............|

00002010  00 00 30 2e 39 37 00 2f  62 6f 6f 74 2f 67 72 75  |..0.97./boot/gru|

00002020  62 2f 6d 65 6e 75 2e 6c  73 74 00 00 00 00 00 00  |b/menu.lst......|

00002030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00002040
I am trying to make chain.c32 pass the partition info to grldr too.
The part of the install_partition variable that I need to
change is byte at offset 0x200A (third ff of first line), right?

00002000 ea 70 82 00 00 00 03 02 ff ff ff 00 e2 84 00
00 |.p..............|

Grub4dos doesn't seem to read the install_partition variable (bold part is reset to "00").
Or does the partition info need to be set in the Boot Sector/Boot Record Layout for Ext2/3, FAT and NTFS (at offset 0x25 or 0x41of each sector)?
At which address grldr prefers to be loaded?
How does Grub4dos load grldr (technically)? Which info is passed to
grldr (or where is it patched)?
title Load grldr from Grub4dos\n Search for menu.lst on &#40;hd2,7&#41; first

chainloader /grldr

root &#40;hd2,7&#41;


#22 tinybit

tinybit

    Gold Member

  • Developer
  • 1157 posts
  •  
    China

Posted 08 January 2010 - 05:09 AM

First, I almost have completely forgotten this thread.I think this thread should be shared by both subforums "syslinux" and "grub4dos". Perhaps the moderator or the site developers can do it.

I am sorry for my last post which was not clear enough. And I had lost something.

GRLDR can be loaded at any address with alignment 16(i.e., a possible segment base address). Generally you want to load it at 0000:7C00, or at 2000:0000. Of course you never load it at 0000:0000 or similar.

Before jumping to the entry point at the very beginning of GRLDR, you should setup DL=(BIOS drive) and DH=(partition number). For partition numbers, 0 - 3 are primary, 4 - 0xFE are logical. (DH=0xFF) stands for whole drive(unpartitioned). DH will later be passed to install_partition(the third byte, from bit 16 to bit 23).

Or does the partition info need to be set in the Boot Sector/Boot Record Layout for Ext2/3, FAT and NTFS (at offset 0x25 or 0x41of each sector)?


Yes. the partition number must be set to the correct value in the BPB of the boot sector, if this boot sector is (to be) placed on the partition's boot area.

How does Grub4dos load grldr (technically)? Which info is passed to grldr (or where is it patched)?


In whatever manner grldr is loaded, the DX register will be passed to. And DL=drive, DH=partition.

#23 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 09 January 2010 - 03:00 PM

I got it working now :D. Correct info makes it a lot easier ;) .
LABEL grldr_second_logical_partiton_as_root

MENU LABEL Boot grldr and tell it to use second logical partition as root drive

TEXT HELP

 This will force Grub4dos to first search the second logical partition

 for a menu.lst before searching the other partitions.

ENDTEXT

COM32 chain.c32

APPEND grldr=/some/dir/grldr hd0 6



LABEL grldr_second_primary_partiton_as_root

MENU LABEL Boot grldr and tell it to use second primary partition as root drive

TEXT HELP

 This will force Grub4dos to first search the second primary partition

 for a menu.lst before searching the other partitions.

ENDTEXT

COM32 chain.c32

APPEND grldr=/some/dir/grldr hd0 2



LABEL grldr_second_primary_partiton_as_root_swap_drive

MENU LABEL Boot grldr and tell it to use second primary partition as root drive &#40;swap&#41;

TEXT HELP

 &#34;swap&#34; will swap hd1 with hd0 &#40;the &#40;hd0&#41; that grub4dos will see

 is in reality &#40;hd1&#41;&#41;. The swapping is usefull when you boot from USB and you want

 to use the menu.lst on the internal hard drive &#40;which hard coded &#40;hd?,?&#41; entries&#41;.

 This will force Grub4dos to first search the second primary partition

 for a menu.lst on the second hard drive &#40;before the swapping&#41;

 before searching the other partitions.

ENDTEXT

COM32 chain.c32

APPEND grldr=/some/dir/grldr hd1 2 swap

Get Syslinux 3.84 (or Syslinux 3.85-pre1) and the chain.c32 of the attached file.

Edit: Fixed copy/paste/replace error.

Attached Files



#24 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 09 January 2010 - 05:20 PM

I got it working now :D. Correct info makes it a lot easier :) .

Yep, and that should also be true for trying not to posr "confusing" info ;):

This will force Grub4dos to first search the primary logical partition
for a menu.lst before searching the other partitions.


;)

:)

Wonko

#25 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 30 January 2010 - 04:27 PM

chain.c32 of syslinux-3.85-pre3 can now chainload grldr and set root correctly.
The grldr= command doesn't exist in that version.
Just use ntldr= or file=.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users