web statistics


 

 GRUB Chainloading on RAM disk, How to boot from a ramdisk?
Nuno Brito
Posted: Jul 5 2006, 04:57 PM


Frequent
*

Group: .script developer
Posts: 342
Member No.: 1
Joined: 8-May 06



I'm booting a windows ME boot disk from diskcopy.dll like jaclaz described earlier, this image is combined with a PE based build, loading the CD rom drivers provided by freedos. I'm able to acess the CDROM drive, create the ramdisk and copy all files into this ramdisk.

My question here is:

Is it possible to boot setupldr.bin from the files on this ramdisk using grub.exe?

There's all sort of topics on the CD forum, but I'm still wondering if this could be done, the "find" command inside grub seemed like a good start point, but I was unable to use it properly, even with exact filecases it doesn't retrieve the information I was looking..

sad.gif


--------------------
Nuno Brito's page - A simple one man page - nothing else - nothing less simple..
Top
jaclaz
Posted: Jul 6 2006, 11:15 AM


Searcher
*

Group: Moderator
Posts: 65
Member No.: 9
Joined: 9-May 06



How do you make the ramdisk?

If you do it from dos, it won't work.

If, on the other hand, if you use GRUB to make it, by mapping to memory a hard disk image, it "might" work:

map --mem --read-only (hd0,0)/hd.img (hd1)
find --set-root /setupldr.bin
chainloader /setupldr.bin

(completely and utterly untested) wink.gif

jaclaz

Top
Nuno Brito
Posted: Jul 6 2006, 02:04 PM


Frequent
*

Group: .script developer
Posts: 342
Member No.: 1
Joined: 8-May 06



