PDA

View Full Version : [all variants] Recover from placing windows partitions in a LVM volume



software mechanic
November 30th, 2009, 08:23 PM
I did something stupid while installing Ubuntu Studio 9.10 (x64) on an IBM T61 tablet notebook. I placed the windows partitions in an LVM volume. I can't boot to windows from grub. Grub sees the windows partition, SW_Preload, and when I attempt boot to Vista, nothing happens. PhotoRec was used to recover all the data from the windows partitions.

Testdisk was used to make the windows partitions visible by changing the filesystem type to NTFS and remove the LVM identifier. The Vista CD was used to fix the boot sector and MBR.

gParted recognized the windows partition as /dev/sda2, SW_Preload. /dev/sda2 is seen as bootable and shows no used space.

When the Windows Vista CD was used in rescue mode, the following was observed:

-Start up repair discovered 1 error. Log file showed no failing tests and the root cause was “Boot status indicated that the OS booted successfully.”
-The flowing commands were executed: Bootrec /fixmbr, Bootrec /fixboot, Bootrec /rebuildbcd. Vista did not boot.

I considered reloading Vista, but didn't since it would do a clean install.

Is it possible to recover from my stupid user trick and be able to boot to boot Ubuntu and Windows?

Thanks,
John

lemming465
December 2nd, 2009, 05:45 AM
Ouch! I don't see a way out of this that doesn't involve saving your data, scrubbing the disk, and reparitioning and reinstalling from scratch. Sorry.

software mechanic
December 2nd, 2009, 11:20 PM
Ouch! I don't see a way out of this that doesn't involve saving your data, scrubbing the disk, and reparitioning and reinstalling from scratch. Sorry.
Further investigation shows that:

From grub.cfg:

menuentry “Windows Vista (loader) (on /dev/sda2)” {
insmod ntfs
set root=(hd0.2)
search – no-floppy –fs-uuid –set 000000000000
chainloader +1
}

The UUID for the Windows partition in the grub.cfg file is set to all 0's.

From sudo blkid -c /dev/null
/dev/sda1: UUID=”K6X762-pVgZ-HeVr-dicv-MEhh-tl9o-040Ddb” TYPE=”LVM2_member”
/dev/sda2/: LABEL=”SW_Preload” TYPE=”ntfs”
/dev/sad3: UUID=”01CA670375A83080” ; LABEL=”Warped” TYPE=”ntfs”
/dev/sda5/; UUID=”9ff1a425-8a35-4456-97fa-76db2d361d7d” TYPE=”ext4”
/dev/sda6/; UUID=”d7d7e73b-8114-42f1-a754-3d04d8c1d4c6” TYPE=”swap”

It is seen that /dev/sda2 does not have a UUID. fstab has entries for /dev/sda5, /dev/sda6, and /dev/scd0.

It appears that the windows boot problem could be caused by the ntfs partition, /dev/sda2, not having a UUID. If so, how do I fix it?

lemming465
December 6th, 2009, 10:08 PM
Try booting without the search ... line. Particularly with a chainloader scenario, I don't see why it would be necessary. (Booting from an external USB fob would be a different story; there it would tend to matter.)