Fixed size and already partitioned VHDs here!

User avatar
bootsector
Posts: 170
Joined: Sun May 24, 2020 6:58 pm
Has thanked: 4 times
Been thanked: 30 times

Fixed size and already partitioned VHDs here!

Unread post by bootsector »

So I was having several issues with VHD files created by VirtualBox. I've then followed the approach of using bximage for creating RAW bochs images, then cfdisk for creating a FAT16 bootable partition on them and finally qemu-img for converting from raw to vhd format.

Disk sizes available in zip package attached to this post are:

50MB
100MB
200MB
300MB
400MB
500MB
1GB
2GB

I've successfuly used the 50MB one to create a bootable Doom VHD based on FreeDOS, so I thought those would be useful to other people as well.

Cheers,

bootsector
Attachments
EmptyVHDs.zip
(4.49 MiB) Downloaded 1268 times
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Caldor »

So these are fomatted images? I have had trouble compressing images, but I did have some data on them. They were Fat32 formatted though.

MiSTer seems to only support partitions and VHDs of up to 8gb... or a bit over 8000MB. Would be nice if such an image could be compressed effectively, as it clearly should not take up more than a few megabyte without data on it. I think I will experiment a bit since you got this working.

I create my VHDs using the Windows 10 disk manager and then I use FDISK from FreeDOS to partition them and format to format them.

Update: I compressed a raw 8032MB VHD (pretty sure you should not get issues with this size). I compressed it with 7zip and its 1.2mb.
8GB_Empty.7z
(1.18 MiB) Downloaded 559 times
This one is partitioned and formatted:
8GB_Fat32.7z
(1.18 MiB) Downloaded 497 times
ZigZag
Posts: 99
Joined: Sun Jun 28, 2020 7:05 am
Has thanked: 1 time
Been thanked: 6 times

Re: Fixed size and already partitioned VHDs here!

Unread post by ZigZag »

When I ran fdisk on the latest release it seemed to support LBA. I was hoping that'd allow bigger VHD/HDD sizes.
User avatar
uigiflip
Posts: 27
Joined: Sun May 24, 2020 7:28 pm
Been thanked: 2 times

Re: Fixed size and already partitioned VHDs here!

Unread post by uigiflip »

seems to support only upto 8gb vhd
Ultimate MiSTer Blissbox pro version, Replay Vidor version, Replay 2, Real Amiga's 500+, 500+ with pi storm, a1200 in cd32 special edition case. https://www.twitch.tv/uigiflip
User avatar
bootsector
Posts: 170
Joined: Sun May 24, 2020 6:58 pm
Has thanked: 4 times
Been thanked: 30 times

Re: Fixed size and already partitioned VHDs here!

Unread post by bootsector »

Caldor wrote: Mon Aug 17, 2020 1:25 pm So these are fomatted images? I have had trouble compressing images, but I did have some data on them. They were Fat32 formatted though.

MiSTer seems to only support partitions and VHDs of up to 8gb... or a bit over 8000MB. Would be nice if such an image could be compressed effectively, as it clearly should not take up more than a few megabyte without data on it. I think I will experiment a bit since you got this working.

I create my VHDs using the Windows 10 disk manager and then I use FDISK from FreeDOS to partition them and format to format them.
These are only FAT16 partitioned. Not formatted.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Caldor »

Ahh... I made a raw 8032MB VHD... I guess I should partition it as well then if that is not going to make the compressed file much bigger anyway.
ZigZag wrote: Mon Aug 17, 2020 1:35 pm When I ran fdisk on the latest release it seemed to support LBA. I was hoping that'd allow bigger VHD/HDD sizes.
uigiflip wrote: Mon Aug 17, 2020 1:38 pm seems to support only upto 8gb vhd
Yeah, pretty sure its a problem with the bios AO486 is using... or maybe its the core itself or a mix... but disks larger than 8000MB causes issues. I think all the sectors above 8064MB or close to that, wont work. So when I made a VHD that was exactly 8gb it means its 8192MB, which is about 100MB too big it seems, or 148mb? Well, does not seem much point to figure out the exact number, which is why I made my VHD 8032MB, just to ensure its within the supported capacity and wont get these bad sectors messing up the whole VHD.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Caldor »

Ohh... found that a partioned and formatted empty VHD still compresses to being about 1mb compressed. I shared it in my first post.
User avatar
bootsector
Posts: 170
Joined: Sun May 24, 2020 6:58 pm
Has thanked: 4 times
Been thanked: 30 times

Re: Fixed size and already partitioned VHDs here!

Unread post by bootsector »

Caldor wrote: Mon Aug 17, 2020 3:59 pm Ohh... found that a partioned and formatted empty VHD still compresses to being about 1mb compressed. I shared it in my first post.
That's great! Thanks for sharing those!
Fallon
Posts: 111
Joined: Mon May 25, 2020 1:48 am
Has thanked: 52 times
Been thanked: 22 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Fallon »

