I have three OS-es (XP, Ubuntu 10.10, OpenSuse 11.3) on my PC (single disk) and would like to add the Ubuntu to the boot list (using Suse’s grub), so I can boot into it. The problem is that I have never did this before and am not much familiarized with linux, so if anyone could help me out, I would very much appreciate it.
Now, from what I’ve read a bit on the forums and the net (specifically here), if I use the code from the link:
#Don't change this comment - YaST2 identifier: Original name: none#
title Ubuntu 9.04 booting via symlinks
root (hd0,8)
kernel /vmlinuz root=/dev/sda9 ro quiet splash
initrd /initrd.img
Would I be able to boot to Ubuntu with that and what would I need to change exactly to make it work? Or is there a better code to get to boot into it? +would I then need to update/do anything else? (or be careful about later on?)
Also at the end I add my fdisk -l (sda6 is switch, sda7 is Ubuntu’s ‘/’ and sda8 it’s ‘/home’):
Naprava Zagon Začetek Konec Bloki Id Sistem
/dev/sda1 1 8287 66565296 7 HPFS/NTFS
/dev/sda2 8288 24933 133703442 f W95 Razš'a (LBA)
/dev/sda3 * 24933 27121 17572864 83 Linux
/dev/sda4 27121 30402 26356736 83 Linux
/dev/sda5 8288 21036 102406311 7 HPFS/NTFS
/dev/sda6 21037 21282 1968128 82 Linux izmenjalni / Solaris
/dev/sda7 21282 23715 19546112 83 Linux
/dev/sda8 23715 24933 9780224 83 Linux
and my current menu.lst:
# Modified by YaST2. Last modification on Mon Nov 22 11:59:18 CET 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader
default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,2)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.3 - 2.6.34.7-0.5
root (hd0,2)
kernel /boot/vmlinuz-2.6.34.7-0.5-desktop root=/dev/disk/by-id/ata-WDC_WD2500AAKS-00VYA0_WD-WCARY0509017-part3 resume=/dev/disk/by-id/ata-WDC_WD2500AAKS-00VYA0_WD-WCARY0509017-part6 splash=silent quiet showopts vga=0x345
initrd /boot/initrd-2.6.34.7-0.5-desktop
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.3 - 2.6.34.7-0.5
root (hd0,2)
kernel /boot/vmlinuz-2.6.34.7-0.5-desktop root=/dev/disk/by-id/ata-WDC_WD2500AAKS-00VYA0_WD-WCARY0509017-part3 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x345
initrd /boot/initrd-2.6.34.7-0.5-desktop
###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
rootnoverify (hd0,0)
chainloader +1
###Don't change this comment - YaST2 identifier: Original name: floppy###
title Disketa
rootnoverify (fd0)
chainloader +1
Little bug?
I’ve looked at the script (besides how do you run one?), but I can’t seem to open the dev/sda7 here from Suse (can open any other partition only the Ubuntu’s one I can’t, it says: p, li { white-space: pre-wrap; }There is no application installed that can open files of the type block device (inode/blockdevice).) to use the script there and extract the entry.
Also (using the script) would that mean that each time I would so to say update the Ubuntu, I would need to re-look and re-post the new entry?
You have to mount your Ubuntu root partition under openSUSE first: mount -t ext4 /dev/sda7 /mnt
If it complains, try mount -t ext3 /dev/sda7 /mnt
copy/paste the entire code in a text file
save as “ugrub” in the current directory
make executable chmod 755 ./ugrub
execute: ./ugrub
Anyway, the script does a better job and is faster, providing you know how to run a script. But you can edit the file manually if it’s easier. Btw the boot entry suggested by lenwolf is correct.
If you use the symlink entry as it has been suggested, it won’t change. Otherwise you would have to modify the kernel version.
One more word: Make a copy of /boot/grub/menu.lst, as those Ubuntu kernel entries might not survive openSUSE kernel updates. I’ts a bug: Grub looses menu entry after kernel update
Ok, thank you for that for now. It’s currently rather late here (& am on XP) so I’ll do that tomorrow, after all don’t want to go furstrated to bed if sth. possibly wouldn’t go well
So will then let you know how things went
Lenwolf’s suggestion looks good.
The method works for Ubuntu 10.x (both for Grub2 & legacy Grub) because it’s based on unchanging symlinks
Do make a backup as suggested by please_try_again, so you can copy/paste the code back if the bug strikes it out.
If I add the code a bit upper on the menu.lst, will it affect anything else, rather than showing before other boot selections?
The main effect will just be to change the place it’s shown in the menu. However, the default menu entry which is used after the timeout could also be affected if its position in the menu chnaged due to the change you made - just readjust it, in that case.
[li]And also changing the timeout only affects the timeout before it atomaticaly boots into default (right)?
[/li]
Correct.
the default is based on the (1 to x) - 1 positions acording to the actual list in menu.lst?
Basically that’s it, I just don’t remember whether it’s “1 to x” or “0 to x-1”