Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
Write an article for LinuxForums Today! Win Great Prizes!
Ubuntu 9.10 uses Grub2 that has different commands with grub1, this paper tells how to boot previous installed Linux and Xen that used to use Grub1. It shows also Grub2/Grub1 commend syntax differences.
1. I partitioned for CentOS5.2 and Ubuntu10.04 when I have not known I can use single /boot. After installed CentOS and it works, I installed Ubuntu with its own /boot and /. I can't boot my PC thus reinstalled grub into MBR using Ubuntu live DVD. This results in bootable Ubuntu only. My partitions are: sda1(CentOS /boot), swap, sda3(CentOS /), sda5(Ubuntu /boot), sda6(Ubuntu /), sda7(common data)
2. Ozar and yancek tells me Ubuntu 9.10+ uses Grub2... In Grub1 or CentOS' /dev/sda1/grub/menu.lst I have: title CentOS (2.6.18-92.1.13.el5xen) root (hd0,0) kernel /xen.gz-2.6.18-92.1.13.el5 module /vmlinuz-2.6.18-92.1.13.el5xen ro root=LABEL=/12 xencons=tty6 rhgb quiet module /initrd-2.6.18-92.1.13.el5xen.img title CentOS (2.6.18-92.1.13.el5) root (hd0,0) kernel /vmlinuz-2.6.18-92.1.13.el5 ro root=LABEL=/12 rhgb quiet initrd /initrd-2.6.18-92.1.13.el5.img
where label /12 can also be seen via: $ blkid /dev/sda3 /dev/sda3: LABEL="/12" UUID="56a49751-f9d1-4d86-9de4-73bd49f5af20" SEC_TYPE="ext2" TYPE="ext3"
3. as I use grub2 under Ubuntu I need to add previous CentOS entries into /etc/grub.d/40_custom: menuentry 'CentOS 5.2, with Linux 2.6.18-92.1.13.xen' --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,1)' multiboot /xen.gz-2.6.18-92.1.13.el5 module /vmlinuz-2.6.18-92.1.13.el5xen ro root=LABEL=/12 xencons=tty6 rhgb quiet module /initrd-2.6.18-92.1.13.el5xen.img } menuentry 'CentOS 5.2, with Linux 2.6.18-92.1.13' --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,1)' linux /vmlinuz-2.6.18-92.1.13.el5 root=LABEL=/12 rhgb ro quiet splash initrd /initrd-2.6.18-92.1.13.el5.img } Note Grub2 doesn't support "kernel" but "linux", and you must use "multiboot" for xen now. Also I can only use "root=LABEL=" syntax rather then Ubuntu's syntax - sth like that that uses "search" and "uuid" as below. Even "root=/dev/=sda3" does not work for me. menuentry 'Ubuntu, with Linux 2.6.32-22-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,5)' search --no-floppy --fs-uuid --set 3e60d438-f679-4846-8ea1-92425cdf9c49 linux /vmlinuz-2.6.32-22-generic-pae root=/dev/sda6 ro quiet splash initrd /initrd.img-2.6.32-22-generic-pae }
4. Disable uuid passing by edit /etc/default/grub, un-comment this line GRUB_DISABLE_LINUX_UUID=true
5. Update and verify your additions: $sudo update-grub
$sudo cat /boot/grub/grub.cfg
$sudo reboot
In this way I can boot previous installed Linux and Xen, along with new installed Ubuntu.
Comments about this article
Comment title: * please do not put your response text here