Topic: Multibooting With Gena And/Or Other PE1 Builds  (Read 9960 times)

Multibooting With Gena And/Or Other PE1 Builds
« on: June 18, 2011, 03:59:45 AM »

Arvy

  • Code Baker
  • Chef
  • ***
  • Location: Canada
  • Date Registered: Jun 2011
  • Posts: 157
Multibooting With Gena And/Or Other PE1 Builds

For most people, a singular Gena PE build (with or without "sweets") will probably provide an amount of protection that is more than sufficient for any emergency when their PC's operating system refuses to boot normally.  Only those "rare birds" like myself who operate multiboot platforms on a regular basis and who therefore need multiple repair and recovery capabilities need bother to read any further.

One of the major frustrations for people wishing to create and maintain multiple preinstallation environments is the necessity for including the complete range of applications and utilities within each PE build.  My own case can serve as an example of the amount of replication and redundancy that is potentially involved in such circumstances.  My multiboot Grub4DOS/BOOTMGR menu looks like this:

Code: [Select]
title Windows XP PE
chainloader /WXPE/SETUPLDR.BIN

title Windows 2003 PE
chainloader /W2K3/SETUPLDR.BIN

title Windows PE Boot Manager (WIM)
chainloader /BOOTMGR
#  {BOOTMGR handles Win7x64 PE, Win7x64 Recovery, Win7x86 PE, Win7x86 Recovery, Vista PE and Vista Recovery}

title Acronis Rescue Media (ISO)
map /SOURCES/AcronisMedia.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)

title Reboot
reboot

title Shutdown
halt

Needless to say, trying to keep every one of those bootable options up to date with its own programs folder containing individual versions of every application and utility used by all of them would be a maintenance nightmare.  The obviously preferable alternative is for all of them to use the same programs folder.  But, quite apart from specifying the same programs folder for all of your WinBuilder and/or other PE project builds, how can that be done? [See Note 1.]

