Jump to content











Photo
- - - - -

XP Universal USB and VHD boot - my procedure


  • Please log in to reply
15 replies to this topic

#1 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 18 December 2013 - 03:30 PM

Hi all,

 

as suggested on another thread, i share my experience.

 

here are the basic steps, i will integrate all the details and specific files by tomorrow.

 

1) i made a custom xp nlited iso removing some components with my winnt.sif

2) i made a minimal vmare virtual machine

3) installed xp

4) tweaked xp

5) made xp universal by setting intelppm start to 3 and forcing the ide controller to use the microsoft generic drivers

6) manually installed waitbt

7) added minimal usb boot cddb entries

8) added a shutdown script to preserve usb services

9) installed winvblock using its own bat script and instructions

10) shutdown the vm

11) make vmware map the vm disk

12) copy the xp installation directly into any hdd even usb or a vhd stored on any hd

13) install grub4dos accordingly (NB i used a custom built linux grub2+grub4dos for my specific purposes)

14) for usb3 boot, first boot at usb2 port, install specific driver, then usb3 boot is available

 

I'm in a hurry now, tomorrow i will explain details adn provide all sources, questions are welcome! ;)

 


  • Sha0 likes this

#2 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 19 December 2013 - 08:03 AM

here is my script to enable usb boot:

cd /D %~dp0

xcopy waitbt.sys %SystemRoot%\system32\drivers\
reg import waitbt.reg

reg import usb_boot_criticaldevicedatabase.reg
reg import usb3_boot_criticaldevicedatabase.reg

xcopy usb_boot.bat %SystemRoot%\system32\
%SystemRoot%\system32\usb_boot.bat

here is my waitbt.reg

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\waitbt]
"Type"=dword:00000001
"Start"=dword:00000000
"ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,\
  72,00,69,00,76,00,65,00,72,00,73,00,5c,00,77,00,61,00,69,00,74,00,62,00,74,\
  00,2e,00,73,00,79,00,73,00,00,00
"Group"="SCSI Miniport"

here is my usb_boot.bat:

@echo off
cd /D %~dp0

rem intel cpu on demand for amd cpus compatibility
reg query "hklm\system\currentcontrolset\services\intelppm"
if %errorlevel% == 0 (
  reg add "hklm\system\currentcontrolset\services\intelppm" /f /v "Start" /t REG_DWORD /d 3
)

rem usb2 services
call :srv_reset "hklm\system\currentcontrolset\services\usbccgp" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\usbehci" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\usbohci" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\usbuhci" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\usbhub" "System Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\usbstor" "SCSI miniport"

rem usb3 services
call :srv_reset "hklm\system\currentcontrolset\services\amdxhc" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\amdhub30" "System Bus Extender"

call :srv_reset "hklm\system\currentcontrolset\services\asmtxhci" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\asmthub3" "System Bus Extender"

call :srv_reset "hklm\system\currentcontrolset\services\EtronXHCI" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\EtronHUB3" "System Bus Extender"

call :srv_reset "hklm\system\currentcontrolset\services\FLxHCIc" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\FLxHCIh" "System Bus Extender"

call :srv_reset "hklm\system\currentcontrolset\services\nusb3xhc" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\nusb3hub" "System Bus Extender"

call :srv_reset "hklm\system\currentcontrolset\services\rusb3xhc" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\rusb3hub" "System Bus Extender"

call :srv_reset "hklm\system\currentcontrolset\services\tixhci" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\tihub3" "System Bus Extender"

call :srv_reset "hklm\system\currentcontrolset\services\xhcdrv" "Boot Bus Extender"
call :srv_reset "hklm\system\currentcontrolset\services\ViaHub3" "System Bus Extender"

goto :EOF

:srv_reset
reg query %1
if %errorlevel% == 0 (
  reg add %1 /f /v "Group" /t REG_SZ /d %2
  reg add %1 /f /v "Start" /t REG_DWORD /d 0
)
exit /b

here is the usb_boot_criticaldevicedatabase:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\*pnp0a03]
"ClassGUID"="{4D36E97D-E325-11CE-BFC1-08002BE10318}"       
"Service"="pci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci#cc_0c0300]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="usbuhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci#cc_0c0310]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="usbohci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci#cc_0c0320]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="usbehci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\usb#root_hub]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="usbhub"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\usb#root_hub20]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="usbhub"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\usb#class_09]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="usbhub"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\usb#class_08]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="USBSTOR"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\gendisk]
"ClassGUID"="{4D36E967-E325-11CE-BFC1-08002BE10318}"
"Service"="disk"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\usbstor#disk]
"ClassGUID"="{4D36E967-E325-11CE-BFC1-08002BE10318}"
"Service"="disk"


