Jump to content











Photo
- - - - -

Breakthrough in grub4dos development


  • Please log in to reply
11 replies to this topic

#1 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 14 November 2009 - 03:31 PM

well , to me at least it is a break through . i find this most difficult i dont know why , but chenal made it happen with grub4dos only .

anyways , an exciting new feature has been put in grub4dos's latest version where , the main pe file ( setupldr.bin ) will be mapped to memory , and using cat function , it can be hex edited on the fly .

examples ,

title WXPE and WINNT.XPE
map --mem /WXPE/SETUPLDR.BIN (rd)
cat --locate=I386 --replace=WXPE (rd)+1
cat --locate=WINNT.SIF --replace=WINNT.XPE (rd)+1
chainloader (rd)+1
root ()

title TYPE and TYPE.XPE
map --mem /WXPE/SETUPLDR.BIN (rd)
cat --locate=I386 --replace=TYPE (rd)+1
cat --locate=WINNT.SIF --replace=TYPE.XPE (rd)+1
chainloader (rd)+1
root ()


, these functions are ,mmm lets say in alpha stage .

links of interest

http://bbs.znpc.net/.....;extra=page=1

http://bbs.wuyou.com...ge=1#pid1829975


Latest Grub4dos as of 14th Nov 2009 .

http://nufans.net/gr...-2009-11-14.zip

( not yet tested by me , just got informed by pseudo about the release)

#2 was_jaclaz

was_jaclaz

    Finder

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

Posted 14 November 2009 - 03:47 PM

Maybe not a "breakthrough", but really, really nice. :)

The part that is interesting (as I see it), more than the "on-the-fly" editing, is the direct mapping to (rd) of files, that I didn't think was possible.

:drunk:

jaclaz

#3 Mio Kawaii

Mio Kawaii
  • Members
  • 4 posts
  •  
    Singapore

Posted 14 November 2009 - 04:30 PM

glad to know there's still development on g4d.

#4 cdob

cdob

    Gold Member

  • Expert
  • 1438 posts

Posted 16 November 2009 - 09:22 PM

it can be hex edited on the fly

Thanks, that's good news and a relief.
My multi installation CD used BCDW because of this the last several years.

Grub4dos hex editing on the fly give more possibilities, e.g. ignore 2003 setupldr.bin checksum.
title Loading XP install - plain /I386/SETUPLDR.BIN

chainloader /I386/SETUPLDR.BIN



title Windows XP PRO 64 SP2 - multi boot 

map --mem /XP64/I386/SETUPLDR.BIN (rd)

#checksum: geitonaki http://www.msfn.org/board/index.php?showtopic=58410

write --offset=0x2060 (rd)+1 \xEB\x1A

#cdob SetupSourcePath="\XP64\"; BootPath=\XP64\AMD64\  

#http://www.msfn.org/board/index.php?s=&showtopic=126480&view=findpost&p=814566

cat --locate="\\i386\\ntdetect" --replace="\\XP64\\ntdetect.com" (rd)+1

cat --locate="amd64\\" --replace="XP64\\\x00" (rd)+1

cat --locate="AMD64\\" --replace="XP64\\\x00" (rd)+1

cat --locate="\\AMD64" --replace="\\XP64\x00" (rd)+1

cat --locate=I386 --replace=XP64 (rd)+1

chainloader (rd)+1

root ()


#5 Lost

Lost
  • Members
  • 8 posts

Posted 24 November 2009 - 08:30 AM

Nice feature indeed.
Successfully booted two ramdisk-based BartPE isos on same partition with a single setupldr.bin and two winnt.sif files.

Here is menu.lst:
title BartPE

chainloader /setupldr



title BartPE (Second version)

map --mem /setupldr (rd)

write --offset=0x2060 (rd)+1 \xEB\x1A

cat --locate=winnt.sif --replace=winn2.sif (rd)+1

cat --locate=WINNT.SIF --replace=WINN2.SIF (rd)+1

chainloader (rd)+1

root ()

As you can see the second entry forces setupldr.bin to use winn2.sif, which contains a different /rdpath, pointing to another iso. As they say "works like a charm" :dubbio:

