[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] resize file disk iommu xp won't boot



On Fri, Jan 23, 2009 at 7:34 PM, Daniele Palumbo <daniele@xxxxxxxxxxxx> wrote:
> http://en.wikipedia.org/wiki/Master_boot_record
> 512 bytes, but from 447 start the partition table...
> and i don't want to delete it, of course.

Ah, thanks for the info.

> new image:
> pc18:/home# fdisk -l /dev/loop1
>
> Disk /dev/loop1: 8388 MB, 8388608000 bytes
> 128 heads, 63 sectors/track, 2031 cylinders
> Units = cylinders of 8064 * 512 = 4128768 bytes
> Disk identifier: 0x92759275
>
>      Device Boot      Start         End      Blocks   Id  System
> /dev/loop1p1   *           1        1014     4088416+   7  HPFS/NTFS

So you haven't gone through resizing the ntfs and partition yet, but
Windows simply refuses to boot, right?

> pc18:/home#
>
> backup image:
> pc18:/home# fdisk -l /dev/loop1
>
> Disk /dev/loop1: 4194 MB, 4194304000 bytes
> 128 heads, 63 sectors/track, 1015 cylinders
> Units = cylinders of 8064 * 512 = 4128768 bytes
> Disk identifier: 0x9e099e09
>
>      Device Boot      Start         End      Blocks   Id  System
> /dev/loop1p1   *           1        1014     4088416+   7  HPFS/NTFS
> pc18:/home#

>> - you get a big number of cylinders
>
> but of course, cause qemu see 8GB in virtual bios, this is not a surprise to
> me.
>

Here's what happened to me earlier :
- I use 10G LVM as domUs disk -> windows boots
- created another 10G LVM, clone the first disk's contents using
ntfsclone -> windows boots
- created 10G zfs-volume on another host, import it with iscsi, clone
the first disk here using ntfsclone again -> windows refused to boot

Weird huh?
Upon investigating, I found that LVM-backed disk show these geometries
255 heads, 63 sectors/track, 1305 cylinders

while the iscsi-imported zfs-volume had these
64 heads, 32 sectors/track, 10240 cylinders

So I use fdisk's extra functionality to change iscsi-imported disk's
geometry to be the same as the LVM one, repeat the cloning process,
and voilla, windows boots.

Perhaps windows (or at least Windows that was installed to a
1305-cylinder disk) can't boot from a 2031-cylinder (or in my case, a
10240-cylinder) disk. I know it's not a very scientific explanation
(especially since my notebook has a 14593 cylinder SATA disk, and
windows boots just fine from it), but as shown from my experiment
above simply changing the disk geometry fixed the issue.

I suggest you try these :
- create a new 8GB image (copy the backup image then extend it with dd
or whatever)
- use fdisk to change disk geometry to 255 heads, 63 sectors/track,
1019 cylinder
- delete the old partition 1
- create a new partition 1, have it occupy cylinder 1-1018. Don't
forget to set active flag and type correctly
- try booting windows

If it works, then your next step is to resize ntfs on partition 1
using ntfsresize. If it doesn't, I'm out of ideas. Good luck :)

PS: If anyone can give a detailed explanation as to why I need to
change disk geometries to make windows boots, I'd like to hear it.

Regards,

Fajar

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.