Advanced

Ubuntu "Stick" Blues - or USB for short

Posted by hkwint on · 23 comments
LXer Linux News; By H. Kwint - The Netherlands
Mail this story
Print this story

hk.img

LXer Feature: 29-Oct-2009

There could be several reasons why your PC doesn't have a CD-ROM. For example, the next scenario:

  • 1) You damaged the mobo fan while hoovering dust,
  • 2) The new fan you bought featured adhesive tape which didn't last at 60 degrees (C), and an iron cord didn't fix it, causing the fan to fall of,
  • 3) The northbridge burned,
  • 4) The new 'green' AMD780G mobo you bought could not facilitate both your CD-ROM and IDE drives,
  • 5) Given your IDE drives were part of a RAID array, you decided not to connect your CD-ROM drives.

OK, your reasons will probably be different, but these are mine. "Not a problem" I thought. "After all, it's 2009. Who needs CD-ROMs anyway?" The answer is: Mandriva, Gentoo, Tinycore and even Windows 7 don't, but Debian derived stuff does. It makes your life really hard, while Ubuntu is meant to make your life as a human being simple.

Once, my systems hard drives were unbootable. That was a problem, given my CD-ROM drives were not connected anymore. I thought of many solutions. Buying a Promise-IDE card to connect the CD-ROM-devices via PCI. Buying new SATA-DVD drives. Buying SATA-to-IDE connectors. But I decided not to buy anything, and boot a recovery OS from USB instead when needed. Sure, I could open the case, disconnect the IDE drives, connect the CD-ROM drives, boot a LiveCD from one and burn a CD on the other and revert all connections afterward. But after doing that once I decided it was 'too clumsy'.

My first try at booting from USB was with DSL. It booted without a glitch, at the first try, but didn't support my network card given it's 2.4 kernel. Later, as a Gentoo user, I became tired of compiling KDE and found out that Kubuntu is recommended for developing KDE. I decided I was going to use Kubuntu, especially given all the fuzz 'bout 9.10. "After all, it's supposed to be a modern distro leading us into the new decade, those of netbooks without CD-ROM!" I contemplated. Boy was I wrong.

Somebody was so nice to make UNetBootin. You just choose an OS and version from a list, and it makes a bootable USB drive for you. Or if the OS is not in the list, you give it an ISO file, and same result. I have to stress UNetBootin was designed to boot Ubuntu without CD-ROM, exactly what I wanted!

Well, it was not that easy. Kubuntu wouldn't boot. Not 9.10 RC. Not 9.04. Not Daily Build. Not when choosing it from the UNetBootin list, not when providing ISO's to UNetBootin. Not Kubuntu alternate. Not when manually running / editing the configuration of syslinux. Not when copying the kernel / initrd to the harddisk and manually using GRUB to boot. Not with Ubuntu 9.04. Not from SD over USB, not from my USB memory stick. And not in many combinations of these.

There were several manners how this failed. For example, because the Debian-installer wants you to have a CD-ROM-device. It won't let you continue otherwise! This can be circumvented by loop-mounting in busybox, and then using /dev/loop0 as a CD-ROM-device, just to make the freakin' Debian installer happy. What nonsense. Please note you can't loop mount to /mnt/0 because busybox doesn't want to accept that target, it only seems to accept a dir in the root directory.

After that, it failed after starting CUPS and tuning my hard disks. It just hung there.

That's why I decided to try something else. I provided a TinyCore ISO to UnetBootin and it booted without a glitch. Could you believe that? It ran X, and I was able to install things using a GUI and to browse using either Opera or Firefox. Quite pleasant actually, apart from the graphics being a bit ugly due to 'simplified' drivers (VESA in combination with TinyX I guess) and resolution.

Then I found a comparison of OpenSuse with Karmic, both using USB to boot. My OpenSuse try failed, because I didn't notice I was supposed to dd the ISO-image to a block device (/dev/sdi) and not to a partition (/dev/sdi1). This caused a major failure because Linux is not able to delete an ISO9660 file system. Believe me, because I and others tried. Luckily there is decent stuff beyond Linux such as VirtualBox and Windows XP, so this problem can be fixed after all, but not in Linux only.

With Mandriva Spring One / Free I didn't make the same mistake, and apart from being a bit ugly it worked OK. However, it didn't come with a CD-burning program, because I just decided maybe I should open my case after all to burn a Kubuntu CD-ROM (while booting from USB).

My 80 MB command-line only Gentoo 2008 netinstall also booted flawlessly from USB.

After that I found out about PendriveLinux, but it tells you to burn an Ubuntu CD-ROM, and after booting from that CD-ROM, go to the menu and choose 'make LiveUSB'. Thanks for the effort, but how annoying, I don't have a #%^*$ CD-ROM device!

