Adding Ubuntu section to grub on 11.4

Trying to add a section in grub to boot a Ubuntu 10.10 from a partition, and can enter all the info OK, but it won’t save it.
It has an issue with the kernel and ram files not being where configured, but I tell it to save them anyway. When I go back in the section hasn’t been saved…??

Have tried in YAST (cli) and Yast2 - same result.
Thanks, John.

Depending on the partition numbers in your case, it should look something like this

###Don't change this comment - YaST2 identifier: Original name: Mint###
title Mint 9
    root (hd0,6)
    kernel /vmlinuz root=/dev/sda7 ro quiet splash
    initrd /initrd.img

Did you edit the file menu.lst in /boot/grub/menu.lst? You can do that using one of these editor commands:
Gnome: gnomesu gedit/boot/grub/menu/lst
KDE: kdesu kwrite /boot/grub/menu.lst

Then add this entry:

#Don't change this comment - YaST2 identifier: Original name: none#
title      Ubuntu booting via symlinks
root       (hd0,8)
kernel     /vmlinuz root=/dev/sda9 ro quiet splash
initrd     /initrd.img

You’ll have to edit the sda9 and (hd0,8) to reflect your actual partition for Ubntu

Ah Carl – two like minds I see.

I thing yes.

You should not use device names in Grub menu. The fact that is works in most cases (but not as often as you think) and doesn’t require further explanation doesn’t make it a good practice nor an advisable method. Use disks IDs, UUIDS or labels instead (as most Linux setups would do).

To edit the file use this in a terminal

kdesu kwrite /boot/grub/menu.lst

I had the same problem.
First, go into yast and use the partitioner to mount your Ubuntu root partition.

Once it is mounted, go into Yast and start up the boot loader. Click add, select Image section, Type in what you want for a description, and browse for the kernel image. Go to the folder you mounted the Ubuntu partition to, and look for the boot folder. In that folder you will see ’ vmlinuz-2.6.35-27-generic-pae ’ or something like that. Select it. And yes, the path will include the folder you mounted the Ubuntu partition in… dont worry about that right now.

Next do the same thing for the Init RAM disk, it’ s in the same location as the kernel image file. It will be something like ’ initrd.img-2.6.35-27-generic-pae '. The root device will be whatever parittion is your Ubuntu root, and you can set the VGA mode however you want.

The next thing is the Option Kernel Command Line Parameter box. If you don’t remember what yours was originally, use quiet splash as swerdna pointed out.

Click OK, then OK again. Re-open the boot loader and it should have saved this time. Next, select the Ubuntu entry, click the Other button in the lower right hand corner, and select ‘Edit Configuration Files’. There will be a drop down at the top of the screen open it and select /boot/grub/menu.lst then scroll to the bottom of the File Contents box. Make sure that the kernel and initrd lines start with at the ‘/boot’ folder (for example: kernel /boot/vmlinuz-2.6.35-27-generic-pae… )

May seem a bit confusing, but the idea is this: Mount your Ubuntu partition with partitioner, add an entry through boot loader in Yast, and browse to the kernel and initrd files. Just make sure the menu.lst is pointing to the boot folder and not your mount folder for Ubuntu. The Boot Loder GUI will see the files, add the entry for you as it should be, and compile the GRUB files for you the way the system expects. And, at least on my system, the Boot Loader GUI will extrapolate the correct path to my kernel and INITRD files after I select them.

IIRC you mentioned this last time I posted to use device names like sda. I think the added burden for newbies of finding the UUID or diskID is too much when trying to edit menu.lst (just my POV). We have different views on how to be pragmatic.

Yep and I still will. You shouldn’t advise people to use a syntax which is known not to work as expected and even create problems and is considered to be deprecated.

In other words, if it is too complicated to do something right, just do it wrong! I do not share this view (sounds windowish). My guess is that you’ve been misinformed about the probability of device name changes in modern Linuxes - which is never 0.1% as you stated in another thread - but closer to 50% in multiboot (or even in multiple kernels) environments.

However the issue might get solved in the future if users continue to worry about it or even propose solutions (OpenSuse 11.4 Hard drive order?).

In the meantime - I’m sorry to say it again - don’t use device names (sda, sdb, etc) in Grub menu. There is no reason to do so, except that it might be simpler for you. And this is not a good reason, as the udev daemon doesn’t care about what is simpler for you but just names devices in the order which appears to be simpler for itself.

Yes.

Thanks for all the replies!
Easy when you know (are told…) how, particularly NeoGraven. Thought I had basically been doing that, but it hadn’t worked, so obviously I hadn’t been!
All is now good, although I had stuffed up the HOME partition somehow, but now working.
Thanks again, John.

I do not wish to have repeated discussions with you about this matter because that is clearly a waste of time.

Let it be clear, finally: you think I have the wrong approach and I think you have the wrong approach.

I find these discussions, in particular your dogmatic attitude and cavalier aggression simply offensive. Phrases like “yep and I still will” and “if it is too complicated … just do it wrong” are not on; you need to revise your method of communication so that it is civil, in line with the T&C.

What? dogmatic attitude and cavalier aggression! Forgive me but … c’est plus fort que de jouer aux bouchons!

IMHO your answer reveals more about your sense of psychology than it does about my method of communication. I don’t see what’s wrong in explaining an re-explaining that using device names is a bad pratice since it is a bad practice. Whether you believe it or not is your problem. But as soon as you give others debatable advice and suggest using a - somehow - deprecated syntax in system files, you should be prepared to handle criticism. That’s perfectly right and civil, I think. Wrong would be not to warn users about the potential problems of this method.

For the record, both approaches have their uses in my view. I recommend users seeking help in this thread ignore the comments saying its a bad approach, because there is more to this.

Indeed, I just noticed. Thank you.