How to install Ubuntu 9.10 without CD/DVD

Ubuntu 9.10, Karmic Koala is finally out now and everybody wants to install it. But since the requested CDs won't get delivered for another few weeks the only option left is to download the ISO, burn it and then install. Everything seems to be right except the burning part, I hate burning CDs. And I believe there are many out there who feel the same. So, in this article I will tell you about 2 different ways of installing Ubuntu Karmic which don't involve burning CDs.

 

Install from your Hard Drive

Pre-requisites

  • Any preinstalled Linux system.
  • Ubuntu 9.10 ISO. (you may download it from here)
  • If you want to learn the basic concept behind installation without burning CDs then refer this article.

Benefits

  • Since the ISO lies on the Hard disk, installation is pretty quick.
  • If you don't have CD/DVD drive.
  • You hate burning CDs, like me ;).

Installation

1) The basic trick behind this method of installation is that instead of booting from a 700 MB installation CD we create a separate > 700 MB partition and boot from that partition. This results in increased speed of booting into a Live mode and lesser time for installation.

So, first of all we are going to create a separate partition for this purpose (750 MB will be fine). One can create partition using gparted (Gnome partition editor). Let us call this new partition /dev/sda1

2) After creating the partitoin, we will have to copy the contents of the ISO into the new partition. Boot into your pre installed linux system or using another Live CD and run the following commands

[shredder12]$ mkdir /tmp/install_cd

[shredder12]$ mkdir /tmp/installer

Now, mount the partition and the ISO in their respective directories

[shredder12]$ sudo mount -o loop ubuntu_disk_image.iso /tmp/install_cd

[shredder12]$ sudo mount /dev/sda1 /tmp/installer

Now, use rsync to copy the contents of the ISO to the partition

[shredder12]$ sudo rsync -a  /tmp/install_cd/    /tmp/installer

Once, this is done unmount the partitions.

[shredder12]$ sudo umount /tmp/installer

[shredder12]$ sudo umount /tmp/install_cd

P.S.- Replace /dev/sda1 with the partition you have created and ubuntu_disk_image.iso with the ISO have downloaded.

3) Now, we need to add an entry in our grub or lilo boot loader to be able to boot into this partition. If you are using grub then add this line in the grub's menu.lst file. Open the file in any editor (i will use vim here)

[shredder12]$ sudo vim /boot/grub/menu.lst

Add these lines at the end of your menu.lst file

title           my ubuntu installer
root            (hd0,0)
kernel          /casper/vmlinuz boot=casper root=/dev/ram ramdisk_size=1048576 rw
initrd          /casper/initrd.gz

Since, the disk partition I was using was /dev/sda1 so I used (hd0,0) here if your partition is /dev/sdaN then you should use (hd0,N-1).

You may either add this entry in menu.lst file or you may boot from grub by executing similar commands (prefer adding these lines if you don't know what I am talking about).

4) Now, reboot your system and select "my ubuntu installer" from grub. And you can follow the regular Ubuntu installation from there. But if you have unpacked the Live CD on the same hard disk on which you want to install Ubuntu then you might run into this problem.

The solution you may use is to execute this command before beginning the installation. So, boot into the Live session and from there run the installer and before actually running the final installation execute this command (or execute this command before actually running the installer).

[ubuntu]$ sudo umount -l -r -f /cdrom

Or you may mention the device which is mounted as /cdrom in our case it is /dev/sda1. I don't exactly know why this error occurs but you may read the bug's link mentioned above to know more about the reasons. It actually works for most of them but in case if you are having the same trouble you may run this command before the installation and get rid of the problem. But remember booting into Live session first and then running the installer from there and execute this command before starting actual installation.

Install using USB

If you have a USB (size > 700MB) then you can create your own USB bootable Ubuntu.

Pre-requisites

  • A USB of size > 700MB
  • A BIOS that allows booting from USB
  • Ubuntu installation ISO
  • A tool for creating USB bootable disk

Benefits

  • If the USB is fast then the installation can be as fast as a hard drive installation.
  • You can use the USB stick as a Live CD (but ofcourse it will be a lot faster than a CD)
  • It is easier to maintain than a Live CD

Installation

1) First of all we will need a bootable USB creator. Actually there are many of them, you can check them out here. I will be using UNetbootin in this article.

2) I guess you might have installed UNetbooting by now. If not follow this link and download the version you want to install (they are available at the top).

3) Once you have installed it open it and you will see a window. Select Ubuntu in the distribution drop down box and select the USB location and the ISO. Click OK and it will create a bootable USB disk for you.

4) Now, there is nothing much to do. Just insert the USB and select boot from USB from your BIOS booting options. After booting you will see some options, select default if you don't know what to do. And after that you will see the regular Ubuntu installation. Go ahead and install it.

Enjoy then new Ubuntu Karmic :) !!

P.S.- Please note that methods mentioned here  are tested on some machine before being posted so they might not be compatible with your system or your method of installation. So, I would kindly request you to use them at your own risk and if you have any trouble with them then please mention your query in the form of a comment. We are always open for help.

7 Comments

champ (not verified)
November 12th, 2009 05:32 pm
I would like to know if my BIOS allows USB drive to be a boot device, the options my BIOS display are LSI 120, ZIP 100, HDD, Floppy, CD-ROM, SCSI. which option to choose? I used Make USB as startup disk thats available in Ubuntu 9.04
Anon Linuxer (not verified)
January 13th, 2010 10:52 pm
this is good i never liked wasting a CD (and sometimes they dont burn well) a few pics would make it even easier, since you gotta read the article a few times to get the full idea but very useful tips, good work
Anon Linuxer (not verified)
January 13th, 2010 11:58 pm
oh i might add that the above can be done with "unetbootin" (just look for the disk-image and in "type" select hard-drive) it can be done in windows or linux as posted above, use this command to unmount the virtual cdrom (if you get that problem): sudo umount -l -r -f /cdrom in case unetbootin doesnt work or you're an more advance user, then use the great guide above cheers
Anon Linuxer (not verified)
March 11th, 2010 11:41 am
Thanks a million, seached a lot and finally found your solution (the problem where installation program wants to change the partitions and can't do it because cdrom cannot be unmounted)!
Anon Linuxer (not verified)
March 12th, 2010 09:27 pm
Unetbootin couldn't find a hard drive on my system. The only option was "/" ....which I assume would be a bad choice. My drives are SCSI based so maybe that's it. Any reason the above tutorial would not work with a live DVD iso, or with an older version of Ubuntu, 8.10? I guess I'm going to give it a go. Nothing especially difficult or new for me save the rsync command. Looks do-able. I too love my optical drive best when it's not being used. Plus I think it's ultra slick to do the install off a hard drive. Thanks all! Be real, be sober.
Pavan Gudi (not verified)
June 19th, 2010 03:26 pm
I bought a new PC and I want to install Ubuntu operating system. what are the steps are needed to install, give me in steps.
June 19th, 2010 04:23 pm

Hi Pavan, there are various methods to install with lots of variations, I would suggest you go for the standard method provided by Ubuntu https://help.ubuntu.com/community/GraphicalInstall

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <img> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <p> <br>
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.
  • Search Engines will index and follow ONLY links to allowed domains.

More information about formatting options

Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.