Install any Linux distro directly from hard disk without burning any DVD

After you download any Linux distro from the internet, you have to burn it to a DVD, CD or a number of CDs to install it. That CD or DVD is generally used only once after which it lies unused , and worse, almost every Linux distro comes up with a new release every 6 months. So if you are in the habit of upgrading to every new version, you must have dozens of CDs lying at the bottom of your drawer. What a wastage of CDs! But with a little trick you can install any Linux directly from the hard disk without burning a single CD or DVD. The prerequisite of this trick is to have an operating system already installed on your computer. This is obvious because unless you are able to boot into your machine, you can't install anything; and we are not going to boot from the Linux disk because we aren't burning any. Here I'm going to focus on Microsoft Windows as the pre installed operating system.

Almost all Linux installers uses two files to boot the computer: a Linux kernel, and an initial root file system containing a minimal set of directories that is mounted prior to when the real root file system is available. This initial root file system is also called Ram disk (initrd). We will use these two files to boot our PC. Now lets get to the actual procedure.

1. The first thing you will have to do is copy the ISO file(s) of the Linux to your hard disk (ofcourse, you already have it). Make sure that the partition is FAT32 unless the distro you are installing has native NTFS read/write support. Some distros require you to copy the ISO file(s) to the root of the partition. If you keep it inside a folder, the setup might not be able to detect it.

2. Use Winrar to open the ISO file (you need not need to extract it). Now you will have to extract the two files I talked about earlier. The files are usually found inside a directory called isolinux. Different distros might place the files in different location; you just have to search for it, but it isn't hard to locate. These two files are also named differently in different distros. The files that you will need to search and extract are: (the kernel file is shown in green and the Ram disk is shown in red)

Fedora: vmlinuz and initrd.img

Suse: linux and initrd

Mandriva: vmlinuz and all.rdz

Ubuntu: vmlinuz and initrd.gz

Gentoo: gentoo and gentoo.igz

Knoppix: vmlinuz and initrd.img

Slackware: bzImage and initrd.img

Debian: vmlinuz and initrd.gz

3. After you have extracted the two files, copy them to c:\boot (you will need to create the folder "boot")

4. Now download the file called grub4dos from here. (Note: the new versions of grub4dos i.e. 0.4.2 and 0.4.3 does not work. So download the earlier version 0.4.1. Direct download link)  Extract the folder "boot" and the file "grldr" from the downloaded zip file. Inside the folder "boot" is another folder called "grub"; copy the folder "grub" to c:\boot. Copy the file "grldr" to c:\

5. Open c:\boot\grub\menu.lst and add these following lines. (Notice that hd0 refers to the first hard drive. If you have more than one hard drive, they will be named hd1, hd2 etc. Replace hd0 with the proper hard drive number incase you have windows installed on another drive.) Replace Linux_kernel and Ram_disk with the appropriate file names below. (the ones you copied to c:\boot)




title Install Linux
kernel (hd0,0)/boot/Linux_kernel
initrd (hd0,0)/boot/Ram_disk


6. Now you have to add grub to your c:\boot.ini file. You can open boot.ini by clicking on Start>Run and typing c:\boot.ini. If Windows does not allow the file to be modified, then go to Control Panel>System and click on the Advanced tab. Now under Startup and Recovery click Settings and then under System Startup click Edit. Open boot.ini and add this line in the end.

C:\grldr=”Start GRUB”

7. You are now ready to install Linux. Restart your PC and from the boot screen select "Start GRUB". This will load GRUB. From the grub screen select "Install Linux". During the setup you will be asked the source of installation. Choose hard disk and then select the hard drive partition where you copied the ISO files. Sometimes you might have to type the whole path of the partition and the exact name of the ISO. So write it down before you begin.

I have personally tested this with Fedora, Suse and Mandriva and it works without problem. I have no doubt it will work for others too.

Update: dougfractal adds that this is possible from Linux too. The method as he describes is:

From the terminal enter these commands

sudo mkdir /distro
sudo chmod `whoami`:`whoami`
cp MYLINUX.iso /distro/distro.iso

Now extract Linux_kernel & Ram_disk to /distro#

Open  /boot/grub/menu.lst

#ADD NEW ENTRY#
title Install Linux
root (hdX,X)
kernel /distro/Linux_kernel
initrd /distro/Ram_disk

Reboot and select "Install Linux" from grub.

Liked the article? Subscribe via RSS or via Email and get new articles delivered to your inbox everyday. It's free.

137 comments

Anonymous said...

Thank you, that was interesting and useful :-)

DB said...

Surely this only applies for a Linux-Windows Dual Boot system? Even then using a rewriteable disc is just as simple?

Karl L. Gechlik said...

Great tip. I am going to give this a shot in a few minutes. Thanks from your new friends @ AskTheAdmin.com

Bo said...

Or, if you're like the avarage computer user you have some old useless box sitting in the closet gathering dust. Install Ubuntu on it, load up tftp, rarpd, dhcpd, vsftpd and and start netbooting your installs.

Anonymous said...

From my experience this usually doesn't work with the now popular Live-CD distrobutions (PCLinuxOS, Ubuntu Desktop). I use a similar method for my Centos installs... and taking CD swapping out of the equation and adding the speed of hard drive data transfer... this method is pretty darn fast.

