Jump to content











Photo
- - - - -

MultiBoot multi win PE


  • Please log in to reply
17 replies to this topic

#1 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 09 March 2009 - 05:02 PM

Hello,

I've created some time ago a linux live-cd with some recovery tools.
I also owned an "Active boot disk 4.x" licensed which is in fact a bootable CD/DVD created with Win PE and which contains a lot of active softwares (like active file recovery, active partition recovery, active image, password reset, network tool, etc)

The missing things are some anti-malware tools (anti virus, trojan, adware, etc)

The idea would be to create a VistaPE with all the softs I need, then add on this DVD others OS/Live CD like the two others I have (linux live-cd, active boot disk).

Then I could use grub4dos to create a mutli-boot system which will allow me to choose between all these Live-cd.

The problem is surely about the other win pe boot cd (active boot disk). It already contains

/BOOT
/EFI
/SOURCES


/SOURCES/BOOT.WIM

/BOOT/BCD
/BOOT/BOOT.SDI


For the Linux live CD, it should be easier as it is a standard isolinux


So is it possible ?

Do I just have to create a script in "other os" and add an entry in menu.lst ?

Thanks by advance

sQuaLiTo


ps: It looks like that the active software are portable. So if I have too much pbm to add the active boot disk I could just try to create a script for all the software it contains.... But I'd really prefer try first to add this boot cd as other os first :cheers:

#2 was_jaclaz

was_jaclaz

    Finder

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

Posted 09 March 2009 - 06:00 PM

Solution should revolve around "booting two different WinPE 2.x":
http://www.msfn.org/...opic=114711&hl=
http://www.msfn.org/...opic=125543&hl=

jaclaz

#3 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 09 March 2009 - 06:59 PM

Thank you

Yes, using BCD I know how to do this, but with VistaPE you have GRUB4DOS :cheers:
And here I don't know...

Surely by mapping the boot.sdi...


Or do you mean I create a dvd, using BCD with two boot options, VistaPE and ACTIVE Boot Disk (win pe) then I let in VistaPE grub4dos ?

If I understand well what you advise me, is to not choose other os, nor grub4dos, and create my own BCD and create an entry for VistaPE and the Other Win PE ?

#4 was_jaclaz

was_jaclaz

    Finder

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

Posted 09 March 2009 - 07:30 PM

Well, no.

All you do with grub4dos is to call BOOTMGR (if you choose to do so). :cheers:

Once BOOTMGR is loaded, the BCD store is used.

In other words on hard disk:

Normal:
MBR->bootsector->BOOTMGR->BCD->Choose an entry->Chosen OS

With grub4dos (installed to MBR):
MBR->grldr->menu.lst->Choose a "Vista entry"->BOOTMGR->BCD->Choose an entry->Chosen OS


On CD/DVD:
Normal:
CDbootsector(MS VISTA bootsector)->(BOOTFIX.BIN)->BOOTMGR->BCD->Choose an entry->Chosen OS

With grub4dos (grldr used as no-emulation CDbootsector)
CDbootsector(grldr)->menu.lst->Choose a "Vista entry"->BOOTMGR->BCD->Choose an entry->Chosen OS

These may help:
http://www.multiboot...uk/bootmgr.html
http://www.multiboot.../multiboot.html
http://www.boot-land...?showtopic=3950

Or you may want to experiment with .iso mapping to (hd32):
http://www.boot-land...?showtopic=5041

Or, you could make a couple of floppy images:
http://www.multiboot....uk/floppy.html
with different BCD's.....

:cheers:

jaclaz

#5 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 10 March 2009 - 01:00 PM

Thanks a ton for your answer and the links provided..

So ok, it is what I first suspected. I'll use 2 differents bootloader :cheers:
First one Grub4dos --> vista entry --> BCD one ---> choose a entry


Ok I think I'm going to try 3 differents way

