Jump to content











Photo
- - - - -

Xp on logical partition.


  • Please log in to reply
33 replies to this topic

#26 grubsome

grubsome
  • Members
  • 4 posts
  • Location:arhus
  • Interests:grub4dos
    grub2
  •  
    Denmark

Posted 11 September 2011 - 09:20 PM

Hey Wonko,
nice, thanky for that an hour is okay, will give you the report
later at the week.
Please check your mail and get a virtual double-beer
plus for this fast response.
Cool!

:tabletalk:
:cheers:
:cheers:

#27 cdob

cdob

    Gold Member

  • Expert
  • 1,010 posts

Posted 14 September 2011 - 08:12 PM

Let's play another game:

Install XP from USB to a logical partition.
Neither MBR nor partition code changed.

Given one internal hard disk and a USB stick.
There is one primary partition and a logical partition at hard disk.

Grub4dos is installed at primary active partition at hard disk.
Add a small hard disk image boot_xp.img to logical partition
The hard disk image is mapped to hd0
Winvblock is used at first boot to mount hard disk image.
setup writes MBR, PBR and core boot files to hard disk image

Boot from USB stick menu.lst
title First part of Windows XP Professional SP3 setup\nUSB to logical - boot_xp.img

#boot from USB

#(hd0) USB drive

#(hd1) internal hard disk

#(hd1,0) primary boot partition

#(hd1,4) logical partition, contains /boot_xp.img

ls /WINSETUP/XPpSP3.ISO || find --set-root --ignore-cd /WINSETUP/XPpSP3.ISO

map ()/WINSETUP/XPpSP3.ISO (0xff) || map --mem /WINSETUP/XPpSP3.ISO (0xff)

map --heads=16 --sectors-per-track=63 (hd1,4)/boot_xp.img (hd0)

map ()/winvblock.ima (fd0)

map ()/winvblock.ima (fd1)

map (hd0) (hd2)

map --harddrives=3

map --hook

map --rd-size=2048

map --mem (rd)+4 (0x55)

map --rehook

write (0x55) #!GRUB4DOS\x00v=1\x00boot_xp.img\x00\x80\x00

chainloader (0xff)/I386/SETUPLDR.BIN
Remember internal hard disk refers to hd1. Read boot.ini entry refers to hd1.

Add to grub4dos menu.lst at hard disk:
title boot from internal hard disk, mapped to (hd1)

ls /boot_xp.img || find --set-root --ignore-cd --ignore-floppies /boot_xp.img

map --heads=16 --sectors-per-track=63 /boot_xp.img (hd0)

map (hd0) (hd1)

geometry (hd1) && map (hd1) (hd2)

geometry (hd2) && map (hd2) (hd3)

map --hook

chainloader (hd0,0)/ntldr
WinSetupFromUSB is used to add XP to USB stick.
http://www.msfn.org/...omusb-with-gui/
Boot once from USB and reboot to internal hard disk.
Internal hard disk refers to hd0 now. Map to hd1 to match boot.ini entry.
Installation does finish. XP is installed fully.

If you prefer a fixed letter c:, add a adjusted migrate.inf to xp install files.

That's a example. You may have to adjust this, if you use a different environment.

#28 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 14 September 2011 - 10:16 PM

The heads=16 sound like a very small partition/disk :dubbio:
Or are they simply "fictional" and LBA is used anyway? :unsure:

Some detail on the used image would be appreciated anyway.

I don't understand to WHAT will be the XP installed. :unsure:
Can you explain?

:cheers:
Wonko

#29 cdob

cdob

    Gold Member

  • Expert
  • 1,010 posts

Posted 15 September 2011 - 08:17 PM

The heads=16 sound like a very small partition/disk :dubbio:

Yes, boot_xp.img size is 8 MB.
Setup stores files ntldr, ntdetect.com, boot.ini and bootfont.bin at the image partition.

I don't understand to WHAT will be the XP installed.

XP will be installed to the logical partition at hard disk, or to a "Logical volume inside Extended partition".
Core boot files (ntldr, ntdetect.com and boot.ini) are inside a image. Other files are at logical volume.

#30 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 16 September 2011 - 06:11 AM

XP will be installed to the logical partition at hard disk, or to a "Logical volume inside Extended partition".
Core boot files (ntldr, ntdetect.com and boot.ini) are inside a image. Other files are at logical volume.


Well, then it's the same (once installed) as the floppy image approach, the difference is only because you can install directly without writing bootsector/NTLDR/NTDETECT.COM/BOOT.INI on a "real" Primary, right?
Nice. :)

:cheers:
Wonko

#31 cdob

cdob

    Gold Member

  • Expert
  • 1,010 posts

Posted 18 September 2011 - 08:53 AM

Well, then it's the same (once installed) as the floppy image approach, the difference is only because you can install directly without writing bootsector/NTLDR/NTDETECT.COM/BOOT.INI on a "real" Primary, right?

Yes, approach is inspired by floppy image approach.

Main idea: keep MBR and partition boot code at internal hard disk.
Create a (virtual) hard disk hd0. XP setup write core boot environment to (virtual) hd0 now, internal hard disk is not changed.