Miller said...

Personally, I favor the CD writing. While I condone the senseless wasting of CD's, CD-RW's I have no problem with. Also, I would think the delay inherent in simultaneously reading and writing to a drive, especially if it isn't very high-speed (7200 rpm or less), would make the process a little more time consuming.

However, this method is fantastic for a system with two or more hard drives in it. The data transmission speeds would be much better than even CD to HDD. I definately would try this out.

Anonymous said...

Miller, it's condemn, not condone. Even then, condoning the senseless waste of CD-RWs is silly. And it's spelled 'definitely'. Really helps with credibility.

Paul said...

What if you have a Window's Vista partition? Window's Vista creates a boot dir under the root of C:\. I am curious if this Linux install method would have technical difficulties or conflicts with an already occurring Vista boot dir.

Anonymous said...

Get the minimal CD of your distribution and put it on a usb disk. Boot from there and do a netinstall.

Eugeniu said...

"almost every Linux distro comes up with a new release every 6 months. So if you are in the habit of upgrading to every new version, you must have dozens of CDs lying at the bottom of your drawer"

Actually, I think most people just upgrade from online repositories.

Anonymous said...

Gentoo, and some other distros rarely put out new releases. Plus, when installing gentoo, you just create a new partition and chroot.

Yum (and I'd assume apt-get) let you set the root path to install to. Just about every distro uses net-install these days too.

So, if you have room for another root partition, you can usually find a way to install a distribution without even downloading the CD.

phatsphere said...

i always press "upgrade" in my ubuntu box when a new release is in the wild. this requires nothing except some bandwith and time ...
but anyway, nice hack ;)

Explodingpickle.org said...

"Gentoo, and some other distros rarely put out new releases. Plus, when installing gentoo, you just create a new partition and chroot."

Yeah, and Gentoo takes 10 hours to install because it compiles everything from source.

russoz said...

Nice tip!!!

Very ingenious :-) I never heard of grub4ds before, but that makes life way simpler! :-)

Thanks,
Alexei

... said...

Would you provide the info for Damn Small Linux and FreeNAS? What name is kernel file and the Ram disk this two distro used?

Is it possible have a similar common way to install them from linux?

Anonymous said...

UNetbootin at http://lubi.sourceforge.net/unetbootin.html does the job for Ubuntu and Debian automatically, for Windows and Linux

Anonymous said...

Problem with step #4
Now download the file called grub4dos from here. Extract the folder "boot" and the file "grldr"
from the downloaded zip file.

There is no folder called "boot" in the downloaded zip file.

Anonymous said...

grub_for_dos-0.4.1 which includes the boot folder can be downloaded at:
http://grub4dos.freespaces.com/

dougfractal said...

This is great.
I thought I'd try this out from linux.

sudo mkdir /distro
sudo chmod `whoami`:`whoami`
cp MYLINUX.iso /distro/distro.iso
#EXTRACT Linux_kernel & Ram_disk TO /distro#

sudo nano /boot/grub/menu.lst

#ADD NEW ENTRY#
title Install Linux
root (hdX,X)
kernel /distro/Linux_kernel
initrd /distro/Ram_disk

Reboot and select "Install Linux" from grub.

doug said...

sudo chmod `whoami`:`whoami`
whoops!

sudo chown `whoami`:`whoami`

home owner said...

Great post and thanks for writing!

mtnbluet said...

Please give directions for Xandros.

Thanks,
Cathy S

wwbein said...

This has another appliction: There are a number of sub-notebooks out there
which do not have a cd drive, for example the Acer Travelmate C 100, the IBM Thinkpad X series, or the Toschiba Protege. Some of these do not boot some distributions from an external
CD drive. For example, the Acer Travelmate C 100 will not boot off an exteral CD for Fedora. So then the only option used to be a network install. This procesdure is much easier. Thank you!

Kaushik said...

@Paul: I don't have Windows Vista installed right now on my system so I have no way of telling. But I think the same can be achieved by adding the entries through BCDEdit.

@... (couldn't find a better name, did ya? ;))

I will see for DamnSmall Linux and let you know. And yup its possible from Linux too. See dougfractal's comment.

@dougfractal:

Thanks for that!

@mtnbluet: I will let you know. I have to search for my Xandros CD. :)

Shiben Bhattacharjee said...

Hey this is nice

ChevronX said...

Wubi is a GUI system for installing ubuntu based systems in windows.

Dietrich said...

Gentoo doesn't really make releases as we know them from Debian, Fedora, etc. The releases only consist of an installation CD, Live CD and stage3 tarballs which you need to install Gentoo. You install a Gentoo installation from scratch only once, after that you never need to download a "release" again (and thus certainly do not need to "spend 10 hours" every time). When connected to the Internet and using Portage you can keep your system up-to-date many years after you made the initial install. Every aspect of the system is reflected in a package, even the base stuff (baselayout package).

Anonymous said...

simply use a rewritable media?

David said...

For Ubuntu Feisty, you need the following vmlinuz and initrd.gz for installing from iso:

http://archive.ubuntu.com/ubuntu/dists/feisty/main/installer-i386/current/images/hd-media/

