<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: usb</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/usb/feed/index.xml" rel="self" type="application/rss+xml" />
    <description>GNU Linux, Perl and FLOSS</description>
    <language>en-gb</language>
    <pubDate>Fri, 13 Feb 2026 17:22:31 +0000</pubDate>
    <lastBuildDate>Fri, 13 Feb 2026 17:22:31 +0000</lastBuildDate>
    
    <item>
      <title>Intermittent USB3 Drive Mount Continued</title>
      <link>https://chrisjrob.com/2015/11/27/intermittent-usb3-drive-mount-continued/</link>
      <pubDate>Fri, 27 Nov 2015 12:10:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2015/11/27/intermittent-usb3-drive-mount-continued</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/anker-usb3-hub.jpg" align="right" alt="Featured Image">
         
         <p>Further to my recent post <a href="/2015/11/17/intermittent-usb3-drive-mount/">Intermittent USB3 Drive Mount</a>, sadly I have to report that, after ten days of perfect operation, this morning once again the drive mount failed.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># dmesg | tail
</code></pre></div></div>

<!--more-->

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[ 7659.848351] usb 2-3: Product: USB3.0 Hub             
[ 7659.848352] usb 2-3: Manufacturer: VIA Labs, Inc.         
[ 7659.852937] usb 2-3: Disable of device-initiated U1 failed.
[ 7659.856435] usb 2-3: Disable of device-initiated U2 failed.
[ 7659.856473] hub 2-3:1.0: USB hub found
[ 7664.860293] hub 2-3:1.0: config failed, can't read hub descriptor (err -22)
[ 7664.863787] usb 2-3: Set SEL for device-initiated U1 failed.
[ 7664.867279] usb 2-3: Set SEL for device-initiated U2 failed.
[ 8137.312105] usb 2-3: reset SuperSpeed USB device number 3 using xhci_hcd
[ 8137.559139] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8800bc7e8a20
</code></pre></div></div>

<h2 id="power-control">Power Control</h2>

<p>Following the tack from last time, I once again checked the USB power control status:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># grep . /sys/bus/usb/devices/*/power/control
</code></pre></div></div>

<p>As before these were mostly set to auto, so I switched on again using the same command as before:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># for F in /sys/bus/usb/devices/*/power/control; do echo on &gt;"${F}"; done
# grep . /sys/bus/usb/devices/*/power/control
</code></pre></div></div>

<p>Clearly I need a more permanent fix to that command.</p>

<h2 id="auto-suspend">Auto-Suspend</h2>

<p>I also discovered two more settings:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># grep . /sys/bus/usb/devices/*/power/autosuspend
</code></pre></div></div>

<p>Apparently to switch off auto-suspend you should set the delay seconds to -1:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># for F in /sys/bus/usb/devices/*/power/autosuspend; do echo -1 &gt;"${F}"; done
# grep . /sys/bus/usb/devices/*/power/autosuspend
</code></pre></div></div>

<p>To set this permanently I created a file <code class="language-plaintext highlighter-rouge">/etc/modprobe.d/autosuspend.conf</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>options usbcore autosuspend=-1
</code></pre></div></div>

<p>I came across <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1371233">Ubuntu Bug 1371233</a>, in which there was a suggestion to try:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># echo -1 &gt;/sys/module/usbcore/parameters/autosuspend
</code></pre></div></div>

<p>And on the same lines the suggestion to edit <code class="language-plaintext highlighter-rouge">/etc/default/grub</code> file and append to the <code class="language-plaintext highlighter-rouge">GRUB_CMDLINE_LINUX_DEFAULT</code> line:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>usbcore.autosuspend=-1
</code></pre></div></div>

<p>Followed of course by the obligatory:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># update-grub
</code></pre></div></div>

<h2 id="power-level">Power Level</h2>

<p>You can also check your USB power levels:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># grep . /sys/bus/usb/devices/*/power/level
</code></pre></div></div>

<p>Mine were already all switched on, but if not:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># for F in /sys/bus/usb/devices/*/power/level; do echo on &gt;"${F}"; done
# grep . /sys/bus/usb/devices/*/power/level
</code></pre></div></div>

<h2 id="back-to-basics">Back to Basics</h2>

<p>Having run through all the above, I still could not see my drive. 
Unplugging and plugging it back in seems to have no reaction in the logs, suggesting that my drive is not being seen at all.</p>

