Boot Linux ISOs directly from hard drive.

kisame

King of Heroes
The following tutorial helps you to boot linux ISOs without using pendrive/dvd/cd.
This tutorial can be followed using both EFI/BIOS setup.(Another tutorial specifically for EFI setup.)

Note:If anyone has easier method,please post.

Prerequisites

1.A fat32(preferable) partition(big enough to hold iso contents).
2.Grub2 installed to any device from which you can boot.
3.Search for isolinux.cfg or syslinux.cfg file in the iso contents.Copy first menuentry from it to a text file(e.g bt.txt).Be sure to include 'kernel' and 'append' part.
Save this file into root of the fat32 partition.This file will come in handy.
Note:Corresponding file for archlinux is /arch/boot/syslinux/archiso_sys64.cfg.Also,its format is different.So pay attention.

Steps

1.Extract iso contents to fat32 partition.(You should know the number of the partition.On my system,it is 8).
2.Boot into grub2,hit C for command line.It will be like this
3.Type the following commands.
(i)
This will show available hard drives and partitions.Output will be something like (hd0),(hd0,1),(hd0,2),......

(ii)
root=(hd0,8)
Here hd0 is my hard drive.8 corresponds to the partition.hd0 will correspond to the hard drive from which you booted into grub2.
Therefore,if you boot into grub2 using your pendrive,hd0 will correspond to your pendrive.Adjust accordingly.

(iii)
cat /bt.txt
This will list file contents so it is easier to type next command.

(iv)
linux /path/to/kernel options
/path/to/kernel corresponds to what was written against 'kernel' in bt.txt.
options corresponds to what was written against 'append' in 'bt.txt' excluding the 'initrd=/path/to/initrd' part. initrd must not be specified here.

(v)
initrd /path/to/initrd
This is what was written in 'append' part against 'initrd' but without '=' sign.

(vi)

All done.If everything went well,you will boot your linux iso.

List of ISOs I was able to boot

1.Archlinux/Archboot
2.Debian
3.Linux Mint/Ubuntu(Must use 'toram' kernel parameter to be able to install to same harddrive)
4.Parsix
5.Fedora
6.Backtrack
7.Linux Mint Debian Edition
8.GParted
9.AVG antivirus cd.
10.Netrunner
11.Tiny Core Linux

Unable to boot OpenSUSE using this method.

Conclusion:Most of the ISOs can be booted save some rare ones.

PS:If anyone has a way to boot windows 7 iso directly from hard drive(with BIOS setup),please post.
Post if you have any problems.
 
Last edited:
Top Bottom