Adding Other Operating Systems to GRUB

Posted in Technology
Sun, Feb 18 - 6:16 pm EDT | 11 years ago by
Comments: 6
Be Sociable, Share!
Use Arrow Keys (← →) to Browse

Today I installed a second operating system to my laptop and I was surprised that Ubuntu did not automatically add the new operating system to GRUB. The solution is simple. To add another operating system to grub type the following into the terminal:

gksudo gedit /boot/grub/menu.lst

Scroll all the way to the bottom of the file and type the following:

title Your New Operating System’s Name
root (hd0,0)
chainloader +1

Let me explain a bit about this command. The root (hd0,0) command will probably have to be changed in your case. “hd0″ is related to the hard disk. If you only have one hard drive (like most people) leave this alone. Now the second part after the comma is related to the actual partition. My new operating system is located at hdc3 so I changed the command to root (hd0,2). Whatever partition your new operating system is located at, you will need to change this number to be one less. For example: hdc1 becomes root (hd0,0), hdc2 becomes root (hd0,1), hdc3 becomes root (hd0,20), etc. You get the point.

Resave the file and reboot and you should be able to boot into your new OS.

Use Arrow Keys (← →) to Browse

Be Sociable, Share!

Related Posts

  • Jason

    Ok, what I need to know is how to change the default OS in GRUB. Right now, it’s booting up Ubuntu by default (Ubuntu uses the first 3 or 4 entries) and the final entry is XP, which I want set as the default.

  • Kyle

    @Jason: In that same /boot/grub/menu.lst file under Ubuntu there will be a line that says “savedefault” remove that line and put it under your Windows entry and Windows will become the default operating system.

  • Dennie Barker

    What about adding 2 OS? Would the chainloader be +1 still or would it be +2 for the next OS?

  • TeeJay


    It would still be chainloader +1…… at least it is based on my menu.lst booting Vista, XP, and Ubuntu.


  • Casey Stamper

    Kyle and Jason: There is also a line in menu.lst that reads “default 1″ or whatever the number is. If you have 4 menu entries, this will default to the 2nd (numbered 0 through 3). So, if XP is your 4th menu entry, change the line to read “default 3″ and save it. Upon reboot, XP will boot by default.

  • Nick

    If you could re explain the entire process to me for my particular situation for instance i have vista, ubuntu, and xp pro on scsi 1 as my primary hard drive (120 gb) and Mac OSx86 on scsi 3 as my 2ndary hard drive (120 gb)……Please explain to me how i would make it work

Be Sociable, Share!