<p>Re-plugging the USB hub seems to respond okay:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Nov 27 11:51:47 asusi5 kernel: [11372.680605] usb 1-3: USB disconnect, device number 2
Nov 27 11:51:47 asusi5 kernel: [11372.775937] usb 2-3: USB disconnect, device number 3
Nov 27 11:51:54 asusi5 kernel: [11379.603869] usb 1-3: new high-speed USB device number 7 using xhci_hcd
Nov 27 11:51:54 asusi5 kernel: [11379.733470] usb 1-3: New USB device found, idVendor=2109, idProduct=2812
Nov 27 11:51:54 asusi5 kernel: [11379.733478] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 27 11:51:54 asusi5 kernel: [11379.733482] usb 1-3: Product: USB2.0 Hub
Nov 27 11:51:54 asusi5 kernel: [11379.733486] usb 1-3: Manufacturer: VIA Labs, Inc.
Nov 27 11:51:54 asusi5 kernel: [11379.734284] hub 1-3:1.0: USB hub found
Nov 27 11:51:54 asusi5 kernel: [11379.734556] hub 1-3:1.0: 4 ports detected
</code></pre></div></div>

<p>But still plugging in the USB3 drive into that hub still has no effect.</p>

<p>Next I tried re-plugging the USB hub into a different USB3 port. 
This time when I plugged back in the USB drive - it was recognised and worked perfectly.</p>

<h2 id="conclusions">Conclusions</h2>

<p>It could be that one of the above fixes only affects new devices (the auto-suspend probably), and that by choosing a different port it was recognised as a new device and therefore worked.</p>

<p>Equally there could be a hardware problem with the original USB port, perhaps the connector inside the case is a bit dodgy.</p>

<p>For now I will monitor the situation for another week or two and report back.</p>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Intermittent USB3 Drive Mount</title>
      <link>https://chrisjrob.com/2015/11/17/intermittent-usb3-drive-mount/</link>
      <pubDate>Tue, 17 Nov 2015 14:38:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2015/11/17/intermittent-usb3-drive-mount</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/samsung-drive.jpg" align="right" alt="Featured Image">
         
         <p>I have a problem with a Samsung M3 Portable USB3 external hard drive only working intermittently. 
I use a couple of these for off-site backups for work and so I need them working reliably.
In fairness a reboot does cure the problem, but I hate that as a solution.</p>

<p>To troubleshoot this problem, the first step was to check the system devices:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># ls -al /dev/disk/by-id
</code></pre></div></div>

<!--more-->

<p>But only my main two system drives were showing, and not the USB3 drive, which would have been <code class="language-plaintext highlighter-rouge">sdc</code>, being the third drive (a, b, c).</p>

<h2 id="system-logs">System Logs</h2>

<p>The next step was to check the system logs:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># dmesg | tail
</code></pre></div></div>

<p>This showed no issues at all. Then I checked <code class="language-plaintext highlighter-rouge">syslog</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># tail /var/log/syslog
</code></pre></div></div>

<p>This was completely empty, and had not been written to for almost a year. 
I can’t quite believe I haven’t needed to check the logs in all that time, but there you are.</p>

<p>I checked that rsyslogd was running and it was as user syslog. But the <code class="language-plaintext highlighter-rouge">/var/log/syslog</code> file was owned by root with group adm, but whilst syslog was a member of the adm group, the files all had user rw permissions only <code class="language-plaintext highlighter-rouge">-rw-------</code>.</p>

<p>This was easily fixed:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># chmod g+rw /var/log/*
# service rsyslog restart
</code></pre></div></div>

<p>Now the syslog file was being written to, but there was a problem writing to <code class="language-plaintext highlighter-rouge">/dev/xconsole</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Nov 17 12:20:48 asusi5 rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="11006" x-info="http://www.rsyslog.com"] start
Nov 17 12:20:48 asusi5 rsyslogd: rsyslogd's groupid changed to 103
Nov 17 12:20:48 asusi5 rsyslogd: rsyslogd's userid changed to 101
Nov 17 12:20:48 asusi5 rsyslogd-2039: Could no open output pipe '/dev/xconsole': No such file or directory [try http://www.rsyslog.com/e/2039 ]
Nov 17 12:20:48 asusi5 rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="11006" x-info="http://www.rsyslog.com"] exiting on signal 15.
</code></pre></div></div>

