Opened 17 years ago

Closed 17 years ago

#1998 closed bug (fixed)

haiku virtual disk image size is not aligned on the disk size

Reported by: starsseed Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/pre-alpha1
Keywords: Cc: siarzhuk
Blocked By: Blocking:
Platform: x86

Description

For a disk whom the size is about 256 Megabyte, the disk geometry is 16 heads 63 sector. but the VmWare disk image or the raw image disk contain 512000 sector instead of 511056 (507 cylindres) or 512064 (508 cylindres) for an image size aligned on the disk size. when I try to convert the raw image to a Virtual-PC VHD file with 507 cylindres 16 heads 63 sector(ie the disk geometry specified in the Hiaku.vmdk file), the BootLoader boot the kernel and the kernel run in debug mode when mounting the boot FS (Thanks to the new boot animated screen) when I load the image in a disk with 508 cylindres, Haiku boot correctly

Is it possible to correct the disk image size to 512064 sectors and 508 cylindres(262176768 bytes ) to align the target image to the disk geometry ?

Change History (5)

comment:1 by siarzhuk, 17 years ago

Cc: siarzhuk added

2 starsseed: Which tool do you use to convert vmdk to vhd? Btw, I wrote a tool for converting raw haiku images directly into dynamic VHD for using with VPC. I can share it with you. May be it can be interesting as part of Haiku source tree too? ;-) The second question: Do you have problems booting Haiku on VPC? On my system there are sporadic timeouts directly before showing splash screen. :-\

comment:2 by starsseed, 17 years ago

I'm writing my own tool with Ms Visual C++ / MFC to convert Virtual disk For the moment I can convert raw image to vhd "flat" (and vice versa) and I'm working to add VMDK "monolithicFlat" support the next stage will be "sparse extend" support and why not a driver for haiku to see a virtual disk as a physical disk

I saw the same problem for booting haiku (a long black sceen with a blinking caret between the bios and the animated boot screen) this long time out is the actual reason for my bug post : I suspect a problem around the disk geometry

comment:3 by anevilyak, 17 years ago

The pause between the caret and animated boot should just be it waiting for a keystroke to hit the safe mode menu...that's only timed at 2-3 seconds on real hardware though.

comment:4 by starsseed, 17 years ago

to anevilyak: under virtual-pc the pause is about 2-3 minutes long !

to siarzhuk: I'am interested to share ours sources (I wanted to publish mine when it will more mature and a bit more clean...) but the place of my code is not in the haiku tree because for the moment it's just a tiny tools for MsWindows...

comment:5 by bonefish, 17 years ago

Resolution: fixed
Status: newclosed

I don't know why it worked that well anyway. The BFS created with bfs_shell inside the image should have used the full available size of the image, while vmdkheader only defined a cylinder-aligned size. So actually when running under VMware BFS should have missed a part of its volume. I suppose VMware has got some work-around for images bigger than specified in the header.

Anyway, vmdk images created by the build system are now (hrev24784) as big as the header specifies them to be. This should hopefully also fix the conversion problem.

Note: See TracTickets for help on using tickets.