Author Topic: Convert Partition to VDI  (Read 6140 times)

Eric Erickson

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Convert Partition to VDI
« on: January 17, 2019, 01:58:47 am »
I've got an ArcaOS partition on a machine, that I want to convert to a VDI. Now this is a 3GB partition on a 250GB SSD. I've booted into Win10 and used DfSee to create an image file of the partition of interest. I used VBoxManage to convert that to a VDI, but when I attach this VDI to a virtual machine and attempt to boot it, I get the following

"Invalid code for JFS 0000:0000"

I booted into DfSee and it seems to see the VDI as a Large Floppy Format. It reports there are no partitions on the disk.

Anyone ever done something like this? I've played around with DfSee trying to get MBR, or boot code, or converted to a disk/partition, but no luck so far.


Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: Convert Partition to VDI
« Reply #1 on: January 17, 2019, 02:15:24 am »
Never tried, but I thought it was possible to mount the raw partition under Vbox. Then it would just be a matter of xcopying the contents to a new 3GB VDI.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Convert Partition to VDI
« Reply #2 on: January 17, 2019, 07:57:19 am »
Never tried, but I thought it was possible to mount the raw partition under Vbox. Then it would just be a matter of xcopying the contents to a new 3GB VDI.

I have tried mounting a raw partition under VBox. I never got it to work. From what I saw, it appears that the partition information is virtualized, and only the data portion of the disk is attached. That seems to work with NTFS, or FAT32 partitions, but not with HPFS, or JFS, partitions. Be careful trying it, you can mess up the real disk.

Quote
I've got an ArcaOS partition on a machine, that I want to convert to a VDI.

That could be tricky, but it is probably not difficult. Using a DFSEE image probably won't work, unless you restore it to a disk using DFSEE, and that only restores exactly what you backed up, and it would probably need to be to a similar sized disk to get the geometry correct.

Anyway, what I would try, would be to ZIP the whole volume, using -r9yS parameter (under OS/2, of course). Boot an alternate OS/2 boot system, in the VM (the ArcaOS installer would do), configure (LVM), and format, the VDI using OS/2, then UNZIP the ZIP file into it. You may need to use SYSINSTX.COM to make it bootable (but I haven't needed to do that, yet). If it is the C: drive, and you use a primary partition, you probably won't need Air Boot (or Boot Manager). If it is not C:. or you use a logical drive, you will need Air Boot to get it to boot. Install with LVM.

Before you do anything, you will need to make CONFIG.SYS compatible with a VBox machine Most of it should be okay, but the driver for the network probably needs to change. You may also need AHCI, or IDE (Danis) support, depending on how you set up the VM.

Have fun...  :)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4714
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Convert Partition to VDI
« Reply #3 on: January 17, 2019, 01:01:42 pm »
Hi

In Windows there is this Disk2VHD, it is not VDI, but I want to try it when I got some time to see if works on a dual boot machine to extract an OS/2 JFS partition. There are also  VMware vCenter Converter (free) .

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Convert Partition to VDI
« Reply #4 on: January 18, 2019, 07:49:05 am »
Check out: https://forums.virtualbox.org/viewtopic.php?t=22422. I have used that to change from VMDK to VDI.

It does a number of formats (including HDD, which might do what the OP wants). Additionally, it will compress VDI files (READ the instructions).

It is a windows program, but I did get an older version (haven't tried the latest, yet) to run with ODIN, as long as all files are less than 2 GB (it just stops at 2 GB, and needs to be killed - that would be an ODIN problem). I do run it under windows, through a SAMBA network connection, to work with larger (6 GB) VDI files in OS/2.

Eric Erickson

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: Convert Partition to VDI
« Reply #5 on: January 18, 2019, 06:39:23 pm »
I used the zip method described earlier to get my hard partition converted to a VDI. Using SYSINSTX to get it bootable did not work, so I simply added Air-Boot from the ArcaOS Installer. It takes a couple of seconds long to get booted, but I can live with that. I may fool around some more and see if I can get it directly boot.

Now I can proceed with my project to virtualize a couple of my physical machines to reduce the space they take up.



TIA.