Ubuntu USB Install

From C4 Wiki
Jump to: navigation, search

Howto[edit]

Installing Ubuntu via USB boot is the way to go if your machine has no cdrom or floppy and PXE boot is not working because pxelinux doesnt like your tftpd.

Besides - it's nice to have grub on an USB stick, which you can pull out anytime someone has a boot problem.

Requirements[edit]

  • a working network connection
  • an USB stick with about 10MB of free space (FAT formatted is ok, others work just as well)
  • means of installing grub on the stick

Getting the files[edit]

You'll need the network boot kernel and initrd, here is an example for Lucid Lynx (10.04):

wget http://de.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux
wget http://de.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz

The kernel is about 3.9MB and the initrd 8.2MB.

For Karmic Koala (9.10):

wget http://de.archive.ubuntu.com/ubuntu/dists/karmic/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux
wget http://de.archive.ubuntu.com/ubuntu/dists/karmic/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz

Here the kernel is about 3.7MB and the initrd 7.8MB.

For Jaunty Jackalope (9.04):

wget http://de.archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux
wget http://de.archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz

Here the kernel is about 3.3MB and the initrd 7.2MB.

For Intrepid (8.10):

wget http://de.archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux
wget http://de.archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz

Here the kernel is about 2.1MB and the initrd 7.2MB.

Or for Debian Lenny:

wget http://ftp.de.debian.org/debian/dists/lenny/main/installer-i386/current/images/netboot/debian-installer/i386/linux
wget http://ftp.de.debian.org/debian/dists/lenny/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz

Here the kernel is about 1.4MB and the initrd 5.6MB.

Install grub on the USB Stick[edit]

Depending on which system you use to install grub the details will be different. It is imperative that you really know what you are doing because otherwise it will either not work (if you're lucky) or even replace your existing bootmanager and leave you with a mess. The details have been described before so I'll simply point you to: Installing-GRUB-using-grub-install

Configuring grub[edit]

After you have installed grub on the stick, you should have a directory structure similar to this one: (apart from the files already on the stick)

boot
boot/grub
boot/grub/default
boot/grub/device.map
boot/grub/e2fs_stage1_5
boot/grub/jfs_stage1_5
boot/grub/xfs_stage1_5
boot/grub/minix_stage1_5
boot/grub/fat_stage1_5
boot/grub/stage1
boot/grub/stage2
boot/grub/reiserfs_stage1_5
boot/grub/menu.lst

Now place the files "linux" and "initrd.gz" in the "boot" folder.

boot/initrd.gz
boot/linux

Now add/edit "boot/grub/menu.lst" to include a section like this:

title           Ubuntu Install
root            (hd0,0)
kernel          /boot/linux
initrd          /boot/initrd.gz
boot root=/dev/ram rw --
savedefault

If you dont know where to put this - put it at the end of the file. If your grub install is working you now have an Ubuntu install stick.

See also[edit]