Page 5 of 12

Help, Raw Disk to install guest WinXp

PostPosted: 26. Nov 2008, 04:32
by tshen
Hey VT,
I created a VMDK for a whole raw disk to install WinXP on VirtualBox 2.0.6 hosted by Ubuntu 8.10. I configured /dev/sda as my raw disk and set the access mode 666 to sda. SATA support is off, ACPI is on and IO APIC is off. However, I encounter a problem when WinXP installer trying to format the disk and it says "can't find any hard disk drivers installed in your computer". One thing for sure is that the installer could read the partition table correctly from sda.

I also tried to turn on SATA support and set the operation mode to Legacy in BIOS and loaded Intel driver for SATA with F6 during installation. The same problem occurred.

Any Suggestion?
thanks a lot.
tshen

PostPosted: 26. Nov 2008, 17:21
by TerryE
Virtualize the IDE3 controller, as this "plays better" with XP.

PostPosted: 27. Nov 2008, 09:01
by tshen
Hey TerryE.
IDE3 works fine! thank you so much!

PostPosted: 30. Nov 2008, 07:04
by Streeter
Im having trouble:

I used used the command
Code: Select all   Expand viewCollapse view
sudo VBoxManage internalcommands createrawvmdk -filename rawDiskXP.vmdk -rawdisk /dev/sda3
to create the vmdk because if I use
Code: Select all   Expand viewCollapse view
sudo VBoxManage internalcommands createrawvmdk -filename rawDiskXP.vmdk -rawdisk /dev/sda -partitions 3 -relative
virtualbox reads my entire hard disk as opposed to the one partition. Windows will install fine initially but as soon as the virtual machine is closed, the partition is no longer readable. I have tried multiple times, and even after repairing the partition with TestDisk, it will not boot after the first time the virtual machine is closed.

PostPosted: 30. Nov 2008, 14:47
by vbox4me2
Another hint how to port between VM and real machines, ntbackup and bartPE(CD) works very well. Apart from the HAL problem (for which there is a solution mentioned in this thread) and ide to sata http://forums.virtualbox.org/viewtopic.php?p=47983#47983 which I consider to be solved. With a bartpe ISO it is very easy to disable stuff that gives bsod's and even to do a sysprep(when needed). Must VB stuff is generic enough to port between environments, everything else can be set to manual start(services), ntbackup/restore, run a scan for new devices from device manager and off you go.

PostPosted: 30. Nov 2008, 16:43
by TerryE
vbox4me2, agreed: BartPE is a wonderful alternative to Linux LiveCDs for those who want to stay in the Windows world.

Streeter, are you saying that the first of these tw VMDK does work for you?

PostPosted: 3. Dec 2008, 21:05
by Streeter
sudo VBoxManage internalcommands createrawvmdk -filename rawDiskXP.vmdk -rawdisk /dev/sda3

This one will work UNTIL I shutdown the virtual machine completely; at that point the filesystem is read as unreadable and I can no longer access the partition. I tries to recover the NTFS structure with TestDisk and that essentially failed. It would mount in Ubuntu but not VirtualBox, even if I remade and reregistered the VDMK. I have tried these different approaches many times and none worked. I think it comes down to the filesystem losing its structure (and possibly writing data over the NTFS structure information?)

PostPosted: 4. Dec 2008, 00:46
by Sasquatch
Streeter wrote:sudo VBoxManage internalcommands createrawvmdk -filename rawDiskXP.vmdk -rawdisk /dev/sda3

This one will work UNTIL I shutdown the virtual machine completely; at that point the filesystem is read as unreadable and I can no longer access the partition. I tries to recover the NTFS structure with TestDisk and that essentially failed. It would mount in Ubuntu but not VirtualBox, even if I remade and reregistered the VDMK. I have tried these different approaches many times and none worked. I think it comes down to the filesystem losing its structure (and possibly writing data over the NTFS structure information?)

Are you sure that the partition isn't mounted on the Host? That can cause strange behaviour like this.

PostPosted: 5. Dec 2008, 06:55
by Streeter
I am sure it is not mounted. I used just tried with an extended partition and that allows me to boot to the VM after closing it down, yet the partition is still unreadable to Ubuntu and thus will not boot natively. "NTFS signature is missing" is the error Ubuntu deals out.

PostPosted: 5. Dec 2008, 16:59
by TerryE
Streeter wrote:I am sure it is not mounted ... "NTFS signature is missing" is the error Ubuntu deals out.

Unfortunately it only needs to be mounted once for this corruption to occur. I run my dual boot XP instance from inside a script. I use a service account so that I don't need to add my normal interactive account to disk. I also double check to make sure that these partitions are not mounted before starting my VM.

