Testing Linux hardware compatibility with USB sticks

Want to select hardware that works with your favorite Linux distribution? Try it out first with USB stick in the store.
486 readers like this.
Testing Linux hardware compatibility with USB sticks

Opensource.com

Like everyone else, those of us who use Linux sometimes need to purchase a new computer. Although the days of poor hardware compatibility are long gone, it is still possible to run into issues. Just going to a local store, like Intrex here in Raleigh, or any of the big box stores, and watching the display models run Windows demo programs does not help my confidence levels about Linux support for all aspects of their hardware.

So it would be really nice to have a way to test a computer I might consider purchasing before I actually take it to the checkout counter. I thought about this problem for a while and then read an interesting email posted to the TriLUG (Triangle Linux User Group) right here in Raleigh. A gentleman named Alan Porter wrote that he had taken a live USB stick to a couple stores and rebooted the computers into a live version of Linux. He found a nice Acer laptop that worked perfectly with Linux that way.

So why didn't I think of that? Well, I guess we can't all have the great ideas like Alan.

But when I stopped to think about it, that is exactly what I do when I plug a Fedora 25 Live USB stick into any computer I already own to do an installation. If the Fedora Live USB works well enough to be able to even show the live desktop with its "Install to hard drive" option, most of the hardware should already be compatible, such as the motherboard, USB, graphics adapter, keyboard, hard drive, and mouse or touchpad. Only a few things would remain to be tested, perhaps wired and wireless networking, the sound system, and an integrated webcam.

Buying laptops

I talked to Alan to get more information on his experiences testing computers in retail stores using a live Linux USB drive. He has been using Linux for about twenty years so has had a good bit of experience dealing with compatibility issues. Alan has two daughters in school, and they desperately needed upgraded hardware. He wanted to buy two identical laptops but did not want to support/maintain Windows and he did not want to buy two expensive MacBooks. Both girls are familiar enough with Ubuntu that they would be OK with that. Most of their schoolwork is web-based and operating system-agnostic. Alan also imagined that they would be doing a few audio/video projects which might require some open source tools.

In the event that they absolutely must run Windows, he knew that his daughters could run a 90-day copy of Windows on a downloadable virtual machine from Microsoft's modern.ie site in VirtualBox.

Alan said that they looked briefly online at the major big box stores but he was pressed for time with Christmas rapidly approaching. He knew that Costco would have a narrowed-down choice of general-purpose laptops. He looked at one other big box store. They had a wider variety, but the models he and his daughters had also seen at Costco were a little more expensive there.

He did not ask permission to perform his testing, but one tech-savvy store employee did wander by. Alan told the staffer what he was doing and what his results were. Alan made sure to tell them that he was not altering anything on their computer, but that he wanted to see if it would run the software he had before they bought anything.

I asked Alan about other ways he has used live Linux USB sticks and he said, "I almost always have a live USB stick on me, or at least in my backpack. Most of the times I've used it, I have had a specific mission, such as copying the contents of a hard disk while it is not mounted or in use. Once or twice, I have used a live USB stick when a system was not bootable. In those cases, I would boot from the USB, mount the filesystem, and run a tool like fsck on the filesystem."

He has also used a live USB stick when resizing or encrypting hard disk partitions. He says, "In these cases, you can't have the filesystem mounted when you work on them."

He went on to say, "Way back in 2005, rather than bring my big heavy laptop on vacation, I brought a live CD for use in the hotels and public internet spots. We were booking hotels and transportation along the way, and I really didn't like the idea of using public (virus-infected) PCs at libraries, hotels, or shops. That worked surprisingly well, though these days, I have a much smaller and lighter laptop that would be easier to carry. And of course, phones are much more capable now than they were in 2005."

Creating the live USB

Creating a live USB drive is very easy these days. The Fedora Project website has an article on how to create and use Live USB page that contains instructions for doing just that on Linux and Windows. The Fedora Project page describes several methods for creating the live USB device, but my favorite is quite trivial and can be done from the command line with minimal work.

Select a USB memory stick. It should be large enough to contain the ISO image. Almost any USB memory stick will work, even a used one, so long as it is VFAT and bootable. I overwrite Live USB sticks all the time using this procedure and they work fine. If necessary you can use Linux fdisk to partition it and format it as VFAT and then make it bootable.

Download the desired ISO image from the Get Fedora website. I usually use either the "Workstation" version or the KDE spin. I plug in the USB stick and determine the device ID that has been assigned to it using the dmesg command. The results will look something like the following sample and will be at the very end of the output. The numbers in the square braces on the left of the output are time stamps representing the time since the system was booted.