For PE2 (Vista) and PE3 (Windows 7) builds the anwser is quite straightforward.  Each one of those PEs can be created as a Window Boot Manager option (.WIM file) that utilizes the same external programs folder as all of the others.  It is then just a matter of using the Windows BCDedit command line utility (or a GUI interface like NeoSmart's EasyBCD) to include them all in a single Boot Configuration Data (BCD) file.

For PE1 (XP/2003) builds the answer is somewhat tricker as, for reasons best known to Microsoft, their PE1 setups can normally be booted only if their system root folder has a singular name which must be either "minint" or "i386" depending on whether it is booted on a hard drive or on a CD/DVD drive.  To boot both of them (along with any others) on the same HDD primary partition and/or the same CD/DVD therefore requires a certain amount of "abnormal" manipulation to overcome those built-in restrictions.

The restrictive limits that need to be dealt with are contained in two files: an ordinary text file (TXTSETUP.SIF) and a binary file (SETUPLDR.BIN).

Any plain text editor can be used to modify the TXTSETUP.SIF file. In most cases, the only entries requiring modifications will be found under the [SourceDisksNames] and/or [SourceDisksNames.x86] sections of that file. In either or both places you'll see a line such as the following:
1="Boot Disk","\WIN51",,\I386

The "\WIN51" (or equivalent) item is a "flag file" entry.  You can change it to something else if you wish, but the Windows setup loader expects to find a file with that name (in addition to ntldr and ntdetect.com) in the root of the book disk. The file's contents don't matter; even a zero-byte file will do fine.  The \I386 item specifies the name of the system root folder within which the Windows setup loader expects to find everything else that it needs for booting and loading the system.  For reasons which will be made clear later, any change to the system root folder name in the TXTSETUP.SIF file must be limited to four (4) alphanumeric characters and UPPERCASE is best for multiple disc type destinations.

Now we come to the trickier part that involves modifying the Windows binary SETUPLDR.BIN file. [See Note 2.]  This must be done with an editor that is capable of preserving the integrity of binary files.  There are many such "hex editors", but my own favourite is IDM UltraEdit.

Using a hex editor, you must change all of the "i386" and "minint" strings in the SETUPLDR.BIN file to whatever will be used as the name for the system root folder -- the same one specified in the TXTSETUP.SIF file.  A proper hex editor won't let you change the length of any of those strings, but you can "pad" them with hex 00s where necessary.  That is why the chosen system root folder name cannot be longer than four (4) alphanumeric characters.

Changing the "minint" strings as well as the "i386" strings to make both the same avoids the issue of needing different root folder names on different disc types.  Just be sure to "pad" the shorter name strings with hex 00s. At one point you will encounter "\minint\txtsetup.sif" where the hex 00 "padding" must be added at the end of that entire string (i.e. after the txtsetup.sif file name to compensate for the shorter folder name).

For 64-bit editions, also change "\amd64", "\AMD64" to "\EFGHI" and "amd64\", "AMD64\" to "EFGHI\" (where EFGHI is anything you want, 5 characters long).  Do not replace all the occurrences of "amd64" (only the ones with leading or trailing backslashes) as the others refer to a named section of the txtsetup.sif file.

Lastly, but very important, especially if you intend to burn your multiboot package onto a CD/DVD disc, keep case sensitivity in mind for some early parts of the Windows setup boot process. The name of the "boot flag" file, for example is case sensitive.  If you don't run a PE builder finalization script that handles that issue for you, you'll need to do it yourself manually when copying the files from the project's target output folder to your multiboot destination.  In Gena projects, the "standard" default CreateISO finalization script will do it for you automatically.

Good luck, and happy multibooting!
"Arvy"
[Posted here by request.]

__
NOTES:

[1] This "tutorial" deals mainly with the specific setup boot loader (setupldr.bin) issues involved with the inclusion of PE1 (XP/2003) builds in multiboot environments.  It is not intended as a comprehensive guide for the creation of multiboot discs (CD/DVD, USB, eSATA, et al) using Grub4DOS, Windows Boot Manager and other multiboot loaders for which many other fine guides exist elsewhere.  See, for example, the many other online tutorials available in these forums and at http://www.911cd.net/ and http://reboot.pro/ that cover the specifics of preparing and using various destination disc types for multibooting with WIMs, ISOs and other PE builder outputs and "rescue" utilities.

[2] Special handling is required for the setupldr.bin file of the following Windows editions:
•Windows Server 2003 SP1 and later
•Windows XP Professional x64 Edition
•Windows Server 2003 x64 Edition

In those cases, setupldr.bin has a built-in checksum which must be handled to avoid "NTLDR is corrupt" errors.  With your favorite hex editor, go to hex address 0x2060 and change "74 03" to "EB 1A".


Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #1 on: June 18, 2011, 05:21:45 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
THANKS A LOT  :cheerleader: :thumbup: :clap: :happy: :dance: :smiling9:

I couldn't find time today, but hoping to find tomorrow.. See you.

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #2 on: March 18, 2012, 01:28:22 AM »

doveman

  • Jr. Chef
  • **
  • Date Registered: Mar 2012
  • Posts: 17
Hi

I found the following whilst trying to get my Gena "flat" boot working (I.E. no ISO or IMG).

I put the I386 and GenaPrograms folders on the HDD, I then had to copy NTDETECT.COM and TXTSETUP.SIF from the I386 folder to the root. That gets me started but then it stops with "\minint\system32\ntoskrnl.exe could not be found". So I then renamed the I386 folder to minint and everything works.

I'm booting with grub4dos with:

title Gena (flat)
find --set-root /minint/setupldr.bin
chainloader /minint/setupldr.bin
boot

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #3 on: March 18, 2012, 06:19:13 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
using "minint" name on "harddisk" for "direct" boot is normal (& official by ms) procedure  :thumbsup:


ps:

title Gena (minint)
find --set-root /minint/setupldr.bin
chainloader /minint/setupldr.bin


no need boot line ;)

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #4 on: March 18, 2012, 11:12:28 PM »

doveman

  • Jr. Chef
  • **
  • Date Registered: Mar 2012
  • Posts: 17
Cool. I'll tidy that up then :)

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #5 on: March 19, 2012, 07:53:55 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
I just tested "direct" boot on hd,
with copying Gena to my windows xp drive,
all worked perfectly  :thumbsup:


tip: don't forget to copy BOOTFLAG CD.DRIVE files to the root, aside \i386\ (renamed to \minint\) and \GenaPrograms\ ...

C:\minint\
C:\GenaPrograms\
C:\BOOTFLAG
C:\CD.DRIVE

 :xmas-beer:

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #6 on: March 19, 2012, 07:55:15 PM »

doveman

  • Jr. Chef
  • **
  • Date Registered: Mar 2012
  • Posts: 17
Hmm, strange. I just tested again in Virtualbox with my new Meal build and it still requires me to copy ntdetect.com and TXTSETUP.SIF to the root or else it just reboots as soon as I select Gena from grub4dos.  :confused:

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #7 on: March 19, 2012, 08:36:42 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hmm, strange. I just tested again in Virtualbox with my new Meal build and it still requires me to copy ntdetect.com and TXTSETUP.SIF to the root or else it just reboots as soon as I select Gena from grub4dos.  :confused:

