Tag/tag.png

Duplicate Article
This article covers the same material as another article. More info...

Tag/tag.png

Content Cleanup Required
This article should be cleaned-up to follow the content standards in the Wiki Guide. More info...

Tag/tag.png

Style Cleanup Required
This article does not follow the style standards in the Wiki Guide. More info...

This pages describes how to create a flash drive that can be used for installing Ubuntu Server. This is for any machine that doesn't have a CD drive but can boot from USB media (i.e. the flash drive).

Note: The methods described below (installation with the hd-media installer) will work for mini and server isos.

The steps are

  • Log onto a Ubuntu machine where you have sudo privileges

  • Download the hd-media installer's initrd.gz file

  • Download the hd-media installer's vmlinuz file

  • Download Ubuntu Server installation iso file

  • Determine which device your flash drive is on (/dev/sdb, etc)
  • Run the script below after:
    • Unmounting the flash drive, if necessary
    • Making sure you are in the same directory that contains the three files that were just downloaded
    • Replacing /dev/sdx with /dev/[your device here]

    • Changing the ISOIMAGE variable to match the Ubuntu Server iso filename
  • Boot the computer you would like to install Ubuntu Server on from the flash drive
  • Install Ubuntu Server as you would from a normal install CD
    • Note: The first screen after the language prompt has several options. Only the first option works (Install to disk)

Comment: Could not get it to work with hardy server iso - it fails to mount /dev/sda and /var/log/syslog says Debian image ubuntu-8.10-server-amd64.iso is not usable Sad :(

Comment2: Get it to work with hardy-server-amd64 iso too. My first try doesn't work too, but because of the false vmlinuz/initrd.gz files. With both from the "installer-amd64"-tree the installation goes around Smile :-)

Notes:

  • The links above are for the 32-bit version of Ubuntu 8.04 (Hardy). To install with a 64-bit image, replace the "i386" in the URLs with a "amd64". To install Ubuntu 8.10 (Intrepid), replace "hardy" in the URLs with "intrepid".
  • If on booting the USB drive you get a blank screen with the cryptic message MBR FA:, press the "a" key. The message will change to MBR 1234F. Now press "1" and the boot will proceed as normal.

  • Depending on the speed of your drive, the "Loading Linux Kernel" window may show 100% for a minute or more. It hasn't locked up. Just be patient!

  • If you actually use the drive to install Ubuntu on a server, it may turn out that the installer puts grub on the USB disk (because it's detected as the first drive) instead of your hard drive. To fix this, reboot using the USB disk and run install-grub on the actual hard drive. You'll also need to recreate the flash drive. I experienced this on Jaunty. -- kiko

Flash Drive Creation Script

# Replace "sdx" with "sdb" or whatever your flash drive is
#   - If unsure which device is your flash drive then
#     run "sudo fdisk -l | less" in order to identify it

ISOIMAGE=ubuntu-8.04-server-i386.iso

sudo apt-get install syslinux mtools mbr
echo "Use fdisk to manually create a 1GB bootable FAT16 partition."
read -p "Press [Enter] to start the fdisk program..."
sudo fdisk /dev/sdx
sudo mkfs -t vfat /dev/sdx1
sudo mkdir -p /mnt/flash
sudo mount -t vfat /dev/sdx1 /mnt/flash
sudo syslinux -s /dev/sdx1
sudo mkdir -p /mnt/iso
sudo mount -o loop $ISOIMAGE /mnt/iso
sudo cp -R /mnt/iso/isolinux/* /mnt/flash
sudo mv /mnt/flash/isolinux.cfg /mnt/flash/syslinux.cfg
sudo mkdir -p /mnt/flash/install
sudo cp vmlinuz /mnt/flash/install
sudo cp initrd.gz /mnt/flash/install
sudo cp $ISOIMAGE /mnt/flash
sudo install-mbr /dev/sdx
sudo umount /mnt/flash
sudo umount /mnt/iso

Note: If you lose network connectivity during installation, GRUB and LILO may not be installed successfully.

UbuntuServerFlashDriveInstaller (last edited 2017-09-22 19:21:05 by ckimes)