Boot an Ubuntu ISO from Your Hard Drive

Booting an ISO on your hard drive is useful for testing new versions of Ubuntu without using up a CD. It is quicker than using a live USB tool such as UNetBootin or Ubuntu Live USB Creator.

Steps

  1. Download the bootable disc image from here.
  2. Install GRUB2 if it is not already installed. Type the following command into the terminal: sudo grub-install --root-directory=/media/grub2 /dev/sda.
  3. Add a menu entry for your Ubuntu ISO. Here are a few examples. Type the following command into the terminal: sudo gedit /etc/grub.d/40_custom and paste these menu entries to the end of the file. Replace /PATH-TO-UBUNTU-ISO/FILENAME.iso with the appropriate path. On my system it would be /home/myUserName/Downloads/lubuntu-natty-i386.iso
    =====
    menuentry "Ubuntu 10.10 Desktop ISO" {
    loopback loop /PATH-TO-UBUNTU-ISO/FILENAME.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/PATH-TO-UBUNTU-ISO/FILENAME.iso noeject noprompt splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Linux Mint 10 Gnome ISO" {
    loopback loop /FILEPATH/linuxmint10.iso
    linux (loop)/casper/vmlinuz
    file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=/FILEPATH/linuxmint10.iso noeject noprompt splash --
    initrd (loop)/casper/initrd.lz
    }
  4. Make make the custom menu entries active, run "sudo update-grub"



Tips

  • If you want to install a new version of Ubuntu, partition your hard drive first. Use Gparted or a similar tool. Assuming you are using an Ubuntu CD image, you will only need a 700mb partition to hold the image. If you have a liveUSB or liveCD, that's the easiest way to re-partition because you can't change or shrink a partition while it has your operating system (and re-partitioning tool) currently running on it.

Warnings

  • Installing boot-loaders and operating systems can destroy your data. The same applies when partitioning a hard drive. Make appropriate backups of any files or settings if they are on the hard drive(s) you are working with.
  • You can't format a partition that is currently in use (for the running operating system)
  • Installing GRUB2 will over-write your previous boot loader. So if GRUB2 does not detect your existing operating system, you may have no way to get back into it.

Related Articles

  • Make a Bootable Ubuntu with USB Drive Using UNetbootin
  • Install Web Apps in Lubuntu