Jump to content











Photo
- - - - -

Boot Bart(X)PE using syslinux sdi.c32


  • Please log in to reply
31 replies to this topic

#1 Mulder

Mulder
  • Members
  • 2 posts
  •  
    Austria

Posted 12 April 2009 - 11:38 AM

Why?
1) Downloading is 4 times faster than the "classic" ramdisk method (startrom.n12 winnt.sif setupldr as ntldr on the TFTPserver)
2) the sdi can be gzipped

Some infos
http://msdn.microsof...y/ms838543.aspx
http://remile.free.fr/syslinux/sdi.txt

I've used this method already to boot an Nlited XP successfully
but i'm unable to boot my XPE sdi.

What have i done so far
.)I have a sdi image file (BartXpe) prepared to be booted the classic ramdisk way
.) mounted as K: using SDILoader.exe
.) imported setupreg.hiv as sys and merged with (regpatch.reg)
Windows Registry Editor Version 5.00



[HKEY_LOCAL_MACHINE\sys\ControlSet001\Services\Ramdisk]

"Type"=dword:00000001

"Start"=dword:00000000

"ErrorControl"=dword:00000001

"DisplayName"="Windows RAM Disk Driver"

"Group"="SCSI Class"

[HKEY_LOCAL_MACHINE\sys\ControlSet001\Control\Session Manager]

"BootExecute"=hex(7):00,00

[HKEY_LOCAL_MACHINE\sys\ControlSet001\Control\Session Manager\Memory Management]

"PagingFiles"=hex(7):00,00

[HKEY_LOCAL_MACHINE\sys\ControlSet001\Control\CrashControl]

"AutoReboot"=dword:00000000

"CrashDumpEnabled"=dword:00000000

"LogEvent"=dword:00000000

"SendAlert"=dword:00000000

[-HKEY_LOCAL_MACHINE\sys\MountedDevices]
.)extracted osloader.exe, osloader.ntd, startrom.com, setupldr.exe from 2003 sp1
In the links above ntldr == osloader.exe
.)renamed osloader.exe to ntldr
.)add k:\boot.ini (with a small error [to be shure the ramdisk can be accessed])
[boot loader]

timeout=30

default=ramdisk(0)\I387

[operating systems]

ramdisk(0)\I386="Windows XPE  From RAM" /fastdetect
.)create and run a small batch (build.cmd)
del EMB.SDI 

cscript Sdimgr.wsf /new EMB.SDI || @echo error && pause

cscript Sdimgr.wsf EMB.SDI /readpart:k: || @echo error && pause

cscript Sdimgr.wsf EMB.SDI /import:BOOT,0,startrom.com || @echo error && pause

cscript Sdimgr.wsf EMB.SDI /import:LOAD,0,ntldr || @echo error && pause

cscript Sdimgr.wsf EMB.SDI /pack || @echo error && pause

cscript Sdimgr.wsf EMB.SDI || @echo error && pause



copy /y EMB.SDI \\xyz\d$\tftpd32\tftp || @echo error && pause



@echo.

@echo.

@echo finished

pause
.) pxelinux entry looks like this
LABEL pebuilder

MENU LABEL ^3: BartPE starten new

KERNEL sdi.c32

APPEND EMB.SDI


The result is
.)I got a boot menu, so the ramdisk can be accessed

Next step
.)Now i 've used setupldr.exe as ntldr, run build.cmd and booted
-> result is "SETUPLDR: Couldn't open drive ramdisk(0)"
and now im stuck
adding a winnt.sif on K: changes nothing
and i must say i dont know what to add there (winnt.sif) or if my attemption is "right"

Attached Files



#2 kolk

kolk

    Newbie

  • Members
  • 26 posts
  • Location:Kiev, Ukraine
  •  
    Ukraine

Posted 14 April 2009 - 09:01 AM

As I remember, there are 2 well-known things:
1) WinPE requires setupldr, not ntldr;
2) setupldr doesn't work as SDI LOAD BLOB.

So I think the answer is that WinPE can't boot with ntldr.

#3 was_jaclaz

was_jaclaz

    Finder

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

Posted 14 April 2009 - 09:13 AM

So I think the answer is that WinPE can't boot with ntldr.


If you read the post above, Mulder is NOT using ntldr, but a renamed setuppldr.bin or osloader.exe, which is allright.

jaclaz

#4 kolk

