[Techtalk] two ubuntu distros on one computer

Akkana Peck akkana at shallowsky.com
Wed Jan 31 18:16:41 UTC 2007


Wim De Smet writes:
> On 1/31/07, Roberta Gallini <regina.amazzone at gmail.com> wrote:
> >Let me know if I got it right:
> >
> >1) I put my live-installation CD into the drive.
> >2) when I repartition I put the /boot directory in a primary partition
> >on its own
> >3) now I start the installation and GRUB will be in a "reserved partition".
> >
> >In order to have the former installation working I think that I have
> >to copy its content into the new boot partition, but when do I do so?
> 
> In between step 2 and step 3. First you need to format your new boot
> (put ext2 or ext3 on it, can possibly do this from parted too), then
> mount both /boot partitions somewhere in your temporary filesystem
> (for instance make two directories /mnt/bootold and /mnt/bootnew) and
> copy over the contents (cp with the relevant switches, see the backup
> thread on here a while back). You'll need to edit your old
> installation's /etc/fstab to mount the new /boot. Make sure you edit
> your installations /etc/fstab, not the livecd's one.

Here are the steps listed out in more detail. You don't need to
worry about formatting explicitly, just make sure that box is
checked in the partitioner. (Er, I should mention that I've never
installed from the live CD because it can't handle my hardware;
I've always used the installer. But I assume the live CD is similar.)

First, from your current distro: type mount (no arguments) and
make a note of the devices where / and /home are mounted. Then:

1. Boot from the CD and start the install/partitioner.
2. Repartition and put /boot in a primary partition on its own
3. Tell the partitioner that that partition should be mounted on /boot.
4. When done with that partition, figure out which of the other
   partitions is /home (you can get that by typing "mount" in
   your old distro before you reboot to the live CD) and tell
   the partitioner to mount that as /home.
5. Finally done with the partitioner! (assuming you've done any
   resizing, etc. you need to do) -- continue with the installation.
   Let it update grub, etc.
6. Reboot into your new ubuntu. You will be booting from your new
   /boot, and the default choice (maybe the only choice) will be the
   newly installed OS.
7. Once you're up and everything is working, mount your old root
   partition -- I usually make a directory for each other
   installation, like /sarge or /dapper or /fc6 or whatever.
   Let's pretend you mount your old one as /dapper.
8. Copy your old kernel and associated files from the old /boot
   to the new one. This command will probably do it:
   cp /dapper/boot/*-2.6.* /boot/
9. Here's the only tricky step: edit /boot/grub/menu.lst, and in
   another window, view /dapper/boot/grub/menu.lst. Scroll down
   to near the end of the file where the boot lines are (most of
   the file is comments and configuration; you want the sections
   that start with lines like: title   Ubuntu, kernel 2.6.17-10-generic
   and include title, root, kernel, boot and maybe savedefault).
   Copy the sections you were using to boot your old system into the
   new menu.lst. You'll probably only need to copy the very first
   section, if you were always booting the default before.

-- 
    ...Akkana
    "Beginning GIMP: From Novice to Professional": http://gimpbook.com


More information about the Techtalk mailing list