September 12

Linux: How to Boot an 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 liveUSB tool such as uNetBootin or Ubuntu Live USB Creator.

1. Download the bootable disc image (ISO).

2. Install GRUB2 if it is not already installed. (If necessary, search for instructions on how to check if you have GRUB2 installed, and how to install it)

3. ADD a menu entry for your Ubuntu iso using the following examples: open the custom-entries in nano (sudo nano /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/UserName/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. To make the custom menu entries active, run “sudo update-grub”

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.

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.

By Julianbrelsford, Maluniu, 80_Calo, Teresa and 3 others

Copyright 2021. All rights reserved.

Posted September 12, 2013 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B