I don’t get it. I copied one of these to mister, partitioned it in fdisk, formatted it on mister via msdos then copied it back to my windows 10 pc, added some games, copied it back to mister and the files cannot be seen on the vhd in mister.

I’m no dos expert, am I missing some setting when prepping the disk?
Fallon
Posts: 111
Joined: Mon May 25, 2020 1:48 am
Has thanked: 52 times
Been thanked: 22 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Fallon »

Fallon wrote: Tue Aug 18, 2020 12:56 am I don’t get it. I copied one of these to mister, partitioned it in fdisk, formatted it on mister via msdos then copied it back to my windows 10 pc, added some games, copied it back to mister and the files cannot be seen on the vhd in mister.

I’m no dos expert, am I missing some setting when prepping the disk?
* problem resolved, please ignore above post
User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Fixed size and already partitioned VHDs here!

Unread post by pgimeno »

Caldor wrote: Mon Aug 17, 2020 3:59 pm Ohh... found that a partioned and formatted empty VHD still compresses to being about 1mb compressed. I shared it in my first post.
You can even recompress it for a ridiculous size.
Attachments
8GB_Empty.7z.7z
(941 Bytes) Downloaded 366 times
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Caldor »

pgimeno wrote: Tue Aug 18, 2020 6:26 am
Caldor wrote: Mon Aug 17, 2020 3:59 pm Ohh... found that a partioned and formatted empty VHD still compresses to being about 1mb compressed. I shared it in my first post.
You can even recompress it for a ridiculous size.
woot? That works? I gotta try that.

It does work... pretty strange. I wonder if special 7zip settings would help making it this small in the first attempt. Maybe by increase the library or something.
frozencities
Posts: 1
Joined: Wed Aug 19, 2020 4:46 am

Re: Fixed size and already partitioned VHDs here!

Unread post by frozencities »

Fallon wrote: Tue Aug 18, 2020 12:56 am I don’t get it. I copied one of these to mister, partitioned it in fdisk, formatted it on mister via msdos then copied it back to my windows 10 pc, added some games, copied it back to mister and the files cannot be seen on the vhd in mister.

I’m no dos expert, am I missing some setting when prepping the disk?
How did you resolve this? I'm having the exact same issue.
Fallon
Posts: 111
Joined: Mon May 25, 2020 1:48 am
Has thanked: 52 times
Been thanked: 22 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Fallon »

frozencities wrote: Wed Aug 19, 2020 4:48 am How did you resolve this? I'm having the exact same issue.

You can make your own VHD in disk management, basically create the VHD as fixed storage, allocate it's size, set it as MBR, but don't format it, or partition it, or create a simple volume.

Copy the VHD to mister then in MSDOS using "fdisk" command. Change to the drive with option 5 (I think), partition it as a primary, exit fdisk then use command "format d:"

Now copy it back to Windows, attach the VHD, select it, and open within disk management to add any files you want, then recopy back to Mister.


Then, get the shared folder working so you don't have to mess around copying VHD's back and forth over your network.
User avatar
Cebion
Posts: 115
Joined: Sun May 24, 2020 7:30 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Cebion »

Or use the driver image disk after you formated and directly start misterfs to transfer files :D
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Caldor »

Cebion wrote: Wed Aug 19, 2020 6:31 am Or use the driver image disk after you formated and directly start misterfs to transfer files :D
Yeah, this is a bootable floppy that has MiSTerFS, FDISK and FORMAT based on FreeDOS, so it can do all of this. Even has a file manager called Volkov Commander that can help copy files from the shared folder drive to your VHD.

http://dionysus.dk/software/DOS/AO486_floppy.7z
Boot this image and type "misterfs F" and you should get the shared folder as drive F, the shared folder will be created in the AO486 folder on your USB if a USB is used and otherwise it will be on the SD card.

But still, the files copied on the Windows computer to a mounted VHD should stay on that VHD. Not sure what causes this problem.

How is the drive mounted on the PC? I have used Windows 10s Disk Manager to mount and Daemon Tools as well for mounting the VHD and then transferring files to and from it. Especially when its more than even a few MB, its just way faster on the PC. Copying to the MiSTer over a network sometimes has a speed of just a few KB/s when running a core. That can probably be resolved cold rebooting the MiSTer to get it out of the core and / or use a faster dongle or a network cable with the MiSTer, but pretty sure it can be slow even using a cable.
User avatar
madelk
Posts: 5
Joined: Sat Oct 03, 2020 5:28 pm
Location: USA
Been thanked: 2 times

Re: Fixed size and already partitioned VHDs here!

Unread post by madelk »