Edited by mazak000, 19 December 2013 - 08:23 AM.


#3 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 19 December 2013 - 08:06 AM

and this is the usb3 cddb reg that i took from wimb project

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_174C&DEV_2104&REV_00]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_174C&DEV_2104&REV_01]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_174C&DEV_2104&REV_02]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_1B21&DEV_1040&REV_00]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_1B21&DEV_1040&REV_01]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_1B21&DEV_1040&REV_02]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_1B21&DEV_1041&REV_00]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_1B21&DEV_1041&REV_01]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_1B21&DEV_1041&REV_02]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_1B21&DEV_1042&REV_00]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_1B21&DEV_1042&REV_01]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\PCI#VEN_1B21&DEV_1042&REV_02]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmtxhci"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\USB#ASMEDIAUSBD_Hub]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmthub3"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\USB#ASMEDIAUSBD_Hub&VID_040E&PID_0100]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"Service"="asmthub3"

it's only for asmedia controllers because that's the one i have.



#4 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 19 December 2013 - 08:19 AM

i dropped the idea of direct install into vhd because i had troubles making the xp setup properly use drivers like winvblock and wait4ufd.

In details:

 

using the f6 procedure to install wait4ufd (i know it's not as suggested by the developer) the xp setup cannot locate the .sys file under the subfolder and installation fails.

 

using the f6 procedure to install winvblock, if vhd is located under my asmedia usb3 controller, the vhd is seen, but not selectable as target for installation. If vhd is on an internal drive or usb2 hdd, the xp installation goes flawless, but winvlbock do not result installed properly and is seen as an unrecognised device and any attempt to update or reinstall winvlbock causes an immediate bsod (of course because it's like removing the system hd while windows is working on it). In any case in this situation it is possible to boot vhd on internal and usb2 but never on usb3 hdd.

The latter may seem odd, but it's the same reason that makes impossible to install xp into a vhd on the asmedia usb3 controller...that is at txtsetup stage xp will mess a lot with drivers, that's why i decided to cleanly install xp and then mod it.

 

When i tryied wait4ufd, i substitued the step of waitbt installation by starting a new hardware installation, selecting "the device is already attached" and then locating the wait4ufd driver.

After reboot there is a system device called wait4ufd and the service is installed properly with start=0 and i suppose the driver is starting otherwise i should see a question mark on the wait4ufd device in the device list.

 

I completely understand that the installation procedure of wait4ufd is different, but i am sure that if the driver is installed properly and it's purpose is to wait for the boot device, it doesn't matter when it is installed, or maybe i completely miss some point.

Of course i'm not saying that wait4ufd it's not working at all, just in all my tests that do not follow the procedures suggested in this forum...i know i'm a rebel! :D i just like to make experiments! ;)


Edited by mazak000, 19 December 2013 - 08:32 AM.


#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 19 December 2013 - 12:28 PM

Good. :)

How exactly do you perform step #12 (copy the xp installation directly into any hdd even usb or a vhd stored on any hd)?

Can you provide some detail of the mixed mode grub4dos/GRUB2 mentioned in step #13?

 

:cheers:

Wonko



#6 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 19 December 2013 - 01:05 PM

Good. :)

How exactly do you perform step #12 (copy the xp installation directly into any hdd even usb or a vhd stored on any hd)?

Can you provide some detail of the mixed mode grub4dos/GRUB2 mentioned in step #13?

 

:cheers:

Wonko

thanks to vmware mapping the vmware hd is seen as another phisycal hdd then i simply use the copy and paste provided by windows explorer.

Mapping of a vhd to copy in, can be achieved through winvblock, imdisk, or by os if under windows 7 or later.

Please note that i use a customized winnt.sif that places all windows folders under a specific folder see the following winnt.sif:

[Data]
AutoPartition = 0
MsDosInitiated = "0"
UnattendedInstall = "Yes"
AutomaticUpdates="No"

[Unattended]
UnattendMode = DefaultHide
UnattendSwitch = "Yes"
WaitForReboot = "No"
OemSkipEula = Yes
OemPreinstall = No
TargetPath = "\system\windows\WinXP"
ProgramFilesDir = "\system\windows\WinXP\Prg"
CommonProgramFilesDir = "\system\windows\WinXP\PrgCommon"
AutoActivate = No
CrashDumpSetting = 0
DUDisable = Yes
Hibernation = No

