Installing Debian distributions from USB sticks – problems and solutions

If you tried to install any distribution which uses Debian-Installer (Debian, Ubuntu and derivatives) using my method for booting multiple CDs from a USB stick (with ext2 partitions) (see also the version with FAT16 partitions, you most likely encountered the error “No common CD-ROM drive was detected.” immediatly after the “Detecting hardware to find CD-ROM drives” screen.

This is, of course, caused by the fact that Debian-Installer looks for CD-ROM drives and tries to mount them using the iso9660 filesystem (the ISO files format). Since we are running from a USB stick, our partitions are formated as ext2 or FAT16, so they will be ignored by Debian-Installer.

There is a quick fix though – Debian-Installer will happily use the files from the /cdrom directory if it is already mounted by the time it tries to check for CD-ROMs! You should follow these steps:

Step 1: Boot the USB stick, select the distribution that you want to install.

Step 2: When the installer asks for the language selection, don’t choose anything and press ALT-F2, then Enter to activate the console.

Step 3: Create /cdrom and mount the USB stick partition to it (/dev/sdc2 and 5 are my partitions, make sure you have the right ones, for example by looking at the log messages in console 4 – press ALT-F4 – or checking what sd* devices were created in /dev):

# ls /dev/sd*
# mkdir /cdrom
# mount -t vfat /dev/sdc2 /cdrom
or
# mount -t ext2 /dev/sdc5 /cdrom

If you get an error message saying “Invalid argument”, the most likely cause is that you run from a ext2 partition but the initrd doesn’t support ext2 filesystems. This is the genius work of Debian developers, and I will provide a fix for it in another blog post.

Step 4: Press ALT-F1 to go back to the installer dialogues and continue installing.

Additional step: If at some point, you get an error from the installer with the message “Failed to determine the codename for the release”, it usually means the installer is trying to access a symlink that is no longer there (most likely cause: you used a FAT16 filesystem, which does not support symlinks).

The solution is simple: take a look at the error messages in console 4 (press ALT-F4) and you will most likely see the installer tried to look for the release name “stable”. Get back to console 2 (press ALT-F2 and Enter to activate it), see what’s in /cdrom/dists and “fix” it:

# cd /cdrom/dists
# ls
lenny
# mv lenny stable

You can now return to the installer (press ALT-F1) and select Retry. The installation should continue correctly.

Enjoy and let me know what you think, in the comments section below!

Image credit: Sig.

TwitterFacebookLinkedInGoogle ReaderYahoo MessengerEmailGoogle GmailYahoo MailPrintShare

Related posts:

  1. How to boot multiple CDs from a USB stick (with ext2 partitions)
  2. Instalare de pachete care sunt în conflict pe Debian
  3. Mentenanța unui sistem Debian cu pachete în conflict

5 comments

  1. steve says:

    awesome tip. Why they don’t think of this up front is beyond me, but you solved my problem…thanks.

  2. Poli says:

    Great! Thank you so much, finally I’m able to install squeeze to panel PC from flash (it has no optical drive).

  3. Ovidiu says:

    @Poli, you’re welcome, I’m happy you found it useful!

  4. [...] you’ve read my posts about booting CDs from a USB stick (with ext2 partitions too) and the problems that I encountered, you know that I was pretty pissed-off by the Debian guys, who for some strange reason, decided [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*


+ 3 = six

CommentLuv badge