Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old April 22nd, 2005   #1
ed_agamemnon
A Carafe of Ubuntu
 
Join Date: Apr 2005
Beans: 90
HOWTO: Install Ubuntu Linux without burning a cd

#EDIT: The automatic installer script included with this thread has been removed. The new version is available for Breezy and Dapper here: errr... waiting for the thread to be approved by a moderator... zzzz!

How to install Ubuntu Linux without having to burn the .ISO image to CD.

Why would you want to do this?
1 - you don't have a cd burner.
2 - you can't be bothered to wait for your pressed cd to arrive in the post.
3 - because you can...

-- The howto is mainly a simplification of this (Install GNU/Linux without any CD, floppy, USB-key, nor any other removable media) excelent guide for which i take no credit --

The hardware i used to sucessfully install Ubuntu without booting a CD:

Dell Inspiron 1100 2.2 Ghz laptop, 20GB hard disk, running Windows XP on a single NTFS partition. No other system has been tested ~ at least, not by me.


Brief overview of the steps:
1 - resize the c: windows partition
2 - get hold of the ubuntu kernel
3 - set up GRUB for NT
4 - install ubuntu

easy really! i should stop now, hehe


#1 ~ Resizing the partition
(I used Partition Magic 8.0)

Notes:

The trick is not to create specific Linux partitons, but to resize the Windows one leaving nothing but free 'unallocated' space. The ubuntu installer will be able to install itself to this space and do all the fancy partitioning stuff automatically without frightening us linux n00bs too much

In my case i redistributed my 20GB to 15GB for windows and 5GB of 'unallocated space'.

#2 ~ Setting up the kernel

We only need to download two files for the installer to work...

linux.bin
initrd.gz

both of these we could download from the ubuntu archive

place both of these files in C:\boot
- you'll probably have to create this directory yourself

#3 ~ Setting up GRUB for NT (a bootloader that will allow us to choose either the Ubuntu installer or to boot normally into Windows)

The files that we need for GRUB for NT actually contained in the GRUB for DOS package, but that's no problem, so download that:

from here: http://newdos.yginfo.net/grubdos.htm
or here: http://grub.linuxeden.com/

The two files that we want are "menu.lst" and "gldr", you can delete the rest. Place "gldr" in the root of the hard disk (probably C:\) and make a new directory inside C:\boot called 'grub' (ie, C:\boot\grub) and put you menu.lst in there.

All we have to do now is edit the menu.lst to give an option to select the Ubuntu installer and to set the boot.ini to load GRUB.

A) ~ Editing menu.lst

open it with notepad and append right at the bottom of the file the following lines:

Quote:
title Ubuntu Installer (hd0,0)
kernel (hd0,0)/boot/linux vga=normal ramdisk_size=14972 root=/dev/rd/0 rw --
initrd (hd0,0)/boot/initrd.gz

(a lot of the stuff in that file can be cut out, but it's no big deal, we'll leave it for now)

B) ~ editing the boot.ini

The problem here is that this particular file is not only write-protected but also hidden. So to undo all this open a command prompt (Start -> Run -> cmd.exe)

type:
Quote:
attrib -a -r -s -h c:\boot.ini
now open the boot.ini file with notepad and add this line on at the end:

Quote:
C:\grldr="Start GRUB"
...

That's it!


4 ~ Installing Ubuntu

Now when you reboot you should be presented with a screen offering you the choice to either boot into windows, or to 'Start GRUB'; choose 'Start GRUB' and then on the next menu choose 'Ubuntu Installer'.

