Ubuntu – Running Ubuntu from a USB Flash drive on Acer

usb-drive

I've made a bootable USB flash drive to run Ubuntu. The drive works fine on most laptops/computers I try: It does not want to start on my (favourite) Acer Aspire 5745 (Windows 7 64 bit). The opening screen has SYSLINUX 4.06 EDD 4.06-pre1 (…) and simply sits there. I was using Ubuntu 12.04.1 64 bit until I tried booting to the Acer this morning. I've tried booting to 10.04 as well (saw this as a fix on a discussion) with the same result.

I really want to use the Acer for development and do not want to wipe my Windows 7 from the hard disk.
Are there any solutions/answers?

I was using a 16 GB Cruzer drive (I was "playing" until the two 32 GB Kingston drives arrived this morning from Staples). Although Cruzer drive worked fine on other laptops it did not want to work on the Acer. I formatted one of the 32 GB Kingston's and it fired up immediately. Lesson learned for the other poor souls I saw with the same issue. Thank you for the quick reply and tell your friends about the solution. Baffled me for a bit…

Best Answer

Late getting around to writing this one up.

Preamble

The problem appears to be an inconsistent partition table, often found on factory formatted USB thumb drives. Something about the partition table makes it unsuitable to make a liveUSB.

The Problem

My research into this seems to suggest the problem stems from a partition table written in a DOS 6.x format, a known buggy implementation. Here's explanation from the Linux cfdisk manual page (cfdisk is a text based utility for manipulating disk partition tables):

DOS 6.x WARNING

   The DOS 6.x FORMAT command looks for some information in the first sec‐
   tor of the data area of the partition, and treats this  information  as
   more  reliable than the information in the partition table.  DOS FORMAT
   expects DOS FDISK to clear the first 512 bytes of the data  area  of  a
   partition  whenever a size change occurs.  DOS FORMAT will look at this
   extra information even if the /U flag is given -- we  consider  this  a
   bug in DOS FORMAT and DOS FDISK.

Manifestations of this problem will often include some or all of the following symptoms:

  • Testdisk and similar programs will identify the partition table as being made by DOS 5.x
  • The boot disk creator in Ubuntu will often refuse to use the USB thumbdrive because it can't find a valid partition table the error message does not state this clearly however.
  • Disk utility and Gparted can not delete the partition table because they don't recognise that there is one. Conversely they can't make a partion table either, because they also recognise that there is something there.
  • Running fdisk -l on the thumbdrive will often declare that it has no partition table, even though you know there is one and can write data to it if it is still mounting OK.
  • Attempts to use the drive and put an ext type partition table on it if successful can sometimes result in inconsistencies - the drive can fail to work on other machines, or suddenly fail to mount on the machine it was formatted on. These appears to be 'dead' USB thumbdrives as the device is firmware is recognised but it fails to mount and the partition table can not be read at all. I suspect a few fairly new thumbdrives have been thrown away, including one of mine before I figured out what the problem was.

Affected devices

Devices that I know from personal experience that have this problem:

Verbatim white 'Stor N Go' 4 and 8 GB devices Many Kingston 4Gb devices Woolworths "essentials" 4GB devices

Common factors with all of these devices is often that they claim Linux OS compatibility, and that they often include some Windows backup software for synchonising Windows data folders.

I don't know why USB thumbdrive manufacturers are supplying devices with what appears to be a partition table format that had problems when it was released. Any later format would probably work without any problems whatsoever, even though it might not be perfect by todays standards.

The Solution

dd if=/dev/zero of=/dev/sdX bs=512 count=1

This little line of code simply writes zeros over the top of the partition table on the device /dev/sdX

You will need to change sdX to the correct device for your faulty USB pendrive.

Warning: Using the incorrect device name will completely delete the partition table from whatever device you point it at - hard drive, external backup drive, anything. This will result in the deletion of any and all partitions that might be on the drive, and cause you a great deal of grief if you don't have all your important data backed up. You Have Been Warned

Once the partition table has been erased you will have to use a program like gparted to create a new one, and to add 1 or more partitions so that the device can be used. In my experience this fix is fast, simple, and permanent. I usually do it on all new USB pendrive devices that I purchase.

It's also possible use Linux command line utilities such as fdisk and extfs to create a new partition table. I shall add some details on this as time allows.

References