[GuiUnattended]
AdminPassword = *
EncryptedAdminPassword = NO
OEMSkipRegional = 0
OemSkipWelcome = 0
TimeZone=110
ProfilesDir = "%SYSTEMROOT%\Profiles"

[UserData]
ProductKey = [REMOVED]
FullName = "X"
OrgName = "X"
ComputerName = X

[RegionalSettings]
LanguageGroup=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
SystemLocale="0410"
UserLocale="0410"
UserLocale_DefaultUser="0410"
InputLocale="0410:00000410"
InputLocale_DefaultUser="0410:00000410"

[Networking]

[Identification]
JoinWorkgroup = WORKGROUP

[SystemFileProtection]
SFCQuota = 0
SFCShowProgress = 0

[Components]
AccessOpt = Off
Deskpaper = Off
Dialer = Off
Fax = On
Media_clips = Off
Media_utopia = Off
Mousepoint = Off
Msnexplr = Off
OEAccess = Off
Pop3Admin = Off
Pop3Service = Off
Pop3Srv = Off
Templates = Off
WMAccess = Off
WMPOCM = Off
Zonegames = Off
 

regarding step 13 basically i made a customised grub2 image from linux using grub-mkimage, used wee to write an mbr to load such grub2 image and from grub2 menu i chainload grub.exe (grub4dos) passing as parameter a specific config file so that it directly load the xp-vhd without showing another gui.

Everything is located under one folder /system/boot

This environment let me use the advanced features of grub2 like cute advanced gui and theming, loopback devices to boot into a single file containing a full linux installation (wubi like), etc. and also the specific unique features provided by grub4dos like sector mapping to allow vhd booting for an xp installation.

In the past, before knowing the existence of winvblock i tryied without success to use the grub2 loopback devices to test if a virtual-hd boot for xp could be imaginable evidently it behaves a lot different from sector mapping of grub4dos...

.

If interested i can post detailed procedure scripts and cfg files to recreate it


Edited by mazak000, 19 December 2013 - 01:07 PM.


#7 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 19 December 2013 - 01:16 PM

this is an example grub2 cfg file:

set rootlabel=mycustomlabel
search --no-floppy --label --set=root $rootlabel

set bootdir=($root)/system/boot
set prefix=$bootdir/grub/modules

set bootmgrdir=($root)/system/boot/bootmgr
set grub4dosdir=($root)/system/boot/grub4dos
set grub4dosmenudir=/system/boot/grub4dos/menu
set ntldrdir=($root)/system/boot/ntldr

set linuxdir=/system/linux
set windowsdir=/system/windows

# GRAPHIC TERMINAL
#set gfxmode=1920x1080,1920x1200,1600x1050,1600x1200,1280x720,1280x800,1024x768,800x600x24,640x480
set gfxmode=auto
insmod vbe
insmod vga
insmod gfxterm
terminal_output gfxterm

# IMAGE FORMATS
insmod png
insmod tga
insmod jpeg

# GRAPHIC MENU
insmod gfxmenu
set theme=$bootdir/grub/themes/default/theme.cfg
source $bootdir/grub/themes/default/fonts.cfg

set default="0"
set timeout=10

menuentry "Linux" {
	set loopfile=$linuxdir/linux.root.disk
	loopback loop0 $loopfile
	set root=(loop0)
#	linux /vmlinuz root=UUID=$uuid loop=$loopfile ro quiet nosplash noplymouth loglevel=0
	linux /vmlinuz root=UUID=$uuid loop=$loopfile ro quiet splash video=vesafb
	initrd /initrd.img
}

menuentry "Linux, internal grub config file" {
	set loopfile=$linuxdir/linux.root.disk
	loopback loop0 $loopfile
	set root=(loop0)
	configfile /boot/grub/grub.cfg
}

menuentry "Microsoft Windows XP Professional VHD" {
	linux $grub4dosdir/grub.exe --config-file="$grub4dosmenudir/winxp.lst"
}

menuentry "Memtest86+" {
	linux16 $bootdir/memtest86+.bin
}
 

and this is the called winxp.lst

find --set-root --ignore-floppies /system/windows/winxp.vhd
map /system/windows/winxp.vhd (hd0)
map --hook
root (hd0,0)
#uncomment the following for vhd hotswap
#map --rd-size=2048
#map --mem (rd)+4 (0x55)
#map --rehook
#write (0x55) #!GRUB4DOS\x00v=1\x00/system/windows/winxp.vhd\x00\x80\x00
chainloader /ntldr
 

NB i patched grub4dos to remove the internal menu and thus the boot is very fast.