So I looked further, and finally found out about the 'detect-cdrom/try-usb=true' kernel parameter, which you should add just to make sure the Debian-installer understands not every human being has a CD-ROM-drive. Great, to be sure I copied all syslinux-config files to the root of the filesystem of the USB-drive and ran syslinux on the FAT-partition. Then Kubuntu finally booted. Into the command line, that would be. So, I continued in the Gentoo way with X -config, and as sudo I tried to run with that config, but it wouldn't let me. After copying the file to /etc/X11/xorg.config it failed because it couldn't find /dev/fb0. Too sad. Even worse, the CLI didn't come with lynx or links, so I was not able to look for the error directly. So I fiddled with apt-get - wihtout success. Please note in 'user-unfriendly' distributions like the 50MB netinstall from Gentoo 'links' is provided by default.

So as usually (this happened to me in Fedora before) I continued by replacing the nv driver (in Fedora it was Nouveau) with VESA, and that's how I finally was able to boot Kubuntu from USB. "How is this supposed to be user friendly?" I asked myself.

Only two things would have to be changed to fix this: Add the try-usb flag by default (or why not just fix the Debian installers assumptions?) and a bulletproof X configuration, which has been proposed before. Maybe provide an ISO which you can just dd, in the way Mandriva and OpenSuse do. Until then, I will continue to have the Ubuntu memory-'Stick' Blues.

Disclaimer: Yes, I know, I should have submitted bugs, asked on IRC and everything. But I wasn't expecting to participate in a development process, because if I was, I would happily continue to use Gentoo. I was expecting to run something for which participating in a development process was not necessary in the first place!

  Nav
» Read more about: Story Type: LXer Features; Groups: Debian, Fedora, Gentoo, KDE, Kernel, Linux, Mandriva, PHP, Ubuntu

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (23)

USB-related

There is also a USB stick issue found in older BIOS's that is described in the Syslinux Project's 'USBKey' text document http://syslinux.zytor.com/doc/usbkey.txt
Quoting:The proper mode to boot a USB key drive in is "USB-HDD". That is the ONLY mode in which the C/H/S geometry encoded on the disk itself doesn't have to match what the BIOS thinks it is. Since geometry on USB drives is completely arbitrary, and can vary from BIOS to BIOS, this is the only mode which will work in general.

Some BIOSes have been reported (in particular, certain versions of the Award BIOS) that cannot boot USB keys in "USB-HDD" mode. This is a very serious BIOS bug, but it is unfortunately rather typical of the kind of quality we're seeing out of major BIOS vendors these days. On these BIOSes, you're generally stuck booting them in USB-ZIP mode.

THIS MEANS THE FILESYSTEM IMAGE ON THE DISK HAS TO HAVE A CORRECT ZIPDRIVE-COMPATIBLE GEOMETRY.


Debian should work

I can't speak for unetbootin or Kubuntu, but Debian installs using USB are documented at http://www.debian.org/releases/stable/i386/ch04s03.html.en ISTR it working for me with Debian Lenny, but my favourite install method for my home LAN is a PXE + TFTP medialess install - a minor hassle to setup the first time, but once setup it's easy to maintain. It seems like most (especially onboard) Ethernet controllers support this nowadays.

John
hkwint - I'd just bite the bullet and get a SATA optical drive ...
Funny, Hans, both Kubuntu and Kubuntu Netbook Remix worked fine for me with Unetbootin. It's how I did the installs to my netbook and netbook's SD cards which I use for testing distros I'm unlikely to keep. I don't know why you had issues. Oh, and for the record Ubuntu, Ubuntu Netbook Remix, and Xubuntu also work. One of the above five choices will be a keeper: I'm just not sure which one yet.
I'm confused. Running Ubuntu, with recent versions, you can just go to your System menu, Administration, and select the USB Startup Disk Creator. From here, you can select pretty much any current Ubuntu ISO and it will make the USB bootable as if it was the CD. I've used it previously to get a copy of Ubuntu Linux 9.10 on my stick without burning the CD, and then used that as my installer for Ubuntu Linux 9.10 on another USB stick (yes, I carry two -- one for using and one for proliferation purposes).
hkwint Story submitter ·
John: Thanks, I will try.

Quoting:Running Ubuntu, with recent versions, you can just go to your System menu


I know, but the problem is that I was not yet running Ubuntu.
hkwint, you could have taken the Gentoo approach to installing debian/ubuntu (works for either). From Gentoo do a debootstrap debian/ubuntu install, as Gentoo does have all the needed utilities to install debian/ubuntu/other_debian_derived.

/end Gentoo geek humor
hkwint Story submitter ·
Obviously, I already thought of that too. But I couldn't find the Ubuntu stage-files. Too sad, isn't it?

Grub2 boot Live CD from hard disk

Of course, with Ubuntu 9.10 you have Grub2. Were you aware that with Grub2 you can boot a CD iso from harddisk?....

FYI,

http://www.linux.com/community/blogs/Boot-an-ISO-via-Grub2.h...

