Installing Ubuntu 8.10 Alternate with a USB Drive
27 December 2008 at 9:32 am | In Linux, Ubuntu | 7 CommentsTags: 8.10, alternate, flash, install, installation, Intrepid Ibex, Linux, pen drive, thumb drive, Ubuntu, USB
Note: The following instructions are valid only for the alternate installer! Using a Live CD image won’t work. Please read my guide here for instructions on booting the Live CD from a USB drive.
Today I decided to install Ubuntu 8.10 with the alternate CD so that I could get a command-line system without all of the extra packages that are normally installed with Ubuntu. Unfortunately, my CD-ROM drive was not cooperating and was giving I/O errors when the installer was running, so I was forced to try installation using a flash drive. The directions in the Ubuntu community documentation were outdated and unclear on how to use the alternate image with a USB drive, so I was forced to improvise and thus discovered a great way to install Ubuntu without wasting a good CD-R.
For this method, you’ll need at least a 1GB USB drive and a high-speed internet connection.
1. Download the appropriate ISO image from the Ubuntu home page. I chose the 64-bit alternate image, which provided me with the text-based installer (much better than the graphical installer) and the ability to install a minimal command-line only system, as well as the ability to fully utilize my 64-bit processor (an Intel Core 2 Duo).
2. While this is downloading, you can start preparing the USB drive. I’d suggest formatting it to a fresh FAT16 partition.
Windows: This can be accomplished by right-clicking on the drive in My Computer, click on Format, choose FAT in the File System drop-down, and then click Start.
Linux: You can format the drive using sudo mkdosfs -F 16 /dev/sdc1 (substituting the proper device node of your drive for /dev/sdc1). FAT32 will probably work fine too, but I didn’t test it.
3. Windows: Download Syslinux (latest version at the bottom) and extract the archive somewhere like C:\SYSLINUX.
Linux: Install Syslinux from your distribution’s repositories, if it isn’t already installed.
4. Install SYSLINUX on your USB drive.
Windows: Open a command prompt (Start->Run->cmd) and navigate to C:\SYSLINUX\win32. Then type
syslinux -s -m F:
where F: is the path to your USB drive.
Linux: Open a terminal and type
sudo syslinux /dev/sdc1
where /dev/sdc1 is the location of your USB drive.
5. Download initrd.gz and vmlinuz from the Ubuntu archive (32-bit versions, 64-bit versions) and place both files in the root of your USB drive. Technical note: it is important to use the hd-media images because otherwise the installer won’t be able to find the ISO image later on.
6. Place the ISO image you downloaded earlier in the root directory of the USB drive. It doesn’t matter what it’s called as long as it ends in .iso.
7. Create a file named syslinux.cfg in the root of the flash drive and add the following lines to it (choose one of the three below):
Regular installation:
default vmlinuz
append initrd=initrd.gz
Command line system installation:
default vmlinuz
append initrd=initrd.gz file=/cdrom/preseed/cli.seed
LTSP server installation:
default vmlinuz
append initrd=initrd.gz file=/cdrom/preseed/ltsp.seed
Note: the /cdrom/ is not a typo!
8. Reboot your computer and make sure you choose to boot from the USB drive in the BIOS. The rest of the Ubuntu installation should proceed exactly as it would from a CD-ROM, with one exception: after the installation is finished, you need to do some configuring to add the USB drive as a source in apt.
9. Once the installation is complete, boot into your new system and open up a terminal. Copy the contents of the ISO image to your hard drive so that you don’t have to have your USB drive plugged in when you add packages. To do so, mount the USB drive and then mount the ISO image somewhere, and copy the files recursively to your hard drive:
sudo mkdir /media/flash
mkdir ~/ubuntu-cdrom
sudo mount /dev/sdc /media/flash
mount -o loop /media/flash/ubuntu-8.10-alternate-amd64.iso /cdrom
cp -r /cdrom/* ~/ubuntu-cdrom
umount /cdrom
Of course, you should substitute /dev/sdc with the location of your flash drive and ubuntu-8.10….iso with the name of your ISO image. You should end up with all of the files from the ISO image located under ~/ubuntu-cdrom or wherever you decided to put it.
Now edit the /etc/apt/sources.list file to include this location:
sudo nano /etc/apt/sources.list
and add at the bottom
deb file:/home/jesse/ubuntu-cdrom intrepid main restricted
where jesse is your user name. Finally, run
sudo apt-get update
to add the new source. You now should be able to install any of the packages that are on the CD with no problems.
Troubleshooting
If you’re having trouble getting the USB drive to boot, try installing a new Master Boot Record (MBR) on the drive using the instructions below.
Linux:
- Install the mbr package. On Ubuntu use
sudo apt-get install mbr - Run install-mbr to install a new MBR on the USB drive, where /dev/sdc is the path to the USB drive’s device node:
sudo install-mbr /dev/sdc - Reboot and choose the USB drive as the boot-up drive.
- If you see a prompt that says “MBR FA:” press A, then 1. This will boot from the first partition on the USB drive.
- Proceed from step 9 in the guide above.
Windows:
- Open a command prompt (Start->Run->cmd).
- Type the following, where F: is your USB drive, then press Enter:
fdisk /mbr F: - Reboot and choose the USB drive as the boot-up drive.
- Proceed from step 9 in the guide above.
7 Comments »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.
Hi,
I am trying to install ubuntu 8.10 from usb drive and using alternate cd as i have 256 MB RAM. I have winxp and i want to use one of its partitions for ubuntu(dual boot configuration).
I followed the procedure provided by you and it all went fine except while installing some yenta_socket error came. Anyways i continued from it and reached partition manager.
Now the problem started. The partition manager is only showing the usb drive space and not any of my pc hard disk partitions where i want to install ubuntu.
Please suggest something to resolve this problem.
Thanks waiting for your reply.
Tarun.
Comment by Tarun Singal — 11 February 2009 #
Tarun,
I don’t think that the yenta_socket error would be related to the problem with partitioning the disks. There are a couple of possibilities here. One is that your computer’s IDE or SATA controller is not currently supported. Since you only have 256MB of RAM, it sounds like you have an older computer. But if you have a newer computer, you could try a development version of Ubuntu and see if that works with your disks. The other possibility is that you may need some extra boot parameters to be able to access the hard drive. Try looking at this page for some help on using boot parameters and troubleshooting the installation process: https://help.ubuntu.com/8.10/installation-guide/i386/boot-parms.html
If you are still having trouble, please post some info on what type of computer you have, etc. so that I can try to help.
Jesse
Comment by Jesse — 12 February 2009 #
This page also has a lot of good info on troubleshooting the installation, some of which is applicable to booting from a USB drive:
https://help.ubuntu.com/8.10/installation-guide/i386/boot-troubleshooting.html
Comment by Jesse — 12 February 2009 #
Hi,
I hit exactly same problem before few weeks. After a lot of googling and reboots I found both the problem and solution.
The problem is that if some partition of your local harddisk is already mounted, the partition manager don’t show entire disk…
Partition is mounted because installer looks for an .iso image on all available partitions.
Solution is easy. Switch to different virtual terminal, umount all local disk partitions and run partition manager again.
Umounting is little tricky, because partitions are mounted on the same mount point and USB stick is usually last one. So use ‘umount -l’ and don’t be scared, if your USB stick looks unmounted as well. It works!
Comment by JirkaS — 27 February 2009 #
Lifesaver! Many thanks
Comment by Jet — 1 March 2009 #
Top stuff, spend ages trawling through Ubuntu’s documentation following instructions that are either wrong or ambiguous. This worked off the bat for Xubuntu 9.04.
Comment by Alan — 15 April 2009 #
Many thanks – I just used this to install Ubuntu 9.04 (for which the hd-media archive path needs to say ‘jaunty’ of course) and it’s perfect. Not only saves a CDR, but a lot of time, too.
I did see the same yenta_socket modprobing error that Tarun mentioned. Every time the installer was scanning buses for hardware (networking, disks, etc), it tried to load the yenta_socket (cardbus) module and threw an error. My guess is that the hd-media vmlinuz image lacks the right hooks for that module, or something like that. I don’t have cardbus devices so it wasn’t a problem. Also, after rebooting into the fresh install there are no problems with the module anymore.
Comment by yungchin — 1 October 2009 #