[194543.805330] usb 3-4.1.3: new high-speed USB device number 14 using xhci_hcd
[194543.893708] usb 3-4.1.3: New USB device found, idVendor=abcd, idProduct=1234
[194543.893712] usb 3-4.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[194543.893714] usb 3-4.1.3: Product: UDisk           
[194543.893716] usb 3-4.1.3: Manufacturer: General 
[194543.893717] usb 3-4.1.3: SerialNumber: 1404161029354477560901
[194543.893980] usb-storage 3-4.1.3:1.0: USB Mass Storage device detected
[194543.894076] scsi host14: usb-storage 3-4.1.3:1.0
[194544.949733] scsi 14:0:0:0: Direct-Access     General  UDisk            5.00 PQ: 0 ANSI: 2
[194544.950065] sd 14:0:0:0: Attached scsi generic sg10 type 0
[194544.950181] sd 14:0:0:0: [sdh] 15761408 512-byte logical blocks: (8.07 GB/7.52 GiB)
[194544.950296] sd 14:0:0:0: [sdh] Write Protect is off
[194544.950299] sd 14:0:0:0: [sdh] Mode Sense: 0b 00 00 08
[194544.951111] sd 14:0:0:0: [sdh] No Caching mode page found
[194544.951114] sd 14:0:0:0: [sdh] Assuming drive cache: write through
[194544.954241] sdh: sdh1 sdh2 sdh3
[194544.955162] sd 14:0:0:0: [sdh] Attached SCSI removable disk

In this case, the device has been assigned as sdh, so we address it using the device file, /dev/sdh. Then I use the following command to install the image onto the device, where if is the input file and of is the output file. Remember that in Linux, everything is a file.

dd if=Fedora-Workstation-Live-x86_64-25-1.3.iso of=/dev/sdh

This command may take several minutes to complete depending on the speed of your computer. When completed you can use fdisk to list the partitions on the live USB device. My procedure results in three partitions.

Finally, you can test the live USB device you have just created by using it to boot from. You may have to set BIOS to boot from removable USB devices and set it to boot USB before the regular hard drives.

Testing an old netbook

After talking with Alan, I decided that I needed to get a little experience with actual testing using a live Linux environment before I headed out to some retail stores.

I used the Fedora 24 and 25 32-bit USB sticks created using the above procedure to test my old—very old as it was one of the very first netbooks—ASUS EeePC. I had to press Esc during BIOS to get to boot menu then select the USB device. Fedora 25 Live recognized all of the internal devices including the graphics adapter, the wired network card, and the wireless adapter. I did have to turn on the wireless in BIOS because I had turned it off many years ago to save power. At that time wireless was just not that ubiquitous.

I also took a little bit of time to test the wireless network, the sound, and the graphics using a couple videos from YouTube over a wireless connection. The sound worked just fine and the video was perfect with no skips or dropouts.

So I installed Fedora 25 on my EeePC and it works just fine. It just sits there and runs Fedora day after day.

On the road

After that test, it was time to move on to the real world. So I took my live Fedora USB sticks on the road to two different stores here in the Raleigh, NC, area. I started with Intrex, a local computer store that has knowledgeable staff, a good selection of laptops, desktops, and parts. I build all of my computers with parts I purchase from Intrex. 

On March 13, 2017, I went to Intrex with my trusty live USB drives. I tried the live USB drive on three laptops and one ASUS desktop. One Acer laptop booted to the live USB but spewed lots of errors. One Acer worked just fine, and on one ASUS laptop, I was unable to get to interrupt into BIOS so I could change the boot sequence. The Acer desktops worked just fine and it was easy to alter the boot sequence.

Jonathan Farmer, one of the staff at Intrex, knows me so I am pretty certain that is why he left me to my task after he asked me if I needed any assistance. I later told him what I was doing and got his permission to use both his name and that of the store.

Next, I went to Best Buy. I tried several laptops before someone on staff asked if I needed help. I told him no, that I was just testing some of the computers, and he looked at me a bit strangely but walked away without further comment. Some laptops here failed to boot, others booted and worked ok with the few tests I tried. No one at Best Buy paid much attention to what I was doing and I suspect that no one really cared. It was almost too easy and I could have been installing any kind of malware on the demo systems.

Conclusions

This test was not really about the performance or compatibility of the computers. It was all about the ability to boot a live USB on demo computers in a retail store and gauge the reaction of the staff. At Intrex, Jonathan walked by a couple times before asking if I needed help, but basically left me alone because he knew and understood what I was doing. None of the staff at Best Buy paid me much attention.

Other stores might possibly have reacted differently, but based on Alan's experience on top of mine, I don't think that they would have.