Ed Frome said...

If you burn a cdrom for every distro you download, and install from disk only once, that burn is not wasted if you pass the disk on to a friend or stranger.

Kaushik said...

@mtnbluet: Sorry, I couldn't find the files in Xandros. The files on the CD are a bit differnt, not what we typically find on a Linux CD. Though there is one vmlinux but its empty and so is initrd. I presume those get created when the installation process starts. I will give you 3 alternatives.

1. Find someone who already have Xandros running and copy vmlinuz and initrd from /boot
2. Use a USB drive to boot from it.
3. Xandros allows you to boot from a floppy too. You can use that.

Anonymous said...

for ubuntu, installing from hard drive using grub usually need to download a special kernel file and initrd.img from their website, do you think using kernel file and initrd.img picked out from iso image as your description in this article also work?

Kaushik said...

Its not any special kernel file but the same one present on the disc. It will work.

Anonymous said...

For Ubuntu, you cannot use initrd.gz file extracted from iso file for hard drive installation, that's why Ubuntu provide a special initrd.gz for user's download.

The kernel file is same.

Anonymous said...

JFYI, installign Debian from Windows is easy via goodbye-microsoft.com

Антон Баранов said...

Hello. I do not have your permission, but issued a translation of your post on the Russian language at my blog. Translation is available here: http://demonjaka.blogspot.com/2007/09/blog-post_07.html

Kaushik said...

@Антон Баранов:

No problem. :)

Anonymous said...

There used to be a utility 'loadlin' which came with redhat in old times. maybe it can be used instread of grub.

Gangsar said...

I've tried this to install Linux Mint from harddisk.
But I got an error message like this:
Error 17: File not found
Booting 'find /boot/grub/menu.lst'
Error 20: Select cylinder exceeds maximum supported by BIOS

Something wrong?

Kaushik said...

Are you sure the file /boot/grub/menu.lst is actually there? Have you placed grldr on c:\?

Gangsar said...

I have copied grldr on c:\
and my menu.lst is on c:\boot\grub\ folder
Or maybe it just not work on Linux Mint?

Anonymous said...

Brilliant! This is exactly what I was looking for. Thanks

Oscar said...

This article has even higher potential, not only saves DVDs for Linux updates, but also allows to install distros from scratch in machines with no DVD drive AND BOOT THEM FROM XP. I did as the article reads, installed Fedora in a HD not used by XP, selecting "No boot" during installation. Then deleted unwanted titles in menu.lst and added a new "Title Boot Fedora" with same lines described in the article BUT POINTING TO THE NEW vmlinuz and initrd.img that Fedora created in the installation. Now I can boot into XP (default) or GRUB, and then choose either to boot Fedora or install it. Note that GrubForDos version 0.4.1 works as described, but version 0.4.2 does not, has different files. Note that the vmlinuz and initrd created by Fedora in the boot area have long names including several dots that may need renaming to work. You may need to install a driver in XP that allows you read Ext2fs partitions and rename files. It can be found in http://www.fs-driver.org/

Kaushik said...

@Oscar:

Thanks for the valuable inputs. Indeed, this method has a much higher potential.

Does Grub4Dos ver 0.4.2 not work? I didn't know that. Actually, I tried this stuff almost a year ago. Probably the version I used then was 0.4.1. I have been using that ever since.

DJ Gentoo said...

I'm amazed that I missed this. Thanks for pointing out the obvious (in a good way) for me, this is just what I've been looking for.
On a related note: Are you sure it works on openSUSE? It keeps track of package repositories on the CDs using their labels, and... Well, there's always the network install, but what if you want to install it right off the image? It shouldn't work, but if you say you've tested it, I'll take your word for it.

WebGk.com said...

I have always used "upgrade" from my ubuntu box. Eats up some bandwith and my valuable time.
This is a great alternate you have giver here. Thanks for sharing with all of us.

Dnmt said...

how i should write path to file in the grub?
my suse cdimage (su.iso) is on C:\ disk.
when i'm selecting hdd as a source for installation, his asking me for path to the file and when I write C:\su.iso or su.iso,su,C:\su..., -grub cant find em. =\

dnmt said...

i have tried to put iso file on fat32 partition, tried to extract whole iso in folder and that did not helped.

Kaushik said...

@dnmt:

Linux does not understand drive c,d etc. Your C drive is most likely to be called sda1. So the path name will be

/sda1/su.iso

Dins' said...

Hi, Its a great Guide... Thanks.

I've Successfully did it a few days ago, it worked good with the Win Xp, but on vista it is giving error as there is no boot.ini to add the entry "C:\grldr="Start Linux", and can't create "boot" folder, as it is already there but with no access to it, though I copied the required files to the "boot" folder from Command Line,
and also I Tried to add the entry "C:\grldr="Start Linux", with the bcdedit.exe but avail no result ... it says ".../Windows/system32/hal.dll missing"

If you have also faced this and got the solution please Let me know the Solution...

Anonymous said...

how to do it with free bsd? bsd?

飞扬跋扈 said...

I do not agree with! You can not do this with the Gentoo distro!

peter said...