kolk

    Newbie

  • Members
  • 26 posts
  • Location:Kiev, Ukraine
  •  
    Ukraine

Posted 14 April 2009 - 10:18 AM

IMHO,

osloader (= ntldr - real mode part) can't boot WinPE
on other hand setupldr can't be used inside SDI,
because setupldr doesn't know where to find SDI' ramdisk.

#5 was_jaclaz

was_jaclaz

    Finder

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

Posted 14 April 2009 - 10:42 AM

on other hand setupldr can't be used inside SDI,
because setupldr doesn't know where to find SDI' ramdisk.


Yep, that sounds like the explanation to the problem at hand. :)

I know next to nothing about XP Embedded and it's SDI format, but the SETUPLDR.BIN from Server 2003 SP1 or R2 (which derives from XP Embedded one) is used for conventional RAMDISK booting, so it can find the ramdisk(0) normally,

Could it be a problem within the SDI?

AFAIK osloader.exe is just SETUPLDR.BIN with the "real mode" part stripped.

Maybe, just maybe something here:
http://www.boot-land...?showtopic=5900

might be of help.

Link is broken, I will report the matter to Nuno.

jaclaz

#6 kolk

kolk

    Newbie

  • Members
  • 26 posts
  • Location:Kiev, Ukraine
  •  
    Ukraine

Posted 14 April 2009 - 10:44 AM

There are only two binaries:
osloader and setupldr.

osloader is for normal installation and XP Embedded
setupldr is for setup and WinPE

Each of them come in two flavors:
.bin is for loading by boot sector
.exe is for loading by startrom

.bin's just have a (same) prepend before corresponding .exe' PE image
That prepend can be stripped away by fixloader.py from ris-linux.

osloader.bin is what named ntldr (w/o extension)

Osloader.exe is the only one which can be put into SDI.
(only osloader knows of PART BLOB and only .exe can be run by startrom)

But osloader is the name for protected mode part of ntldr,
so it inherits inability to load WinPE, when standard ntldr is unable.

#7 kolk

kolk

    Newbie

  • Members
  • 26 posts
  • Location:Kiev, Ukraine
  •  
    Ukraine

Posted 14 April 2009 - 10:49 AM

AFAIK osloader.exe is just SETUPLDR.BIN with the "real mode" part stripped.

The name of stripped SETUPLDR.BIN is, of course, SETUPLDR.EXE :)
osloader is a stripped ntldr

#8 kolk

kolk

    Newbie

  • Members
  • 26 posts
  • Location:Kiev, Ukraine
  •  
    Ukraine

Posted 14 April 2009 - 10:57 AM

I know next to nothing about XP Embedded and it's SDI format, but the SETUPLDR.BIN from Server 2003 SP1 or R2 (which derives from XP Embedded one) is used for conventional RAMDISK booting, so it can find the ramdisk(0) normally,

For conventional RAMDISK booting you put an offset to .ima (in Winimage terms) inside of a SDI on the command line.
In the case of SDI booting RAMDISK needs to be already mounted for the (boot.ini) command line to be read :)

#9 was_jaclaz

was_jaclaz

    Finder

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

Posted 16 April 2009 - 07:28 AM

Link is broken, I will report the matter to Nuno.


Fixed. :)

jaclaz

#10 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 13 May 2009 - 02:05 PM

Hello Gents,

I too am stuck at the same point.
I tried ntldr (from remote boot services), setupldr from w2k3sp1, and osloader from w2k3sp1 without success.
All are executables.

The boot code must fine since I get to step2 (loader) and the loader actually executes but complains it cannot locate ramdisk(0).
The SDI looks also fine since I get the boot menu.

Anyone succeeded since there to boot a SDI image file thru pxelinux ?

Regards,
Erwan.

#11 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 13 May 2009 - 03:19 PM

Why SDI ?
does not a simple img-file do the same thing ?
I can boot img files via gPXE (iscsi) without issues.

Ulli

#12 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 13 May 2009 - 05:09 PM

Why SDI ?
does not a simple img-file do the same thing ?
I can boot img files via gPXE (iscsi) without issues.

Ulli


Hi Ulli,
why? for the challenge :D
Plus I am a big fan of pxe and gPXE and i'd like to master the sdi.c32 pxe module.
Also some of the MS solutions (like xp embedded) use that format and I'd like to possibly reuse an xpe image thru network booting.


Thanks,
Erwan.