1- Only BCD
2- Grub4dos --> BCD (with 2 entries)
3- Grub4dos map ISO (1 VistaPE iso, 1 Active Boot Disk iso, 1 Linux live-cd)


I'll firstly try solution 2.
By doing something like this

1- Extract the VistaPE iso in c:\vistaPE

2- Copy the x.wim files from Active boot disk to c:\vistaPE\activesoft.wim
(So here I'll have 2 wim files the vistaPE one and the othe one)

3- Edit the BCD file to add the other wim file

:: Go to the good store

cd /d c:\vistaPE\boot\


:: Verify the store and note the RamDisk identifier

bcdedit -store BCD /enum

{ RamDisk } = {7619dcc8-fafe-11d9-b411-000476eba25f} (always)

:: Add a new windows boot loader and note the GUID

bcdedit -store BCD /copy {default} /d "Active Software"

{GUID} = {xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

:: Update the first Boot loader

bcdedit -store BCD /set {default} description "VistaPE"
bcdedit -store BCD /set {default} device ramdisk=[boot]\vistape.wim,{ RamDisk }
bcdedit -store BCD /set {default} osdevice ramdisk=[boot]\sources\vistape.wim,{ RamDisk }



:: Update the second Windows Boot loader

bcdedit -store BCD /set { GUID } description "Active Recovery Softwares"
bcdedit -store BCD /set { GUID } device ramdisk=[boot]\activesoft.wim,{ RamDisk }
bcdedit -store BCD /set { GUID } osdevice ramdisk=[boot]\activesoft.wim,{ RamDisk }


finally repack the iso


Ok does it make sense ?
Do you see something I could miss ?


If it works like this it will be great. As I'd had done the most important part. (The linux part in grub4dos shouldn't be so hard)


For the fun I'll try the map iso after this one

Thanks again

#6 was_jaclaz

was_jaclaz

    Finder

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

Posted 10 March 2009 - 03:13 PM

It seems allright, at first sight.


Cannot say whether it is possible to load directly grldr from the BCD store/BOOTMGR on CD/DVD :cheers: (in case you go ahead with your "1)" version).

Version "3)" should be the most "comfortable/easy", though you may need to extract some files from the Linux distro, or modify it to allow fro booting from .iso mapped to (hd32).


:cheers:

jaclaz

#7 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 10 March 2009 - 04:06 PM

Really thank you jaclaz :cheers:

Maybe a last question... :cheers: ?

What is etfsboot.com ?

When is it choosen to create the iso using oscdimg or cdimage ?

Could you please confirm me the iso is created using this model :

mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o #isofile# #target_dir#


About the solution 3)
I think it should be possible to mix in a menu.lst a map iso and a normal linux distro call ? something like

title Linux recovery live-cd
kernel /boot/vmlinuz-2.6.22-generic root=/dev/ram0
initrd /boot/initrd.img-2.6.22-generic


Ok, I'll try and next posts will be more accurate and problems relating if need

Thanks again for all

#8 was_jaclaz

was_jaclaz

    Finder

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

Posted 10 March 2009 - 04:20 PM

etfsboot.com is a name "attributed" to the no-emulation boot sector of Vista and later DVD's.

The one that before Vista was called "Microsoft Corporation.img" or "Arnes Boot Record".

It's a 2048 bytes CD/DVD bootsector that invokes (BOOTFIX.BIN) and BOOTMGR.

The command I use is detailed here:
http://www.911cd.net...o...18045&st=25

With newish releases of grub4dos the " -boot-load-seg 0x1000" can be now safely exchanged with "-boot-load-size 4" as in your example.

Sure, you can mix whatever you want in a menu.lst. :cheers:

Point is whether (depending on the specific Linux Distro):
  • "Whole" .iso to (hd32) mapping works
  • "Only" kernel and initrd needs to be extracted from .iso
  • "Everithing" in yhe .iso needs to be extracted to root of the CD/DVD