Best Regards, Dietrich
hkwint Story submitter ·
I heard about it a while ago, but back then they also told Grub2 was not yet very stable. This might have changed, I should try!
I might add, this even opens up the possibility of mounting a pen drive formatted with a Live CD on a PC that *doesn't*have*bios*support* for boot from usb!!!

Food for thought.
I switched to grub2 on Ubuntu 9.10 and it seems pretty stable so far. Thanks for the tip Dietrich.
Technically, it's 1.97, but I went with a clean install of 9.10.

FYI, http://www.phoronix.com/scan.php?page=news_item&px=NzYzOQ
Dietrich, you forget to mention that a caveat to this is that the iso itself needs to be designed to work with grub2's ability to boot straight from hard disk. I have already run across that little gotcha on several occasions, and there is no way to know until you try.
@azerthoth:

Please cite a reference that highlights the issue to which you refer...thx
irc.freenode.net (I believe that the channel is #grub) is where it came up in trying to get the sabayon iso's working with grub2.
@azerthoth

What specifically is the issue and how did you resolve it?
Never did solve it as it would have taken a remaster of the iso. It starts the boot, gets to wanting to mount the root partition and dies right there. We had several guesses as to why and what, in the end though the grub folks let us know that the iso wasnt setup correctly for grub2.
I found this which may be of use:

http://sidux.com/index.php?module=Wikula&tag=Grub2isofrom

Its meant for sidux but the issues look general

That's odd.

Just last night I downloaded Ubuntu 9.10 Netbook Remix, downloaded UNetBootin, backed up the data on the microSD card from my cell phone to an SD card in the 2nd card reader slot, had UNetBootin' set up the microSD through a USB adapter, and booted my Aspire One Netbook into Karmic with ZERO problems!

Ran like a top, so I installed it, and then fired all my phone data back onto the microSD and went to bed.

I can't see why the desktop version wouldn't work just as easily ... the other option would be just to install UNR and change some packages to get the standard desktop instead of the netbook interface. Although, to tell you the truth, I really like the netbook interface. That's slick as heck and very functional! I'm not sure how much I'll actually boot into Windows 7 now. For the limited range of apps I actually run on the pocket wonder, UNR is probably going to be all I need!

Was really impressed at how seamlessly it picked up not only my wifi, but the whole process of connecting was easier than Windows was too. Sleep and wake times beat the pants of 7 too. Hibernate works flawlessly. It's very polished!!
The desktop version does work equally well with unetbootin... for most of us, I don't discount the author's issues. They're real. Perhaps it would be better to try and troubleshoot why they happened rather than lament them and claim the whole thing just doesn't work.

In fairness, Linux distros (and operating systems in general) do produce different results on different hardware.
hkwint Story submitter ·
Thanks for the suggestion of trying the Netbook Remix, DigitaLink. I didn't thought of that option yet, otherwise I'd have definitely tried just that. I have my doubts about why Ubuntu just can't provide a 'one fits all' distribution which you can configure for KDE, Gnome or Netbook, but that's a whole other discussion.

Quoting:Perhaps it would be better to try and troubleshoot why they happened rather than lament them and claim the whole thing just doesn't work.


No, not perhaps, that's for sure, and I admit I'm to blame.

The problem is I wasn't prepared to do troubleshooting when I started. Later I did some troubleshooting by searching for errors on the web. That's how I found out about the try-cdrom/detect-usb, bulletproof X and the things like that. I couldn't find any people who had the '/dev/fb0 missing' error in combination with Kubuntu 9.10 and the nv driver. And please don't forget I'm using unetbootin on a distro where it's not marked as 'stable' yet. Also, when a system just 'hangs' without error message or log to read, there's not much troubleshooting someone can do.

Obviously, I was a bit angry after this whole experience, which is probably why this article looks like I'm blaming people while I didn't really intend to. I'm glad of the efforts they did. I'm just disappointed that my experience wasn't as good and the process wasn't as easy as advertized - and experienced by most other users. I feel like maybe I did something wrong or have some peculiar setup, but I just can't find why all this doesn't work out of the box for me while it does for others.

Maybe a nVidia 6600LE card can be considered 'old' hardware (I don't consider it old), but I always thought 'Linux' ran great on older hardware. But I'm pretty dependent on nVidia and it's willingness to support my 'old' card in newer drivers. Anyway, most of the times I try a Linux LiveCD it just doesn't boot X out of the box on my setup, and that's disappointing.

Apart from that, the 1680x1050 monitor I just bought might also be a bit of a problem, but my monitor is happy to display 4:3 output (stretched) as well.
> I have my doubts about why Ubuntu just can't provide a 'one fits all' distribution which you can configure for KDE, Gnome or Netbook

I'm pretty sure you can configure the default Ubuntu install for any of the above, but most people don't want to take the time/effort. It's simpler for them to download a new iso.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post