Another example:
Map another (USB) disk to hd0.
Assuption: I like to keep MBR at first internal hard disk and donate a USB disk to MBR changes.
Install XP to a logical volume to internal hard disk.
XP setup writes core boot environment to second disk.
This dosn't require a addional windows driver.
Drawback: adjust boot environment after installation: copy core boot files to logical volume and ajdust hidden sectors at partition boot code.

To summarize:
map a victim disk to hd0 and install XP to logical volume.

#32 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1,427 posts
  • Location:Chennai, India
  •  
    India

Posted 18 September 2011 - 12:16 PM

Main idea: keep MBR and partition boot code at internal hard disk.
Create a (virtual) hard disk hd0. XP setup write core boot environment to (virtual) hd0 now, internal hard disk is not changed.

Seems that this approach can be the answer to my problem also.

#33 Max Shonichev

Max Shonichev
  • Members
  • 8 posts

Posted 07 December 2011 - 04:22 PM

Boot from USB stick menu.lst

title First part of Windows XP Professional SP3 setupnUSB to logical - boot_xp.img

#boot from USB

#(hd0) USB drive

#(hd1) internal hard disk

#(hd1,0) primary boot partition

#(hd1,4) logical partition, contains /boot_xp.img

ls /WINSETUP/XPpSP3.ISO || find --set-root --ignore-cd /WINSETUP/XPpSP3.ISO

map ()/WINSETUP/XPpSP3.ISO (0xff) || map --mem /WINSETUP/XPpSP3.ISO (0xff)

map --heads=16 --sectors-per-track=63 (hd1,4)/boot_xp.img (hd0)

map ()/winvblock.ima (fd0)

map ()/winvblock.ima (fd1)

map (hd0) (hd2)

map --harddrives=3

map --hook

map --rd-size=2048

map --mem (rd)+4 (0x55)

map --rehook

write (0x55) #!GRUB4DOSx00v=1x00boot_xp.imgx00x80x00

chainloader (0xff)/I386/SETUPLDR.BIN
Remember internal hard disk refers to hd1. Read boot.ini entry refers to hd1.

Can you shed some light on why do you need (0x55) drive with some GRUBSOME magic, it does seem to be used anywhere later on.
Interesting spamming over both (fd)-s with winvblock as well - is this to hide any original floppies? Doesn't map --floppies=1 helps to cut alternatives?

Add to grub4dos menu.lst at hard disk:

title boot from internal hard disk, mapped to (hd1)

ls /boot_xp.img || find --set-root --ignore-cd --ignore-floppies /boot_xp.img

map --heads=16 --sectors-per-track=63 /boot_xp.img (hd0)

map (hd0) (hd1)

geometry (hd1) && map (hd1) (hd2)

geometry (hd2) && map (hd2) (hd3)

nice trick with geometry to make script more portable!

Edited by Max Shonichev, 07 December 2011 - 04:23 PM.


#34 cdob

cdob

    Gold Member

  • Expert
  • 1,010 posts

Posted 07 December 2011 - 10:33 PM

Can you shed some light on why do you need (0x55) drive with some GRUBSOME magic, it does seem to be used anywhere later on.

WinVBlock driver does read (0x55) http://reboot.pro/8168/
If I recall correctly, file is hooked by winvblock driver at running windows.
At second glance 0x80 may match internal hard disk or not in that case.

Contrary we don't need boot_xp.img at runnning windows.
Can you change a XP ISO image?

Use WinVBlock driver at textmode only. No need to add to final windows installation.
Remove winvblock floppy image, but include file \I386\WVBlk32.SYS
And add \I386\UNSUPDRV.INF
[Version]

Signature = "$Windows NT$"



[AddReg.WinVBlock]

HKLM,"SYSTEM\CurrentControlSet\Services\WinVBlock",,0x00000012

HKLM,"SYSTEM\CurrentControlSet\Services\WinVBlock","Type",0x00010003,1

HKLM,"SYSTEM\CurrentControlSet\Services\WinVBlock","Start",0x00010003,0

HKLM,"SYSTEM\CurrentControlSet\Services\WinVBlock","ErrorControl",0x00010003,1

HKLM,"SYSTEM\CurrentControlSet\Services\WinVBlock","Tag",0x00010003,33

HKLM,"SYSTEM\CurrentControlSet\Services\WinVBlock","ImagePath",0x00020002,"\SystemRoot\System32\drivers\WVBLK32.SYS"

HKLM,"SYSTEM\CurrentControlSet\Services\WinVBlock","Group",0x00000002,"SCSI miniport"

HKLM,"SYSTEM\CurrentControlSet\Services\WinVBlock","TxtSetupInstalled",0x00010003,1



[Files.WinVBlock]

WVBLK32.SYS,system32\drivers



[Devices]

WinVBlock

What's your environment? How do you install XP?
Which hard disks and partitions does exist.

Doesn't [i]map --floppies=1[/i] helps to cut alternatives?
That's a never ending story, different BIOS may require different approaches.
Any floppy image mapping is correct and false.