:cheers:

jaclaz

#9 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 11 March 2009 - 10:53 AM

As always thank you :cheers:


Hmm I'm not sure the "Create ISO/CD/DVD" script in vistaPE choose the good mkisofs

ok

I have copied the vista DVD in %BaseDir%\VistaSrc
So %sourcedir% is this directory (%BaseDir\VistaSrc)
I also defined AIK to "%program files%\Windows AIK"

I have choosen :
%BuildModel% = MultiBoot

I have in %targetdir% vistape.wim
I have boot/etfsboot.com
I have %targetdir%\boot\grldr
I don't have %targetdir%\bootsect.bin

So looking this

[Process]
ReadENV
If,"%BuildModel%",Equal,"MultiBoot",Run,%ScriptFile%,AutoBootMGR
TRUE so RUN AutoBootMGR
If,"%BuildModel%",Equal,"RAM",Set,%BootSect%,"boot/etfsboot.com"
If,"%BuildModel%",Equal,"Normal",Set,%BootSect%,"boot/etfsboot.com"
If,NotExistFile,"%TargetDir%\vistape.wim",Set,%BootSect%,"boot/etfsboot.com"
FALSE vistape.wim exists
Retrieve,FolderSize,%TargetDir%,%sizeFolder%
StrFormat,Bytes,%sizeFolder%
echo,"Creating ISO: [%isofile%] Folder size: %sizeFolder%"
If,"%BootSect%",Equal,"Boot/etfsboot.com",Run,%ScriptFile%,NormalCD
FALSE
If,"%BootSect%",NotEqual,"Boot/etfsboot.com",Run,%ScriptFile%,CompatibleCD
TRUE so the script choose CompatibleCD
Retrieve,FileSize,%ISOfile%,%sizeISO%
StrFormat,Bytes,%sizeISO%
echo,"ISO build size is %sizeISO%"
If,%pCheckBox2%,Equal,True,Run,%ScriptFile%,BurnIso

[AutoBootMGR]
Set,%BootSect%,"boot/etfsboot.com"
TRUE
If,ExistFile,"%targetdir%\boot\grldr",Set,%BootSect%,"boot/grldr"
TRUE
If,ExistFile,"%targetdir%\bootsect.bin",Set,%BootSect%,"bootsect.bin"


FALSE
So finally %BootSect% = "boot/grldr"

IT IS THE COMPATIBLECD WHICH IS RUN


[CompatibleCD]

If,%pCheckBox1%,NotEqual,true,ShellExecute,Hide,#$q%Tools%\mkisofs.exe#$q,"-rdNlDTJ #$s-force-uppercase -duplicates-once -joliet-long -hide-joliet-trans-tbl -volid #$q%pTextBox1%#$q -eltorito-boot #$q%BootSect%#$q -no-emul-boot -boot-load-size 4 -boot-info-table -hide boot.catalog#$s-o #$q%IsoFile%#$q #$q%targetdir%#$q"

If,%pCheckBox1%,Equal,true,ShellExecute,Open,#$q%Tools%\mkisofs.exe#$q,"-rdNlDTJ #$s-force-uppercase -duplicates-once -joliet-long -hide-joliet-trans-tbl -volid #$q%pTextBox1%#$q -eltorito-boot #$q%BootSect%#$q -no-emul-boot -boot-load-size 4 -boot-info-table -hide boot.catalog#$s-o #$q%IsoFile%#$q #$q%targetdir%#$q"

And I'd prefer it'd be NORMALCD
[NormalCD]

If,%pCheckBox1%,NotEqual,true,ShellExecute,Hide,#$q%Tools%\mkisofs.exe#$q,"-iso-level 4#$s-force-uppercase -volid #$q%pTextBox1%#$q -b #$q%BootSect%#$q -no-emul-boot -boot-load-size 4 -hide boot.catalog#$s-duplicates-once -o #$q%IsoFile%#$q #$q%targetdir%#$q"

