Distro Systems Setup

From FreekiWiki
Jump to navigation Jump to search

Seems like most Distros will be using grub, so heres a guide for installing them alongside others on one hard drive.

The Partitions

First, delete all partitions on the drive. Then add partitions to the beginning of the disk, sda1-3 should be primary, and the rest logical. Decide in advance how many partitions to create, so that the final partition can be a swap space of 2-5 Gigabytes (not that you need that much, but it's easier to shrink them than grow them).

From online research it seems you have to use an extended partition in place of sda4 to allow for more partitions.

The Install

When installing always use the manual partitioning method. All decent Distros should have this option.

To keep it organized we should install first to sda1, then sda2, and so on so that its easier to look at. Also, don't format a partition unless you are going to use it for the root of the OS you are installing.

The Bootloader

If there isn't an option to install the booloader to a specific place well then maybe we shouldn't consider that distro, or install to a clean HD. In Ubuntu it can be kind of convoluted to find the bootloader option, but its there, you just need to hunt for it. Once you find it, if this is the first distro on the system, install to the MBR, or Master Boot Record (sda). For all consecutive distros install the grub to the partition you specified as /.

GRUB Config

The grub of the first distro on the hard drive will also point the the bootloaders of all the other distros. First create the file that will tell grub where to look:

touch /etc/grub.d/50_distrotest

and copy this into it:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "distro name" {
set root=(hd0,2)
chainloader (hd0,2)+1
}

Give the menu entry a nice name, and then tell it where to look. (hd0,2) is sda2, change the "2" to the partition number that the distro is installed to in both instances. In the above example selecting "distro name" in the grub menu will launch whatever bootloader is installed to sda2, which will load its appropriate OS.

Now just a few more things:

chmod -x /etc/grub.d/30_os-prober
chmod +x /etc/grub.d/50_distrotest
update-grub

I can't see why this wouldn't work on any Debian-based system. If you have problems, first scream. And then go to tech support and get the grub rescue cd. And then do a bunch of searches on google, it really helps.