Thursday, March 4, 2010

Dual Boot - Ubuntu and Fedora

I have seen many of the people who wants to know the steps for creating a dual boot system with both Ubuntu and Fedora. Now its better to install Fedora first and Ubuntu second as Ubuntu has a better partition manager.
Installing Ubuntu

1. I installed Ubuntu 8.0.4 as built from the latest images.
2. Booted the Ubuntu install CD and selected “Guided, use entire disk”
3. You need to select a name and password
a. I used the same name and password for both installations.
4. Once the OS was booted I went into system preferences and setup the network proxy to enable network access from within the firewall. This step is necessary if you have a firewall, if you are outside your selections might be different.
5. Using the update manager, I installed updates just to make sure everything was current.

Modifying the Disk Partition information

1. To enable a second OS on the drive we need to make room for it.
2. Boot your system using an Ubuntu “Live” CD which runs Ubuntu from CD and not from your installed setup.
a. This requires your system to be able to boot from a CD.
3. Once the Live version is up, run the GNOME Partition Manager as found in: System – Administration.
4. Select to resize the primary drive
5. Enter values that create two equally sized partitions
a. Do NOT select ok yet as it will fail since the drive is mounted.
6. Bring up a terminal window
7. Type: sudo umount /dev/sda1
a. check to make sure this is the drive you are expecting by looking at the graphical UI
8. Now with the drive unmounted, go back to the GUI and select OK and then APPLY
9. It takes some time to resize and then gives a few errors as it’s unable to auto mount the drive since it was unmounted without the GUI app knowing.
10. The result is you should have your partition ½ full and ½ unallocated now.

Installing Fedora

1. Boot your system with the Fedora install DVD
a. Select Install or upgrade an existing system
b. Skip the media test
2. GUI comes up now
a. Select Next (to continue installing)
b. Select English as the language
c. Select US English as the keyboard
d. Hostname – select Auto via DHCP
e. Root password – I used the same as I had for Ubuntu
i. Select OK if it’s a “weak” password
f. @ the dropdown box at the top, select
i. Use free space on selected drives and create default layout
g. Check the box that says you want to review and modify partitioning layout
h. I took the defaults and when clicking next was warned to write the changes to disk.
i. Accept the changes
i. You get a “Formatting file/system” message and it’s there for several minutes
j. Selecte to install a boot loader on /dev/sda
k. Add Ubuntu as /Dev/sda1 then NEXT to keep going
i. This will need some serious changes later on because Fedora doesn’t know enough about Ubuntu
l. Select to add software dev tools since you’ll be using this as a development system.
m. You can select to add a web server to your system too
n. If you want to add additional Fedora software, it requires a connection and there wasn’t a way to setup a proxy in this dialog, so I skipped that since it can be done through the software management application once the install is complete.
o. Start the actual install.
i. It goes through 1149 packages with the v9 DVD
p. Says congrats install is complete, press reboot
3. At this point when you reboot you get the Boot Manager and it shows 2 options. 1 for Fedora and 2 for Ubuntu. The Fedora option will work but the Ubuntu option needs some serious changes.

Modifying Fedora to support dual boot

As unlikely as it seems, Fedora doesn’t know how to run Ubuntu, in fact you can’t even see the Ubuntu hard drives from Fedora. So, when the Boot Manager installed to run Ubuntu, it didn’t get things right. The Ubuntu strings need to be added to the Fedora Boot Manager, here’s instructions for doing that.
1. Put the Ubuntu Live Boot CD in the system and boot it
2. Open the file /boot/grub/menu.lst
3. Once you have the file look for the section near the bottom that shows how to boot Ubuntu. It looks about like these 4 lines… YOURS will be different because the UUID info is different for each drive. You need to write it down exactly, all 4 lines (double check it too).
a. Title Ubuntu 8.04.1, kernel 2.6.24-19.generic
b. Root (hd0,0)
c. Kernel /boor/vmlinuz-2.6.24-19.generic root=UUID=63766a10-f196-47b2-b2be-2a057b4be170 ro quiet splash
d. Initrd /boot/initrd.img-2.6.24-19-generic
4. Re-boot your system and select Fedora from the boot manager
5. Inside of Fedora, bring up a terminal by selecting: System Tools Terminal
6. In the terminal change to root by typing SU
7. Then enter the root password as requested
8. Now type: gedit /boot/grub/menu.lst
9. Modify the Ubuntu entry to match what you just wrote down above
10. Save the changes
11. Reboot and check that both OS’s work now. If your Ubuntu doesn’t boot, check VERY carefully for typos as everything needs to be exactly right for this to work.

Now you have a dual boot Ubuntu-Fedora system for all your Linux development needs.

Source: Intel

No comments:

Post a Comment