If,%pCheckBox1%,Equal,true,ShellExecute,Open,#$q%Tools%\mkisofs.exe#$q,"-iso-level 4#$s-force-uppercase -volid #$q%pTextBox1%#$q -b #$q%BootSect%#$q -no-emul-boot -boot-load-size 4 -hide boot.catalog#$s-duplicates-once -o #$q%IsoFile%#$q #$q%targetdir%#$q"

Shouldn't it be better to have the NormalCD process (as it relies to Grub4Dos) ?

Do you know why I don't have %targetdir%\bootsect.bin ?

What are the conditions in VISTAPE to %targetdir%\bootsect.bin ?


I have to say that :
- Vista DVD is not sp1
- Windows AIK is for vista sp 1 and others (latest version) : Latest Windows AIK 6001.18000.080118-1840-kb3aik-xx.iso


Why don't use oscdimg ?
Something like
oscdimg -n -h -bc:\winbuilder\target\VistaPE\boot\etfsboot.com c:\winbuilder\target\VistaPE c:\winbuilder\ISO\VistaPE.iso


#10 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 12 March 2009 - 12:48 AM

Just to let know others that SOLUTION 2 works great !

2- Grub4dos select a Win PE entry (vistaPE) --> BCD (with 2 entries. Vista PE and Active Boot Disk)



So here is what I did:

1- Created the vistaPE (vistape.iso)
2- Created the Active Boot Disk 4.0.1 (abd.iso)
3- Extracted the abd.iso
4- cpy from abd.iso file all /SOURCES and BOOTDISK.KEY to VistaPE target dir