#13 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 13 May 2009 - 05:52 PM

why? for the challenge :D


Can there be a better reason ? :D

By the way - I replaced
....sniffer\_pxe\ntldr with a renamed setupldr.bin from 2003-sp1
....sniffer\_pxe\ntdetect.com with the version from 2003-sp1

maybe that helps ???

#14 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 13 May 2009 - 06:19 PM

Can there be a better reason ? :D

By the way - I replaced
....sniffer\_pxe\ntldr with a renamed setupldr.bin from 2003-sp1
....sniffer\_pxe\ntdetect.com with the version from 2003-sp1

maybe that helps ???


Gonna give a try indeed the ntdetect.com from w2k3sp1.

I followed this procedure : http://syslinux.zyto...dex.php/Doc/sdi .
Only this part did not i follow : "3) Import the partition in the SDI file (eg: sdimgr xpe.sdi /readpart:D:). The size of the partition must be less than 500 MB. " .

Instead I drag file in the mounted SDI from an ISO of bartpe.
I believe I should master bartpe in an IMG file first then move on to SDI.

/Erwan

#15 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 13 May 2009 - 07:05 PM

still no luck with ntdetect from w2k3sp1.

in parallel i also tried the more classic way : NTDETECT.COM, NTLDR, WINNT.SIF, STARTROM.0 outside the SDI file thru PXE and this time the image loads successfully.
only just before getting in windows (i guess) i get
"inf file txtsetup.sif is corrupt or missing, status 2"

getting closer :D

my winnt.sif :
[SetupData]
BootDevice="ramdisk(0)"
BootPath="\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdimageoffset=36352 /rdpath=images\bartpe.sdi"

gonna redo my sdi file from scratch !

/Erwan

#16 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 13 May 2009 - 07:14 PM

...images\bartpe.sdi

AFAIK this should be uppercase ?

#17 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 13 May 2009 - 07:21 PM

got it :D

i have redone the image from scratch and now i can boot it using the winnt.sif method thru pxelinux :D
i used this procedure (http://ubcd4win.com/...eaded&pid=57531).
i believe the trick is the diskpart step.

now going to boot it thru pxelinux and sdi.c32 (adding the boot and load blob first) so that i dont need any other files in my tftp directory but my sdi file.

/Erwan

ps : hope this ok to post links to other forums.
if not i'll make a sumarry howto based on that thread.

#18 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 13 May 2009 - 07:50 PM

Still cannot boot my image thru pxelinux + sdi.c32 :D
I believe i dont have the right loader or i should drop bartpe and go for a winpe or xpe image.

Too bad i cannot use sdi.c32 for the following reasons :

-the tftp client of sdi.c32 downloads the image at 4.5 mbytes/sec whereas the tftp client of MS (rampe loading) tops at 1.5mbytes/sec which makes it fast
-sdi.c32 accepts gzipped sdi file (even faster download then!)
-sdi.c32 (associated to gPXE) can download thru http (and probably ftp) which makes again it faster (compared to tftp).

oh well, at least (for now) i managed to boot an sdi file thru the network but using the winnt.sif way which is already a nice achievement for me.

advantages of using an sdi file : once in bartpe you can write to your booted hard drive.

/Erwan

#19 was_jaclaz

was_jaclaz

    Finder

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

Posted 13 May 2009 - 09:54 PM

erwan.l
since you appear like very knowledgeable in this field and a willing and accurate experimenter, why don't you try with grub4dos newish PXE capabilities?

It may :D have something "different" that works in this case.

Here:
http://www.boot-land...?...=5187&st=12
and here:
http://diddy.boot-la...s/files/pxe.htm

:D

jaclaz

#20 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 14 May 2009 - 06:48 AM

erwan.l
since you appear like very knowledgeable in this field and a willing and accurate experimenter, why don't you try with grub4dos newish PXE capabilities?

It may :D have something "different" that works in this case.

Here:
http://www.boot-land...?...=5187&st=12
and here:
http://diddy.boot-la...s/files/pxe.htm

:D

jaclaz


Hi Jaclaz,
Thanks for the nice words ;)
Knowledgeable and accurate I dont know, willing to try and learn definitely !

I just tried grub4dos : this opens a all new set of possibilities !
Great tip, thanks !
Associated to PXE it is highly powerful.