#6 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 24 November 2009 - 08:51 AM

cat --locate=winnt.sif --replace=winn2.sif (rd)+1
cat --locate=WINNT.SIF --replace=WINN2.SIF (rd)+1

just wondering why are you using them 2 times >? single time is enough,.

#7 Lost

Lost
  • Members
  • 8 posts

Posted 24 November 2009 - 09:05 AM

Tried only first line -> no result.
Maybe I should test it with second line only. Added it because of uppercase and lowercase occasions of winnt.sif in setupldr.bin.

#8 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 24 November 2009 - 09:26 AM

Tried only first line -> no result.
Maybe I should test it with second line only. Added it because of uppercase and lowercase occasions of winnt.sif in setupldr.bin.


ah so you were booting from cd , right ? well uppercase will do the work for both usb and cd

#9 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10544 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 24 November 2009 - 09:45 AM

wow.. this is a breakthrough! :thumbup:

BCDW has been in frozen state for quite some time and this is an excellent feature for Grub4DOS.

I'm really happy to hear this.

:)

#10 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 02 January 2010 - 09:14 PM

The --replace option for cat is now in grub4dos:
Changelog: grub4dos-0.4.5a-2010-01-02

2010-01-02 applied karyonix's patch(map improvements).
2009-12-30 fixed the failed find. note that the kernel command could hang while loading non-linux kernels, which is a known bug on newish 0.4.5 versions.
2009-12-28 initial implementation of program execution. fixed a bug causing FAT16 search hang(grldrstart.S). version number changed to 0.4.5a.
2009-12-12 moved up 32-bit grub kernel code at above physical addess 3M. moved down buffer for dd and geometry-tune at 0x20000. moved down raw disk buffer at 0x30000. version number changed to 0.4.5.
2009-12-02 (chenall)fixed a bug in color_func(builtins.c).
2009-12-01 (chenall)fixed a bug which caused dd/write to write onto the wrong sector of the disk(fsys_ntfs.c).
2009-11-29 (chenall)fixed a bug when using (md) to access memory at 2G and above(bios.c). improved memmove64 to support overlap(asm.S).
2009-11-25 Caution! Reports say build 2009-11-08 and later will write wrong data onto disk when using dd and/or write commands.
2009-11-13 (chenall)added --replace option for cat. This will write to file. Caution!
2009-11-11 let PXE_BUF use BUFFERADDR. cancelled (hd+) support. added (hd) and (hd-N) support.
2009-11-09 moved FSYS_BUF and some other buffers up at 0x3E0000. (chenall)added (hd+) support for map.
2009-11-08 map memdrive images at memory address above 4GB(only for 64-bit CPU). deleted SETUP, INSTALL and EMBED commands.
2009-10-16 Turned off int13/AX=4B01/DL=7F cdrom query which may hang on some machines. Commented out DMA code related to running via KEXEC. Implemented 64-bit int13 memdrive block moving code.
2009-06-20(r68) add (ud) device to access space created with fbinst.



#11 shamurshamur

shamurshamur

    Frequent Member

  • Developer
  • 322 posts
  •  
    India

Posted 16 March 2010 - 03:43 PM

Can i use this method to edit isolinux.bin,on the fly.
For example,i want to force isolinux.bin to look for another configuration file,instead of default configuration file ie isolinux.cfg.

I tried the following commands:

map --mem /isolinux.bin (rd)

cat --locate="isolinux.cfg" --replace="isolinux.cf2" (rd)+1

chainloader (rd)+1

But it gives the following error message:
autodetect number-of-heads failed. use default value 2

autodetect sectors-per-track failed. use default value 18

34F2

cannot chainload ISOLINUX from a non CD-ROM device

ERROR 13 : invalid or unsupported executable format


#12 tinybit

tinybit

    Gold Member

  • Developer
  • 1117 posts
  •  
    China

Posted 16 March 2010 - 05:21 PM

cannot chainload ISOLINUX from a non CD-ROM device


That is enough. You cannot load isolinux.bin from a device outside cdrom.

ISOLINUX.BIN only works on cdrom. It also has checksum. So you cannot edit it on the fly.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users