Done all these cmd using BCDEDIT (maybe easyBCD work for this. Don't know)

5- Go to the boot dir of vistaPE's target dir
cd /d c:\winbuilder\Target\VistaPE-Core\boot
6- Save ori BCD
copy BCD BCD.save

7- Verify the BCD
bcdedit -store BCD /enum
8- CReate a new windows bootloader
bcdedit -store BCD /copy {default} /d "Active Recovery Sotwares"
Write down the created GUID. GUID = { GUID }

9- Update first BOOTLOADER
bcdedit -store BCD /set {default} description "Windows Pe 2.1 x86"

bcdedit -store BCD /set {default} device ramdisk=[boot]\vistape.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

bcdedit -store BCD /set {default} osdevice ramdisk=[boot]\vistape.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
10- Update Second Bootloader (using the GUID provided sooner)
bcdedit -store BCD /set {51d18250-0e35-11de-8d99-0016d4f7932e} device ramdisk=[boot]\SOURCES\BOOT.WIM,{7619dcc8-fafe-11d9-b411-000476eba25f}

bcdedit -store BCD /set {51d18250-0e35-11de-8d99-0016d4f7932e} osdevice ramdisk=[boot]\SOURCES\BOOT.WIM,{7619dcc8-fafe-11d9-b411-000476eba25f}
11- Verify all is ok
bcdedit -store BCD /enum

12- From within Winbuilder, recreate the ISO (In Finalize, choose "Create ISO/CD/USB" script, then click on "Create new ISO file")

And it"s working GREAT !!!

Thanks Jaclaz :cheers:

Now I'm going to try solution 1 and 3

#11 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 13 March 2009 - 11:07 PM

nobody has an answer for the queston about why it is CompatibleCd which is run rather than NormalCD.
Or, better, what conditions must be meet to have this file "%targetdir%\bootsect.bin" (as normalCD are run in this case) ?

See my question here (just 2 post before this one in this thread) http://www.boot-land...?...ost&p=61984

Thanks

#12 PaPeuser

PaPeuser

    Silver Member

  • Advanced user
  • 787 posts
  •  
    United States

Posted 14 March 2009 - 01:09 AM

You would probably get a faster and better answer over in Boot from anywhere or anything or MAYBE your questions are already answered :cheers:

heres a link even :cheers:
http://www.boot-land...hp?showforum=71

#13 was_jaclaz

was_jaclaz

    Finder

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

Posted 14 March 2009 - 09:01 AM

Shouldn't it be better to have the NormalCD process (as it relies to Grub4Dos) ?

Do you know why I don't have %targetdir%\bootsect.bin ?

What are the conditions in VISTAPE to %targetdir%\bootsect.bin ?


bootsect.bin is the typical name of the "normal" bootector for 2K/XP:

The one that before Vista was called "Microsoft Corporation.img" or "Arnes Boot Record".


Since we are talking about VistaPE, isn't it "normal" that it's bootsector for "normalCD" is the "normal" etfsboot.com and that ANY other bootsector is "compatibleCD"? :cheers:

Why don't use oscdimg ?
Something like

oscdimg -n -h -bc:\winbuilder\target\VistaPE\boot\etfsboot.com c:\winbuilder\target\VistaPE c:\winbuilder\ISO\VistaPE.iso


Why not using mkisofs?

mkisofs is Freeware, Open Source, whilst oscdimg is ONLY with Vista and later, and it's predecessor, cdimage was not licensed for use outside of Microsoft.


jaclaz

#14 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 14 March 2009 - 11:26 AM

lol ok :cheers:

ha ha ha.... Some times I feel stupid :cheers: Should think a little before asking :cheers:

#15 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 14 March 2009 - 11:58 AM

ABOUT SOLUTION 3:
Grub4dos map ISO (1 VistaPE iso, 1 Active soft Boot Disk iso, 1 other Active soft boot disk ISO, 1 Linux live-cd)


Ok the quick comment is that everything is working great

splashimage /face.gz

timeout 30

default 0



title Active Boot Disk 4.01

find --set-root /images/ABD/Active-Recovery.iso

map --mem /images/ABD/Active-Recovery.iso (hd32)

map --hook

chainloader (hd32)



title Active Undelete 7.01

find --set-root /images/AU/Active-Undelete.iso

map --mem /images/AU/Active-Undelete.iso (hd32)

map --hook

chainloader (hd32)



title VistaPE

find --set-root /images/VPE/VistaPE-Core.iso

map /images/VPE/VistaPE-Core.iso (hd32)

map --hook

chainloader (hd32)

The detailled comment is that in fact I have a little problem.

Let me try explain you why.

I have licenses for two Boot disk recovery tools from "Active" (ntfs.com)
- 1 "Active Boot disk 4.01" (file recovery, partition recovery, ...)
- 1 "Active Undelete boot disk" (active undelete 7.01)

Every boot disk from "active" company use WinPE 2.x
Every boot disl from "active" company look for a license key file (in the root partition) called BOOTDISK.KEY

So I can have ONLY one BOOTDISK.KEY file at the root of the iso and it is a pbm because, the license is not the same for both product

For example, the created ISO contains
/ISO_ROOT

/ISO_ROOT/BOOTDISK.KEY

/ISO_ROOT/GRLDR

/ISO_ROOT/MENU.LST



/ISO_ROOT/IMAGES/ABD/Active_Recovery.iso

/ISO_ROOT/IMAGES/AU/Active_Undelete.iso

/ISO_ROOT/IMAGES/VPE/VistaPE-Core.iso

and the iso is created with this command (the Jaclaz one)
.\mkisofs -v -iso-level 4 -l -D -d -J -joliet-long -R -volid "RECOVERY" -A GRLDR/MKISOFS -sysid "Win32" -b grldr -no-emul-boot -boot-load-seg 0x1000 -allow-multidot -hide grldr -hide boot.catalog -o .\ISO\recovery.iso iso_root

If the BOOTDISK.KEY is the one of ABD/Active_Recovery.iso then this one works great without asking me for the license. But the AU/Active_Undelete.iso ask me for the license file !!!!
The exact inverse is also true

The problem is that even with a BCD it couldn't work as in every cases, the active boot disks look for the BOOTDISK.KEY at the same place.


The solution could be to be able to hide/Rename, one BOOTDISK.KEY depending on which active boot disk I want to boot from.

The other one, could be to be able, to change the root of the boot disk, to let it look at a different place for the right BOOTDISK.KEY.

I hope you understand what I'm trying to explain (my english isn't so good)

