Page 1 of 1

Grub Double Boot on SSD: cannot boot windows XP any more

Posted: Wed Dec 16, 2009 7:53 am
by maurizio.dececco
On my ThinkPad x61s, i wanted to migrate to my shiny new Intel SSD, and at the same time migrate to Ubuntu (Studio) 9.10
and to ext4. In the same time, i wanted to get rid of R&R, and be able to just make backups by full
disk images.

I started from a double boot HD, where Grub was installed in its own /boot partition,
and was able to boot windows or the R&R partition.

So, this is what i did: i used Acronis Partition Suite (ver 9, i think) to copy the windows
partition to the SSD, than i installed Ubuntu Studio 9.10 amd64, choosing to put GRUB
on the main partition.

Grub start, and propose either the Linux partition and Windows XP, Linux boot up,
but Windows XP does not, just stop with a blinking cursor in the left up corner.

So:
1- Is this completely wrong :-< ?
2- Any way to save the day, and fix the current installation to boot Windows XP ?
3- Should i do a clean reinstall of Windows from the recovery disks ??? (hope not !)

Thanks for any help you can give.

Maurizio De Cecco

Re: Grub Double Boot on SSD: cannot boot windows XP any more

Posted: Wed Dec 16, 2009 10:38 am
by emeraldgirl08
This may be of some help :)

Grub/XP/Vista Bootloader Help

Re: Grub Double Boot on SSD: cannot boot windows XP any more

Posted: Wed Dec 16, 2009 10:25 pm
by kiwipad
maurizio

did you check to see you had a viable, bootable XP install on your shiny new ssd after the acronis copy action and before you installed ubuntu?

if it were a simple GRUB problem you would expect to see an error message (however unhelpful!) and not just a flashing cursor (even less helpful)

if you didn't, you could at least check the "look" of the XP partition from within Ubuntu (is the filesystem recognized, are the right files/folders there, etc)

then have a look at menu.cfg (or is it menu.config in the new GRUB version "nearly2" that Ubuntu uses) and see where it thinks the XP boot option is and if that actually agrees with your disk layout

posting the output of fdisk -l and the content of the GRUB menu file back here might help others see where you are up to

and when you say you put GRUB on the "main" partition, you mean Ubuntu's / partition or at the root of the device (e.g. at /dev/sda) ?



IG

Re: Grub Double Boot on SSD: cannot boot windows XP any more

Posted: Thu Dec 17, 2009 5:30 am
by maurizio.dececco
Thanks for the answers.

First, i tried the fixboot trick, no results. I'll possibly try fixmrb (even the Lenovo version), but i'll probably need
to reinstall the grub bootloader.

Second: yes, i check the partition, i can access it from Ubuntu, everything seems ok.

I also think it is not a pure Grub problem, the 'blinking cursor' is a typically Windows attitude :->.
Actually, i have got it in the past trying to clone a disk, and it was related to the specific Lenovo
BIOS and on the way it interact with the Lenovo Service Partition.

Anyway, i realised after writing that i was imprecise: yes, i installed grub in the MBR, in the /dev/sda level.
I'll try to restore a standard mbr (or a lenovo partition), and then to install grub in ubuntu partition.
This is how my old disk was installed, and worked fine.

Anyway, the result of fdisk-l is the following:


Disque /dev/sda: 160.0 Go, 160041885696 octets
255 têtes, 63 secteurs/piste, 19457 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Identifiant de disque : 0x0006f111

Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 * 1 9164 73609798+ 7 HPFS/NTFS
/dev/sda2 9165 19457 82678522+ 5 Etendue
/dev/sda5 9165 19032 79264678+ 83 Linux
/dev/sda6 19033 19457 3413781 82 Linux swap / Solaris

About the grub menu, the file i found is grub.cfg in the /boot/grub directory, and its content is the following:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set e2d47896-e420-407e-a722-7291c8ecc72d
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-16-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set e2d47896-e420-407e-a722-7291c8ecc72d
linux /boot/vmlinuz-2.6.31-16-generic root=UUID=e2d47896-e420-407e-a722-7291c8ecc72d ro quiet splash
initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-16-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set e2d47896-e420-407e-a722-7291c8ecc72d
linux /boot/vmlinuz-2.6.31-16-generic root=UUID=e2d47896-e420-407e-a722-7291c8ecc72d ro single
initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-9-rt" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set e2d47896-e420-407e-a722-7291c8ecc72d
linux /boot/vmlinuz-2.6.31-9-rt root=UUID=e2d47896-e420-407e-a722-7291c8ecc72d ro quiet splash
initrd /boot/initrd.img-2.6.31-9-rt
}
menuentry "Ubuntu, Linux 2.6.31-9-rt (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set e2d47896-e420-407e-a722-7291c8ecc72d
linux /boot/vmlinuz-2.6.31-9-rt root=UUID=e2d47896-e420-407e-a722-7291c8ecc72d ro single
initrd /boot/initrd.img-2.6.31-9-rt
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professionnel (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 0fb5f5378008ab5e
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

Since i need to backup the Linux and the Windows partition, i would be very happy to get rid of the R&R and the service
partition and use standard tools to clone the disk, but this seems to be difficult :->.

Thanks again,
Maurizio

Re: Grub Double Boot on SSD: cannot boot windows XP any more

Posted: Thu Dec 17, 2009 11:00 pm
by kiwipad
I've not had to use "GRUB2" but the entries appear ok (although I'm sure I read somewhere it had begun using disk/partition numbering from 1 rather than 0, e.g. /dev/sda1 would now be hd1,1 insstead of hd0,0 in proper GRUB - but the entries appear consistent & seem to tie in with your disk partitioning and if it boots Ubu then it must be ok). Now if you were using a different distro with traditional GRUB...

I'm still inclined to this being a problem with your XP partition as you seem to be - the flashing cursor is much more a Windows response. Probably need someone who understands the standard IBM setup with the recovery partition - I always wipe & clean install my machines with no R&R - but it may be that the option to boot to the R&R on the original disk is interfering with how GRUB sees booting to the NTFS partition.

If you have a regular XP install disk (rather than the Lenovo recovery disks) you can try repairing the bootloader from there ("fixmbr") - would be interesting to see if XP's Repair option actually found the "installed" OS - but that will overwrite any GRUB entry in the MBR so making Ubu unbootable, so then you will need to do a repair install on Ubu, re-writing GRUB again to the MBR.

Sorry, no magic one-line fix (unless someone else knows better !)

IG

Re: Grub Double Boot on SSD: cannot boot windows XP any more

Posted: Fri Dec 18, 2009 11:52 am
by maurizio.dececco
Thanks for your comment.
I tried the original Windows XP fixmbr and the lenovo one, no effect.

Actually the last time i tried to clone a disk, i had to go thru installing the original
recovery disks, then recovering a backup. Very very long.

After all, not being able to boot in XP may not so dramatic :->
I am currently trying something more brave and more definitive: having
a Windows XP VM for the two o three things i have to do in Windows,
and moving everything to Linux ... tired of this Windows peculiarities ...

Maurizio