you miss a point

I just tested "direct" boot on hd,
with copying Gena to my windows xp drive,

there already exist NTDETECT.COM on my C: ;)

I can not now remember how to prepare a hd-disk to boot with nt5 boot (ntdetect, ntldr, boot.ini whatever) so I cheated with using an already disk where xp installed  :whistling:
As a result, with grub4dos, Rest worked as it should  :wink:

it should not be hard to prepare a hd-disk ready for nt5 boot, probably only copying a couple of files,
but as far as I remember preparing a ufd-disk (usb flash disk) was a bit tricky involving a patch or......
(I remember old tutorials with hp utility, involving additional files ready to copy on ufd...)

as I wrote on another topic, since I use Gena.iso with grub4dos with-without mem option for a long while now,
I lost experience preparing such things for "direct" boot,
but I remember steps are quite easy, available all over internet  :thumbsup:

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #8 on: March 19, 2012, 09:47:18 PM »

doveman

  • Jr. Chef
  • **
  • Date Registered: Mar 2012
  • Posts: 17
Hmm, strange. I just tested again in Virtualbox with my new Meal build and it still requires me to copy ntdetect.com and TXTSETUP.SIF to the root or else it just reboots as soon as I select Gena from grub4dos.  :confused:

you miss a point

I just tested "direct" boot on hd,
with copying Gena to my windows xp drive,

there already exist NTDETECT.COM on my C: ;)

Ah, that probably explains it then. I didn't have to do anything else, just have grub4dos installed and the Gena files/folders as you said, plus copy NTDETECT.COM and TXTSETUP.SIF from minint to the root :)

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #9 on: March 20, 2012, 01:56:14 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
what I mean:
when you figure out right path, there would be no need to copy TXTSETUP.SIF to the root  :wink:
 :cheers:

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #10 on: March 20, 2012, 04:01:43 PM »

doveman

  • Jr. Chef
  • **
  • Date Registered: Mar 2012
  • Posts: 17
I'm not sure what you mean about "figure out right path". I've got the folders like you had:

C:\minint\
C:\GenaPrograms\
C:\BOOTFLAG
C:\CD.DRIVE

and it still needs TXTSETUP.SIF copied to the root (along with NTDETECT.COM) to boot.

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #11 on: March 20, 2012, 06:07:39 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
I wish you googled heavly ;)
anyway,
I do not have time to find (or read) details, but I found and tested and easy way:

on a new disk:

C:\minint\
C:\GenaPrograms\
C:\BOOTFLAG
C:\CD.DRIVE

ps: no txtsetup.sif on root....

from
http://tinyempire.com/notes/ntldrismissing.htm
get
ntldrusb.zip

from ntldrusb.zip (\ntldrusb\putonusb\) get 3 files and put inside your hd
boot.ini
NTDETECT.COM
NTLDR

as far as I know, you already have your grldr, menu.lst and you already have your disk bootable with grldr......



here I tested on a fresh hdd (no windows installed in it, just an active primary ntfs partition empty disk) and Gena boot nicely  :thumbsup:
ps: don't forget to enable dps plugin if you have new-hardware (default enabled on Gena-Meal, only reminding) else you will bsod ;)

with same files, you should be able to boot from ufd too (usb flash disk), on such case don't forget to enable  \Gena\Drivers\4 Storage->Removable Devices Combo else you will bsod ;)

 :cheers:

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #12 on: March 20, 2012, 07:14:45 PM »

doveman

  • Jr. Chef
  • **
  • Date Registered: Mar 2012
  • Posts: 17
Thanks, it was just NTLDR I needed to add. With that I can boot without TXTSETUP.SIF in the root.  :thumbsup:

By the way, it boots just fine without BOOTFLAG or CD.DRIVE.

I tested on USB stick with MobaLiveUSB.

Re: Multibooting With Gena And/Or Other PE1 Builds
« Reply #13 on: March 20, 2012, 07:57:22 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Good  :thumbsup:

Indeed I believe you are right, BOOTFLAG is not necessary for your minint boot,
but CD.DRIVE required for some other options, well I guess for plain CreateISO there would probably no trouble...


@Galapo
I am not sure if such option exists or not, what you think: when cd.drive flag file not found, cddrive equal to systemdrive  :wink:

 :cheers:

 

Powered by EzPortal