Do you think there is a solution to this problem ?

Because, whatever I use (solution2 or solution3) yet I can't have 2 active boot disk on the same bootable ISO :\


Thanks by advance

#16 was_jaclaz

was_jaclaz

    Finder

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

Posted 14 March 2009 - 05:01 PM

Well, you could try :cheers::
1) to set root to (hd32) (which is always a "best practice"), right now your root is the "outer" .iso or CD/DVD, if you set root to the "inner" one (i.e. the one mapped to (hd32)) chances are that the program will search for BOOTDISK.KEY inside the mapped .iso and you won't need ANY BOOTDISK.KEY on root of the "outer" .iso.

and (though it should not be the problem in this case)
2) don't "trust" the (hd32) (read .iso) bootloader

i.e.:

title Active Boot Disk 4.01
find --set-root /images/ABD/Active-Recovery.iso
map --mem /images/ABD/Active-Recovery.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)


Otherwise, you must look into the actual loader of the "inner" .iso, see which parameters are passed and try invoking it directly from grub4dos bypassing original "inner" .iso bootsector/loader, i.e. something like:

title Active Boot Disk 4.01
find --set-root /images/ABD/Active-Recovery.iso
map --mem /images/ABD/Active-Recovery.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)
kernel somekernel <option1> <option2> <option3> .... <optionn>
initrd someinitrd


jaclaz

#17 sQuaLiTo

sQuaLiTo

    Newbie

  • Members
  • 15 posts
  •  
    France

Posted 15 March 2009 - 04:27 AM

Thanks but I had already tried with root(hd32) and it didn't work

Otherwise, you must look into the actual loader of the "inner" .iso, see which parameters are passed and try invoking it directly from grub4dos bypassing original "inner" .iso bootsector/loader, i.e. something like:

title Active Boot Disk 4.01
find --set-root /images/ABD/Active-Recovery.iso
map --mem /images/ABD/Active-Recovery.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)
kernel somekernel <option1> <option2> <option3> .... <optionn>
initrd someinitrd


These 2 ISO are winPE with BCD inside, not Grub4dos :good:


But I've found a solution, AND NOW SOLUTION 3 is WORKING !!!

In fact, as I have a license for these softs, and as I don't want to redistribute them, I have changed their BOOT.WIM contents.

Indeed, in these BOOT.WIM contents, both softs, use 2 files called license.key and settings.ini. In these files I have enter my licenses informations and now everything work well ^_^
(I have mounted the boot.wim with imagex then commit the changes)

But I'll continue to try a solution without having to modify the boot.wim

I thought the root (hd32) should be the solution, but it seems not. I have to investigate a little bit, as I've done my test using a VM under VirtualBox !

Well, at least, now I have ALL my RECOVERY CD on an USB/DVD
- Active Boot Disk (winpe)
- Active Undelete (winpe)
- VistaPE
- Console XP
- Own made linux Ubuntu distro, recovery based

Thanks a ton for your patience, ET VOILA !

#18 was_jaclaz

was_jaclaz

    Finder

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

Posted 15 March 2009 - 09:35 AM

Good. :good:

I thought they were Linux based, instead they are WinPE 2.x based.

The edit of the .WIM appears like the "right thing" to do in this case, I don't think there can be other solutions ^_^, exception made for directly hexediting/modifying with internal grub4dos dd or write over the files in the image mapped to memory, all in all a lot of work unneeded if the simple :WIM solution works.

^_^

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users