If you're having issues making a VHD you can try these commands in diskpart https://github.com/madelk/expandziptovh ... s.ps1#L158
You'll have to fill in the variables yourself for a path, size and a drive letter if you want to mount it right away
flynnsbit
Top Contributor
Posts: 552
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 185 times
Been thanked: 310 times
Contact:

Re: Fixed size and already partitioned VHDs here!

Unread post by flynnsbit »

I do this:
Windows 10: Search for Disk --> open "Create and Format Hard Disk Partitions"
Action --> Create VHD
put it somewhere
Set the size to whatever you want 20MB-128GB
VHD
Fixed Size
Right click on the disk where it says unknown.
Initialize disk and select MBR
Right click on disk, new simple volume
quick format, again partition doesn't matter, fat, exFat, NTFS
Format it to whatever, doesn't matter as you are going to format again in next step
Close Disk Manager and the new File Explorer that might open up
Download http://www.ridgecrop.demon.co.uk/index. ... format.htm (Direct download: http://www.ridgecrop.demon.co.uk/guiformat-x64.Exe)
open guiformat-x64.Exe
Pick the drive you just formatted,
don't pick the wrong disk. Are you sure you have the disk you just created in the Drive section?
name the volume, click start.
Now you can transfer whatever you want to that vhd in windows and it will work in AO486. You can also use that VHD as an install target over in AO486, no need to fdisk it or diskpart it over there as long as you use an os that can handle Fat32. I suggest Dos 7.1 or Win98..
manni199
Posts: 21
Joined: Wed Sep 23, 2020 2:13 pm
Has thanked: 4 times
Been thanked: 2 times

Re: Fixed size and already partitioned VHDs here!

Unread post by manni199 »

The max file size on a FAT/FAT32 formatted partition is 4GB, as far as I know.

So you should get problems copying a 8GB VHD to the MiSTer micro SD card.
flynnsbit
Top Contributor
Posts: 552
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 185 times
Been thanked: 310 times
Contact:

Re: Fixed size and already partitioned VHDs here!

Unread post by flynnsbit »

Nope, on the Mister the max FAT32 size is 137GB. I've tested filling a full vhd to the brim and all is fine as long as you stay away from the absolute limit. I keep mine at 130GB for the full AO486 packs. No issues what so ever as long as you format the vhd correctly.
User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: Fixed size and already partitioned VHDs here!

Unread post by aberu »

manni199 wrote: Sat Oct 31, 2020 9:17 pm The max file size on a FAT/FAT32 formatted partition is 4GB, as far as I know.

So you should get problems copying a 8GB VHD to the MiSTer micro SD card.
FAT (aka FAT16) and FAT32 are very different. MSDOS 7.1 supports FAT32 natively. This enables it to use much larger drives. Windows 95 and 98 started using MS-DOS 7 under the hood.

FAT32 allows for 8TB drive sizes. However it only allows for a *file* size of up to 4GB.

Fat 16 has a max volume size of 4GB and max filesize of 4GB as well.
https://en.wikipedia.org/wiki/File_Allocation_Table

Now...

The MiSTer is not just in fat32. It also supports exfat which has no problem with these filesizes, unlike fat and fat32. Exfat has support for filesizes over 100 petabytes.

I'm pretty sure the sdcard installer and Mr fusion setup the root partition as exfat now.

The 137GB limit flynn's is mentioning above must be a limitation of MSDOS 7.x with regard to the vhd
birdybro~
manni199
Posts: 21
Joined: Wed Sep 23, 2020 2:13 pm
Has thanked: 4 times
Been thanked: 2 times

Re: Fixed size and already partitioned VHDs here!

Unread post by manni199 »

aberu
thank you for explanation.

So I remembered right that there ist a file size limitation 4GB in FAT16/32.
But I didn‘t know that exFAT is used for MiSTer SD card.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Caldor »

Yeah, I also use exFAT and yes, otherwise it would not be possible to use more than 4gb VHD files. Now AO486 supports... what is the new limit? 136gb maybe? Its pretty high, that is for sure. I think I have made a 32gb partition for someone.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Caldor »

Bump since its a useful thread
zorik
Posts: 1
Joined: Mon May 01, 2023 5:09 pm

Re: Fixed size and already partitioned VHDs here!

Unread post by zorik »

I don't know what compression was used but I was able to compress all VHDs with 8GB vhd in a 4kb 7z file! :D by putting 7z inside a 7z :)

Attachments
Blank_VHDs.7z
(3.97 KiB) Downloaded 195 times
Bas
Top Contributor
Posts: 623
Joined: Fri Jan 22, 2021 4:36 pm
Has thanked: 80 times
Been thanked: 324 times

Re: Fixed size and already partitioned VHDs here!

Unread post by Bas »

These are mostly empty, as in 99.9999% zeroed bytes. 7zip compressed those like there's no tomorrow.

Post Reply