I've forgot to mention, that I'm indeed using DOS to create a ramdisk (using the same process on the freedos image here: http://z3.invisionfree.com/Boot_Land/index.php?showtopic=22 - time to try another approach: boot a compressed windows ISO


GRUB can load GZIP'ed images, so can a workaround exist?

This is also interesting to try out, making an image using grub as boot loader including inside a gziped image ready to be uncompressed and then loaded.

Do you know if it would work with a compressed ISO windows image? blink.gif

QUOTE

Try the following:
find /FLOPPIES/MODBOOT.imz

Then try copying, just for the sake of it,
MODBOOT.imz to the root of your e: drive
and try
find /MODBOOT.imz

Then try copying, again just for the sake of it,
MODBOOT.imz to the root of your c: drive
and try
find /MODBOOT.imz


I'm still in doubt on how to find the compressed image and trying this, do the retrieved find values change from computer to computer? huh.gif


Some of the links I've visited along the way:

http://www.openbg.net/sto/os/xml/grub.html

http://fbim.fh-regensburg.de/~feyrer/g4u/ (ghost for unix seems an interesting project to try..)

And finnaly I've read and re-read this thread trying to figure by myself how to do it..
http://www.911cd.net/forums//index.php?act...er&f=20&t=16980

mellow.gif


--------------------
Nuno Brito's page - A simple one man page - nothing else - nothing less simple..
Top
jaclaz
Posted: Jul 6 2006, 08:20 PM


Searcher
*

Group: Moderator
Posts: 65
Member No.: 9
Joined: 9-May 06



QUOTE

Do you know if it would work with a compressed ISO windows image?

No, it won't.

As of now grub4dos supports (plain or compressed):
floppy disk images
Hard disk images (i.e. with MBR)
Hard disk partitions aka superfloppy images (i.e. without MBR)

The only tool that can boot .iso I know of is isoemu:
http://sysoft.zdwx.com/isoemu/bin/

but it won't work for "NT based OS " isos, as far as I know.

AVLGOMGR, it's "successor" is a kind of grub4dos+isoemu:
http://www.911cd.net/forums/lofiversion/in...php/t15994.html

Never had time to test it, but I presume it won't be able to boot a "NT based OS" image as well.

jaclaz
Top
Bopha
Posted: Jul 8 2006, 05:14 AM


Member
*

Group: Advanced member
Posts: 34
Member No.: 43
Joined: 12-June 06



This is a half-baked idea half explained but.. could you GRUB launch an ISO with CD Boot Wizard on it to launch setupldr? I know the web site stated that it had problems with SP2, but it may work anyway. Disclaimer: I haven't had much luck getting *any* ramdisk PE things to work sad.gif
Top
wendy
Posted: Jul 8 2006, 07:20 AM


an OS/2 fan two
*

Group: Advanced member
Posts: 27
Member No.: 17
Joined: 11-May 06



The trick with booting a ramdisk is that somehow, the boot loader must pass the handle to the booting OS. Most ramdisk drivers do not support this.

OS/2 does this when using Viet K's modified memdisk proggie.

You can also boot BartPE by using a ram-iso file. The trick here is to use ramdisk from Win2k sp1 when booting, and then when booted, use the ramdisk from the underlying Winnt (eg winxp sp1).

Top
Dietmar
Posted: Jul 9 2006, 11:24 AM


Recruit
*

Group: Members
Posts: 1
Member No.: 66
Joined: 9-July 06



Hi all,

for all the people, who cannot boot direct via USB, this is an alternative.
In a few days I have holydays and I also try to boot XP from a ramdisk, using
the SDI file concept from Windows Embedded, from which I know, that it works.

There are 2 things to be solved: Putting the SDI image to ram laugh.gif (I think it is possible to use the DOS USB drivers for this)

And second: SDI works for Windows Embedded but until now not for real XP.
But I think, this can be hacked... ninja.gif biggrin.gif biggrin.gif biggrin.gif ninja.gif .

Nice to hear from you all
Dietmar
Top
Yorn
Posted: Jul 14 2006, 01:22 AM


Member
*

Group: Advanced member
Posts: 22
Member No.: 28
Joined: 15-May 06



What if we have been going about the booting an ISO business wrong? How about instead of actually loading the ISO into as-is we use FreeDOS/DOS with HX 32-bit support to run 7-zip which can extract the contents of an ISO?

From the 7zip main page: http://www.7-zip.org/

QUOTE
Supported formats:
* Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR
* Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM, Z, CPIO, RPM, DEB and NSIS


If we could, we could unpack the ISO. Now that might not help us on booting Linux, but if we could determine the contents of the ISO using 7zip, we could find out if it's an XP/2003 ISO and mod the boot.ini before it's even loaded in GRUB4DOS accordingly, right?

Or am I way off here?

Dietmar may be on to something too, but I'd rather use a "free" method if at all possible. Even if that requires loading QEMU in 32-bit HX/DOS.

Something to think about...

EDIT: Dang, I just found out that 7za doesn't support ISO:
QUOTE
7za handles less archive formats than 7z, but does not need any others.


FROM: http://www.penguin-soft.com/penguin/man/1/7za.html

So I guess unless we are going to do pre-processing from OpenBuilder, somehow converting a user's submitted ISOs for inclusion into a 7zip archive, this isn't going to be possible.
Top
Yorn
Posted: Jul 14 2006, 01:27 AM


Member
*

Group: Advanced member
Posts: 22
Member No.: 28
Joined: 15-May 06



QUOTE

As of now grub4dos supports (plain or compressed):
floppy disk images
Hard disk images (i.e. with MBR)
Hard disk partitions aka superfloppy images (i.e. without MBR)


Okay, so in line with what I'm talking about above, could you make a hard disk partition WITHOUT MBR from an uncompressed ISO using 7zip in 32-bit HX/DOS? Heh. I'm confusing myself with all the utilities & acronyms needed to make this possible, but I'm still interested in the possibilities.

If the ISO is determined to be "non-Windows", perhaps based on a common file, the boot will happen in ISOEMU loaded by GRUB4DOS, otherwise it'll be GRUB4DOS with a modified boot.ini file and possibly recreate the .img. Do you see what I'm getting at?

EDIT: I'm going to fiddle with Nuno's image and see what all 7zip, at least, can do.

ALSO, I have no clue how to map your actual CD drive to QEMU, anyone here know or have an idea?
Top
jaclaz
Posted: Jul 14 2006, 09:14 AM


Searcher
*

Group: Moderator
Posts: 65
Member No.: 9
Joined: 9-May 06



QUOTE
Do you see what I'm getting at?

No.

Maybe you could better explain what you want to achieve.


QUOTE
ALSO, I have no clue how to map your actual CD drive to QEMU, anyone here know or have an idea?


Just use Qemu Manager:
http://www.davereyn.co.uk/

or this sintax:

CODE

A real CD-ROM can be used on a Windows 2000/XP host. When a CD-ROM drive is D:, please use \\.\d: or //./d:.

[DOS Prompt] qemu.exe -L . -cdrom //./d:
Top
Yorn
Posted: Jul 14 2006, 05:13 PM


Member
*

Group: Advanced member
Posts: 22
Member No.: 28
Joined: 15-May 06



I guess I'm trying to provide the user with a means to select which ISOs they want to boot from. It'd be ideal for like a 60-120 gig laptop hd in a USB enclosure. As you save your ISOs to that USB drive, you can live with the assurance of knowing that you can boot from your USB drive into that ISO.

It's like this:
Contents of USB HD:
* 1 partition for boot/tools/etc of 200 meg
* 1 partition for extracted ISOs of 1 gig
* 1 partition for actual ISOs of 58.8 gig

Example
Contents of first partition: FreeDOS, HX-DOS, ISODETECT, BOOTMENU, ISOEXTRACT, GRUB4DOS, ISOEMU, & maybe QEMU?
Contents of second partition: None unless an ISO contains NTLDR/NTDETECT.COM
Contents of third partition: BARTPE.ISO, BACKTRACK.ISO, NANOPE.ISO, KNOPPIX.ISO, DoctorWho.AVI, KLITECODECS.EXE, FIREFOXINSTALL.EXE

Sequence:
1) FreeDOS boots
2) HX-DOS runs
3) ISODETECT (a non-existant program/script to list the contents of an ISO) lists all ISO's in the third partition, ignoring the AVI and EXEs. And determines which ones contain NTLDR/NTDETECT.COM
4) BOOTMENU (another non-existant program/script) creates a list of options based on the number of available ISOs from #3.

