RSS Feed!

About Me

I’m a 30 something Irish guy that works in the IT business. Inside the trade I’m interested in Linux, Internet technologies and mobile hardware and services. Outside, I enjoy a good book, a nice beer and decent game of rugby……

P.S. This is a personal blog, and while I do have a professional involvement in a lot of the technical topics I mention in some of my posts, they do not reflect company policy or ethos.

View Gary Pigott's profile on LinkedIn

How to dual boot Moblin and Ubuntu

The secret is in where you put grub for each OS. Moblin, being cute ‘n friendly assumes that it’ll be the only OS on the disk so slaps it in /dev/sda (or whatever your hard disk is). Ubuntu Network Remix defaults to doing the same. What you need to do is install Moblin first but use a custom partitioning scheme (to leave room for Ubuntu). I created a 2GB /dev/sda1 root partition and a small swap partition. I then installed Ubuntu on /dev/sda3, again using a custom partition layout, but I clicked the “advanced” button to put grub on /dev/sda3 rather than on /dev/sda. You then reboot into Moblin (which is the only bootable OS at this stage) and edit your Moblin grub menu (/boot/grub/menu.lst) and tag the following at the end:

title Ubuntu
rootnoverify (hd0,2)
chainloader +1

This has the effect of kicking off the bootloader on /dev/sda3 (i.e. the Ubuntu one) when selected, booting Ubuntu!

By gary | 11. Aug 2009 | Internet, Linux, Software, Technology | 14 Comments »

14 Comments

  1. Thank you very much for this tip! Solved my problem, but I’m dual-booting with Linux Mint instead of Ubuntu.

    By the way, Moblin V2 is the most beautiful OS that I’ve seen.

  2. gary says:

    It is beautiful, but it’s pretty useless as a media centric netbook OS without DivX & MP3 support

  3. Faith says:

    Okay…. I am still very new to Linux (~lol~ even after about 6 months of it)…

    How do you edit the file? Could you elaborate? (I’ve searched the Net already for instructions, but I didn’t find any thing in great detail. Maybe I’m not searching right.)

    I am attempting a triple boot of Windows XP, Moblin + Ubuntu on a Dell Mini 9. XP boots fine & so does Moblin. The only one Moblin doesn’t “see” at the boot screen is Ubuntu.

    When I tried to edit the Moblin grub menu, the file I got was blank, so I know I must have been doing something wrong.

    Please, could you help?

  4. gary says:

    There’s two issues. Firstly a standard user in Linux might not have sufficient rights to view/edit the file, so open a terminal and type:

    su –

    and enter your password.

    Once you’ve done that you need to edit the file using vi (the default installed text editor). Type

    vi /boot/grub/menu.lst

    Move the cursor to where you want to add text and type “a” (to tell vi that you want to add text) and then start typing. When finished press escape twice then “:” (to get the function prompt) and “wq” (to write and quit). Reboot and you’re good to go.

  5. Tyler says:

    So, it didn’t work for me. I guess the chainloader doesn’t kick off Ubuntu’s GRUB. Can you please provide a more detailed guide please? No matter what I do I still get ‘Error 13′ for GRUB. I want to murder the entire Moblin team for setting up Moblin like this.

  6. gary says:

    A grub error 13 is probably because you’re pointing at the wrong partition to start the loading of Ubuntu.
    The “rootnoverify (hd0,2)” may need to be changed. The “(hd0,2)” references the hard disk number and the partition on the hard disk, and both values start at 0, so if Ubuntu is installed on /dev/sda2 then you need to change it to “(hd0,1)”. If it’s on /dev/sdb1 you’d need to use “(hd1,0)”.

    There is another wrinkle however. Ubuntu 9.10 came out recently and the default filesystem changed from the old reliable ext3 to the new and shiney ext4 filesystem. The current release of Moblin doesn’t support ext4 so the above method doesn’t work. I’m in the middle of writing a new post to work with Moblin 2.1 & Ubuntu 9.10 which I should have up in a day or two, but in escence it involves having the Ubuntu grub on /dev/sda chain loading a Moblin grub on /dev/sda2.

  7. Tyler says:

    Yeah, I had the commands for GRUB correct and the commands did point to the correct partitions, but the problem was, in fact, originating from the file system types for my partitions. I thought chain loading didn’t deal with the FS though? So, shouldn’t Legacy GRUB on MBR be able to chainload Ubuntu’s GRUB2? Also, I had some trouble trying to have GRUB2 on MBR chainload Legacy GRUB. Moblin was detected using the ‘update-grub’ command, but when I tried booting the partition it still gave me errors.

    Thanks a ton for a quick reply and the help.

  8. gary says:

    Grub does need to be able to read the target filesystems, and the version of grub that comes with Moblin 2.1 can’t read ext4, which is Ubuntu 9.10′s default filesystem. I’m in the same situation as you right now trying to get Ubuntu 9.10′s grub2 to chainload Moblin……

  9. Tyler says:

    Figured it out. GRUB2 was spitting out an “vga=current is deprecated” (not word for word but that was the jist) error when I tried to boot Moblin, so I changed the vga value in my /boot/grub/grub.cfg on my Ubuntu 9.10 partition and it booted with no problem. Thanks for the collaboration on the problem and good luck with your next post.

  10. Atasa says:

    I have entered in menu.lst the details but moblin boots without any grub prompt.
    Seems can’t boot to Ubuntu any more.

  11. Unoid says:

    Any luck ? I installed 9.10 then moblin overwrote my ubuntu bootloader.

    Now I added in the lines you said above and now when I boot its stuck on MOBLIN black adn white, won’t go anywhere.

  12. andy bleaden says:

    Absolutely brilliant. Just dual booted with a test version of Lucid 10:04. Your guide was very useful and helpful ..thanks

  13. Sam says:

    great guide, but for some reason it didnt work for me probably cuz its a different version i have moblin 2.1 and ubuntu 10.4 and tried it. installed moblin fine as dev1 putting the swap as dev2 then installed ubuntu as dev3 i wasnt sure if i should install it as EXT4 or EXT3 like moblin so i did it as EXT4 and then as i restarted it booted up to ubuntu. so now i cant open moblin.
    any ideas?
    thanks

Leave a Reply