<p>So I duly visited <a href="http://www.rsyslog.com/e/2039">the link mentioned</a>, which gave instructions for disabling <code class="language-plaintext highlighter-rouge">/dev/xconsole</code>, but this made me nervous and further research suggested that that was indeed the correct fix for headless servers, but possibly not for a desktop PC. Instead I used the following fix:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># mknod -m 640 /dev/xconsole c 1 3
# chown syslog:adm /dev/xconsole
# service rsyslog restart
</code></pre></div></div>

<h2 id="usb-powersaving">USB Powersaving</h2>

<p>Now at least it seems that my syslog is working correctly. Unfortunately unplugging and plugging in the USB drive still was not writing to the logs! When I plugged in the drive the blue light would flash repeatedly and then switch off. I would have believed that the drive had a fault, if it weren’t for the fact that rebooting the PC solves the problem.</p>

<p>Thinking that perhaps this problem was USB3 related, I decided to Google for “USB3 drive not recognised” which found <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1242321">this post</a>. Except, that post was only relevant when operating on battery power, whereas I am using a plugged in desktop PC.  Clearly that page could not be relevant?  Except that in my notification area there is a battery icon, relating to my Uninterruptible Power Supply. But surely Ubuntu couldn’t be treating my UPS as if it were a battery? Could it?</p>

<p>In order to find out the power status of my USB devices I followed the suggestion of typing:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># grep . /sys/bus/usb/devices/*/power/control
</code></pre></div></div>

<p>Most were flagged as “on”, but a number of devices were flagged as “auto”. I decided to try switching them on to see if that made any difference:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># for F in /sys/bus/usb/devices/*/power/control; do echo on &gt;"${F}"; done
# grep . /sys/bus/usb/devices/*/power/control
</code></pre></div></div>

<p>Now all the devices were showing as on. Time to try out the drive again - I unplugged it and plugged it back in again. This time the power light flashed repeatedly and then went solid.</p>

<p>Unfortunately the drive was still not mounted, but at least it was alive now. What next? Ah yes, I should check the logs to see if they have any new messages, now that the drive is powered and my logs are working:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># dmesg | tail
[15243.369812] usb 4-3: reset SuperSpeed USB device number 2 using xhci_hcd
[15243.616871] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880213c71800
</code></pre></div></div>

<h2 id="faulty-usb-sata-bridge">Faulty USB-SATA Bridge</h2>

<p>At last I have something to go on. I searched for that error message, which took me to <a href="http://forums.debian.net/viewtopic.php?f=7&amp;t=117061">this Debian.net page</a>, which suggested:</p>

<blockquote>
  <p>Reason is faulthy usb-sata bridge ASM1051 in USB3 drives. It has nothing to do with motherboards.
See this. <a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a9c54caa456dccba938005f6479892b589975e6a">https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a9c54caa456dccba938005f6479892b589975e6a</a> 
Workaround was made to kernel 3.17-rc5. Now those disks works. Some perfectly and some works but data transfer is not smooth.</p>
</blockquote>

<p>Could that be my problem? I checked my current Kernel:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># uname -r
3.13.0-68-generic
</code></pre></div></div>

<p>So yes, it could be. As I cannot read the device yet, I cannot check whether ASM1051 is present in my USB3 drive.</p>

<p>Having uninstalled 34 obsolete kernels and a further 8 newer kernels that weren’t in use, I was in a position to install the latest Kernel from Vivid with:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># apt install linux-generic-lts-vivid
</code></pre></div></div>

<p>The problem of course is that in order to boot onto the newer Kernel I must reboot, thereby fixing the problem anyway.</p>

<h2 id="and-finally">And finally</h2>

<p>It would be easy to portray this as clear evidence of the difficulty of running Linux, certainly Samsung will have thoroughly tested their drive on Windows and Mac operating systems. That said such problems are <a href="http://lmgtfy.com/?q=usb3+drive+not+showing+up+\(windows%2C+os-x\)">not unheard of on the more popular operating systems</a> and debugging such problems is far harder, I would argue, than the above logical steps.</p>

<p>Having rebooted, as expected, the drive worked. I tried running <code class="language-plaintext highlighter-rouge">lshw</code> to see if ASM1051 was present, but I could not find it. Of course upgrading the Kernel could have fixed the problem anyway.</p>