Based on the choice in #4, if it was a Windows ISO:
5) ISOEXTRACT (another non-existant program/script to extract the contents of an ISO) and place the contents of the Windows compressed ISOs on the second partition
6) GRUB4DOS to boot the NT-based ISO off the second partition
7) END

Based on the choice in #4, if it was not a Windows ISO:
5) GRUB4DOS to boot...
6) ISOEMU to boot the selected ISO.
7) END

For ISOEXTRACT, we can run 32-bit programs, so why not use Undisker (http://www.undisker.com/uhlp-cmdline.html)

For ISODETECT, I don't know yet, but think of this, if we can run 32-bit programs in FreeDOS, then can't we use Linux utilities that are compiled with Cygwin to run in Windows? If so, all the linux utilities we already know about should be available for FreeDOS!

So, what do you think? (And thanks for the QEMU help!)
Top
Yorn
Posted: Jul 15 2006, 05:17 AM


Member
*

Group: Advanced member
Posts: 22
Member No.: 28
Joined: 15-May 06



Getting closer...

Today I found this:
http://www.acc.umu.se/~bosse/

Some guy on some other forums made a tool unisofs or something that basically uses the file on this page, filedisk, to mount and copy the contents of an ISO from the commandline. What I did was just get filedisk. It doesn't work in HX-DOS though.

Still, this is closer to being able to extract the contents of an ISO.
Top
jaclaz
Posted: Jul 15 2006, 11:26 AM


Searcher
*

Group: Moderator
Posts: 65
Member No.: 9
Joined: 9-May 06



For your "hypothetical" ISODETECT and ISOEXTRACT you can actually use under DOS/FREEDOS, SHSUCDHD + some batch files, no need for HX-DOS.
QUOTE

SHSUCD is a suite of programs dealing with the CD-ROM. It contains:
SHSUCDX:
a replacement for MSCDEX.  v3.02 
SHSUCDHD:
emulates a CD-ROM using an image file.  v3.01 
SHSUCDRD:
emulates a CD-ROM using an image file in memory.  v1.00 
SHSUDVHD:
emulates a DVD-ROM using multiple image files.  v1.00 
SHSUCDRI:
emulates a CD-ROM using an image created in memory.   v1.00 
OMI:
creates an image file from a CD or DVD.  v1.00 
ISOBAR:
extracts the boot image from a bootable CD or image.  v1.01
QUOTE (Yorn)

Today I found this:
http://www.acc.umu.se/~bosse/
....
It doesn't work in HX-DOS though.

Heck, no, blink.gif it is an IFS (installable File System Driver) it needs a NT based operating system, not just a 32 bit compatible environment!

However, I still fail to see why you should make things so difficult, using grub:
1) Linux .ISO images can be directly booted through isolinux
2) Dos/win9x .ISO images can be directly booted through isoemu or, as they are usually smallish, or at least smallish is the needed bootable part through memdisk or grub internal --mem mapping, using SHSUCD for the rest, but they could as well be moved to superfloppy or hd or partitions images
3) "Normal" BartPE/WinPE/UBCD4WIN .ISO images can be booted through setupldr.bin/winnt.sif in ram
4) Larger PE images or full NT based OS can be directly installed on the "second" partition, without extracting them from .iso images on the third (though it's not so easy at the moment installing such a system on a USB attached drive - Dietmar's method)

Of course, a tool being able to "map" directly a .iso image to a "hardware like" CD-rom drive "seen" by Dos, Linux and NT based OS would be VERY nice, but it simply hasn't been written (YET wink.gif ), whilst all the above methods work, NOW thumbup.gif

jaclaz
Top
Yorn
Posted: Jul 15 2006, 07:20 PM


Member
*

Group: Advanced member
Posts: 22
Member No.: 28
Joined: 15-May 06



Okay, I appreciate the help. Looks like I'm trying to do #3. I might end up wanting to do a mix of all of them though, maybe have a Linux ISO, Dos ISO, and PE ISO menu. From what I'm understanding, I'll need a setupldr.bin for every seperate instance of a PE ISO, as well as having to extract them. Whew. This could get complicated quick.

Additionally, I haven't been able to get QEMU to work in HXDOS. it keeps asking for .dll files from Windows XP even in DOS. I haven't tried seeing what the dependencies are, though.
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Boot Loader | Next Newest »


Topic Options



Hosted for free by InvisionFree (Terms of Use: Updated 7/7/05) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Archive
Translation



Boot Land (c) 2006