<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://ubuntuguide.org/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Lucid Multiple OS Installation - Revision history</title>
		<link>http://ubuntuguide.org/index.php?title=Lucid_Multiple_OS_Installation&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.1</generator>
		<lastBuildDate>Sat, 25 May 2013 20:02:52 GMT</lastBuildDate>
		<item>
			<title>Perspectoff:&amp;#32;/* The (hd0,9) problem */</title>
			<link>http://ubuntuguide.org/index.php?title=Lucid_Multiple_OS_Installation&amp;diff=27516&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;The (hd0,9) problem&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;These instructions are for installing more than two operating systems on your hard drive. If you only need two operating systems (such as a Windows installation and a (K)ubuntu Linux installation), it is easiest to just use the (K)ubuntu installer to do it for you (as [[Ubuntu:All#Installing_Ubuntu|detailed]] on the main page).&lt;br /&gt;
&lt;br /&gt;
Warning: During installation of 10.04 (Lucid Lynx) and later, there is an advanced option (Ready to install -&amp;gt; Summary -&amp;gt; Advanced) to choose whether to install the GRUB2 bootloader into both the partition into which the (K)Ubuntu OS is installed as well as the Master Boot Record MBR) or just to install it into the partition into which the (K)Ubuntu OS is installed (only). If your system uses a boot partition, uses multiple OS (more than 2), or chainloads bootloaders then pay careful attention during this step. For systems with boot partitions that have already been configured (and to which the Master Boot Record already refers to as the partition which contains the initial bootloader), it is best not to overwrite the MBR during any OS installation.&lt;br /&gt;
&lt;br /&gt;
:*Example, from the Desktop version GUI installer, a point in the installation will be reached:&lt;br /&gt;
::Ready to install -&amp;gt; Summary -&amp;gt; Advanced -&amp;gt; Device for boot loader installation: ''/dev/sda6''&lt;br /&gt;
&lt;br /&gt;
In this example, this setting will cause the GRUB2 bootloader to be installed into ''/dev/sda6'' only (the partition into which the new (K)Ubuntu OS is being installed). The MBR (Master Boot Record) will not be changed. However, if the default setting of ''/dev/sda'' were to be chosen, GRUB2 would not only be installed into partition ''/dev/sda6'' (into which the (K)Ubuntu OS is installed) but also the MBR (designated as ''/dev/sda'') would be changed. The copy of GRUB2 stored in ''/dev/sda6'' wwould then be designated by the MBR as the master bootloader for all Operating Systems on the entire computer. This is undesirable if you wish to use a master bootloader (such as Grub Legacy stored in the boot partition) instead of GRUB2.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The method described here involves creating a small boot partition in which to store a set of Grub bootloader configuration files. (These files will be created during the first Ubuntu Linux OS installation and then copied to the boot partition where they can subsequently be edited.) The initial Grub menu will always be kept in this small boot partition. Each operating system will then keep its ''own'' set of bootloader configuration files within its own partition. The Grub menu residing in the boot partition will be only be used to [http://en.wikipedia.org/wiki/Chainload#Chain_loading_in_boot_manager_programs chainload] the specific bootloader files stored in the partition of whichever operating system is chosen from the menu (no matter whether the chosen operating system is a Windows, Mac, (K)ubuntu, or other Linux operating system).&lt;br /&gt;
&lt;br /&gt;
Each operating system can therefore use the bootloader/configuration file that is peculiar to it, storing it in its own partition. If the kernel, filesystem, or even the bootloader files for that operating system changes (within its own partition) for any reason, it will not affect the kernel, filesystem, or bootloader files of the operating systems stored in the other partitions. It will also not affect the primary bootup menu (stored in the boot partition), and each operating system will be able keep its own independent bootup process intact.&lt;br /&gt;
&lt;br /&gt;
This avoids a common problem with many operating system installers (including (K)ubuntu) which attempt to impose a single [http://en.wikipedia.org/wiki/Booting bootloader] on all the operating systems residing on a hard drive. The installer overwrites the Master Boot Record so that it only points to the bootloader installed with that operating system (within that operating system's partition). When this happens, the bootloader files can only be edited while running that particular operating system and cannot be adjusted by any other operating system. Further, after this happens several times (following multiple OS installations), it eventually becomes difficult to remember which partition has the bootloader configuration files that the Master Boot Record points to. With the chainloading method, you don't have to worry about that, any longer. The Master Boot Record will be set to point to the bootloader configuration files stored in the boot partition at all times. Once this is set up, the Master Boot Record need never be changed.&lt;br /&gt;
&lt;br /&gt;
Here is some info about this method:&lt;br /&gt;
*[http://www.hentzenwerke.com/wp/installingmultiplelinuxdistributions_onasinglebox.pdf Installing Multiple Linux Distributions on a Single Box]&lt;br /&gt;
*[http://www.troubleshooters.com/linux/grub/grubpartition.htm#_Creating_Your_Grub_Partition Creating your Grub Partition]&lt;br /&gt;
*[http://members.iinet.net.au/~herman546/p15.html#How_to_make_a_separate_Grub_Partition_ How to make a Grub partition]&lt;br /&gt;
*[http://ubuntuforums.org/showthread.php?t=724817 Ubuntu forums]&lt;br /&gt;
*[http://ubuntuforums.org/archive/index.php/t-1045237.html Ubuntu forums]&lt;br /&gt;
&lt;br /&gt;
=== Using Grub Legacy for the boot partition ===&lt;br /&gt;
This method uses Grub Legacy as the bootloader to be installed to the boot partition (because it is the easiest to customize). Starting with Karmic Koala 9.10, however, Ubuntu/Kubuntu uses Grub 2 (instead of Grub Legacy) by default. &amp;lt;!---&amp;gt;Only versions of [http://releases.ubuntu.com/9.04/ Ubuntu/Kubuntu 9.04] or earlier can be used for installing Grub Legacy to the boot partition, therefore.&amp;lt;---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*An easy and fast method is to use an [http://releases.ubuntu.com/9.04/ Ubuntu Server edition 9.04 LiveCD] (which uses Grub Legacy) to install the first instance of Ubuntu Linux (and Grub Legacy). Use the minimal install (i.e. don't install any extra packages), in the interest of speed. Proceed with the installation instructions that install Grub to the Master Boot Record, as well as installing a second copy of Grub Legacy to the local partition. Then copy the Grub Legacy settings to the boot partition as described. Edit the Grub Legacy menu settings stored in the boot partition so that chainloading to each planned partition is enabled.&lt;br /&gt;
&lt;br /&gt;
:Once this is finished, re-install a newer version of Ubuntu/Kubuntu to the same partition (overwriting the 9.04 server version). However, this time do not allow the new installation process to overwrite the Master Boot Record. (We want the Master Boot Record always to use Grub Legacy, not Grub2.) Install Grub2 (this time) to the local partition only. This method is described in further detail [[Multiple_OS_Installation|here]].&lt;br /&gt;
&lt;br /&gt;
*A second method (detailed below) involves installing (K)Ubuntu completely (using the LiveCD installer), then removing Grub2 from the (K)Ubuntu partition. Grub Legacy is then temporarily installed in its place and copied to the boot partition. The Master Boot Record is set to refer to this copy of Grub Legacy stored in the boot partition. After this has been done, Grub Legacy is then removed from the (K)Ubuntu installation (but left in place in the boot partition) and Grub2 re-installed in the (K)Ubuntu partition's /boot directory once again. &lt;br /&gt;
&lt;br /&gt;
*Now the Master Boot Record will always use Grub Legacy (stored in the boot partition) merely as a chainloader to each subsequent partition, where that chosen partition's particular bootloader will be run directly from within the partition (no matter if it is a Windows partition's bootloader, a (K)Ubuntu partition's bootloader (e.g. Grub2), or a Mac partition's bootloader). &lt;br /&gt;
&lt;br /&gt;
{{PartitionDesign}}&lt;br /&gt;
{{WindowsPartitions}}&lt;br /&gt;
&lt;br /&gt;
== Ubuntu Lucid (&amp;quot;Regular Download&amp;quot;) Desktop LiveCD installation ==&lt;br /&gt;
*The partition manager that is part of the Ubuntu (&amp;quot;Regular Download&amp;quot;) Desktop installer does not have the full capabilities of GParted. It is best to use GParted to set up the partitions on your hard drive. GParted can be run from the Ubuntu Desktop LiveCD. Boot the LiveCD and choose the &amp;quot;Try Ubuntu&amp;quot; option. Once the OS has booted, start GParted:&lt;br /&gt;
&lt;br /&gt;
:::Menu -&amp;gt; System -&amp;gt; Administration -&amp;gt; GParted&lt;br /&gt;
&lt;br /&gt;
*Make sure you have created the partitions as detailed in the [[#Partition_design|partitioning scheme above]]. Specifically, you should have a 100 Mb ext3 primary partition to be used as the boot partition, a linux-swap partition (about 2 Gb, which can be a logical partition), and at least one partition for the (K)Ubuntu OS (which can be either a logical or a primary partition, type ext4).&lt;br /&gt;
&lt;br /&gt;
*Once the partitions have been created, close GParted and click the &amp;quot;Install Ubuntu&amp;quot; desktop icon.&lt;br /&gt;
&lt;br /&gt;
*Choose your language, location/timezone, and keyboard layout from the installation menus.&lt;br /&gt;
&lt;br /&gt;
*Prepare disk space -&amp;gt; Specify partitions manually (advanced): (''ticked'')&lt;br /&gt;
&lt;br /&gt;
*You should be presented with a list of the partitions on your hard drive and any free space that is available. There may be partitions of Type fat32 and ntfs from your Windows installation -- leave these alone. You should be able to see the ext3 100 Mb boot partition, swap partition, and the ext4 partition that were created using GParted. &lt;br /&gt;
&lt;br /&gt;
:::Highlight the ext4 partition (such as ''/dev/sda6'') in which you intend to install (K)Ubuntu -&amp;gt; Change ... -&amp;gt; Use as: -&amp;gt; ext4 journaling file system&lt;br /&gt;
:::-&amp;gt; Mount point: / -&amp;gt; OK&lt;br /&gt;
&lt;br /&gt;
:::If you had created additional partitions (for use as /home or other special partitions), then also specify their mount points now. :::Complete the partition setup (-&amp;gt; Forward).&lt;br /&gt;
&amp;lt;!---&amp;gt;&lt;br /&gt;
*During the step &amp;quot;Ready to install&amp;quot;, select Advanced... -&amp;gt; Advanced Options: Boot loader -&amp;gt; Install boot loader: (''ticked'')&lt;br /&gt;
:::-&amp;gt; Device for boot loader installation: ''/dev/sda6''&lt;br /&gt;
&lt;br /&gt;
:::If the partition in which you have installed (K)Ubuntu is other than ''/dev/sda6'', then use that partition name as the device. This ensures that Grub2 is installed in the same partition in which the OS is installed. Do not keep the default ''/dev/sda'', which overwrites the MBR (which we don't want to do at this point).&amp;lt;---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Allow installation to complete. When prompted, restart into the newly installed (K)Ubuntu OS (removing the LiveCD).&lt;br /&gt;
&lt;br /&gt;
=== Remove Grub 2 and install Grub Legacy ===&lt;br /&gt;
*Login for the first time.&lt;br /&gt;
&lt;br /&gt;
*Start the command-line interface Terminal:&lt;br /&gt;
::Applications -&amp;gt; Accessories -&amp;gt; Terminal&lt;br /&gt;
&lt;br /&gt;
*Backup the Grub2 files in the /boot directory to a backup directory:&lt;br /&gt;
 sudo mv /boot/grub /boot/grub2backup&lt;br /&gt;
&lt;br /&gt;
*Create a new Grub Legacy folder:&lt;br /&gt;
 sudo mkdir /boot/grub&lt;br /&gt;
&lt;br /&gt;
*Remove and purge old configuration files and the Grub2 (aka grub-pc) utility:&lt;br /&gt;
&amp;lt;!---&amp;gt; sudo apt-get remove --purge startupmanager&amp;lt;---&amp;gt;&lt;br /&gt;
 sudo apt-get remove --purge grub-pc grub-common&lt;br /&gt;
&lt;br /&gt;
::Remove GRUB 2 from /boot/grub? -&amp;gt; ''Yes''&lt;br /&gt;
&lt;br /&gt;
*Install Grub Legacy:&lt;br /&gt;
 sudo apt-get install grub&lt;br /&gt;
&lt;br /&gt;
*Update Grub Legacy settings:&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
&lt;br /&gt;
::Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? -&amp;gt; ''y''&lt;br /&gt;
&amp;lt;!---&amp;gt;&lt;br /&gt;
*Install Grub Legacy to the Master Boot Record (MBR):&lt;br /&gt;
 sudo grub-install /dev/sda&lt;br /&gt;
&lt;br /&gt;
*Install Grub Legacy to the boot partition in ''/dev/sda3'':&lt;br /&gt;
 sudo grub-install ''/dev/sda3''&lt;br /&gt;
&amp;lt;---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Copy boot files to the small Grub partition ===&lt;br /&gt;
&amp;lt;!---&amp;gt;&lt;br /&gt;
*Boot into your newly-installed Ubuntu 9.04 OS. Open a command-line terminal (if you have installed a desktop).&lt;br /&gt;
&amp;lt;---&amp;gt;&lt;br /&gt;
*Make a new directory and mount it in your new Ubuntu OS.&lt;br /&gt;
 sudo mkdir /media/GRUBpartition&lt;br /&gt;
 sudo mount /dev/sda3 -t ext3 /media/GRUBpartition&lt;br /&gt;
 sudo mkdir /media/GRUBpartition/boot&lt;br /&gt;
 sudo mkdir /media/GRUBpartition/boot/grub&lt;br /&gt;
&lt;br /&gt;
::Note: Use whatever the device name of your small Grub partition is (mine is ''/dev/sda3'')&lt;br /&gt;
&lt;br /&gt;
*Make sure there are full read/write write permissions (this step may be optional).&lt;br /&gt;
 sudo chmod 777 /media/GRUBpartition/boot/grub&lt;br /&gt;
&lt;br /&gt;
*Copy all your grub files to the new partition&lt;br /&gt;
 sudo cp -r /boot/grub/* /media/GRUBpartition/boot/grub&lt;br /&gt;
&lt;br /&gt;
*Edit the menu.lst&lt;br /&gt;
 sudo nano /media/GRUBpartition/boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
*Place a chainloader entry as the first entry:&lt;br /&gt;
&lt;br /&gt;
 ## ## End Default Options ##&lt;br /&gt;
 title  First (K)Ubuntu OS (chainloader)&lt;br /&gt;
 rootnoverify   (hd0,5)&lt;br /&gt;
 kernel         /boot/grub/core.img&lt;br /&gt;
 #chainloader	+1&lt;br /&gt;
&lt;br /&gt;
 title Second (K)ubuntu OS (chainloader)&lt;br /&gt;
 rootnoverify   (hd0,6)&lt;br /&gt;
 chainloader    +1&lt;br /&gt;
&lt;br /&gt;
This assumes your first installed OS has its / (root) directory in ''/dev/sda6'' (as in my example above). Grub Legacy counts the first partition as 0, so hda6 becomes (hd0,5), or hard drive 1 (it starts counting at zero), partition 6). If you want to chainload a bootloader on a second hard drive, partition 4 (''/dev/sdb4''), you would specify (hd1,3), instead, for example.&lt;br /&gt;
&lt;br /&gt;
(I also put it an entry for my second planned OS, even though I haven't installed it yet. That will save me time later. For more examples, see [[#Changing_main_Grub_boot_menu_settings|this section]].)&lt;br /&gt;
&lt;br /&gt;
*Return the permissions so that only root can change or execute the files:&lt;br /&gt;
 sudo chmod 744 /media/GRUBpartition/boot/grub&lt;br /&gt;
 sudo chmod 744 /media/GRUBpartition/boot/grub/*&lt;br /&gt;
&lt;br /&gt;
=== Reinstall Grub to MBR ===&lt;br /&gt;
Now that the files are copied to the boot partition, we need to tell the Master Boot Record to look for the Grub Legacy files there. &amp;lt;!---&amp;gt;Do this step from your Ubuntu 9.04 OS command-line terminal.&amp;lt;---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Start Grub Legacy:&lt;br /&gt;
 sudo grub&lt;br /&gt;
 grub&amp;gt; find /boot/grub/stage1&lt;br /&gt;
&lt;br /&gt;
You should see the places there are grub configuration files.&lt;br /&gt;
 (hd0,2)&lt;br /&gt;
 (hd0,5)&lt;br /&gt;
&lt;br /&gt;
Note that (hd0,2) corresponds to the small Grub partition (''/dev/sda3''), according to the counting method outline above.&lt;br /&gt;
(hd0,5) corresponds to your first Linux OS (in the example ''/dev/sda6'').&lt;br /&gt;
&lt;br /&gt;
*Make the small Grub partition the loadable Grub location.&lt;br /&gt;
 grub&amp;gt; root (hd0,2)&lt;br /&gt;
 grub&amp;gt; setup (hd0)&lt;br /&gt;
 grub&amp;gt; quit&lt;br /&gt;
&lt;br /&gt;
=== Reinstall Grub2 in the (K)Ubuntu partition ===&lt;br /&gt;
*Start the command-line interface Terminal:&lt;br /&gt;
::Applications -&amp;gt; Accessories -&amp;gt; Terminal&lt;br /&gt;
&lt;br /&gt;
*Backup the Grub Legacy files in the /boot directory to a backup directory:&lt;br /&gt;
 sudo mv /boot/grub /boot/grublegacybackup&lt;br /&gt;
&lt;br /&gt;
*Remove and purge old configuration files and the Grub Legacy (aka grub) utility:&lt;br /&gt;
 sudo apt-get remove --purge grub grub-common&lt;br /&gt;
&lt;br /&gt;
*Install Grub 2 (aka grub-pc):&lt;br /&gt;
 sudo apt-get install grub-pc&lt;br /&gt;
&lt;br /&gt;
:::-&amp;gt; Configuring grub-pc: Linux command line: (''Leave blank'') -&amp;gt; OK&lt;br /&gt;
:::-&amp;gt; Configuring grub-pc: The grub-pc package is being upgraded... -&amp;gt; OK&lt;br /&gt;
:::-&amp;gt; Configuring grub-pc: GRUB install devices: ''/dev/sda6''&lt;br /&gt;
&lt;br /&gt;
This last step is extremely important. '''Do not''' tick the ''/dev/sda'' option (which installs GRUB2 into the Master Boot Record (MBR). '''Only''' tick the partition in which the (K)Ubuntu OS has been installed.&lt;br /&gt;
&lt;br /&gt;
Ignore the subsequent warnings that blocklists are UNRELIABLE and their use discouraged. This is not true, and for a multiple OS system with chainloaded bootloaders, it is desirable for GRUB 2 to use blocklists.&lt;br /&gt;
&lt;br /&gt;
*Reboot. Everything should now boot correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install your second Linux OS ==&lt;br /&gt;
Again I'm going to use (K)ubuntu for the example, although any OS can now be installed.&lt;br /&gt;
&lt;br /&gt;
*Reboot into an Ubuntu LiveCD (in this example a Server edition is used, to which a desktop can later be added).&lt;br /&gt;
:*Install Ubuntu server -&amp;gt; (the usual pleasantries about language and mice and keyboards and stuff)&lt;br /&gt;
&lt;br /&gt;
--&amp;gt; &amp;quot;Starting up the partitioner&amp;quot; -&amp;gt; Partition Disks: Manual&lt;br /&gt;
:*When you see the list of partitions, you will have to configure them manually.&lt;br /&gt;
::*Configure the swap partition.&lt;br /&gt;
:::*This shouldn't need configuring if you set it up properly with GParted.&lt;br /&gt;
:::*You can make sure that Use as: swap area  is set.&lt;br /&gt;
&lt;br /&gt;
::*Configure the root partition for the OS. Choose one of your logical partitions, which in my scheme is #7, is ext4, and has about 30 Gb.&lt;br /&gt;
:::*Use as: Ext4 journaling file system.&lt;br /&gt;
:::*Format the partition: Yes,  format it&lt;br /&gt;
:::*Mount point: / - the root file system&lt;br /&gt;
:::*Bootable flag: off&lt;br /&gt;
&lt;br /&gt;
::::Note: You should write down which device the / (root) partition is on. You will need this information later for Grub settings. On mine, it is ''/dev/sda7''.&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; Finish partitioning and write changes to disk. (It is OK to format the swap and / (root) partitions.)&lt;br /&gt;
-&amp;gt; &amp;quot;Installing the base system&amp;quot; -&amp;gt; ... -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;Installing Grub boot loader&amp;quot; -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:*&amp;quot;Install the Grub boot loader to the master boot record?&amp;quot;: NO&lt;br /&gt;
&lt;br /&gt;
:*&amp;quot;Install the Grub boot loader on a hard disk&amp;quot;: ''/dev/sda7''&lt;br /&gt;
&lt;br /&gt;
::Use whichever device that corresponds to your / (root) directory for this OS, of course.&lt;br /&gt;
::This ensures that the Grub bootloader is installed to this OS's partition, as well. &lt;br /&gt;
&lt;br /&gt;
*Finish installation and reboot. This system ought to be selected as the Second Ubuntu OS, obviously.&lt;br /&gt;
&lt;br /&gt;
*Note: Once you have booted into this OS, you can now edit the chainloaded [[Ubuntu:All#GRUB_boot_manager_settings|GRUB bootloader's local settings]] for this OS (at /boot/grub/menu.lst or /etc/default/grub) as usual, as you can for the first installed OS as well.)&lt;br /&gt;
&lt;br /&gt;
== Changing main Grub boot menu settings ==&lt;br /&gt;
*You can edit the '''local''' (chainloaded) Grub boot menu for each Linux OS that uses Grub Legacy (within the partition in which it is installed), if desired:&lt;br /&gt;
 sudo nano /boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
:::(kate or gedit can also be used instead of nano as the text editor.)&lt;br /&gt;
&lt;br /&gt;
*You can edit the '''local''' (chainloaded) Grub boot menu for each Linux OS that uses Grub2 (within the partition in which it is installed), if desired (see [[Ubuntu:All#Grub2|these instructions]]):&lt;br /&gt;
 sudo nano /etc/default/grub&lt;br /&gt;
 &amp;lt;!---&amp;gt;sudo update-grub&amp;lt;---&amp;gt;sudo grub-mkconfig --output=/boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
*To change the '''main''' Grub boot menu, you will have to change the menu.lst found on the small Grub boot partition.&lt;br /&gt;
:*If you are doing this from a Linux OS other than the first one you installed, again make a new directory for mounting:&lt;br /&gt;
 sudo mkdir /media/GRUBpartition&lt;br /&gt;
&lt;br /&gt;
:*Mount the directory&lt;br /&gt;
 sudo mount /dev/sda3 -t ext3 /media/GRUBpartition&lt;br /&gt;
&lt;br /&gt;
::Note: Use whatever the device name of your small Grub partition is (mine is ''/dev/sda3'')&lt;br /&gt;
&lt;br /&gt;
:*It may be necessary to give full read/write write permissions (optional).&lt;br /&gt;
 sudo chmod 777 /media/GRUBpartition/boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
:*Edit the menu.lst&lt;br /&gt;
 sudo nano /media/GRUBpartition/boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
:*Edit or add new chainloader entries:&lt;br /&gt;
&lt;br /&gt;
 ## ## End Default Options ##&lt;br /&gt;
 title  First (K)ubuntu OS (chainloader)&lt;br /&gt;
 rootnoverify	(hd0,5)&lt;br /&gt;
 chainloader	+1&lt;br /&gt;
&lt;br /&gt;
 title Second (K)ubuntu OS (chainloader)&lt;br /&gt;
 rootnoverify   (hd0,6)&lt;br /&gt;
 chainloader    +1&lt;br /&gt;
&lt;br /&gt;
 title Newest Whizbang OS on second hard drive, partition 4 (chainloader)&lt;br /&gt;
 rootnoverify   (hd1, 3)&lt;br /&gt;
 chainloader    +1&lt;br /&gt;
&lt;br /&gt;
 title Windows OS&lt;br /&gt;
 rootnoverify   (hd0,0)&lt;br /&gt;
 makeactive&lt;br /&gt;
 chainloader    +1&lt;br /&gt;
&lt;br /&gt;
::Grub starts counting from 0, so the first hard drive is number 0 and the first partition is also number 0. hda6 (which is hard drive 1, partition 6) becomes (hd0,5). If you want to chainload a bootloader on a second hard drive, partition 4 (''/dev/hdb4''), you would specify (hd1,3).&lt;br /&gt;
&lt;br /&gt;
::*For (K)Ubuntu 10.04 or later, the menu item for chainloading should be (if the OS is in ''/dev/sda7''):&lt;br /&gt;
 title Second (K)ubuntu OS (chainloader)&lt;br /&gt;
 rootnoverify   (hd0,6)&lt;br /&gt;
 kernel         /boot/grub/core.img&lt;br /&gt;
&amp;lt;!---&amp;gt;&lt;br /&gt;
:::or&lt;br /&gt;
&lt;br /&gt;
 title Second (K)ubuntu OS (chainloader)&lt;br /&gt;
 rootnoverify   (hd0,6)&lt;br /&gt;
 configfile /boot/grub/grub.cfg&lt;br /&gt;
&amp;lt;---&amp;gt;&lt;br /&gt;
:*Return the permissions so that only root can change or execute the files (optional):&lt;br /&gt;
 sudo chmod 744 /media/GRUBpartition/boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
=== Using UUIDs for the main Grub bootloader menu ===&lt;br /&gt;
Although newer bootloader configurations specify partitions using their UUID designation (instead of using the (hd0,x) designation), this is problematic for the primary Grub bootloader. In current OS installation paradigms, when an operating system is re-installed within a partition, the UUID of that partition is simultaneously changed by the installer. If the primary Grub bootloader were to reference a partition by its UUID instead of by its position on the drive, (i.e. (hd0,x)), the primary Grub bootloader would no longer be able to find the partition whenever a new operating system was installed within it (and its UUID simultaneously changed). &lt;br /&gt;
&lt;br /&gt;
For this reason, the primary Grub bootloader in the /boot partition should always use the ''rootnoverify (hd0,x)'' (instead of UUIDs) nomenclature to identify partitions.&lt;br /&gt;
&lt;br /&gt;
=== Add MacOSX entry ===&lt;br /&gt;
You can add a chainloader entry for a MAC OS that you might have installed on its own partition (installed with its own bootloader on the partition). Here's the entry for a MAC that is on partition ''/dev/sda9'' (equivalent to (hd0,8):&lt;br /&gt;
&lt;br /&gt;
 title Mac OS X&lt;br /&gt;
 root (hd0,8)&lt;br /&gt;
 makeactive&lt;br /&gt;
 chainloader +1&lt;br /&gt;
&lt;br /&gt;
== Re-installing Grub Legacy after Windows upgrade or re-installation ==&lt;br /&gt;
Windows installations, re-installations, and upgrades rewrite the Master Boot Record so that it points to the Windows bootloader only (instead of to the copy of Grub in the boot partition). The Master Boot Record must therefore be re-written so that it will again point to the copy of Grub stored in your boot partition.&lt;br /&gt;
&lt;br /&gt;
For this example, assume the boot partition is the ''/dev/sda3'' partition (which is known as (hd0,2) to Grub Legacy).&lt;br /&gt;
&lt;br /&gt;
You must use a version of a LiveCD that has Grub Legacy, i.e. [http://releases.ubuntu.com/9.04/ Kubuntu/Ubuntu 9.04 (Jaunty)] or earlier. Start the LiveCD and start a command-line terminal (Terminal in Ubuntu or Konsole in Kubuntu). From the command-line terminal start grub: &lt;br /&gt;
 sudo grub&lt;br /&gt;
&lt;br /&gt;
Then enter the commands to restore the Master Boot Record to point to the boot partition at ''/dev/sda3'':&lt;br /&gt;
 &amp;gt; root (hd0,2)&lt;br /&gt;
 &amp;gt; setup (hd0)&lt;br /&gt;
 &amp;gt; quit&lt;br /&gt;
&lt;br /&gt;
Then reboot. Your previously created Grub bootup-menu options should again appear.&lt;br /&gt;
&lt;br /&gt;
== Other chainloader options ==&lt;br /&gt;
In Grub Legacy it is possible to specify the root of the partition to be chainloaded using a UUID instead of the hd(0,x) notation. If you do not know the UUID for the partition to be chainloaded, it can be discovered using:&lt;br /&gt;
 sudo blkid&lt;br /&gt;
&lt;br /&gt;
Replace the&lt;br /&gt;
 root ''(hd0,6)''&lt;br /&gt;
&lt;br /&gt;
entry in the /boot/grub/menu.lst file (of the primary /boot partition)&lt;br /&gt;
&lt;br /&gt;
with&lt;br /&gt;
 uuid ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx''&lt;br /&gt;
&lt;br /&gt;
where  ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'' represents the actual UUID of the partition to be chainloaded.&lt;br /&gt;
&lt;br /&gt;
*Example:&lt;br /&gt;
::Replace the lines (in the /boot/grub/menu.lst file)&lt;br /&gt;
 root (hd0,9)&lt;br /&gt;
 chainloader +1&lt;br /&gt;
&lt;br /&gt;
::with the lines&lt;br /&gt;
 uuid ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx''&lt;br /&gt;
 chainloader +1&lt;br /&gt;
&lt;br /&gt;
This method works no matter which operating system is to be chainloaded. It will not work, however, for the operating system stored in (hd0,9) due to a quirk (see below).&lt;br /&gt;
&lt;br /&gt;
Will it work for bootable devices (such as USB flashdrives) that have a UUID? I don't know -- I haven't tried it yet!&lt;br /&gt;
&lt;br /&gt;
*This next method will only work when the operating system in the chainloaded partition uses Grub Legacy (and has a local /boot/grub/menu.lst stored within the partition):&lt;br /&gt;
::Replace the lines (in /boot/grub/menu.lst)&lt;br /&gt;
 root (hd0,9)&lt;br /&gt;
 configfile /boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
::with the lines&lt;br /&gt;
 uuid ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx''&lt;br /&gt;
 configfile /boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
== The (hd0,9) problem ==&lt;br /&gt;
&lt;br /&gt;
Grub Legacy has a quirk -- it does not like to chainload (hd0,9) using the command chainloader +1. (Something about 9 + 1 = 10 requiring an extra digit, or something.)&lt;br /&gt;
&lt;br /&gt;
Most people don't have more than 2 or 3 operating systems on their computer so it is usually not an issue. Here at Kubuntuguide, however, we chainload as many as 10 different OS on every machine (not including virtual machines).&lt;br /&gt;
&lt;br /&gt;
If the operating system in a chainloaded partition happens to use Grub Legacy (and therefore /boot/grub/menu.lst locally), the alternative to &lt;br /&gt;
 chainloader +1&lt;br /&gt;
&lt;br /&gt;
is to use the command&lt;br /&gt;
 configfile (hd0,9)/boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
(This can be used for any partition in which the chainloaded operating system uses Grub Legacy, not just (hd0,9). It will not work, however, if the chainloaded operating system uses Grub2.)&lt;br /&gt;
&lt;br /&gt;
This can alternatively be specified as&lt;br /&gt;
 rootnoverify (hd0,9)&lt;br /&gt;
 /boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
*It is also possible to chainload by specifying the UUID for the chainloaded partition (hd0,9):&lt;br /&gt;
 uuid ''xxxxx-xxxx-xxxx-xxxx-xxxxx''&lt;br /&gt;
 /boot/grub/menu.lst&lt;br /&gt;
&lt;br /&gt;
Of course, you must find out the UUID for (hd0,9) first:&lt;br /&gt;
 sudo blkid&lt;br /&gt;
&lt;br /&gt;
== Protecting Grub Legacy from cracking ==&lt;br /&gt;
* See [http://www.gnu.org/software/grub/manual/legacy/grub.html#Security this section of the Grub Manual] for important information on securing Grub Legacy.&lt;/div&gt;</description>
			<pubDate>Wed, 18 May 2011 15:26:45 GMT</pubDate>			<dc:creator>Perspectoff</dc:creator>			<comments>http://ubuntuguide.org/wiki/Talk:Lucid_Multiple_OS_Installation</comments>		</item>
	</channel>
</rss>