<p>For the present I will labour under the comforting belief that the problem is fixed and will update this post again when either the problem reoccurs on in a week’s time if all is well!</p>

<ul>
  <li>Please see <a href="/2015/11/27/intermittent-usb3-drive-mount-continued/">Intermittent USB3 Drive Mount Continued</a>…</li>
</ul>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Ubuntu Lucid Lynx</title>
      <link>https://chrisjrob.com/2010/06/16/ubuntu-lucid-lynx/</link>
      <pubDate>Wed, 16 Jun 2010 00:00:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2010/06/16/ubuntu-lucid-lynx</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/ubuntu1004_350.png" align="right" alt="Featured Image">
         
         <p>As a died-in-the-wool KDE user, I’m just coming to terms with KDE4 and mostly loving it.  A few niggles remain, but in the main it is very good indeed.  But I suppose I would hesitate to recommend it to a new user.  Having seen and heard much praise for the latest Ubuntu 10.04 Lucid Lynx, which uses the Gnome desktop, I thought I’d give it a go.</p>

<!--more-->

<p>I started by downloading the ISO image from the Ubuntu website and followed my instructions to Make A Linux USB Key, basically by formatting in super-floppy format (which I find to be the most consistently successful method) and using Unetbootin to write the ISO to the USB Key.  Using a USB key is more convenient, more portable and more environmentally friendly than burning a CD/DVD.</p>

<p>I took a spare laptop, an HP NX7300, and inserted the USB Key.  I entered the BIOS settings and changed the boot order to boot first from USB.   I then booted up the laptop.</p>

<p>HP are not know for their Linux compatibility, but Ubuntu booted up with an attractive boot splash, before logging straight into the very attractively themed Gnome desktop.  The new colour scheme is purple, which is very attractive, although brown still exists in the OpenOffice splash screen to remind us of what used to be.</p>

<p>As expected, network manager failed to activate, and I knew from past experience that I would need to load the proprietary broadcom driver.  Continuing to play it dumb, I waited to see if I would get any help from Ubuntu.  After about half a minute, the restricted drivers’ manager appeared on the top panel, although there was no guidance as to why it had appeared, nor what to do with it.  I clicked on it and then clicked on the option to install the Broadcom STR driver and clicked activate.</p>

<p>After a minute or so it had loaded the Broadcom driver from the USB stick and I noticed that the wireless light had illuminated on the laptop.  Promising!  Unfortunately it then suggested I reboot to load the new driver; which obviously I can’t do, as I am running off a USB stick and would effectively start from scratch again if I rebooted.  I decided to just wait and, sure enough, after a while when I clicked on the wireless symbol on the top panel it offered my local wireless access point.  I selected it, and entered the encryption key, and I was connected.</p>

<p>At this point I had a completely usable desktop environment, including a full office suite (OpenOffice.org), a working web browser (Firefox) and everything else you could possibly wish in a modern desktop environment, all working off a USB stick.  I still find that just amazing.</p>

<p>I must admit that I am surprised by Gnome, it looks gorgeous, it feels very integrated, as if it had been designed as a whole, rather than being a collection of applications brought together.  No it’s not my much loved Debian, and no it’s not my much loved KDE, but it does feel easy to use, very uniform and just… well “right”.</p>

<p>I was particularly impressed by Rhythmbox, which had the built in music store, podcast reader, and local collection.  This does look like an application which would reassure an erstwhile iTunes user.  It’s probably not as good as amaroK, but having pushed amaroK on my mother and regretted it mightily, I think Rhythmbox is a good choice, being infinitely more user friendly.</p>

<p>I even set-up my Gmail account in Evolution, simply by clicking on the mail icon in the top panel and following the wizard to set up my Gmail account.  I played completely dumb, it provided all the necessary server information and network settings for me, and all I needed to know was my Gmail address and password.  That is incredible, anyone could set up their email if it’s that easy.</p>