The installer will run and download all the parts it needs for a while until you get to the partitioning stage... Ubuntu will ask you to install in on the whole of your drive - which obviously we do no want, so choose manage drives personally (or whatever the label is, i don't remember exactly :s) and then you will be able to tell it to install onto the 'unallocated space' we created earlier with Partition Magic. Ubuntu will then set its own ext3 and swap partitions from this space and continue to download and install itself to the empty half of the drive

After this (or maybe it was before?) you'll be prompted with the Ubuntu's own GRUB screen... It should have detected Windows, if so, just agree with it and allow it to install its own GRUB to the boot sector.

That's it!
Fin!

Sorry it's so badly written and all, but i've just done this and was pretty pleased so i thought it was important to share

***

Lastly, I have attached all the files needed to set this up in a .zip (EXCEPT FOR inird.gz and linux.bin ~ they're just too big, you'll have to download them yourself to the same folder where you extract this archive to) with this message, inside is a .bat file which can set the whole business up for you

IT IS NOT MY FAULT IF IT SCREWS EVERYTHING UP ~ sorry!

The .bat file expects to run on Windows XP (though i don't suppose it'll care what you run it on...) and will do the following:

create c:\boot
create c:\boot\grub
move grldr to c:\
move linux and initrd.gz to c:\boot
insert a pre-edited version of menu.lst into c:\boot\grub
unprotect the boot.ini
append data to the boot.ini
reprotect the boot.ini

effectively, you could extract the files, run the .bat and then reboot, and all's fine


One last thing, i take no responsibility for any ill effects caused by either your following of this guide, or by running my .bat file.

-ed.

Useful? Try here too: http://www.ubuntuforums.org/showthre...618#post145618

EDIT: (24/04/2005)
#1 - I forgot to type (hd0,0) after 'Unbuntu Installer' in the new c:\boot\grub\menu.lst file sorry! I've fixed the .zip package too.
#2 - Removed all the stuff about renaming linux to linux.bin ~ seems that was all pointless (archive updated accordingly).

(13/06/2005)
#3 - Finally fixed the "title Ubuntu Installer" line - sorry about that... I'll fix the archive soon too; just a little busy right now...

(27/06/2005)
#4 - Added wget.exe (command-line based download program) and set it up to download both the 'initrd.gz' and 'linux' and put them in the right place.

So... Now all you have to do is partition your hard disk, run 'install.bat' and reboot. Though - as always - I take NO responsiblity for whatever happens...

Last edited by ed_agamemnon; March 24th, 2006 at 09:20 PM..
ed_agamemnon is offline   Reply With Quote
Old April 22nd, 2005   #2
andvaranaut
Just Give Me the Beans!
 
Join Date: Apr 2005
Location: Sevilla, Spain
Beans: 49
Re: HOWTO: Install Ubuntu Linux without burning a cd

This rocks. Thanks for sharing.

If I have understood well, all the packages are fetched over the network, so that this is effectively a network installer.

Maybe some sort of rudimentary floppy/net installer might be built with this. Something like having a floppy disk image which looked for the linux.bin file in (hd0,0) (which will either be C:\ or / to 99% of people out there). Or a USB keychain boot sector that could fish the .bin from the keychain and do a network install. That would be awesome, specially since the Ubuntu base installation is probably ~400 Mb of packages, which with the broadband links of today would not amount to more than 2-3 hours time.

I have read elsewhere that it is possible to copy the raw ISO image to a HD partition and that the installer would be able to pick it up. This would make it possible to do a 'CD installation' (without having to download data from the net) without actually having to burn the CD. Perhaps the .iso could also be automatically mounted if found on (hd0,0)/. Or be written in a 700 Mb partition to be later used for swap.

Anyways, seems rather useful for me because it addresses one of the (few! ) Ubuntu weaknesses: the fact that the only easy way to install it is booting from CD.
Cheers.
__________________
--- What are you doing with that Hoary Hedgehog?
--- It followed me home! May I keep it?

If everything is coming your way, you're in the wrong lane.
andvaranaut is offline   Reply With Quote
Old April 23rd, 2005   #3
Hardeep
First Cup of Ubuntu
 
Join Date: Apr 2005
Beans: 2
Re: HOWTO: Install Ubuntu Linux without burning a cd

Hi-

After clicking on "Start Grub" I do not see the Ubuntu Installer in the list of items. Last one I see if for Mandrake iso install.

Also, I see a screen flash with "find...and something else" before seeing the Install options.

Please help!
Hardeep is offline   Reply With Quote
Old April 23rd, 2005   #4
ed_agamemnon
A Carafe of Ubuntu
 
Join Date: Apr 2005
Beans: 90
Re: HOWTO: Install Ubuntu Linux without burning a cd

It sounds like you've not properly configured your menu.lst file (c:\boot\grub\menu.lst).

Have you appeneded this to the bottom of it?

Quote:
title Ubuntu Installer on (hd0,0)
kernel (hd0,0)/boot/linux.bin vga=normal ramdisk_size=14972 root=/dev/rd/0 rw --
initrd (hd0,0)/boot/initrd.gz
Try that

If you're still stuck, the menu.lst included in the .zip above would work perfectly well...

The flash screen is nothing to worry about, that's just GRUB loading.

-ed.

EDIT: (24/04/2005) added "on (hd0,0)" - should fix everything. oooops; and sorry.

Last edited by ed_agamemnon; June 13th, 2005 at 07:02 AM..
ed_agamemnon is offline   Reply With Quote
Old April 26th, 2005   #5
Poppei
First Cup of Ubuntu
 
Join Date: Apr 2005
Beans: 7
Question Re: HOWTO: Install Ubuntu Linux without burning a cd

Hi,

Quote:
Originally Posted by andvaranaut
I have read elsewhere that it is possible to copy the raw ISO image to a HD partition and that the installer would be able to pick it up. This would make it possible to do a 'CD installation' (without having to download data from the net) without actually having to burn the CD. Perhaps the .iso could also be automatically mounted if found on (hd0,0)/. Or be written in a 700 Mb partition to be later used for swap.
Do you remember where you've read this? I copied the iso onto my laptop (which has no CD drive) over internal network. Now, I want to install it from iso.
On the machine a SuSE distribution is running and GRUB is also installed, but I want to kill SuSE and install Ubuntu. This description is great, but I cannot really connect to the internet for I only have a WLAN-card (and this one must function)...

OK, thanks!!

CU Poppei
Poppei is offline   Reply With Quote
Old April 26th, 2005   #6
andvaranaut
Just Give Me the Beans!
 
Join Date: Apr 2005
Location: Sevilla, Spain
Beans: 49
Re: HOWTO: Install Ubuntu Linux without burning a cd

Quote:
Originally Posted by Poppei
Hi,



Do you remember where you've read this? I copied the iso onto my laptop (which has no CD drive) over internal network. Now, I want to install it from iso.
On the machine a SuSE distribution is running and GRUB is also installed, but I want to kill SuSE and install Ubuntu. This description is great, but I cannot really connect to the internet for I only have a WLAN-card (and this one must function)...

OK, thanks!!

CU Poppei
It cost me a few head scratches, but here it is:

http://ubuntuforums.org/showthread.p...3151#post83151

It essentially involves making a raw 700 Mb partition and copying the ISO there (I suspect dd if=ubuntu.iso of=/dev/hdXY would make the trick). If the link above is correct, the installer should give you the option of using the partition as the source for the ISO image.

According to http://ubuntuforums.org/showthread.php?t=17866 there should be a 'detect and mount CD-ROM' option where (I presume) you will be able to specify where you have copied the ISO over.

Please, if it works, by all means post it and write a (not necessarily long) HOWTO in the forums, so that we can have this thread archive. The "how to install without CD drive" question pops up rather often, it seems

Good luck
__________________
--- What are you doing with that Hoary Hedgehog?
--- It followed me home! May I keep it?

If everything is coming your way, you're in the wrong lane.
andvaranaut is offline   Reply With Quote
Old April 26th, 2005   #7
Poppei
First Cup of Ubuntu
 
Join Date: Apr 2005
Beans: 7
Exclamation Re: HOWTO: Install Ubuntu Linux without burning a cd

Hi,

[quote=andvaranaut]It cost me a few head scratches, but here it is:
http://ubuntuforums.org/showthread.p...3151#post83151
[/QUOTE)

Hmm, there is following sentence "When the CDROM drive fails to ignitiate stage 1, it will prompt you with other methods of installations."
I have no drive, so I cannot have this option. ;-(

[quote=andvaranaut]
It essentially involves making a raw 700 Mb partition and copying the ISO there (I suspect dd if=ubuntu.iso of=/dev/hdXY would make the trick).
[/QUOTE)

OK, I did that after this [1] instruction I've found in a newsgroup. I Think this way I will be able to do an HD-Install. But I got a problem with GRUB (I suppose).
In my /boot/grub/menu.lst I have following entry:

[QUOTE)
###Don't change this comment - YaST2 identifier: Original name: linux###
title Kubuntu-Install
kernel (hd0,3)/gregor/vmlinuz ro root=/dev/hda4
initrd (hd0,3)/gregor/initrd.gz
[/QUOTE)

OK, my "/boot" is hda1, "swap" is hda2, "/" is hda3 and "/home" is hda4. I decompressed the iso into /home, as described in [1] (I mounted it with loop-option and copied it into /home). So I think hd(0,3) is correct.
The Kernel is booted well, but there's following error-message:

Quote:
VFS: cannot open root device "hda4" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
What's wrong? I've even deleted the root-entry or set it to hda3, but I still cannot boot.
Any ideas?

Quote:
Originally Posted by andvaranaut
Please, if it works, by all means post it and write a (not necessarily long) HOWTO
Sure I will!

Thanks!

[1] http://www.google.de/groups?hl=de&lr...r%3D%26hl%3Dde
Poppei is offline   Reply With Quote
Old April 26th, 2005   #8
arcilite
First Cup of Ubuntu
 
Join Date: Apr 2005
Beans: 8
Re: HOWTO: Install Ubuntu Linux without burning a cd

Has anyone tried making the raw partition and moving the iso over to it? Then installing from the iso. Now that I think about it I dont belive that would work... how would you "extract" the iso onto a raw partition anyways? I know linux has dd but what about windows?
arcilite is offline   Reply With Quote
Old December 5th, 2005   #9
UbuntuMember
First Cup of Ubuntu
 
Join Date: Dec 2005
Beans: 3
Re: HOWTO: Install Ubuntu Linux without burning a cd

Quote:
Originally Posted by andvaranaut
It cost me a few head scratches, but here it is:

http://ubuntuforums.org/showthread.p...3151#post83151

It essentially involves making a raw 700 Mb partition and copying the ISO there (I suspect dd if=ubuntu.iso of=/dev/hdXY would make the trick). If the link above is correct, the installer should give you the option of using the partition as the source for the ISO image.

According to http://ubuntuforums.org/showthread.php?t=17866 there should be a 'detect and mount CD-ROM' option where (I presume) you will be able to specify where you have copied the ISO over.

Please, if it works, by all means post it and write a (not necessarily long) HOWTO in the forums, so that we can have this thread archive. The "how to install without CD drive" question pops up rather often, it seems

Good luck
It ask me to Mount CD-ROM, but it doesn't ask where I placed the ISO over. =/

Anything you can help me with this?
UbuntuMember is offline   Reply With Quote
Old December 5th, 2005   #10
UbuntuMember
First Cup of Ubuntu
 
Join Date: Dec 2005
Beans: 3
Re: HOWTO: Install Ubuntu Linux without burning a cd

Nobody knows? I need help..
UbuntuMember is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:41 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry