VERR_VD_INVALID_TYPE while copying custom bootloader

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Soumik
Posts: 3
Joined: 3. Oct 2015, 15:07

VERR_VD_INVALID_TYPE while copying custom bootloader

Post by Soumik »

Hi everyone,
I am new here in this community, greetings to everyone :D
I have been using Oracle VirtualBox since a while, and now I am trying to test a bootloader I have built. The bootloader structure in Hexeditor looks ok-- such as, from beginning to 0X00DB the bootstrap code actually exists, afterwards till 0x01BD (till where the bootstrap code should actually continue to to make it a 446 byte long) all entries are 0. From 0x01BE to 0x01FC where the partition should actually reside is again all are 0. However the boot signatures are ok 55 and AA at 0x01FE and oxo1FF respectively.
Now in order to boot it I have kept this E:/VM (I have opened this file in E:/VM with my HexEditor) and have issued the command VBoxManage Internalcommands converthd to convert this, however it's giving the below error:

Code: Select all

E:\VM>vboxmanage internalcommands converthd -srcformat RAW -dstformat VDI "boot.
img" "boot.vdi"
Converting image "boot.img" with size 512 bytes (1MB)...
VBoxManage.exe: error: Cannot copy the image: VERR_VD_INVALID_TYPE
Please note that the Raw image I am trying to convert to VDI is .img

Thank you all in advance :)
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: VERR_VD_INVALID_TYPE while copying custom bootloader

Post by Martin »

Why are you using the insupported internalcommand instead of the 'official' version?

VBoxManage convertfromraw <filename> <outputfile>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--uuid <uuid>]
VBoxManage convertfromraw stdin <outputfile> <bytes>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--uuid <uuid>]
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: VERR_VD_INVALID_TYPE while copying custom bootloader

Post by mpack »

It will be interesting to see if VirtualBox will accept a 1 sector drive...
Soumik
Posts: 3
Joined: 3. Oct 2015, 15:07

Re: VERR_VD_INVALID_TYPE while copying custom bootloader

Post by Soumik »

Hi Martin
Thanks for the reply, but I have now tried with vbox convertfromraw <inputfilename> <outputfilename> with generating the UUID online from an online UUID generator. It's now giving the below error:

Code: Select all

E:\VM>vboxmanage convertfromraw "boot.img" "boot.vdi" --format VDI --variant Sta
ndard --uuid 7d5cb334-6a01-11e5-9d70-feff819cdc9f
Converting from raw image file="boot.img" to file="boot.vdi"...
Creating dynamic image with size 512 bytes (1MB)...
VBoxManage.exe: error: Cannot create the disk image "boot.vdi": VERR_INVALID_PAR
AMETER
I went for the unofficial internalcommands in order to avoid the jargon of UUID generation only.

Hi Mpack
I am under the impression VM will get "stuck" to somewhere in case it gets no instruction to load further commands from any defined drive location in the bootloader. I may be wrong though, pls rectify me if I am wrong somewhere.
Post Reply