Glad you could stop by the Linux Basement site. Linux Basement is an informational Podcast about Linux, open source software and lots of other wonderful technology. If you want to find out more about open source technologies, subscribe and have a listen!

#linuxbasement is up at irc.freenode.net

MP3 Feed
Ogg Vorbis Feed
MP3 Feed (all episodes)
Ogg Feed (all episodes)

 

Installing Ubuntu (or other distributuin) without burning a cd.

Article Type: 
Tutorial

Not that a cd is that expensive, I just don't like the idea of burning a cd I know I'll only use once. Several years ago I learned how to install linux without having to burn a cd. This is useful if you like to distro hop like I do, and also appreciate that testing on real hardware is far better than using a virtual machine. I have used this method for Fedora, Debian, and Ubuntu, but I bet it would work with other distributions as well.

The basics are as follows:
1)You need a running system with a fast network connection and grub as a boot loader. It will probably work with lilo as well, but who uses that any more?
2)You need the kernel and initial ram disk for the installer. More on where to get these later.
3)Then you configure grub to boot the kernel and initial ram disk for the distribution's installer.

It makes sense that the Linux installer is just a small Linux distribution and can be loaded using grub like any other Linux distribution. The trick is finding the required files and knowing how to configure grub.

Here is an example I just used to install Intrepid Ibex alpha.

I keep a few extra partitions at the of my disk for testing. Here is my current drive layout.
/dev/sda1 Partition for testing BSD
/dev/sda5 My normal root partition
/dev/sda6 swap
/dev/sda7 home
/dev/sda8 Partition for testing linux

First I will get the kernel and initial ramdisk required and save them in my home directory.
http://archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-amd64/cur...
http://archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-amd64/cur...

Next I will add two new stanza's to grub's menu.lst which is normally found in /boot/grub. The first added stanza will boot the installer. My home partition is /dev/sda7 or (hd0,6) to grub, and my username is user. If you don't have a separate home partition, you would have to use /home/user/linux instead of what's listed below. The root=/dev/ram0 part is so the kernel knows to use the ramdisk when it's looking for a system to start

title Ubuntu Installer
root (hd0,6)
kernel /user/linux root=/dev/ram0
initrd /user/initrd.gz

The second stanza to add to grub's menu.lst is to boot the new installation. This one is simple. It tells grub to load another bootloader. This essentially the same procedure as dual booting windows. I will be installing Intrepid Ibex on partition 8 or (hd0,7) to grub. During the installation I will have the installer but it's bootloader on the root partition instead of the MBR. Then all I have to do is direct the grub thats installed on the MBR to boot the grub for Intrepid Ibex thats installed on sda8.

Title Partition 8
root (hd0,7)
chainloader +1

Next is reboot and choose the installer. A few things to keep in mind during the installation. This method gets all the packages from the net, so it will take a while. Also, don't forget to tell the installer to put it's bootloader on it's root partition instead of the MBR

Once the installation is complete, reboot and select Partition 8 or whatever one you used. This will load the new installation's bootloader which will then load Intrepid Ibex.

Thats it.

There are a few places to look for the needed files to boot from. For Ubuntu, start at archive.ubuntu.com and follow the path listed in the links above. As you navigate through, you can change the architecture to i386 or change the release to Hardy or whatever. The process is similar for Debian, just start at on of the mirrors listed on the Debian download page, and follow a similar path to the installer. Here are some links for fedora, but I haven't tried them so YMMV. Also note the filenames are different than the example above.

http://mirrors.cat.pdx.edu/fedora/linux/releases/9/Fedora/x86_64/os/isol...
http://mirrors.cat.pdx.edu/fedora/linux/releases/9/Fedora/x86_64/os/isol...

Another option is to get a distributions network installation cd. Mount the iso image and look around inside it for the installer's kernel and initrd. I know this works with Fedora and probably other Red Hat like distributions as well. To mount a iso image, use the following:

mount -o loop boot.iso /mnt/iso

I not only use this method for testing, but also when upgrading to a new release. I normally do clean reinstalls for each new release. The only difference is I let the installer put the boot loader on the MBR. Since I have a separate home partition, I can wipe out the root partition, reinstall from scratch, and still keep all my settings and data.

I take no responsibility if you do this and screw up. So,
make backups as appropriate.

Good luck.
Todd

Todd this is a great

Todd this is a great tutorial, thanks so much! Funny thing, I was actually going through the motions attempting to install Mint 5.1 on my eee this morning, without using a CD, and then I noticed your post. Here is the information I was looking at, which could pertain to some of what you are discussing here.

https://help.ubuntu.com/community/Installation/FromUSBStick

Thanks again for this great info!

Chad

Just what I need

This is great, I was looking for something like this just today via google, but here I find it in my rss aggregator.

I have a rather old computer (P4 1.8 GHz 512 MB) with no booting options other than the hard disk (CD and DVD stooped working - probably a controller issue, floppy drive never worked, usb booting never worked). My Ubuntu is crashing all the time (too much tweaking with it I guess), and to say the truth I feel like trying a lighter distro (maybe ZenWalk, an Xfce one that's for sure). I think I'll do it at the weekend.

pxeboot install.

You can old get old 3com nics with pxeboot features for 5 bucks or so. I prefer to do a pxeboot (or etherboot) to do a net install. Then you can do multiple machines almost at once if necessary with just one setup. If you already have an ltsp server, you are half way there.

http://polishlinux.org/installation/installing-linux-over-network-no-cd-...