Can't you change the CHS because I think there is a --heads setting for the config menu file? Don't remember if there are settings for the cylinders, and sectors. I was also told you change the CHS in the partition table, or in the Bios Parameter block (BPB) ? Also you are saying my VHD is a 15MB image, its actually a 30MB image, with 1024 byte sectors, but this is confusing though , if I mount the image directly into virtualbox , and use a program to tell me the CHS, it says it has 512 byte sectors and it tells me the CHS is higher. I know grub4dos is saying the 30M image is 1024 byte sectors because of the CHS being 31/16/63. I don't remember if it has 512 or 1024 byte sectors, I believe it's 1024, but I can be wrong. Also the DOS program I use also tells me the CHS is different from LBA as a warning.
No.
An image in itself has no sector size (unlike hardware).
There is not any media with 1024 bytes sector (I am lying there used to be a very particular and extremely uncommon floppy drive that used 1024 bytes sector, if I recsall correctly).
ALL (and I mean ALL):
1) floppy disk like devices manufactured in the last - say - 25 years have 512 bytes/sector
2) CD/DVD/optical media have 2048 bytes sectors
3) hard disks of any kind (again manufactured in the same last 25 years or so) have either 512 bytes sectors (until - say 2012 or so) or, if - and only if - they are very recent, have 4096 bytes/sector BUT most of them, like 95% or more of them, expose anyway 512 bytes/sector, native 4Kb drives are still very rare (and in any case they won't be bootable with most OS/on most machines).
4) USB sticks and the like also use 512 bytes/sector
More than that "normal" (like the standard DOS, Win9x/Me, Windows NT up to Windows 10, etc.) MBR code simply wont' support them, PBR may, but not as a bootable device.
Rest assured that any normal VM (like Virtualbox, Qemu, VirtualPC and VmWare) will see the hard disk image as having 512 bytes sector.
The issue with CHS geometry sensed comes from BIOS and it is dependent on size of the image (and on the specific BIOS of the VM).
Typically small images will be having 16/63 geometry (up to a size that exhausts CHS addresses with that geometry), i.e. 1024*16*63*512=528,482,304 i.e. the first CHS limit of around half a GB.
Although there used to be drives and BIOSes using a 128*63 geometry, usually the next step is the common 255*63 geometry. and of course, while the HS geometry remains, the CHS addressing is exhausted at 1024*255*63*512=8,422,686,720, i.e. the infamous arounf 8 GB CHS limit.
Windows XP and later will default to 255/63 geometry, doe mounted images unless you use a particular driver capable of specifying the geometry (that would be the VDK by Ken Kato, when using yet another kind od VMWare descriptor, the .pln ).
Different BIOS and OS's or tools may "decide" to use even for very small images the 255/63 geometry, or go down to the 16/63 one, and as well different tools and OS's may assume something depending on the contents of the MBR or of the PBR or of both.
Use a BLANK (all zeroes) image and have it partitioned/formatted "natively" inside the VM.
You don't need grub4dos for this.
The "read only" issue you are having is because you are not mapping directly (as you should) the image in the VM, but you are attempting to access a file on a "real" hard disk mapped in the VM.
Virtualbox cannot directly mount a RAW image (and you should be careful with which type of VHD you are making).
IMHO you'd better use a RAW image, creating a VMDK descriptor for it, in my experience Virtualbox has no issues whatever with such images, see:
https://www.forensic...wtopic/t=15861/use the batch/info I posted here:
https://www.forensic...590531/#6590531If you don't feel confident with the batch or you have issues with the concepts, provided that your BLANK, RAW image is called "image.raw" and it is say (you can change the number to the EXACT size in 512 bytes sectors here I am using the 31248 seen before), you can copy and paste this:
# Disk DescriptorFile
version=1
createType=
RW 31248 FLAT "image.raw" 0
ddb.uuid.image="00000000-0000-0000-0000-000000000001"
Copy the above to a new file in Notepad (change if needed the number after RW to the EXACT size of your image in 512 bytes sectors) and save it where your image.raw is as "image_raw.vmdk".
Then add to the VM a "IDE controller" and under it choose to add a new hard disk, choose existing disk and point to "image_raw.vmdk".
Wonko