<p>Having tested it, just to decide whether to recommend it to friends and family, I find myself sorely tempted to install it on my own laptop.</p>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | Make a Linux USB Key</title>
      <link>https://chrisjrob.com/2010/04/30/make-a-linux-usb-key/</link>
      <pubDate>Fri, 30 Apr 2010 11:59:28 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2010/04/30/make-a-linux-usb-key</guid>
      <description>
       <![CDATA[
         
         <p>Despite all the fantastic tools around, making a Linux USB key seems to be inconsistent.  Modern hardware seems to be fairly good, but older hardware may need fat 16 or fat 32 or superfloppy format.  The eee pc 701 for example seemed to need superfloppy format to work.</p>

<!--more-->

<h2 id="the-shortcut">The Shortcut</h2>

<p>Try erasing the contents of your USB key, then skipping down to Install Unetbootin below.  You could be lucky, and save yourself some fiddling about!</p>

<h2 id="step-1-make-sure-that-your-usb-key-is-unmounted">Step 1: Make sure that your USB key is unmounted</h2>

<p>Open a terminal and type:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ mount
</code></pre></div></div>

<p>This will list your current mounts, including your USB key (if mounted).  Take a note of the mount point (e.g. <code class="language-plaintext highlighter-rouge">/media/disk</code>) and type:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo umount /media/disk
</code></pre></div></div>

<p>Once you are confident that the drive is not mounted, you may proceed.</p>

<h2 id="step-2-determine-the-device">Step 2: Determine the device</h2>

<p>Find you USB key by typing:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo fdisk -l

Disk /dev/sdc: 64 MB, 64487424 bytes
4 heads, 32 sectors/track, 984 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Disk identifier: 0x5187ef1e

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1         983       62896    6  FAT16
</code></pre></div></div>

<h2 id="step-3-delete-the-old-partitions">Step 3: Delete the old partitions</h2>

<p><strong>This will lose any data on this drive!!!</strong></p>

<p>Ignore the number after the letter, so in the above example the device is <code class="language-plaintext highlighter-rouge">/dev/sdc</code>, not <code class="language-plaintext highlighter-rouge">/dev/sdc1</code>; the 1 is partition 1, but fdisk works on the whole drive, not just a single partition.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo fdisk /dev/sdX
</code></pre></div></div>

<p>Command (m for help):</p>

<ul>
  <li>Type “p” and enter to view the existing partitions (generally only one)</li>
  <li>Type “d” and enter to delete the partition (if there are multiple partitions, you may need to enter 1 for the first)</li>
  <li>Type “p” to view the remaining partitions (there should not be any!)</li>
</ul>

<p>At this point, nothing has <em>really</em> happened, you can “q” to quit and nothing will have been touched.</p>

<h2 id="step-4-create-the-new-partition">Step 4: Create the new partition</h2>

<ul>
  <li>Type “n” to make a new partition</li>
  <li>Type “p” to make this partition primary and press enter</li>
  <li>Type “1” (one) to make this the first partition and then press enter</li>
  <li>Press [enter] to accept the default first cylinder</li>
  <li>Press [enter] again to accept the default last cylinder</li>
  <li>Type “p” to view what you have done</li>
</ul>

<p>This should display the current configuration of your drive:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Disk /dev/sdc: 64 MB, 64487424 bytes
4 heads, 32 sectors/track, 984 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Disk identifier: 0x5187ef1e

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         984       62960   83  Linux
</code></pre></div></div>

<h2 id="step-5-change-partition-to-w95-fat32">Step 5: Change partition to W95 Fat32</h2>

<ul>
  <li>Type “t” to change type</li>
  <li>Type “b” for Win95 Fat32</li>
  <li>Type “p” to view what you have done</li>
</ul>

<h2 id="step-6-make-partition-bootable">Step 6: Make partition bootable</h2>

<ul>
  <li>Type “a” to add bootable flag</li>
  <li>Type “1” (one) to select first partition</li>
  <li>Type “p” to view what you have done</li>
</ul>

<h2 id="step-7-write-partition-changes">Step 7: Write partition changes</h2>

<p>Up to this point, nothing has actually been changed; if you are happy with the changes you have made, then:</p>

<ul>
  <li>Type “w” to write the new partition information to the USB key</li>
</ul>

<h2 id="step-8-format-the-partition">Step 8: Format the partition</h2>

<p>The final step is to create the fat filesystem:</p>

<p><strong>Note that this time we DO quote the partition number</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo mkfs.vfat -F 32 /dev/sdx1
</code></pre></div></div>

<p>This process ends by sync’ing the disk.</p>

<h2 id="step-9-mount-the-usb-key">Step 9: Mount the USB key</h2>

<p>For most systems, this can be easily achieved by simply unplugging and replugging in the key, and taking option to Mount when prompted.  Equally you can mount manually by typing:</p>

<p><strong>Change “mountpoint” below for an appropriate name</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo mkdir /mnt/mountpoint
$ sudo mount /dev/sdx1 /mnt/mountpoint
</code></pre></div></div>

<h2 id="step-9-install-unetbootin">Step 9: Install Unetbootin</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo aptitude install unetbootin
</code></pre></div></div>

<h2 id="step-10-use-unetbootin">Step 10: Use Unetbootin</h2>

<p><img src="/assets/unetbooting_350.gif" class="image-right" /></p>

<p>Run Unetbootin from your menu, either select a distribution and version, or take the option to install an already downloaded disk image.</p>

<p>Next select the usb drive.</p>

<p>Given the tiny size of my USB key, I am using slitaz, which is a minimal distribution.</p>

<p><strong>Have a look at the contents of the USB drive, in at least one test, unetbootin had only copied a single file across.  Just run unetbooting again if that happens.</strong></p>

<h2 id="step-11-reboot-and-test">Step 11: Reboot and Test</h2>

<p>That’s it, you should now be able to reboot onto the drive.</p>

<h2 id="step-12-troubleshooting">Step 12: Troubleshooting</h2>

<p>My first attempt was using FAT32, which did not work.  Next I tried FAT16, which also did not work, then I tried EXT2, by change partition type to “83 Linux” and then typing the following command (replacing the “x” for your correct drive letter):</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo mkfs.ext2 /dev/sdx1
</code></pre></div></div>

<p>This time the USB key was detected as USB-HDD and booted perfectly.  It does seem that everyone’s has different experiences, and there is an element of trial and error to get things working.</p>

<p>If you have a usb key over 512mb and are using FAT32, then you might try reducing the size of the partition to 512k, and create a second partition with the remaining space.</p>

<p>See Alternative Methods for other options.</p>

<h2 id="step-13-superfloppy">Step 13: Superfloppy</h2>

<p>I understand that the problem with USB booting, is that many BIOS’s understand the superfloppy format - i.e. a formatted but unpartitioned drive.  This is easy enough to create under Linux, simply delete the partitions in fdisk and format with:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># mkdosfs -I /dev/sdx
</code></pre></div></div>

<p>or possibly on older hardware:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># mkdosfs -v -F 16 -I /dev/sdx
</code></pre></div></div>

<p>The problem is that superfloppies will not be auto-mounted under Linux, with the result that Unetbootin cannot write to them.  But you can mount superfloppies manually:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ cd /media
$ sudo mkdir sdx
$ sudo mount /dev/sdx sdx
</code></pre></div></div>

<p>Then use unetbooting to write to /dev/sdx, and not forgetting to umount afterwards:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo sync
$ sudo umount sdx
</code></pre></div></div>

<h2 id="alternative-methods">Alternative Methods</h2>

<p>Some distributions offer their own USB key creation software, including Ubuntu 8.10+, PuppyLinux 4.10+, and Slitaz, to name but a few.</p>

<p>Also, it is possible to obtain disk images that can be written to a usb key directly, thus circumventing these problems.  For example:</p>

<ul>
  <li><a href="http://wiki.debian.org/DebianEeePC/HowTo/Install">Debian Installer</a></li>
  <li><a href="http://wiki.debian.org/DebianEeePC/Live">Debian Live</a></li>
</ul>

<h2 id="references">References</h2>

<ul>
  <li><a href="http://www.ubuntu-eee.com/wiki/index.php5?title=Install:_from_a_Live_Ubuntu_image_on_a_USB_stick">Install a Live Ubuntu image on a USB stick</a></li>
  <li><a href="http://www.pendrivelinux.com/">PenDriveLinux</a></li>
  <li><a href="http://d-i.pascal.at/">Installing Debian Sarge from a USB memory stick</a></li>
  <li><a href="http://wiki.debian.org/BootUsb">Debian Wiki USB Boot</a></li>
  <li><a href="http://wiki.debian.org/DebianEeePC/HowTo/Install">Debian EeePC Install</a></li>
</ul>


       ]]>
      </description>
    </item>
    
  </channel> 
</rss>
