LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual boot problem (Ubuntu and mepis) (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-problem-ubuntu-and-mepis-379686/)

lightcastle 11-03-2005 02:59 PM

Dual boot problem (Ubuntu and mepis)
 
Hi everyone. I am an utter Linux newb who was tricked into putting Ubuntu for 64-bit on his machine. After a few months of thinking I was an idiot, I realized that 64-bit stuff simply isn't available yet in sufficient quantities to be useful for an average user (despite my techie friends' exhortations). So I went and installed Simply Mepis, which I like, although I find the KDE desktop very busy.

Anyways, I had already partitioned the hard drive when I put Ubuntu on, figuring I might make the machine dual boot in the future. So I easily preserved /home and such, and Mepis installed like a dream.

Except that I can't get to Ubuntu now. Somehow I must have screwed up and made it that the machine doesn't offer me the choice of OS. I have no idea how to fix this, and am hoping there is some simple line that will make the machine offer me the choice again.

Ubuntu is on /hda1, while Mepis is on /hda2. /home is on its own partition, as is the swap.

Any help to be found? (crosses fingers and prepares to sacrifice ducks to the computer gods.)

ebsbel 11-03-2005 06:05 PM

What happened is that the boot loader Grub(I think Grub is the option for Mepis) installed in the MBR. All you need to do is to is edit /boot/grub/menu.lst. Add an entry for Ubuntu and restart. An example from my menu.lst:
Code:

title Ubuntu64
        root (hd0,9)
        kernel /boot/vmlinuz root=/dev/hda10 ro quiet splash
        initrd /boot/initrd.img

I have my Ubuntu at /dev/hda10. You need to change 'root (hd0,9)' to 'root (hd0,0)' and 'root=/dev/hda10' to 'root=/dev/hda1'. Then it should work. You can check that the Ubuntu partition has the files that grub is trying to load, /boot/vmlinuz and /boot/initrd.img. otherwise you just change to the right file name.
E

saikee 11-04-2005 08:07 AM

That is an answer as good as one can get.

The bit that may help is

One can mount Ubuntu partition /dev/hda1 in Mepis (Mepis could have mounted it automatically because that is what is different from others) and see the actual lines lines ubuntu use to boot itself. The file is /boot/grub/menu.lst in hda1. You can cut and paste the 4 relavant lines as indicated by esbel.

As Mepis now control the MBR your editing should be confined to the /boot/grub/menu.lst of hda2.

ebsbel 11-04-2005 04:54 PM

That's even more clever!;)
E

lightcastle 12-01-2005 02:03 AM

It is very clever.

Except for one thing. I can't seem to edit menu_lst.


This is what the menu_lst on hda 2 looks like



Quote:

timeout 15
color cyan/blue white/blue
foreground ffffff
background 0639a1
gfxmenu /boot/grub/message

title MEPIS at hda2, kernel 2.6.10
kernel (hd0,1)/boot/vmlinuz-2.6.10 root=/dev/hda2 nomce quiet splash=silent vga=791
initrd (hd0,1)/boot/initrd.splash

title MEMTEST
kernel /boot/memtest86.bin
Over in hda 1 we find this in the menu_lst

Quote:

title Ubuntu, kernel 2.6.10-5-amd64-generic Default
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda1 ro console=tty0 quiet splash
initrd /boot/initrd.img
savedefault
boot

title Ubuntu, kernel 2.6.10-5-amd64-generic Default (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda1 ro console=tty0 single
initrd /boot/initrd.img
savedefault
boot

title Ubuntu, kernel 2.6.10-5-amd64-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.10-5-amd64-generic root=/dev/hda1 ro console=tty0 quiet splash
initrd /boot/initrd.img-2.6.10-5-amd64-generic
savedefault
boot

title Ubuntu, kernel 2.6.10-5-amd64-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.10-5-amd64-generic root=/dev/hda1 ro console=tty0 single
initrd /boot/initrd.img-2.6.10-5-amd64-generic
savedefault
boot

title Ubuntu, kernel memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
savedefault
boot
So I have 2 questions:

First: Which of those lines should I paste in?

Second: Why is it than when I do paste something in, I get a warning saying I can't edit that file? I suspect it has to do with getting into super user mode, but I tried running KEdit in super user and that accomplished nothing. Maybe I have to log out and log back in as super user? (Mepis appears to not let you just switch into super user mode).

I thought maybe I had to run a text editor from the terminal, but I appear to only have vi, which is impossible to understand for a newbie.

So... any suggestions?

saikee 12-01-2005 02:16 AM

(1) Log in as root as you need admin privileage to work with system files

(2) Any choice between title and boot, why not cut and the the whole lot (only bits between title and boot are relevant)?

lightcastle 12-04-2005 02:19 AM

Well, we've fixed part of the problem

I edited menu_lst to be the following:

Quote:

timeout 15
color cyan/blue white/blue
foreground ffffff
background 0639a1
gfxmenu /boot/grub/message

title MEPIS at hda2, kernel 2.6.10
kernel (hd0,1)/boot/vmlinuz-2.6.10 root=/dev/hda2 nomce quiet splash=silent vga=791
initrd (hd0,1)/boot/initrd.splash

title Ubuntu at hda1, kernel 2.6.10-5-amd64-generic Default
kernel (hd0,0)/boot/vmlinuz root=/dev/hda1 ro console=tty0 quiet splash
initrd (hd0,0)/boot/initrd.splash

title MEMTEST
kernel /boot/memtest86.bin
This resulted in getting 3 options when I rebooted: Mepis kernel 2.6, Ubuntu amd64, and memtest. But when I select Ubuntu it just hiccups into offering me the same 3 again, and doesn't actually load Ubuntu.

Did I put in the wrong one? Should I put in all 4? And if I do, do I include the boot at the end?

saikee 12-04-2005 04:02 AM

Hey comme on, showing off to the whole world your wrong typing?

Where did you get
Quote:

kernel (hd0,0)/boot/vmlinuz root=/dev/hda1 ro console=tty0 quiet splash
initrd (hd0,0)/boot/initrd.splash
for your Ubuntu? Your were showing us it was
Quote:

root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda1 ro console=tty0 quiet splash
initrd /boot/initrd.img
Condensing 3 into 2 lines with (hd0,0) before /boot would have worked if you didn't replaced the .img with .splash in the initrd filename.

Why Can't you do cut and paste? Hightlight text, ctrl+C to copy, move cursor to destination and ctrl+V.


All times are GMT -5. The time now is 05:44 AM.