The Magic Of USB Flash Drives

Soon I will go to a meeting where I might have to install Debian GNU/Linux without an Internet connection. To do the job, I made up a USB drive with everything I will need:

To test out this rig, I created a virtual machine and booted it from the USB drive. The default installation was routine, hardly different from any other. When I booted the minimal system, though, the repository in the CD would not work for me and debpartial-mirror didn’t have Debian’s signing keys… so I just used dpkg to install what I wanted.

The local repository I created on the USB drive had all the .deb’s on a single level so dpkg -i debian/pool/*/*/*/*.deb got everything there. It worked very well except that it thought three packages were broken. One was a discrepancy between versions on the CD and in the repository. Another was irrelevant because the package wasn’t likely to be used. One was a missing package. We missed one. Then I started up the GUI and saw this, in all its glory:

So, it’s not exactly like XP. It’s configurable and it fit in 4.3gB on the virtual hard drive. 😉 This is a lightweight setup which should give new life to an old notebook sagging under Vista.

One problem was that I had left out gksu to run synaptic, so I had to download the packages to put in a directory on the USB drive. If I want to offer remote support, I can get openssh-server off the CD. I can mount the CD on a local directory to get at the .deb’s there: mount whatever.iso some_dir/ -o loop,ro.

The entire configuration for debpartial-mirror?
cat /etc/debpartial-mirror.conf
;;
;; debpartial-mirror configuration file.
;;

[GLOBAL]
;; Show debug information?
;debug = DEBUG
;; Mirror destination directory
mirror_dir = /home/pogson/debpartial-mirror/
;; Which architectures should I download?
architectures = i386
;; What should I look for, by default?
components = main
distributions = wheezy
;; What should I get?
get_suggests = true
get_recommends = true
get_provides = true
get_sources = false
get_packages = true
;; Here is our first backend. It mirrors a subset of packages from the
;; Debian official repositories.
[wheezy]
;; Where do we get the packages from?
server = http://http.debian.net/debian
;; Since we specify components and distributions in this section, what we
;; specify here overrides the settings in [DEFAULT].
components = main contrib non-free
distributions = wheezy
;; Only get a subset of the packages in this source.
filter = name:xorg|xfce4|wifi-radar|wicd|iceweasel|libreoffice-writer|libreoffice-calc|gnumeric|vlc|gimp|xfce4-weather-plugin|lightdm|xfwm4|xserver-xorg-|xpdf|ristretto|aptitude|synaptic|gufw|xfburn|net-tools|glib-networking-services|python-numpy|gnome-icon-theme|dconf-service|liblapack3|gksu|openssh-server
;;resolve_deps_using = wheezy
;; And get the source packages as well for this backend.
get_sources = false

Yes, gksu, and openssh-server are in there. I must have messed up my versions as I converged on a solution…(I do need a secretary but can’t afford to pay one)… debpartial-mirror is wonderful because a short list like that pulls in the dependencies too. I can concentrate on what the user needs rather than ~1000 details.

Anyway, Debian GNU/Linux is a powerful operating system with powerful tools to use whether on or off the web and with or without a CD-drive. M$, eat your heart out.

UPDATE At the meeting, the lady had not brought her laptop but we did exchange e-mail address for follow-up. She often travels near my neighbourhood. Interestingly, another participant of the meeting, an active teacher, reported that her school’s secretary uses GNU/Linux on her desktop. Amazing. Usually school secretaries are the most difficult to convert because they have a huge inventory of documents and don’t want to risk upsetting the flow of information.

I even found there is at least one person in that town who does GNU/Linux but he does not provide training, just setup and networking support, exactly the backup we might need. I can provide training if e-mail is working.

UPDATE I redid the filter for debpartial-mirror to include the things I missed before and flashplugin-nonfree too.
"/media/usb1/debian/pool# ls */*/*/*.deb|grep "gksu\|ssh\|flash"
contrib/f/flashplugin-nonfree-extrasound/flashplugin-nonfree-extrasound_0.0.svn2431-3_i386.deb
contrib/f/flashplugin-nonfree/flashplugin-nonfree_3.2_i386.deb
main/g/gksu/gksu_2.0.2-6_i386.deb
main/libg/libgksu/libgksu2-0_2.0.13~pre1-6_i386.deb
main/libs/libssh2/libssh2-1_1.4.2-1.1_i386.deb
main/o/openssh/openssh-client_6.0p1-4+deb7u2_i386.deb
main/o/openssh/openssh-server_6.0p1-4+deb7u2_i386.deb"
All in all there are 1050 packages drawn in. Not bad for a few minutes of my time and 25 minutes downloading automatically with dependencies. Great. It makes for a speedy installation of a very usable system.

"filter = name:xorg|xfce4|wifi-radar|wicd|iceweasel|libreoffice-writer|libreoffice-calc|gnumeric|vlc|gimp|xfce4-weather-plugin|lightdm|xfwm4|xserver-xorg-|xpdf|ristretto|aptitude|synaptic|gufw|xfburn|net-tools|glib-networking-services|python-numpy|gnome-icon-theme|dconf-service|liblapack3|gksu|openssh-server|flashplugin-nonfree"

I hope she drops by so I can try this out “in the wild” so to speak. I have no idea what hardware she has except it’s a notebook with Vista and running at a snail’s pace…

About Robert Pogson

I am a retired teacher in Canada. I taught in the subject areas where I have worked for almost forty years: maths, physics, chemistry and computers. I love hunting, fishing, picking berries and mushrooms, too.
This entry was posted in technology and tagged , , , . Bookmark the permalink.

5 Responses to The Magic Of USB Flash Drives

  1. oiaohm says:

    Robert Pogson the bad thing about USB flash drives is the fact they have firmware. Badusb example recently altered the firmware on the flash drives to do bad things like pretend to be a keyboard or return altered data.

    Big design flaw the same code that is the firmware in a USB device is also the same code that shows you what firmware is installed on the device and installs new firmware. Yes infected usb device can have 2 firmwares one it runs and one that is infected. Worst most usb devices don’t have any validation that the firmware they are told to use is valid.

    dougman badusb exploit demoed modified a Linux install on the USB key. Location where the key was made it tested fine but as soon as it was placed in another computer the firmware changed it.

    Its unfortunate for least risk of infected it is still use dvd/bluray discs because of poor security in USB devices.

  2. JD says:

    Not surprising, some of the worst nasties my computer has ever seen came from USB thumb drives and autorun. Some of them changed every folder on your computer, so every time you opened any folder, the virus would run again and wreck havoc.

    Of course that was over 10 years ago, I would imagine things are only much worse now in Windoze land.

  3. dougman says:

    I had a contract with a company long ago, and the one of the bone-headed moves they used for marketing was deploying USB drives with autorun. I made the case that, some computers have that turned off of which they replied, “Well, then they can click the file” and I said ok fine, but just the very act of handing out USB drives is a known security risk.

    After sometime, I later heard that the entire lot of drives became infected somehow and was passing a malware on to their customers, a large contract was even lost over the incident.

  4. dougman’s link: “Because the tampering resides in the firmware, the malware can be eliminated only by replacing the booby-trapped device software with the original firmware. Given the possibility that traditional computer malware could be programmed to use BadUSB techniques to infect any attached devices, the attack could change the entire regimen currently used to respond to computer compromises.”

    Debian segregates firmware for good reason: it’s non-Free, mostly, and bad things can happen. This might actually be a good means to promote Debian GNU/Linux. It could put pressure on manufacturers to document their firmware, like a US-congressional law or a presidential order banning the import or use… Stuff like that gets the attention of manufacturers. One fly in the ointment is that NSA loves this stuff…

    This is timely. I was thinking to order a bunch of USB flashdrives from China as inexpensive Christmas presents. If you buy in bulk you can get custom logos and even installed software/images/files

Leave a Reply