LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to boot many versions of linux on one HD? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-boot-many-versions-of-linux-on-one-hd-559093/)

jay73 06-04-2007 09:51 PM

To install any other OS, you do exactly the same: select a partition, mount under "/" and install GRUB - you can either have it installed to floppy or have it overwrite your present GRUB. In the latter case, you may need to add your first OS manually if it isn't picked up (it would be unbootable otherwise). To make it easier, you should have a look at the file grub.lst before you install a second OS - the file is in the /boot/grub directory. Just copy out the parts that look like this:

title XXXXXXXXXXXXXXXXXXXXXX
kernel /XXXXXXXXXXXXXXXXXXX
initrd /XXXXXXXXXXXXXXXXXXX

These can then be added - by hand - to your newer GRUB.

Plenty of tutorials, manuals, how-tos etc. - just use google and you'll find more than you could ever read.

For now, you can visit the ubuntu site and have a look at all their docs and wikis.

zephyrcat 06-05-2007 08:34 AM

Ok. I found this in boot/grub/menu.lst:

Code:

title                Ubuntu, kernel 2.6.20-16-generic
root                (hd0,1)
kernel                /boot/vmlinuz-2.6.20-16-generic root=UUID=39a42c88-ce12-42d9-860d-a15d6b15da79 ro quiet splash
initrd                /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title                Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root                (hd0,1)
kernel                /boot/vmlinuz-2.6.20-16-generic root=UUID=39a42c88-ce12-42d9-860d-a15d6b15da79 ro single
initrd                /boot/initrd.img-2.6.20-16-generic

title                Ubuntu, kernel 2.6.20-15-generic
root                (hd0,1)
kernel                /boot/vmlinuz-2.6.20-15-generic root=UUID=39a42c88-ce12-42d9-860d-a15d6b15da79 ro quiet splash
initrd                /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title                Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root                (hd0,1)
kernel                /boot/vmlinuz-2.6.20-15-generic root=UUID=39a42c88-ce12-42d9-860d-a15d6b15da79 ro single
initrd                /boot/initrd.img-2.6.20-15-generic

title                Ubuntu, memtest86+
root                (hd0,1)
kernel                /boot/memtest86+.bin
quiet

So when I install the second OS I find it's version of the file and add this to the end of it?

zephyrcat 06-05-2007 10:05 AM

EDIT: I can't boot Ubuntu. I will post the error in just a second. I want to check something in Fedora first.

EDIT2: Now I can't boot Fedora either. I will post the errors in the next post, since they are kinda long.



Well now it works! Thank you for your help everyone, especially jay73. The computer now boots Ubuntu automatically unless I press a key. That gives me the choice between Ubuntu and Fedora. I did't have to use that information I posted above at all, just the Fedora 7 Installer. Thanks so much!

zephyrcat 06-05-2007 11:06 AM

Ok. Here are the errors for Ubuntu and Fedora.


Ubuntu Error:
Code:

  Booting 'Ubuntu'

Rootnoverify (hd0,1)
chainloader +1

Error 13: Invalid or unsupported executable format.

Press any key to continue...

That takes me back to the choice between Fedora and Ubuntu


Fedora gives this and then boots up fine:

Code:

ata2.00: Failed to set xfermode (err_mask=0x4)
ata2.00: Failed to set xfermode (err_mask=0x4)
ata2.00: Failed to set xfermode (err_mask=0x4)


zephyrcat 06-05-2007 11:25 AM

I changed menu.lst on fedora by replacing the Ubuntu entry with the first of the parts that I posted before. Now it appears to be working than the screen goes blank forever. I am going to go back and change the file. Not sure how, but I bet thats where the problem is.

zephyrcat 06-05-2007 11:49 AM

Ok. I am still getting the same problem. It is very hard to see what goes by before it blanks out. If you think this will give an obvious clue I will try to figure out what it says. Here is a list of what I have tried:

- replacing what fedora generated for Ubuntu with what Ubuntu generated for itself
- adding irqpoll to the end of the line (based on what it said here)


Note about the Ubuntu problem: Right before the screen goes blank it says Loading, please wait... and flashes something at the bottom of the screen. I will change this if I figure out what it says.

EDIT:
I got it to do something diffrent by removing the quiet splash part. This is what the Ubuntu part of the menu.lst file looks like now:
Code:

title Ubuntu, kernel 2.6.20-16-generic
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=39a42c88-ce12-42d9-860d-a15d6b15da79 ro
    initrd /boot/initrd.img-2.6.20-16-generic

I took a picture of what it does now. I will try to find a way to post that.

http://img517.imageshack.us/img517/1...4186qd2.th.jpg

This is better:
http://img517.imageshack.us/my.php?image=img4186qd2.jpg

zephyrcat 06-05-2007 01:41 PM

I have tried everything I can think of. Anyone have any ideas?

jay73 06-05-2007 02:19 PM

I'm back. Could you summarize where you're at right now? I've seen you posted so much that it's become confusing.
What works, what doesn't?
Which GRUB are you using: the one generated by Ubuntu or the one generated by Fedora?
Did you modify the original entry for Ubuntu and, if yes, how?

zephyrcat 06-05-2007 02:28 PM

Sorry. I have been going along and I was afraid that if I edited the posts I could confuse someone if people were watching, just not posting. Anyway, this is where I am now:

Code:

title Ubuntu, kernel 2.6.20-16-generic
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=39a42c88-ce12-42d9-860d-a15d6b15da79 ro
    initrd /boot/initrd.img-2.6.20-16-generic


This is what the Ubuntu part of the menu.lst looks like. The grub I am using now was installed by Fedora.

jay73 06-05-2007 02:54 PM

OK, if Ubuntu fails to boot, you need to make a minor adjustment:

its kernel /vmlinuz .... line should have root=/dev/sda2 instead of root=UUID=....

Ubuntu uses a different syntax to identify the root device; you need to "translate" it if you want it to boot from a GRUB other than its own.

The quiet and splash thingies you removed before can be put back - they are in now way involved in this. They only indicate whether you want to see the full boot messages while booting or whether you prefer to hide them.

zephyrcat 06-05-2007 03:43 PM

Ok. It is now saying that /dev/sda2 does not exist. I will post a screenshot as soon as I can take a picture.

http://img267.imageshack.us/img267/4940/img4187da7.jpg

whansard 06-05-2007 03:53 PM

i've used this way too. I have some like this on my system, and some in other partitions.

http://www.faqs.org/docs/Linux-mini/...istro-Dev.html

jay73 06-05-2007 05:47 PM

OK, replace sda2 with hda2

zephyrcat 06-05-2007 06:41 PM

Ok. That takes me back to this:

http://img517.imageshack.us/my.php?image=img4186qd2.jpg

jay73 06-05-2007 06:53 PM

I don't like the look of that. It seems your filesystem got damaged although I fail to see why.

Pop in your Gparted cd and double-click the terminal icon. When a terminal comes up type this:

fsck.ext3 /dev/hda2

Then try booting Ubuntu again.

Note: don't just power down a Linux system by clicking on the reset button- it's one of the main causes of filesystem corruption. You may get away with it using windows but Linux is less forgiving. If you ever get stuck on a command line, you can power down safely like this:
init 6
or
shutdown -h now
or if you want to reboot
reboot


All times are GMT -5. The time now is 02:46 PM.