How to Load LinuxMint via ISO from Disk

<update 2015-01-13>
I originally wrote this for Linux Mint 15 but have used the same instruction to upgraded to Linux Mint 16, 17 and 17.1 without any problems. Just change the Mint release number and everything should work. In fact this should continue to work for susequent versions unless Linux Mint changes its ISO filesystem structure significantly.
</update 2015-01-13>

Instead of burning a CD or using a USB flash stick you can install Linux Mint 15 (and most other Linux distributions) from a hard disk. All you need is a small (about 2 GB) extra partition somewhere. This example is for 'Linux Mint 15 Mate 64'. The arguments you would use for other distribution might (and probably will be) different.

This method uses GRUB2 but I believe GRUB will also work with different syntax (not shown here).

You should edit the GRUB2 configruation rather than editing /boot/grub/grub.cfg. The configuration files are at /etc/grub.d/ and the file you want to edit is 40_custom.

There will probably be nothing in that file to begin with other than the first five lines below. Add the following lines after the header that was there:

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 "Linux Mint 15 Mate ISO" {
 loopback loop (hd1,msdos5)/barton/Downloads/linuxmint-15-mate-dvd-64bit.iso
 linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=/barton/Downloads/linuxmint-15-mate-dvd-64bit.iso noeject noprompt splash --
 initrd (loop)/casper/initrd.lz

The first five lines are what is usually in the file to start. Add the other five lines and then edit them to reflect your environment. You will need to edit the lines that start with 'loopback' and 'linux'. On my system I have a seperate partition for my /home directory. This makes it much easier when it comes time to upgrade as my home directory is safe and I can also put my ISO somewhere on that partition.


(hd1,msdos5) means the second hard disk in my system (I have two internal hard drives one with 320 GB and one with 500 GB). hd1 is the 500 GB drive which has five partitions. My home directory is on partition five (msdos5). In the /home directory is my home /home/barton/ and the 'Linux Mint ISO' is in the /home/barton/Downloads directory.
<update 2015-01-13>
If your disk is GPT (GUID Partition Table) rather than MSDOS you will need to use (hd1,gpt1) instead. If you run 'sudo parted -l' you will see either 'Partition Table: gpt' or 'Partition Table: msdos'.
</update 2015-01-13>

The ISO is only about one GB so you really don't need a very big partition. Unfortunatly you do need a partition other than the one where you will install the new OS. If you don't have a seperate partition for /home you can use 'parted' (sudo apt-get install parted) or some other utility to create a little partition, 2 GB is plenty.

The next line which starts with 'linux' only needs the section
changed to match where your ISO is, which is the same as the line above without the (h1,msdos5) part.

Once you have the new code added to the 40_custom file you need to update the grub.cfg which is probably in your /boot/grub directory. Run 'sudo grub-mkconfig --output=filename' or you can just do 'sudo grub-mkconfig >filename' as without the option the output goes to stdout. I would create a file somewhere other than /boot/grub so I could look at the output first and make sure it is OK.

Once you think the output of OK you can move it to the location of grub.cfg (usually at /boot/grub). You might want to make a backup of the original file (or not, up to you).

Now it is time to reboot your system.

Oh, you might want to backup anything you don't want to lose before you go any further.
Some things to think about backing up are things in /etc that you have customized, your /var/www, /var/mail and any database files if you have them, and anything else that is on the partition where the new OS is going that you don't want to lose. If your /home directory is on that partition you should probably back it up also.

When you reboot select the new 'Linux Mint 15 Mate ISO' entry which brings up the 'Live CD' from which you can install the new OS.

But, maybe it doesn't work.
You can use the GRUB edit facilities and command line to look to see if you have the drive and partition stuff correct. Using the 'c' option on the first GRUB menue you can look at the drive where you think your ISO is. Type ls (h1,msdos5), for example, and you should see the files and directories. If you type the full path to your ISO you should see it. If not then you got the drive and partition wrong. Use the 'ls' command and find your ISO using other disk and partition values. Remember the 'hd' starts at zero not one, so the first disk drive is 'hd0'. Partitions start at one not zero, so '(hd1,msdos1) means the second disk drive on the system and the first parition ('consistency is the hobgoblin of small minds').

If you still can't get the boot to work reboot your old OS and review everything and maybe do some 'google' searches. This all worked for me for the last three Linux Mint releases and two Ubuntu releases before that. Note that some the the arguments have changed on different releases. These arguments work for 'Linux Mint 15 Mate 64' <update 2015-01-13> 16, 17 and now 17.1 </update 2015-01-13>

I hope this helps. Any questions please email me.