hi,
the "/boot" folder is no longer available from grub4dos 0.4.2 and up.
update of this guide would be appreciated ... I will use the old G4D, probably works fine, thanks!

Kaushik said...

Guide updated with working links.

Thanks.

marshieparshie said...

to do this with debian images, do not use the kernel and ram disk files from the ISO. these support installs from cds or the internet only. the files you need can be found on debian mirrors in:
/dists/*release*/main/installer-*architecture*/*version*/..
   ..images/hd-media/gtk/

the files i needed were located in:
http://debian.osuosl.org/debian/dists/Debian4.0r1/main/..
   ..installer-i386/current/images/hd-media/gtk/
for the latest version of etch for i386

Kaushik said...

@marshieparshie:

Thanks for that. I didn't have time and the iso files of all the distros to test it.

nikoz said...

that's how I did with sodilinux (based on ubuntu 7.04)

create a fat16 partition (hd0,1) /dev/hda1
mkdir /media/fat16
mount /dev/hda1 /media/fat16
mkdir /cdrom
mount ubuntu.iso /cdrom
cp -av /cdrom/* /media/fat16

modify /boot/grub/menu.lst adding:

################################################
title setup ubuntu
root (hd0,1) #second partition
kernel (hd0,1)/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper
initrd (hd0,1)/casper/initrd.g
######################################

umount /cdrom
umount /media/fat16

reboot

at boot select "setup ubuntu"


NiKoZ

Rascalico said...

I've got to the stage just after i choose Install Linux and it says stuff about each of these
kernel (hd0,0)/boot/vmlinuz
initrd (hd0,0)/boot/initrd.img
in a few lines but then just freezes with the cursor flashing - is this part suppost to take a while or has something gone wrong? Any ideas?

Rascalico said...

... more info:

Here's what i'm getting after I choose 'Install Linux':

kernel (hd0,0)/boot/vmlinuz
[Linux-bzImage, setup=0x1e00, size=0x1e3354]
initrd (hd0,0)/boot/initrd.img
[Linux-initrd@0x7976000, 0x5695c0 bytes]

(is this usual)

forgive me im reading my atrocious writing, some 0s may be os, 1s may be ls or Is and es may be cs but the rest it what im getting defo.

this remains on screen but all i get is a cursor flashing underneath and nothing else happens! help, please i've been trying to get this installed for ages!!

Iam intending to use Fedora7-i386 DVD iso which i have placed both in the root of on my windows C drive and the F drive which i want to install linux onto.

I have just converted both these from NTFS to FAT32 using partion magic.

But I haven't even been asked where the source file is and where i want to instll linux, it's just frozen at the point I mentioned.

I thought i had done everything correctly - i extracted both those files into c:\boot, extracted that other one into c:, extracted the grub folder from within the boot dir in the zip into the boot dir in c, edited the menu.lst, then edited the boot.ini.

Any thoughts?

Kaushik said...

@Rascalico:

The first thing is: you can't install linux on your F drive. Linux can't be installed on FAT32 or NTFS. It has it's own file system. To install linux you need to have free space on your hard disk - space free of any partition. During installation process you should "tell" the setup program to use the free space. If you don't have much experience about installing linux, you could try installing it inside a virtual machine. Search on Google.

Regarding to your actual problem, I don't remember exactly whether it shows such information. Usually, as soon as you choose "Install Linux", it displays some mesage like "kernel found" and then "uncompressing kernel image" etc. After a few more messages (different files loading etc), the graphical interface takes over.

Check whether the files vmlinuz and initrd.img are inside c:\boot.

Rascalico said...

^ (thanks i've merged my partitions now)

Still no luck though, the files are defo. in c:\boot, i tried a few different things but same thing is happening :-(

laks said...

If you want to do this for a system running Windows Me. Here is what worked for me.

+ boot Windows in safe mode
+ C>: bootlace 0x80

follow the steps mentioned earlier - of copying Grub and menu.lst to C: . You will be on your way to booting from the distro on the hard disk.

the following tutorial for grub is very useful.
http://grub4dos.sourceforge.net/wiki/index.php/Grub4dos_tutorial

In my case - Ubuntu7.10 could not recognize my hard disk - (my systems is a Dell Inspiron 8100), so I had to switch to Fedora.

Dulwithe said...

Thanks for your tutorial! It was AWESOME and did exactly what I needed.

Now I have PCLinuxOS installed dual-boot with WinXP on my Toshiba R100. Suspend to disk works with PCLOS, and the recent updates to PCLOS's printer databases have allowed me to enable my Canon Pixus i560, i4200, and network Brother MFC-7820N.

AWESOME!!! Thanks again.

Dulwithe said...

PS - For anyone who is interested, I didn't reformat my drive with a FAT32 partition for the ISO file before installing. I un-archived the .iso files and saved them on a USB card reader (1Gb SD card).

So, I suppose I could easily use this same technique for install to a USB memory stick.

AWESOME!!!

Kaushik said...

@Dulwithe:

I'm happy to learn that my tutorial worked for you. And yes, most new linux distros has inbuilt NTFS support and can be booted from the USB drive too.

need help.......amin said...

does the c:/ refer ot your pendrive or hardrive and i hav a problem for the hd0 number changing..i hav 2 hardrive and my windows is at hd 2 and i want to install ubuntu on hardrive 1...can somebody do it for me?? thanks :)

need help.......amin said...

and what does the distro refer to?


title Install Linux
root (hdX,X)
kernel /distro/Linux_kernel
initrd /distro/Ram_disk

Kaushik said...

@amin:

C:\ refers to the c drive of your hard disk.

Since you have Windows installed on your second HDD, you will have to copy kernel, ramdisk, grub etc files to the second HDD.

(hd0,0) will change to (hd1,0) assuming the 2nd HDD is assigned 2nd in the BIOS configuration.

Copy the iso files to whichever HDD you want. Just rememeber to mention the correct path when it asks you to point to the iso file. HDD1 will be /dev/hda and HDD2 will be /dev/hdb

What is distro?
http://en.wikipedia.org/wiki/Distro

cristo said...

I own an obsolete ThinkPad 560x laptop without CD or FDD. I find your method perfect for giving a new life to my old IBM. But I realized I have no boot.ini file on my system (Win98SE). How to proceede then?

Kaushik said...

@cristo:

This won't work with Win98. Win98 doesn't have boot.ini file or any boot manager. Since both the CD drive and the FDD are broken, the only option you have got is to install Windows XP or Linux from a USB drive, provided the BIOS supports booting from USB. Another way is to use network install. If you can network your laptop to a PC, you can install any OS into your laptop.

Anonymous said...

Could I boot grub from my USB device and how ???

Problem: I don't see list of options when I'm starting GRUB which is allocated on ntfs C: partition.

Kaushik said...

^^ We aren't using Grub to boot the PC. The PC is booted using Windows bootloader. After the windows is booted the control is transfered to grub to load the Linux installer. So this process will work only if you have some mechanism to boot your PC - either through Windows or Linux or even an USB drive provided that you have the proper booting files on the USB drive.

Anonymous said...

You are right. I use Windows XP SP2.
But I was interesting how could I load grub from USB. And why data from menu.lst are not displayed when I load grub from ntfs ?

Kaushik said...

You can load grub from USB. Copy all the grub files on to the USB stick and add the line to the boot.ini file.

If you are unable to load GRUB from ntfs partition then maybe the distro you are trying doesn't have NTFS support. In that case you have use Fat32.

Anonymous said...

What shoud I write in C:\boot.ini in case of USB ?
I can't convert my NTFS file system to FAT32.

Kaushik said...

Find out what letter Windows assign to the USB drive by plugging it to your PC. Then replace "C" in C:\grldr=”Start GRUB” with the drive letter. You should have GRUB on the USB drive.

Since the linux you are trying can't recognize ntfs you will need to have atleast one fat32 partition where you should place the iso file. There is no way to convert ntfs to fat32 without reformatting.

Anonymous said...

Had you tried it ?
I've tried change letter C: and it didn't work. Grub even didn't load.
Probably I should write smth like "sd(0)..." or "hd(1).." (because it is SATA HDD, connected via USB). I don't know.

Anonymous said...

Kaushik,
Have you tried this:

http://www.google.com/search?
sourceid=navclient&ie=UTF-8&rls=SKPB,SKPB:2008-06,SKPB:en&q=Confert+NTFS+to+FAT32

???
:)))

Kaushik said...

Windows does not allow converting ntfs to fat32 natively. But of course, there are tools like Partition Magic that can do that and even resizing and merging of partitions without losing data. But there is a risk factor involved and if the process fails all your data will be lost. Even Partition Magic displays this disclaimer. I wouldn't advise you to do that because there is a high chance of screwing up your data.

For your main problem, does your BIOS support booting from USB? First find that out. And names such hda, hd0 are for linux. the grub should be loaded by boot.ini file which does not recognise such names. You have to give the usual windows letter names.

Anonymous said...

Thanks, I've tried it. But it doesn't work :(((.
My BIOS supports booting from USB.
I couldn't do something with my main HDD because it is on my workplace. I don't want to damage my Windows XP system too. I'll try smth else.

cracks.host.sk said...

If you burn a cdrom for every distro you download, and install from disk only once, that burn is not wasted if you pass the disk on to a friend or stranger.

Regards,
http://cracks.host.sk

Anonymous said...

I followed your instructions exactly.. But I still get a error said: unknown command...

the only difference is the version of grub4dos.. I am using grub4dos v0.4.3 right now.. I just rename the grub4dos folder to grub because i can't find the grub folder which you mentioned above..

so, about this new version, what should i do?

I am really looking forward your help..

Kaushik said...

grub4dos v0.4.3 does not work. There is nothing you can do. Use version 0.4.1

Swathy said...

how to deal with the command line interface which starts up when one chooses start GRUB as the choice for installing LINUX? What commands are used for installation?

Anonymous said...

What happens if you want to partition the whole drive?

Myself said...

I tried using this to install Minime PCLinuxOS 2008. I got to the windows boot part, but when I go to GRUB, it says "missing MBR-helper."

VijayR said...

URGENT HELP REQ.
STUCK IN INSTALLATION.

I did all steps and the grub started. I selected the "Install Linux".

then the ubuntu installer started.
I finished the region and keyboard selection.

next, it asks for the ubuntu image from my cd rom.
The option there only has install from cd rom (I think so).
and since my ubuntu iso is not in cdrom, I have to abort the installation.

It gave an option to run the ash shell. but I did not know what to do from there.

please help.

Knight said...

I also got the same problem, i ran into the ash shell. nothing to do from there :/

Malachias said...

My favorite way has been to make an additional 750 megabyte partition on the hard-drive, and format it as ext3 - have it in /mnt/fakecd. Then do the following:

$ mkdir /tmp/install
$ sudo mount -o loop /path/to/cd/iso /tmp/install
$ sudo cp * /tmp/install /mnt/fakecd
$ sudo cp .* /tmp/install /mnt/fakecd

Now edit your /boot/grub/menu.lst to add an entry:
title Install Linux
root (hd0,1)
kernel /casper/vmlinuz
initrd /casper/initrd.gz

Note: this is for an *Ubuntu live-cd. For other distributions, your grub entry may be different, depending on where vmlinuz and initrd.gz are located. Also note that "root" will depend on what your fakecd partition is. Mine's /dev/sda2, hence (hd0,1).

Now when you reboot, select Install Linux and it'll be exactly like running it off the CD, except a fair bit faster since you're reading from the HD.

N said...

Hi,

I am trying to do this from within PCLOS to install OpenSUSE. It crashes:

:Failed to detect CD drive !

I have grub's menu.lst editted correctly. Tried it with the iso fully extracted, as well as only linux and initrd extracted + full iso file copied to my dedicated 1.3 Gb drive for HDD version of LiveCD.

The only distro that successfully works so far is PCLOS.

Any help? You can mail me direct @

dulwithe [at] myrealbox [dot] com

- Dulwithe

Kaushik said...

@Dulwithe: Why does the installation try to detect the CD drive? Are you sure you haven't mixed up the paths of the CD drive and the hard drive?

You should not extract the ISO file but copy it intact to the hard drive. And are you trying to install linux from a live CD? I'm not sure whether that is possible.

N said...

Thanks for your response, Kaushik.

I don't know why certain distros crash with the same type of hdd "LiveCD" method. I've tried extracting just the kernel and RAM disk files, and put them with the ISO file on the "LiveCD" partition.

I have had mixed results. I got Mepis to work yesterday. Some distros don't work with this method, others do. I have NO idea why.

My guess with the SUSE distro is that its kernel or RAM disk is directed to look exactly for a cd drive and boot from there. If no cd drive is found, "reboot in 120 sec..." Apparently suse 10 worked this way, but suse 11 doesn't (but I don't want to try and install a year-old distro).

. D.

Kaushik said...

Apparently, Live CDs are different from normal installation CDs. Live CDs are programmed to look for the Cd drive and load from it. I suggest you get a normal cd and try that, or you can continue with your experiments. :)

abhi said...

hi,
I got preinstalled Vista on my laptop. I removed all the partitions by installing
Ubuntu 8.04 making some partitions and keeping other space free for XP. But when I am installing XP from the bootable CD it says hard disk not found. Please help me how to get rid of this problem.

abhi

Kaushik said...

@abhi: Installing Windows after Linux is always going to create problems. Anyway, try this:

If Winxp can't detect your hard drive, then you will have to boot from a Win98 CD. If you don't have the Win98 disk then download the boot disk image from here and burn it to a CD.

Now boot from the disk, and at the commad prompt issue this command:

fdisk /mbr

This will rewrite the MBR and you can now load windows. After you have finished installing WinXP, install ubuntu's bootloader to dual boot WinXP and Ubuntu.

Vasu said...

Hi Malachias,
Very good to hear a nice tip from you, and especially booting Ubuntu live cd from hard disk. I tried the way you mentioned above but, it didn’t work. At the copy commands,"$ sudo cp * /tmp/install /mnt/fakecd
$ sudo cp .* /tmp/install /mnt/fakecd
" I got “directories ignored” error message. I thought that may be 'coz of root security and I manually copied the total iso files in to 750MB new partion. Then I rebooted my system and got into ubuntu installation and I found the same error "mount CD failed. no device exist". Then I opted for command line. I found "cdrom" folder in '/' directory, and I thought it is place where cd drive is mounted and I mounted my 750MB drive to '/cdrom' and tried to install. Now, our 750MB drive works as a CD drive. Happy to get what we desire, but when I format swap partion it shows "device is use" error message. And here i got struck. And I also found that 750MB drive must be ext3/ext2/cdfs file system type. 'coz at the time of installation kernel cant mount a FAT file system.

Any help is appreciated.

Porn Girlz said...

That's what I'm looking for. Thanks for saving my life : )

Malachias said...

Vasu,

I'm very sorry, that was a typo on my part. Instead of

$ sudo cp * /tmp/install /mnt/fakecd
$ sudo cp .* /tmp/install /mnt/fakecd

I meant


$ sudo cp -R /tmp/install/* /mnt/fakecd
$ sudo cp -R /tmp/install/.* /mnt/fakecd

Basically the idea is to get all the files into the fakecd partition.

Hope that helps!

-Mala

malachias said...

Erk, my bad again - don't do the .* one as that'll catch everything in ../ as well =P Replace the second line with
$ sudo cp -R /tmp/install/.disk /mnt/fakecd

Sorry again >_<

--mala

mldarshana said...

Is it possible to for me to install Linux on Extended partition ?

If so my other question is ......

I am going to install Linux Mint on Extended partition.

What is the correct entry for Step 5, that is when i am going to edit the menu.LST ?

PS: I have one hard drive and i have installed Win XP in primary partition and i have 4 logical drives in extended partition.

Thanks in Advance

Kaushik said...

@mldarshana: You can install Linux in the extended partition. No problem with that. I have always used the extended partition for linux.

The step5 will be the same. No change, since you have only 1 HDD. So it will look something like this:

title Install Linux
kernel (hd0,0)/boot/vmlinuz
initrd (hd0,0)/boot/initrd.img

Make sure you use the correct file names.

blossa said...

I think I have followed your instructions... I have two HDs:
*One that has one big FAT32 partition(dev/hda1). On this one I have the iso-file (called su.iso), boot directory with grub and the original windows installation
*The other hd (dev/hdc1) is empty and here is where I plan to install Linux (gentoo).

When I boot and have selected to install linux i get to a point where I get this message:
!!Could not mount specified ROOT, try again.
!!Could not find the root block device in .

Any suggestions about what I have missed?

Teh iso that I am using is the "Gentoo 2008.0 Minimal CD/InstallCD" for x86 found at http://www.gentoo.org/main/en/where.xml

Thanks in advance! / Anders

Anonymous said...

I have copied disk image image.nrg to partion 'H' having fat32 file system and and my 'C' drive is having ntfs file system which is used by windows operating system.
I extracted the file vmlinuz & initrd to c:\boot
also the grub. Also added the lines with exact replacement to menu.lst under the grub.
I restarted the PC and selected "Install Grub" option, it shows...
Booting 'Install Linux'
kernel (hd0,0)/boot/vmlinuz
error 14: Invalid or unsupported executable format

how to get out of this problem.....any suggestions...

Kaushik said...

You can't use .nrg format. You need ISO file. Convert it to ISO.

Anonymous said...

thanks to reply kaushik....
as i was suspecting the same
but can it be converted to iso format......

Anonymous said...

how to convert nrg to iso format ?????


thanks in advance....

Anonymous said...

I have converted .nrg format image to .iso format but it is still showing the following error.....

Booting 'Install Linux'
kernel (hd0,0)/boot/vmlinuz
error 14: Invalid or unsupported executable format
Press any key to continue.........

now what to do ....i'm not getting the things causing to happen it....
how to resolve this error...any suggerstion???

Anonymous said...

I have converted .nrg format image to .iso format but it is still showing the following error.....

Booting 'Install Linux'
kernel (hd0,0)/boot/vmlinuz
error 14: Invalid or unsupported executable format
Press any key to continue.........

now what to do ....i'm not getting the things causing to happen it....
how to resolve this error...any suggestion ???

Anonymous said...

i did the whole steps, i just cant select the instalation source, with a ubuntu server
i just go the option to use the cdrom has a source (at the instalation menus)

Anonymous said...

Sorry man...no working with ubuntu 8.04 alternate disk...help me

Anonymous said...

This guide's crap.

Don't use it.
It won't work.

I don't believe that the author has ever sucessfully pulled this off.

Anonymous said...

i want to try the option installing using the network, i got a distro with a sort of feature,
that allows that i think..

Adam Stern said...
fugiwara01 said...

The chown command gives a missing operand error. I'm sure it's something obvious,but I'll be damned if I can find it. Might have something to do with Slackware 12.1.


chown: missing operand after yada : yada

J.O.L. said...

@fugiwara01

No, it's not Slackware. I noticed that also, while reading the command. I'm surprised some of the more Linux-savvy users didn't notice. I am in the midst of trying to install Intrepid using the method described, and I'm no expert. But, I BELIEVE (can't guarantee) that what dougfractal had in mind was POSSIBLY this:

sudo chown `whoami`:`whoami` /distro

Maybe it has something to do with the boot process being able to read or write to that directory during installation? After I downloaded and copied the two files, I was already set as the owner so I didn't have to touch the permission of those files.

Good luck! (to both of us)

J.O.L. said...

After configuring the keyboard, the installation fails to find the ISO image. I was delighted to find an option that reads something like "Scan hard drives for installer ISO image", but I was disappointed to see that it always fails to find it. I moved the ISO from /distro to /boot to /media/sda1 (Windows partition), all to no avail.

I am currently downloading the alternate installation ISO to give it one last shot. If that doesn't work, I may be forced to burn yet another CD. :(

Anonymous said...

i found a tiny installer that boots the sistem and starts the setup
it worked perfect it runs with a internet connection

Sex Tips : ) said...

Get the minimal CD of your distribution and put it on a usb disk. Boot from there and do a netinstall.

Anonymous said...

some body help me,

i want install linux bactrack2 to my old laptop,
did all steps and the grub started. I selected the "Install Linux".

i have partition, c: system xp (ntfs) , d: data(fat32) and for source e:(fat)
title install linux
root(hd0,4)/BT
kernel(hd0,0)/boot/vmlinuz
initrd (hd0,0)/boot/initrd

when procees
display
kernel panic , no init found .

so i move to install BT 3 but
stop
Usage:init 0123456sQqAaBbCcUu

what i was do?

Swati said...

Thanks Kaushik ! for this wonderful article. But need some more help from u.

I'm a newbie for Linux. I have single OS, win XP media center installed on 4th partition(F:,NTFS).

I'm interested in installing Fedora 9 on E:,FAT from the CD ISOs through the hard disk directly. For this i followed your steps. I downloaded grub and put the iso, grub and boot etc. on the F:
Then i updated boot.ini from control panel. When i rebooted the system, i selected the 'tart Grub' option. But then after it shows the error "hal.dll missing or corrupt".

I'm not getting what had gone wrong ? Please tell me whr i may have made a mistake.

Anonymous said...

This is great. Just what I was looking for to install Debian on some old laps without CD, floppy or USB boot capabilities, but with Windows. It worked very fine. It avoided me the necessity of creating a net install server, and the waste of installing everything from Internet for all laps with netbootin.

Anonymous said...

Thank you very much, my old lappy has a buggered optical drive and therefore cant boot from dvds or cds, this is incredibly useful to me, cheers

hjk said...

for vista you can use easybcd which is free select add and remove entries and then select neogrup then install neogrup then select configure
and add at end

C:\grldr=”Start GRUB” then save and reboot

but i have problem i want chose direction of my iso image i do not want scan hard disk

please tell me if you know

Anonymous said...

amazing, thank you very much!

hjk said...

it works with suse i finally did it
under vista

thanks

Mahdi Razavi said...

Thanks a lot
i want this method search in Fedora Doc but nothing found there

Tags Photo said...

I can't get this to work. Is there something I am doing wrong or is it just that this is just crap. Somebody help!

ashish said...

Thanks for such a good article, but I faced problem in installation:
initially all went well like butter, when I selected the hard drive partition and provided iso image name, then it was not able to find the iso image:

Actually my hard disk is partitioned in 4 parts + one unformated partition(deleted the F 50 GB, created FAT32 30 GB, and left 20GB free for linux)
it shows four partition like
/dev/sda1/ NTFS
/dev/sda5/ NTFS
/dev/sda6/ NTFS
/dev/sda7/ FAT32

I provided it like:(as iso is on F: drive, so I assume F=/dev/sda7/)
/dev/sda7/fedora.iso

I tried other permutations also like:
1.
a. selected /dev/sda7/
b. path: fedora.iso (I renamed iso image to simple name)

2.
a. selscted /dev/sda7/
b. path: /fedora.iso/

but it does not work, and I get error like: Error occured in finding image file on hard disk.... /dev/sda7/ does not seem to contain any image...
can somone please help as what would be going wrong..?

hjk said...

for ashish
you must write the entir path of iso even a dot

entire.iso

for open suse 11 it do every thing for you just

under windows mount iso by daemon tools and reboot and you will find optin to install opensuse 11 press it and then it will say to you to insert dvd or cd ignore it and press back button and then countnu installation by select install or boot from hard disk

fennec said...

"Unetbootin" is a simple open source tool that allows you to install a variety of distributions over the Internet, without burning a CD.
The "Wubi" tool for installing Ubuntu this way has been around for a while, but unlike UNetbootin, Wubi installs Ubuntu on a file stored in a Windows environment and creates no actual partitions. UNetbootin will create a partitioned dual-boot system as though you installed with a CD. It's useful if you're working on a machine with a slow or no CD/DVD drive or don't have any spare discs to burn.
I prefer the "Wubi" for Ubuntu it's very simple to install and to uninstall

http://wubi-installer.org/

Donte said...

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.


Joannah

http://transcendmemory.net

LaptopLuva said...

Winrar opens up iso files? I've been using daemon tools to open up mine. Is winrar free?

Anonymous said...

Hi, idon't know what to say imazing tutorial.
But i hava problem it didn't work on my PC it's freez on "Launching GRUB..." i tried to copy boot folder and grldr to older PC and bam it's works
Can anyone help me ?

Best regards, John.

vlper said...

i have this error after Time: acpi_pm clocksource has been installed.
DONE.

Check root= bootarg cat /proc/cmdline
or missing modules, devices: cat /proc/modules Is /dev
ALERT! /dev/rd/0 does not exist. Dropping to a shell!

That's it :( are anyone can help me ?

maddy said...

After configuring the keyboard, the installation fails to find the ISO image. I was delighted to find an option that reads something like "Scan hard drives for installer ISO image", but I was disappointed to see that it always fails to find it. I moved the ISO from /distro to /boot to /media/sda1 (Windows partition), all to no avail.

I am currently downloading the alternate installation ISO to give it one last shot. If that doesn't work, I may be forced to burn yet another CD

BinaryBrother said...

Really nice instructions. +1

Alex said...

This is seemingly a life saver for those of us with an old machine and only CD-ROM drive (NOT a DVD drive) as we can instal bigger, DVD only versions of Linux instead of just being outta luck, however...I agree that it doesn't seem to work on Linux Mint :(

Related Posts Widget for Blogs by LinkWithin