Linux Dual Boot Installation

=Introduction= In the CIS lab, we need to be able to boot to either Windows XP or the Fedora OS you are planning to install. This can be done by CAREFULLY following the instructions listed on this wiki.

=Installation Procedure=

Pre-install Note
Observe and watch the actions of the GRUB boot menu that currently displays prior to loading of Windows XP. After installation of Fedora, we will reconfigure it using some basic Linux commands and utilities to revert to back to this state, a process that should get you familiar working with a Linux OS.

Download Fedora Live
Download Fedora 16 Live CD image file at http://download.fedoraproject.org/pub/fedora/linux/releases/16/Live/i686/Fedora-16-i686-Live-Desktop.iso.

Burn to CD/DVD
Next, burn the image file to a blank CD or DVD using media burning software. For more detailed instructions, see: http://docs.fedoraproject.org/en-US/Fedora/16/html/Installation_Quick_Start_Guide/Burn_the_image_file_to_CD.html

Boot to CD/DVD
Shortly after turning on a laptop, pressing the F12 key will allow the installer the choice to boot to different boot devices. Select CD/DVD/CD-RW Drive once you see the list of boot devices. The Fedora Live CD/DVD boots, and prompts you to start it, which you should do. Once it has been loaded, we want to permanently install Fedora to the hard drive by clicking activities and choosing the install to hard drive icon.

Fedora Installer
Select U.S. English as the appropriate keyboard for the system. Click, or navigate to and press enter on, next.

Select Basic Storage Devices when asked "What type of devices will your installation involve?" Hit next.

Insert picture - fed-device-type.png

We name this computer with by specifying the default hostname: localhost.localdomain. Press next.

The nearest city we select is New York (Eastern Time). Click next.

insert fed-timezone.png

Designate "password" as the Root Password. Confirm it. Press next. A weak password notice displays; Opt to use it anyway.

insert fed-root-password.png

We are asked "which installation would you like?" Select Replace Existing Linux System(s). IMPORTANT: Use the "Tab" key to highlight Review and modify partitioning layout in the bottom left of the Fedora Installer window. . Press "Spacebar" to check off this option. Press Next.

insert fedora-installer-installation.png

The Please Select A Device installer window displays. This is what your layout should look like:

insert fed-select-a-device.png.

Edit the lv_root logical volume. You have to use the tab key to navigate to the edit button.

insert fed-lvroot.png

Change the size to 5000 MB.

Edit the lv_home logical volume. Change the size to 10000 MB.

insert fed-lvhome.png

The partitioning layout should now look like this:

insert fed-select-a-device-after.png

Click Next. Write the changes to Disk.

Installing GRUB
Install boot loader on /dev/sda. Confirm this option is checked. Select Next.

insert fed-boot-loader-MBR.png

Fedora now installs. This will take approximately 5-10 minutes.

note to self: fedora install pictures are in liveuser on filesystem.

Finalize the installation. On the date and time screen, put a check box to "Synchronize date and time over the network. Select any of the servers.

For Create User, specify:

Full Name: UNH Manchester Username: cis520 (check off Add to Administrators group Password: cis520 Click Forward.

Do not send a profile. Click Finish.

We opt to install GRUB in the MBR, the master boot record.

=Post-Installation=

Boot Menu Configuration
After Fedora installation, the boot menu behavior is now different. We see that Linux has become the default loading OS, and that there is significantly less time to make an OS selection. The following procedure will setup the GRUB menu to how it was before, making Windows XP the default OS (it's the first OS listed in the boot menu), and having a 15 second selection period.

Preconfiguration note: after issuing a Sudo command, the password for the cis542 user is the password that you used to authenticate at the initial Fedora log in.

(insert windowsxp-grub.png here)
 * 1) Open a terminal by selecting 'Activities' -> 'Applications' -> 'Terminal'.
 * 2) Change directory to /etc/grub.d with the cd command.  A cd command changes the directory.
 * 3) * [unhm@localhost ~]$cd /etc/grub.d
 * 4) Copy the 40_custom file to 06_windowsxp with the cp command.  The cp command copies a file.  In this case, 40_custom is copied to 06_windowsxp, a new file we create in the process.
 * 5) * [unhm@localhost grub.d]$sudo cp 40_custom 06_windowsxp
 * 6) Change the directory to /boot/grub2. Then open the grub.cfg file using the Gedit utility.
 * 7) * [unhm@localhost grub.d]$cd /boot/grub2
 * 8) * [unhm@localhost grub2]$sudo gedit grub.cfg
 * 9) The grub.cfg file opens in a Gedit window. NOTE: Do NOT make any changes to this file.
 * 10) * Find the line ### BEGIN /etc/grub.d/30_os-prober ### 
 * 11) * Copy all the lines of code between ### BEGIN /etc/grub.d/30_os_prober ### and ### END /etc/grub.d/30_os-prober ###
 * 12) * Close the Gedit utility. Do not make/save any changes.
 * 13) Switch to the terminal window. Next, we want to open the recently created 06_windowsxp file located in the /etc/grub.d folder with Gedit. If gedit is displaying a warning in the terminal, type CTRL-C to break the operation, and return to the folder prompt.
 * 14) * [unhm@localhost grub2]$sudo gedit /etc/grub.d/06_windowsxp
 * 15) * On the first blank line, make a comment: # copied from /boot/grub/grub.cfg
 * 16) * Paste the text you copied from the grub.cfg file into the 06_windowsxp file below the comment you just made.
 * 17) * Save file. Close Gedit.
 * 1) Change directory to /etc/default.  Open the grub file using Gedit.
 * 2) * [unhm@localhost grub2]$cd /etc/default
 * 3) * [unhm@localhost default]$sudo gedit grub
 * 4) We need to ensure that we will always default to the 0th entry in the boot list. This is done by setting GRUB_DEFAULT to 0. We also need to set the GRUB_TIMEOUT to 15, which allows us 15 seconds to make an OS choice in the boot menu.
 * 5) * Make the two changes below:
 * 6) ** GRUB_TIMEOUT=15
 * 7) ** GRUB_DEFAULT=0
 * 8) * Save and close.

(insert grub-timeout-default.png here)


 * 1) The following group of steps involve navigating back to /etc/grub.d in order to remove executable bits on certain files in this folder.  We do this so that certain files will not be executed in the grub boot menu.  Type the ll command, which is the same as the Ls command supplied with an -l option to see a long listing of the directory contents. A green listing indicates the file is executable.  We need to disable the 30_os-prober file, as well as delete 06_windowsxp~ (a backup file).  The rm command will remove the backup file.  Finally, the last command tells GRUB to update its configuration.
 * 2) * [unhm@localhost default]$cd /etc/grub.d
 * 3) * [unhm@localhost grub.d]$ll
 * 4) * [unhm@localhost grub.d]$sudo rm 06_windowsxp~
 * 5) * type yes.
 * 6) * [unhm@localhost grub.d]$sudo chmod -x 30_os-prober
 * 7) * [unhm@localhost grub.d]$sudo grub2-mkconfig -o /boot/grub2/grub.cfg