#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 19 December 2013 - 01:24 PM

 

If interested i can post detailed procedure scripts and cfg files to recreate it

Sure :), everything is interesting.

For the record, you don't use Wee to write a MBR, you use Wee to write a partial grub4dos (Wee itself) to the MBR and THE WHOLE lot of hidden sectors.

This is VERY non-standard and can cause issues depending on the kind of software that you will run (particualrly Commercial software may write a flag, an ID/serial or something else to some of the hidden sectors).

It is already not advised (by me) to use grldr.mbr (because it uses a few hidden sectors), Wee which uses all of them - in tis regard - is much worse (but of course it is alright if nothing will ever *need* to write to the hidden sectors :)). 

At first sight I am failing to understand the *need* of using Wee instead of grldr.mbr (besides the fact that I personally don't use grldr.mbr).

 

:cheers:

Wonko



#9 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 19 December 2013 - 01:32 PM

Sure :), everything is interesting.

For the record, you don't use Wee to write a MBR, you use Wee to write a partial grub4dos (Wee itself) to the MBR and THE WHOLE lot of hidden sectors.

This is VERY non-standard and can cause issues depending on the kind of software that you will run (particualrly Commercial software may write a flag, an ID/serial or something else to some of the hidden sectors).

It is already not advised (by me) to use grldr.mbr (because it uses a few hidden sectors), Wee which uses all of them - in tis regard - is much worse (but of course it is alright if nothing will ever *need* to write to the hidden sectors :)). 

At first sight I am failing to understand the *need* of using Wee instead of grldr.mbr (besides the fact that I personally don't use grldr.mbr).

 

:cheers:

Wonko

Interesting, i didn't kow that...actually i thought that wee uses less space than bootmgr or ntldr mbr.

I switched to wee recently just to remove the clutter of having a file in the root directy :D, before that i placed my grub2 at root, named bootmgr and used bootsect to write the mbr, but if you say wee can cause problems, i should go back.

Those hidden sectors, how should be user? That is, what are the mbr specifications about that? I'm quite ignorant in this regard.

Thank you! ;)



#10 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 19 December 2013 - 01:54 PM

this is how i created my bootloader:

 

here is the file list:

\system\boot\memtest86+.bin

\system\boot\grub\grub.cfg
\system\boot\grub\grubldr

\system\boot\grub\modules\i386-pc <- grub2 modules copied from the linux installation

\system\boot\grub\themes\default\ <- folder where to put the custom made grub2 theme
\system\boot\grub\themes\default\fonts.cfg <- used to load fonts used by the default theme

\system\boot\grub4dos\grldr
\system\boot\grub4dos\grub.exe

\system\boot\grub4dos\menu\winxp.lst

\system\boot\inst\weemenu.txt
\system\boot\inst\weesetup.exe
\system\boot\inst\weesetup_(hd0).bat
\system\boot\inst\weesetup_(hd1).bat
\system\boot\inst\weesetup_(hd2).bat
 

i already posted grub.cfg and winxp.lst.

here is how to create the custom grub2 image:

from linux launch the following script:

#!/bin/sh

rm -f grubldr.mbr
rm -f grubldr
grub-ntldr-img --grub2 --boot-file=grubldr -o grubldr.mbr
tar cf bootldr.tar grubldr.cfg
grub-mkimage -O i386-pc -c grubldr-bootstrap.cfg -m bootldr.tar -o core.img \
biosdisk \
part_gpt \
gptsync \
part_msdos \
cpio \
fat \
tar \
fshelp \
ext2 \
iso9660 \
ntfs \
ntfscomp \
gzio \
crypto \
gcry_sha512 \
video \
video_fb \
vbe \
vga \
boot \
reboot \
halt \
minicmd \
read \
true \
memdisk \
lvm \
extcmd \
loopback \
cat \
echo \
loadenv \
search_fs_file \
search_fs_uuid \
search_label \
search \
normal \
configfile \
help \
ls \
sleep \
parttool \
msdospart \
password \
pbkdf2 \
password_pbkdf2 \
chain \
mmap \
relocator \
linux \
linux16 \
ntldr \
bufio \
font \
bitmap \
bitmap_scale \
gfxterm \
trig \
gfxmenu \
jpeg \
png \
tga
cat /usr/lib/grub/i386-pc/lnxboot.img core.img > grubldr
rm -f bootldr.tar
rm -f core.img

this is the required grubldr-bootstrap.cfg

normal (memdisk)/grubldr.cfg
 

and this is grubldr.cfg

set show_panic_message=true