So the bottom line is that neither Alan nor I had any trouble walking into retail stores and using a live USB drive to test computers for compatibility with Fedora. And the testing showed that, at the very least, some of the computers that I tested would need more time to figure out how to get booted into BIOS or how to modify BIOS to boot from the live USB drive. I think I would have been able to do that, given more time than I was willing to spend for this test.

I did spend about 20 minutes trying to coax one laptop to boot to the USB drive but was never able to do so. In any real situation where I was looking to purchase a product, I would rule out any device that I could not get to boot to the live USB drive in that time—probably even less time than that.

Testing demo hardware in a retail store is a great way to help narrow down the choices. Just getting the live USB drive booted to the Fedora desktop is a big step in the right direction. And the tools available in the live environment allow testing of the rest of the system's peripherals. Even though I did not try to connect to the wireless access points I could see using the desktop Networks icon, just seeing the list indicated that wireless was working.

Now if I could just figure out a way to use this testing method when I purchase the individual components to build my own computers.

Tags
David Both
David Both is an Open Source Software and GNU/Linux advocate, trainer, writer, and speaker. He has been working with Linux and Open Source Software since 1996 and with computers since 1969. He is a strong proponent of and evangelist for the "Linux Philosophy for System Administrators."

10 Comments

I was doing this back in 2006, but with a CDROM instead of a USB key. I tried thee stores in Ottawa. It was between XMas and New Year, in late December 2006. The first store told me that was not possible, and I just left the store right away. The second one did not have much choice to play with. The third one was more than open to let me try it, and had several laptops to choose from. I got one that was working perfectly with Ubuntu, 6.06 back then, and bought it. I had no choice but to pay the "Microsoft tax", but the first thing I did with it once at home was to reformat the hard disk and install Ubuntu.

I would probably prefer to use one of my two bootable USB hard drives. These are laptop drives that I replaced with SSDs in my laptops. So I got USB cases for them. One has Linux Mint(KDE) 17.3, which is in use on my desktop and two laptops. The other has Linux Mint(KDE) 18.1 That one is kind of an experiment. I have found a couple of minor issues with 18.1, so waiting to see 18.2.

Booting to one of these drives lets me see how all of the hardware works with Linux Mint(KDE), and how all of the software works with the hardware. A USB flash drive would be more convenient, but I have yet to get the KDE versions of Linux Mint to work, and have persistence (being able to save files and settings) from a bootable USB flash drive.

If I were a store manager, I would be rather worried about folks wanting to plug a flash drive (or any drive) into any display computers...especially with disguised USB KILLERs available now!

Great article David! Why didn't I think of that. I've seen some laptops at Walmart that I wanted to try with Linux. Now I've got a solution thanks to your article.

I always carry a small USB stick on my key chain with a full Linux installation on. I prefer that to a live version as I can store files on it as well. When I was shopping for a new laptop, years ago, I tried to boot the one I was mostly interested in but I was quickly stopped by a clerk.

good idea. although i tried this at a local fry's electronics store . they had the bios locked out and i couldn't get my flash drive to boot. can't blame me for trying though

I found the BIOS configuration very inconsistent. Some booted my Live USB right away with no changes and others needed some minor changes to boot. II never did get some to boot to the USB, but I probably just did not spend enough time fussing with the various config options. Nor did I have the directions that might have given me some clue as to how to do so.

But the key is to try. Any computer that I cannot figure out how to boot to a USB device fairly quickly is probably not going to be on my short list anyway, unless it has some whiz-bang feature that I just cannot live without.

In reply to by coolguy (not verified)

I have used a Live Linux CD and then DVD Knoppix since Knoppix 3.x to do this to try computers for many years. It started as I used a Live Linux floppy ( 2 floppies) or CD to start IBMs in soviet places where I worked and thgus get a UK English Keyboard. I carry aKnoppix USB key at all times as i find it detects most hardware.

Has no one considered the security concerns of letting random users put USB sticks into new computers? I doubt this would be GRC.com approved! Isn't this a great way to spread malware if allowed? And same for the USB stick. Is there a way to make the USB non-writable? If so, I don't know about it.
CD Rom seems safer -- perhaps a lightweight USB interface to a (non-writable) live CD.

It would be better if the live .iso did not contain such a prominent 'install to hard drive' icon on the desktop, but buried in a menu. Or instructions how to edit the .iso to remove the icon prior to programming the USB stick

To avoid lingering USB-sticks with sensative data in TAXI's or Hotels, we (MoD) created a long time ago, a bootable USB-stick, with openVPN, Citrix-client and some support SW like Network/Modem-manager. Auto-login, no-shell, no access to anything local. Checked & approved by military intelligence.
Ideal way for working remote: at home/holiday or mission.
Also an easy way for testing new hardware. Especially new Video/Wifi-drivers
If you don't believe me, we issued over 35,000 of such bootable sticks.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.