dual boot problem lucid/XP after vbox clone xp vm
I am a noobie, who has messed up big time. I have a dual boot configuration of XP and Lucid (upgraded from Karmic last night). Everything worked perfectly, including the preservation of my XP virtual machine (not to be confused with the dual boot version of XP). Having had only one XP VM, I tried to clone it. I found a link that would allow me to create a clone of the VM without the necessity of reinstalling the OS manually (and all the apps) here:
http://
This worked fine after using the "VBoxManage internalcommands sethduuid <name of new xp.vdi>". I now have two XP VMs.
However, it seems to have messed up my ability to boot into xp from grub2. Lucid boots up fine, but XP (which is on sda1 in grub) just leaves a blinking cursor. My suspicion is that it has something to do with the UUID.
I found this info if it helps:
~$ sudo blkid
/dev/sda1: UUID="5E2C398A3
<-- this is the one I am trying to boot into
/dev/sda5: UUID="1ad401de-
/dev/sda6: UUID="f6bd937f-
/dev/sdb1: LABEL="MS2 S750" UUID="D6488C304
<-- this is another hd with xp, which i also cannot boot into
Any help is greatly appreciated!
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- matrixunloaded
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
In file /boot/grub/
Revision history for this message
|
#2 |
I am using grub2 so there is no menu.lst. I did go into grub.cfg and checked that the UUID for sda1 is correct and also tried running sudo update-grub. the ntfs partitions are still not bootable. Here is are the menu entries in grub.cfg for the ntfs partitions:
### BEGIN /etc/grub.
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 5e2c398a382e2b62
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Microsoft Windows XP Professional (on /dev/sdb1)" {
insmod ntfs
set root='(/dev/sdb,1)'
search --no-floppy --fs-uuid --set d6488c30488c1183
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.
Any suggestions?
Revision history for this message
|
#3 |
Sorry, I answered other question and gained some knowledge of Grub2.
Boot with Ubuntu, and do a
sudo grub-install /dev/sda
This will rebuild the boot file with new UUID.
Revision history for this message
|
#4 |
delance,
I tried:
sudo grub-install /dev/sda
which completed without error, but still the same blinking cursor on reboot when selecting xp on sda1.
I then ran:
sudo grub-install /dev/sda1
which completed without error, but still the same blinking cursor on reboot when selecting xp on sda1.
what next? Thanks!
Here is full grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z ${boot_once} ]; then
saved_
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
if loadfont /usr/share/
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
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
set locale_
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.
### BEGIN /etc/grub.
set menu_color_
set menu_color_
### END /etc/grub.
### BEGIN /etc/grub.
menuentry 'Ubuntu, with Linux 2.6.32-
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.32-
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
echo 'Loading Linux 2.6.32-
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.32-
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.32-
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
echo 'Loading Linux 2.6.32-
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.31-
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.31-
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
echo 'Loading Linux 2.6.31-
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
linux16 /boot/memtest86
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 1ad401de-
linux16 /boot/memtest86
}
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 5e2c398a382e2b62
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Microsoft Windows XP Professional (on /dev/sdb1)" {
insmod ntfs
set root='(/dev/sdb,1)'
search --no-floppy --fs-uuid --set d6488c30488c1183
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.
### BEGIN /etc/grub.
# 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.
Revision history for this message
|
#5 |
Probably Grub2 called Windows boot-loader, but this latest one is broken.
fixing windows MBR of disk a:
sudo apt-get install ms-sys
sudo ms-sys -m /dev/sda
sudo ms-sys -m /dev/sdb
Why do you have two XPs, on a virtual machine moreover ? Usually the simplest is the best.
Summary for myself:
Grub 2
/dev/sda1: UUID="5E2C398A3
/dev/sda5: UUID="1ad401de-
/dev/sda6: UUID="f6bd937f-
/dev/sdb1: UUID="D6488C304
Revision history for this message
|
#6 |
delance,
I tried your solution but could not get the package ms-sys even with universal enabled. After trying something called testdisk, which generated a log, but no positive results, I Googled some more and found I should burn a live CD of lucid, which I did. After that I installed lilo,after which I could get ms-sys installed and get back my sda1 xp partition. However, I have now lost the Lucid partition.
Is there a way now to non-destructively reinstall grub2 so as to preserve the xp partition on sda1 and have available my old grub2 menu?
BTW, I know you asked why I had two xp partitions on two drives in addition to two XP VMs. This is exactly the reason. I want to be sure that the dual boot is working fine before nixing my old xp standalone drive (sdb1).
Any help is greatly appreciated!
If you need additional info, please let me know.
Revision history for this message
|
#7 |
You're right. I forgotten the package was removed from Ubuntu repository.
http://
and double click on downloaded file to install.
Lilo is an old multi-boot software, which was used before Grub. And it is less and less used, which means you will probably have no help from community. ms-sys probably installed MBR where you have lilo installed. It is THE classical problem, even also with Grub.
You have not lost your Ubuntu partition, but the lilo software, which means that you cannot boot on it for the moment.
For me the situation is not clear.
Can you boot on Ubuntu Live CD, and in a terminal window enter command:
sudo parted -l && sudo blkid
and post the results.
Grub2 is not bulletproof. In theory, you can install again Grub2 without overwriting Windows MBR. In practice, there are sometimes some problem. But the best is to start to follow standard procedure before going into complex solution.
Please, for the moment are you working on real hardware or on a simulation of it in a Virtual Machine ?
If you have two drives, the best solution is:
- having XP disk as first one, repair Window's MBR
- switching both disk (I know it look strange)
- installing Ubuntu on what is now the first disk
Ubuntu will install Grub2 on first sector of Ubuntu disk, and Windows has still its MBR on first sector of Windows disk.
And surprise, Ubuntu detect the MBR on second disk, and add in menu a chain to Windows MBR.
I reproduced it with success on a Virtual Machine, and moreover its my actual hardware configuration (but with Grub1).
If it fails, you simply have to switch again the disk to recover Windows.
Revision history for this message
|
#8 |
delance,
I booted from a Live CD into Lucid. Below is the output:
ubuntu@ubuntu:~$ sudo parted -l && sudo blkid
Model: ATA WDC WD3000HLFS-0 (scsi)
Disk /dev/sda: 300GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 154GB 154GB primary ntfs boot
2 154GB 300GB 146GB extended
5 154GB 294GB 140GB logical ext4
6 294GB 300GB 5963MB logical linux-swap(v1)
Model: ATA ST3750640AS (scsi)
Disk /dev/sdb: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 750GB 750GB primary ntfs boot
Warning: Unable to open /dev/fd0 read-write (Read-only file system). /dev/fd0
has been opened read-only.
Error: /dev/fd0: unrecognised disk label
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label
/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="5E2C398A2
/dev/sda5: UUID="1ad401de-
/dev/sda6: UUID="f6bd937f-
/dev/sdb1: LABEL="MS2 S750" UUID="D6488C304
BTW, the reason I have the dual boot configuration on /sda is to use my velociraptor 10000 rpm for both OSs and to use /sdb for data storage. I could not find documentation for the "-l &&" parameters for parted. Could you explain what they stand for?
Thanks for all your continuing help!
Revision history for this message
|
#9 |
The command is "parted -l" which provides both UUID and file system information.
&& is only to put both commands on same line
-------
Disk /dev/sda: 300GB VELOCIRAPTOR!
1 154GB UUID="5E2C398A2
5 140GB UUID="1ad401de-
6 6GB UUID="f6bd937f-
Disk /dev/sdb: 750GB DATA
1 750GB primary ntfs boot
dual boot configuration of XP and Lucid (upgraded from Karmic last night) with grub2
XP (which is on sda1 in grub) just leaves a blinking cursor => overwriting of MBR
-------
We can do anything while Windows MBR is not fixed.
So
1- do a backup of /home directory to an external disk (doing a backup is always a good idea!)
2-download and install ms-sys
http://
3-fix MBR
sudo ms-sys -m /dev/sda
4-check if Windows boot
5-check if Grub2 was broken (unfortunately it is probable, and we will have after to repair it)
6-if Grub2 is broken, boot under Live CD and run
sudo grub-install /dev/sda
and tell me if it works after (truly, I never tried so I don't know) i.e. both XP and Lucid boot.
Revision history for this message
|
#10 |
I have successfully repaired the windows MBR and can boot into windows fine. However,
Grub2 is not working. I tried your suggestion (sudo grub-install /dev/sda) from live CD and got this:
/usr/sbin/
No path or device is specified.
Try `/usr/sbin/
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.
I am clueless as what this means. The partitions sda1 and sda5 appear to be mounted since they are accessible through Places on the menu. I have tried various options of grub-probe, bu cannot make any sense out of them, either.
Here is the latest status:
ubuntu@ubuntu:~$ sudo parted -l && sudo blkid
Model: ATA WDC WD3000HLFS-0 (scsi)
Disk /dev/sda: 300GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 154GB 154GB primary ntfs boot
2 154GB 300GB 146GB extended
5 154GB 294GB 140GB logical ext4
6 294GB 300GB 5963MB logical linux-swap(v1)
/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="5E2C398A2
/dev/sda5: UUID="1ad401de-
/dev/sda6: UUID="f6bd937f-
(BTW I disconnected /sdb to "simplify" things).
Revision history for this message
|
#11 |
I will try today to reproduce your problem, as you are not alone in this situation.
Else I find a solution with CD Live.
Else you will have to reinstall Ubuntu.
If you have time, you can prepare second case by:
downloading and burning CD of Ubuntu 10.04
doing a backup of /home folder on an external device (a backup is always a good idea!)
Revision history for this message
|
#12 |
delance,
I fixed it just now. Here is how:
sudo mount /dev/sda5 /mnt
sudo grub-install --root-
Afterwards:
sudo update-grub to make the grub.cfg up to date.
A link I found discussed this: http://
The only problem I have now is that I get an error on boot that "disk drive for /media/sda1 is not ready yet or not present", but i I think this is just an incorrect UUID in fstab. I haven't had time to work on it yet, but here is a link to that problem:
http://
Many thanks for all your responses and help!