if search -s -f -n /system/boot/grub/grub.cfg; then
    if configfile /system/boot/grub/grub.cfg; then
        set show_panic_message=false
    fi
fi

if [ ${show_panic_message} = true ]; then
    echo "It is not possible to load boot configuration."
fi
 

this is weemenu.txt

find --set-root /system/boot/grub/grubldr /system/boot/grub/grubldr
 

and this is weesetup_(hd0).bat

weesetup -u -s weemenu.txt -f (hd0)
 

.



#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 19 December 2013 - 01:54 PM

A normal MBR is 1 sector (actually 512 bytes) long.

A "normal" (orthodox) partitioning (like up to XP/2003) is Head aligned thus makes (on any "common" 255/63 geometry disk/device) 63 hidden sectors, of which the first one is the MBR and the other 62 are not used.

A "new" (unorthodox) partitioning (like Vista :ph34r: and later) is Mb aligned and makes (on *any*) device 2048 hidden sectors , of which the first one is the MBR and the other 2047 are not used.

grldr.mbr is 18 sectors (actually 9.216 bytes) long.

the "standard" Wee is 63 sectors (actually 32071 bytes, which "count" as 32256 bytes )  long.

the "extended" Wee is 127 sectors(actually 62391 bytes, which "count" as 62464 bytes )  long.

 

The issue here is more philosophical than anything else, a number of programs may "decide" to "take possession" of one or the other of the hidden sector to senselessly write some data, this is typical of some "smart" partitioning tools, I remember some products from Acronis that do/did that, and some Commercial programs, often coming from the ashes of DOS versions that write the serial/authentication code to one of them.

I am not saying that it will happen, I am saying that it might happen.

 

If you don't want "boot files" in root, it is "safer" to use a hidden very small partition to host them.

 

:cheers:

Wonko



#12 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 19 December 2013 - 02:10 PM

Thank you for the clear explanation.

Actually i'm so obsessed that a hidden partition is even more clutter to me :D (i can't see it, but i know it's there and it's conspiring against me :D ) i even patched windows files to prevent the creation of recycle bin and System Volume Information folders.

 

One more question: do you know what are safe bootloaders? ntldr, bootmgr, etc? Thank you! ;)



#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 19 December 2013 - 02:57 PM

Well, for paranoia there are doctors ;).

For booting you can try using (say) bootice to install the grub4dos PBR, and use *any* conventional MBR code to boot the PBR of the active partition (but you will need grldr on root).

 

:cheers:

Wonko



#14 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 19 December 2013 - 03:03 PM

Well, for paranoia there are doctors ;).

For booting you can try using (say) bootice to install the grub4dos PBR, and use *any* conventional MBR code to boot the PBR of the active partition (but you will need grldr on root).

 

:cheers:

Wonko

thanks! ...maybe with some yoga meditation, i can tolerate the presence of one file :D

;)



#15 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 21 December 2013 - 11:36 PM

the xp installation goes flawless, but winvlbock do not result installed properly and is seen as an unrecognised device and any attempt to update or reinstall winvlbock causes an immediate bsod (of course because it's like removing the system hd while windows is working on it).

When WinVBlock shows as an "Unknown device", it's because the driver was invoked without having used a "normal" .INF installation.

However, if you are performing an .INF installation on that "Unknown device" and it is giving you a Blue Screen of Death, then that's a bug.  WinVBlock should tell the PnP Manager that it cannot be unloaded until shutdown, if it's driving the virtual disk that you've booted. Then you should get a "won't happen until you reboot, would you like to reboot now?"-type message. This bug will need to be addressed.

#16 mazak000

mazak000

    Newbie

  • Members
  • 21 posts
  •  
    Italy

Posted 04 January 2014 - 08:52 AM

When WinVBlock shows as an "Unknown device", it's because the driver was invoked without having used a "normal" .INF installation.

However, if you are performing an .INF installation on that "Unknown device" and it is giving you a Blue Screen of Death, then that's a bug.  WinVBlock should tell the PnP Manager that it cannot be unloaded until shutdown, if it's driving the virtual disk that you've booted. Then you should get a "won't happen until you reboot, would you like to reboot now?"-type message. This bug will need to be addressed.

maybe it's not a bug, maybe it's because i didn't use the small memdisk and write the vhd filename to instruct winvblock on what file it should hot swap...could be?

 

i removed those instructions because i had some problems during direct vhd install causing xp install to fail. I don't remember exactly what was the problem i had and maybe could be related to specific hardware / usb controller.


Edited by mazak000, 04 January 2014 - 08:53 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users