I could load my sdi image at 3.0mbytes/sec, so this is better than the winnt.sif way.
Unfortunately, I still get the "setupldr : couldn't open drive ramdisk(0)".
So there is definitely something wrong with my image.

Thanks for the links!

/Erwan

#21 was_jaclaz

was_jaclaz

    Finder

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

Posted 14 May 2009 - 11:26 AM

Thanks for the links!


You are welcome, I knew you would have liked it. :D

I don't want to put too many "side-thoughts" together in your mind, but I feel like combining grub4dos with your iScsi with PxE and "XP Kansas City Shuffle" or "Fake Signature Method":
http://www.911cd.net...showtopic=21242
http://www.boot-land...?showtopic=6672
http://ubcd4win.com/...showtopic=11375
http://www.911cd.net...o...c=21702&hl=
could be a possible way.
Take a note of the above and when you have time do check the links.

:D

jaclaz

#22 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 16 May 2009 - 04:26 PM

You are welcome, I knew you would have liked it. :D

I don't want to put too many "side-thoughts" together in your mind, but I feel like combining grub4dos with your iScsi with PxE and "XP Kansas City Shuffle" or "Fake Signature Method":
http://www.911cd.net...showtopic=21242
http://www.boot-land...?showtopic=6672
http://ubcd4win.com/...showtopic=11375
http://www.911cd.net...o...c=21702&hl=
could be a possible way.
Take a note of the above and when you have time do check the links.

;)

jaclaz


wow, I took a look at these links and that's hot topic :D
will take me some time (and aspirin) to figure how to work this out in combination with pxe booting and iscsi !

in the meanting still trying to boot an sdi image thru pxelinux/sdi.c32.

the winnt.sif way works fine with sdi files, just like it works fine with iso's or img's.

using winpe bootstrap loader, i also managed to boot vistape (based on winpe) which contains a boot.sdi.
playing with bcdedit, i believe one can even have multi boot.
i still depend then on ms tftp client although it is twice quicker and the wim files are compressed.

using xp embedded bootstrap loader, i also managed to discover i could have a multi boot by simply playing with my boot.ini server side.

but i am deviating from this topic, back to my main concern : pxelinux + sdi.c32 ! ;)

/Erwan

/Erwan

#23 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 17 May 2009 - 12:25 PM

oki i blieve i almost got it working.

in that specific order :
-create the sdi file
-import the boot blob (i took the one from xpe)
-import the load blob (i took the one from xpe)
-readpart (i believe it has to be a part blob, not a disk one)
about that partition you are reading : make sure ntdetect.com and boot.ini are in there
-pack the sdi

you should get something like that :

Type Offset Size Base Address Attr
---- ------------------- ------------------- ------------------- ----------
BOOT 0x00000000.00001000 0x00000000.00005EC2 0x00000000.00000000 0x00000000
LOAD 0x00000000.00007000 0x00000000.00038400 0x00000000.00000000 0x00000000
PART 0x00000000.00040000 0x00000000.0FEFE000 0x00000000.00000007 0x00000000

now my xpe start booting (i got beyond the couldn't load ramdisk error!) but crashed on a bsod 0x7b.
i know this had to do with my xpe as i get the same error when i load it thru winnt.sif.
i know my xpe image is fine since i can boot it thru iscsi or vmware, but it is using a ramdrive already which may not be compatible with the ramdisk loading.

almost there ! :D

/Erwan

#24 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 17 May 2009 - 01:23 PM

I went back to my trusty bartpe now that I know that my steps to build an sdi image are good.
And indeed, here again i got beyong the "couldn't load ramdisk".

BartPE starts loading now but I quickly get a "following file is missing or corrupt : \i386\system32\config\system".
I read here and there threads about /minint parameter.
Digging...

Side note : i now use gpxelinux + sdi.c32 with a gzipped sdi file over http.
Bandwidth used :
7.5 mbytes/sec, image loaded in less than 20 secs :D
9.5 mbytes/sec with a non gzipped file aka the full speed of my 100mbits network card.
I definitely want this to work !

/Erwan

#25 was_jaclaz

was_jaclaz

    Finder

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

Posted 17 May 2009 - 02:53 PM

Possibly again out of the scope of your tests, but just in case and FYI.

One of the least documented, "half misterious" options of grub4dos is SDI support, check the --sdi option of chainloader command:
http://diddy.boot-la...htm#chainloader

See this hint by tinybit too:
http://www.911cd.net...o...18485&st=22

:D

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users