It is a dual system, but it is actually a three-system (including XP), but the problem is not XP. Temporarily ignore it... First, XP exists on the system, which is retained. Then CentOS5.4 is installed. (If you have installed Virtualization -- & gt; Virutalization, you have installed XEN when installing the system ). Finally, Ubuntu10.04 is installed. Result: XP and Ubuntu10.04 can be smoothly accessed, but CentOS5.4 cannot be accessed. The system prompts "Error: invalidm ".
It is a dual system, but it is actually a three-system (including XP), but the problem is not XP. Temporarily ignore it...
First, XP exists on the system, which is retained.
Then CentOS5.4 is installed (choose to install Virtualization --> Virutalization, that is, XEN is installed when the system is installed ).
Finally, Ubuntu10.04 is installed.
Result: XP and Ubuntu10.04 can be smoothly accessed, but CentOS5.4 cannot be accessed. The message "Error: invalid magic number" is displayed.
I tried various methods on the Internet and still cannot access CentOS5.4...
Finally, we can see a saying that some bugs in grub2 will cause xen to fail to start normally. Therefore, we need to delete grub2 and switch back to the old grub version...
Basic steps:
1. Backup
Sudo cp/etc/default/grub. old
Sudo cp-R/etc/grub. d/etc/grub. d. old
Sudo cp-R/boot/grub. old
2. Uninstall grub2
Sudo apt-get purge grub2 grub-pc
3. Install grub
Sudo apt-get install grub
4. Update the Startup menu and install grub on the corresponding device.
Sudo update-grub # generate menu. lst; Select Yes when prompted
Sudo grub-install/dev/sdX # X is a, B, c ...... Generally, it is the device where the Ubuntu system is located.
XP boot item:
Title Microsoft Windows XP Professional
Root (hdX, Y)
Makeactive
Chainloader + 1
CentOS boot item:
Tiltle CentOS (2.6.8)
# Start XEN
Uuid XXXX
Kernel/boot/xen.gz ......
Module/boot/vmlinuz ...... Ro root = LABEL =/rhgb quiet
Moudle/boot/initrd ....... Img
# Start without XEN
Root (hdX, Y)
Kernel/boot/vmlinuz ...... Ro root = LABEL =/rhgb quiet
Initrd/boot/initrd ....... Img
Others:
1. view the UUID of the device:
Sudo dumpe2fs/dev/sdXY | grep UUID # X indicates the device ID, and Y indicates the partition. You can view the UUID of any device.
Sudo grub-probe-t fs_uuid/boot/grub # defect: only the UUID of the device partition where the current system is located can be viewed
2. Differences:
In grub, the first device starts from 0 and the first partition starts from 0. In grub2, the first device starts from 0 and the first partition starts from 1.
3. reinstalling the operating system will result in a different UUID, even if the same partition is reinstalled without any changes.