PostPosted: 5. Dec 2008, 17:46
by Streeter
I have only attempted to mount the partition after it fails to boot in native or if the VM has failed to boot. Even using a separate account it will fail to maintain integrity. The partition has been checked for bad sectors and physical disk integrity.

On a side-note; I have set /dev/sda3 permissions to 666, what would be the proper chmod settings to return to using just a separate account?

I have actually just reinstalled Ubuntu after securely deleting the entire disk to avoid any possibility of an old file structure being picked up. Im going to try starting the install by natively using the disk and have it format the drive, then boot to Ubuntu and install it virtually, so it does not have to format the partition. I have tried formating it with Gparted before installing, but it ends up with the same problem.

Another side-note; why cant I format partitions to NTFS while running Gparted under Ubuntu normally? I have to boot from the LiveCD to format NTFS partitions, which seems odd.

Booting natively - fails

PostPosted: 6. Dec 2008, 00:10
by micf
Thinkpad X300 (= SATA flash disk) + Ubuntu 8.10 + Virtualbox 2.0.4
I configured SATA disk to compatibility mode in BIOS and followed your instructions.
Windows partition is the first primary partition (/dev/sda1). I added a Win XP entry to GRUB (root (hd0,0) / chainloader +1)
I cannot boot natively from the raw disk.
Symptom: Starting up ... + blinking cursor in second line
It seams that the handover from GRUB to the Windows native bootloader does not work.
I tried any of the following:
- added makeactive to GRUB entry
- used rootnoverify instead of root in GRUB entry
Install Intel Storage Matrix Manager in virtualbox and switching to APCI mode of SATA (BIOS and VirtualBox).

Any idea what could be the cause and how to fix this?

UPDATE: It seems that the boot sector of my primary partition is not setup correctly. Actually dskprobe indicates that all is set to 00 - if I used this tool correctly. Even after doing an fixmbr c: / fixboot c: from a Windows XP SP2 Recovery Console.
Meanwhile I found a viable workaround: I replaced GRUB with GRUB4DOS as my main boot manager. GRUB4DOS is able to directly start NTLDR.

Activation problems with Vista.

PostPosted: 8. Dec 2008, 23:38
by dlaor
Hi,

First of all - many thanks to vkov_tinsky and TerryE for this howto, it is very helpful.

I tried to install Windows Vista Home Premium both in VM and native. Here is what I noted while following your runthrough:

- DMI BIOS config: dmidecode -t1 gave "UUID: Not Present", but VirtualBox would not let me start a VM with UUID set to <EMPTY>, so I left that setting out.

- for Vista, [I/O APIC] has to be turned on, otherwise Windows setup will stop with some error about the computer not supporting APIC fully.

- Hardware profiles for Vista: The regsetdword utility does not work for me, I created two hardware profiles as you explained, and saw regsetdword changing the ControlSet001\\Control\\IDConfigDB\\CurrentConfig registery-key from 1 (VM) to 2 (native), but after Vista starts natively (and exits) it is always returned to 1.

Good news is that hardware changes in Vista (for me!) don't seem to matter, everything is working fine here without adding a new hw profile. Both native and vm work with internet, graphic drivers (using Intel GMA 945) and when run natively my webcam and wifi work as they always did, even after booting up 5 times in vm and as many times natively.

For me the problem is activation. I've activated Vista natively, but as VM it gives the message that the hardware has changed and that I have to reactivate...

I tried all mac-addresses my network cards have, but none of them gets accepted...

Does anyone have a solution for this? (I've got 2 days before reactivation... ;))

Anyway, I'll try to find out some more about vista-activation...

I hope this is helpful to anyone who tries to install Vista.

Cheers! Dlaor

PostPosted: 10. Dec 2008, 03:21
by TerryE
AFAIK the XP workaround of copying files doesn't work for XP, though some internet research should validate this. So far my approach to Vista has been to avoid it like the plague, so my detailed knowledge here is extremely limited. XP still does all that I need (basically running a few proprietary packages that won't run under WINE. Perhaps someone else can help here.

PostPosted: 11. Dec 2008, 21:58
by dlaor
TerryE wrote:AFAIK the XP workaround of copying files doesn't work for XP, though some internet research should validate this. So far my approach to Vista has been to avoid it like the plague, so my detailed knowledge here is extremely limited. XP still does all that I need (basically running a few proprietary packages that won't run under WINE. Perhaps someone else can help here.


TerryE, thanks for your reply. I have not found a solution yet. For now I've registered the VM instance of Vista, since I plan on using that one the most (my reasons for using windows are the same as yours; I switched to linux but there are a few apps which don't run that smoothly under wine yet).

Happy holidays to you all!