Child pages
  • CentOS 6.5 Dual Boot Guide
Skip to end of metadata
Go to start of metadata

Information

This is a walkthrough for setting up a dual boot Linux system for maintaining separate Sakai installations on one machine. This is useful for producing a final release deployment image. One partition is typically labeled "dev" with another named "live" for maintaining a stable release image. This guide focuses on the CentOS 6.5 operating system which is essentially a freeware version of Red Hat but should work for most other versions of Linux. The process will completely re-image your hard drive so make sure this machine has no important data on it.

  1. Boot with CentOS 6.5 LiveDVD

    1. Boot the computer using the CentOS LiveDVD.
    2. Select the "Install" option and choose hostname "sakai.dev".
  2. Configure partitions and install CentOS

    1. When prompted how to install to your hard drive choose to do a custom partition layout. Begin by deleting / removing all existing partitions. The following steps use sizes based on a 500G hard drive so sizes may be adjusted to suit your needs. Sizes that should not be adjusted will be mentioned where applicable.

      1. Create an ext4 partition of 500MB, mount to /boot and force-check to be primary partition. This is for the boot partition and size should not be adjusted.
      2. Create an LVM physical volume, fixed size of 204800, and force-check to be a primary partition.
      3. Select the previously made LVM physical volume and create an LVM volume group on SDA2 called “vg_sakai_dev” with physical extent of 4MB.
      4. Add a logical volume within the LVM group with file system “swap”, size 8188, and name “lv_swap”.
      5. Add a logical volume within the LVM group with file system “ext4”, size 98304, mount point “/”, and name “lv_root”.
      6. Add a logical volume within the LVM group with file system “ext4”, size 98304, mount point “/home”, and name “lv_home".
      7. Click next and write changes to disk.
    2. Check “Install boot loader on /dev/sda and edit label to “CentOS_dev”. Image copy will then start.
    3. Enable kdump 128MB then reboot the system.
    4. Repeat steps a through c without deleting the existing partitioning layout and using host name “sakai.live”. Create another boot partition and LVM physical volume using name “vg_sakai_live” within the existing free space that has not yet been partitioned.
  3. Configure the boot menu

    1. After rebooting the system allow the system to auto boot into the default operating system which will be the most recent one installed.
    2. Log in as root user from now on for all remaining setup steps.
      1. OPTIONAL: Open a terminal window and type “# yum update” and update all installed software. Reboot the system logging in as root.
    3. Browse to the exposed 500MB boot partition and right click to open a terminal window then open the grub.conf file for editing:

      # cd grub
      # gedit grub.conf &
    4. Copy all text below “hiddenmenu”. Open the following file and comment out the 1st title/menu option code with the copied code from the first file. Change timeout to 20.

    5. Reboot the system. While booting, trigger the boot menu by pressing “Enter” when prompted to do so. You should now be able to select which operating system to boot into.
  4. Server configuration settings

    Configuration Tips

    You will probably find it useful to relabel the drives to associate them with their respective CentOS images by including the words "live" and "dev". Renaming the computer icon on the desktop "sakai.live" or "sakai.dev" will also show you at first glance which image you are currently booted into.

    1. OPTIONAL: Enable and start the "MySQL" service during boot unless you plan on using the less-capable "hsqldb" as your database:

      # /sbin/chkconfig --add mysqld
      # /sbin/chkconfig mysqld on
      # /sbin/service mysqld start
    2. OPTIONAL: Enable the "vncserver" service if you want to administer remotely with a Virtual Network Client then add the following to "other ports" in the firewall configuration:

      # /sbin/chkconfig --add vncserver
      # /sbin/chkconfig vncserver on
      # /sbin/service vncserver start
      1. Add the following to "other ports" in the firewall configuration:
        • vnc port 5900 udp

        • vnc port 5900 tcp
    3. OPTIONAL: Enable and start the "sshd" service if you want to administer remotely via command line with an SSH client:

      # /sbin/chkconfig --add sshd
      # /sbin/chkconfig sshd on
      # /sbin/service sshd start
    4. OPTIONAL: Enable and start the "network" service if you wish to be able to share files across and network:

      # /sbin/chkconfig --add network
      # /sbin/chkconfig network on
      # /sbin/service network start
    5. OPTIONAL: Enable and start the "httpd" service if you wish to be able to use Sakai remotely:

      # /sbin/chkconfig --add httpd
      # /sbin/chkconfig httpd on
      # /sbin/service httpd start
      1. Add the following to "other ports" in the firewall configuration:
        • webcache port 8080 udp

        • webcache port 8080 tcp