Smokes your problems, coughs fresh air.

Tag: USB

Writing bootable disk images (.iso, .img, etc.) to a USB stick from Windows

Because Windows doesn’t have dd, and I want to write the latest Mint LTS release to a USB task, I had to face the unpleasant task of finding a Windows tool to perform what’s a basic Unix operation. The good news is that I found one, and it’s open source: Win32 Disk Imager. It even has a version ≥ 1, titled: “Holy cow, we made a 1.0 Release”.

A screenshot of Win32 Disk Imager at work, writing Linux Mint 18.3 MATE 64bit to my SanDisk USB stick.

Win32 Disk Imager at work, writing Linux Mint 18.3 MATE 64bit to my SanDisk USB stick.

I found another open source tool, UNetbootin, but that tool didn’t recognize my non-MS-format formatted USB stick (which already tauted the installer for a previous Mint release).

In the end, Win32 Disk Imager also choked on the funky partition table left by the previous boot image, so I had to find out how reset the USB disk’s partition table in Windows:

C:\WINDOWS\system32>diskpart

Microsoft DiskPart version 10.0.16299.15

Copyright (C) Microsoft Corporation.
On computer: YTHINK

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          238 GB      0 B        *
  Disk 1    Online           29 GB    28 GB

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary           1706 MB  1024 KB
  Partition 2    Primary           2368 KB  1707 MB

DISKPART> select partition 2

Partition 2 is now the selected partition.

DISKPART> delete partition

DiskPart successfully deleted the selected partition.

DISKPART> select partition 0

The specified partition is not valid.
Please select a valid partition.

There is no partition selected.

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> delete partition

DiskPart successfully deleted the selected partition.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> exit

Leaving DiskPart...

C:\WINDOWS\system32>

Nokia N79

Two weeks ago, I acquired a shiny “new” second-hand Nokia N79, because my good old Nokia 1600 (which has served me well for over three years) died as a result of drowning in my leaky tent during a high-school hiking trip in the Czech republic.

Nokia N79

So far, I’m really fond of the phone. 🙂 It fills in the gadget gap that was left by my desire for a decent portable music player. After choosing an appropriate S60 app, it might even satisfy my decadent desire for a Bluetooth remote to control my laptop (when viewing a movie, for example).

FM transmitter

One of the things that I’m really happy with is the built-in FM transmitter. I’ve been wanting one of those so that I don’t have to much about with cables when I want to play media through some stereo system. Especially when I was thinking of buying a portable music player, I also wanted to be able to route it through any car radio. Now I can. I can even pick any frequency I want! I am surprised.

IMAP

Another neat feature which I find myself using a lot is the IMAP support. Now, I don’t have to boot my laptop just to find out if I have new mail and to write simple replies or delete some of the crap that I get sent daily. Setting up Gmail access was easy thanks to Gmail’s IMAP support. Yesterday, after teaching kung fu with a friend, on my way to relax at the lake, I found myself stopping my bicycle at a few unsecured WiFi networks to quickly compose a mail and check for responses so that I’d be able to better relax.

Maps

The Nokia-supplied Maps application is fun, but I don’t think I’ll a be a big user of it, since I’d sincerely like to learn to navigate without the aid of high-tech devices. Nevertheless, I’ve downloaded all map data for The Netherlands so that I don’t have to initiate an expensive Internet connection when I’m lost. Symbian Underground has a list of direct links to all the downloadable map files on Nokia’s own servers.

Syncing stuff

This brings me to the subject of syncing data to and from the phone. Of course, the phone has USB Mass Storage support, which makes it easy to add and remove music. Just an hour ago, I also added NL maps this way. However, this mode only gives you access to the installed memory card (which the phone supports up untill 8GB). To access other stuff, you need to do some Bluetooth magic, which I haven’t tried yet.

Normally, when using Windows, you’d download Nokia PC Suite to be able to backup and sync pretty much everything on the phone. I don’t have Windows, so for some tasks I either have to wait until PC Suite’s successor, Nokia OVI Suite, becomes available for Linux or I have to find or create some alternatives for some of PC Suite’s functionality.

Mail for Exchange

Google supports Microsoft’s Exchange protocol to sync Gmail contacts, Google calendar data and mail with mobile devices. For phones which don’t already support this protocol, such as my N79, Nokia supplies the Mail for Exchange application. I got this application set up successfully and synced my calendar successfully, but I can’t start the application a second time. I simply can’t open it. Maybe I should report a bug, but probably it’ll be easier to find another sync solution or to just give up Google Calender and settle for a backup only solution. For my contacts, I’ll also be satisfied when I find a backup-only solution. And my email needs are already well served by the device’s built in IMAP support.

Other stuff

I’ve never really wanted a camera, but still I’m glad that I have one now so I can look at movies of my baby nephew being bathed or make a quick photograph when I need it. Heck, it’s a fun toy!

Besides Mail for Exchange, the only app I’ve installed so far is Skype, which is fun to use on my phone although I find the quality horrible compared to my laptop (and I wasn’t a fan of Skype’s quality to begin with).

Did I mention that browsing for porn pics using Google’s mobile image search is strangely satisfying?:oops:

APC CS-500 causes USB disruption

I’m having a EM interference problem with the APC CS-500 UPS on two different locations. Those two locations are near each other and there seems to be something wrong the power grid in that area. Both UPS’s momentarily switch over to battery several times a day. Some of these times, the apcupsd daemon sends a message saying that the communication with the UPS has been restored (and therefore it had been lost at some point).

Here is the syslog of one of those computers with everything but the power failure and EMI notices filtered out:

Aug  7 06:59:10 bitler apcupsd[22622]: Power failure.
Aug  7 06:59:18 bitler apcupsd[22622]: Power failure.
Aug  7 06:59:31 bitler apcupsd[22622]: Power failure.
Aug  7 06:59:35 bitler apcupsd[22622]: Power failure.
Aug  7 13:59:19 bitler apcupsd[22622]: Power failure.
Aug  7 13:59:38 bitler apcupsd[22622]: Power failure.
Aug  7 18:59:11 bitler apcupsd[22622]: Power failure.
Aug  7 18:59:25 bitler apcupsd[22622]: Power failure.
Aug  7 18:59:28 bitler apcupsd[22622]: Power failure.
Aug  7 21:29:12 bitler apcupsd[22622]: Power failure.
Aug  7 21:29:19 bitler apcupsd[22622]: Power failure.
Aug  7 21:29:23 bitler apcupsd[22622]: Power failure.
Aug  7 21:29:51 bitler apcupsd[22622]: Power failure.
Aug  7 21:30:05 bitler apcupsd[22622]: Power failure.
Aug  7 21:30:09 bitler apcupsd[22622]: Power failure.
Aug  7 21:30:12 bitler apcupsd[22622]: Power failure.
Aug  7 21:30:14 bitler apcupsd[22622]: Power failure.
Aug  7 21:35:21 bitler apcupsd[22622]: Power failure.
Aug  7 21:35:29 bitler apcupsd[22622]: Power failure.
Aug  7 21:35:32 bitler apcupsd[22622]: Power failure.
Aug  7 21:35:38 bitler apcupsd[22622]: Power failure.
Aug  7 22:39:11 bitler apcupsd[22622]: Power failure.
Aug  7 22:39:22 bitler apcupsd[22622]: Power failure.
Aug  7 22:39:31 bitler apcupsd[22622]: Power failure.
Aug  7 22:39:35 bitler apcupsd[22622]: Power failure.
Aug  7 22:39:36 bitler kernel: hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
Aug  7 22:59:10 bitler apcupsd[22622]: Power failure.
Aug  7 22:59:25 bitler apcupsd[22622]: Power failure.
Aug  7 22:59:28 bitler apcupsd[22622]: Power failure.
Aug  7 22:59:32 bitler apcupsd[22622]: Power failure.
Aug  7 22:59:37 bitler apcupsd[22622]: Power failure.
Aug  7 23:59:32 bitler apcupsd[22622]: Power failure.
Aug  8 05:51:10 bitler apcupsd[22622]: Power failure.
Aug  8 05:51:21 bitler apcupsd[22622]: Power failure.
Aug  8 05:51:31 bitler apcupsd[22622]: Power failure.
Aug  8 05:51:35 bitler apcupsd[22622]: Power failure.
Aug  8 06:59:24 bitler apcupsd[22622]: Power failure.
Aug  8 06:59:32 bitler apcupsd[22622]: Power failure.
Aug  8 06:59:36 bitler apcupsd[22622]: Power failure.
Aug  8 11:29:11 bitler apcupsd[22622]: Power failure.
Aug  8 11:29:28 bitler apcupsd[22622]: Power failure.
Aug  8 13:59:17 bitler apcupsd[22622]: Power failure.
Aug  8 13:59:22 bitler apcupsd[22622]: Power failure.
Aug  8 13:59:23 bitler kernel: hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
Aug  8 14:00:19 bitler apcupsd[22622]: Power failure.
Aug  8 18:59:37 bitler apcupsd[22622]: Power failure.
Aug  8 21:27:11 bitler apcupsd[22622]: Power failure.
Aug  8 21:27:16 bitler apcupsd[22622]: Power failure.
Aug  8 21:27:17 bitler kernel: hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
Aug  8 21:27:25 bitler apcupsd[22622]: Power failure.
Aug  8 21:27:39 bitler apcupsd[22622]: Power failure.
Aug  8 21:29:11 bitler apcupsd[22622]: Power failure.
Aug  8 21:29:13 bitler kernel: hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
Aug  8 21:29:22 bitler apcupsd[22622]: Power failure.
Aug  8 21:29:25 bitler apcupsd[22622]: Power failure.
Aug  8 21:29:27 bitler kernel: hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
Aug  8 21:29:37 bitler apcupsd[22622]: Power failure.
Aug  8 21:29:38 bitler kernel: hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
Aug  8 21:30:20 bitler apcupsd[22622]: Power failure.
Aug  8 21:30:22 bitler apcupsd[22622]: Power failure.
Aug  8 21:30:24 bitler apcupsd[22622]: Power failure.
Aug  8 21:30:28 bitler apcupsd[22622]: Power failure.
Aug  8 21:30:29 bitler kernel: hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
Aug  8 21:30:37 bitler apcupsd[22622]: Power failure.
Aug  8 22:39:11 bitler apcupsd[22622]: Power failure.
Aug  8 22:39:25 bitler apcupsd[22622]: Power failure.
Aug  8 22:39:28 bitler apcupsd[22622]: Power failure.
Aug  8 22:59:11 bitler apcupsd[22622]: Power failure.
Aug  8 22:59:18 bitler apcupsd[22622]: Power failure.
Aug  8 22:59:26 bitler apcupsd[22622]: Power failure.
Aug  8 22:59:28 bitler apcupsd[22622]: Power failure.
Aug  8 22:59:40 bitler apcupsd[22622]: Power failure.
Aug  8 23:59:11 bitler apcupsd[22622]: Power failure.
Aug  8 23:59:22 bitler apcupsd[22622]: Power failure.
Aug  8 23:59:24 bitler apcupsd[22622]: Power failure.
Aug  9 05:54:10 bitler apcupsd[22622]: Power failure.
Aug  9 05:54:21 bitler apcupsd[22622]: Power failure.
Aug  9 05:54:22 bitler kernel: hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
Aug  9 05:54:39 bitler apcupsd[22622]: Power failure.
Aug  9 06:59:10 bitler apcupsd[22622]: Power failure.
Aug  9 06:59:17 bitler apcupsd[22622]: Power failure.
Aug  9 06:59:19 bitler kernel: hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
Aug  9 06:59:27 bitler apcupsd[22622]: Power failure.
Aug  9 06:59:28 bitler apcupsd[22622]: Power failure.
Aug  9 06:59:32 bitler apcupsd[22622]: Power failure.
Aug  9 06:59:36 bitler apcupsd[22622]: Power failure.
Aug  9 06:59:39 bitler apcupsd[22622]: Power failure.
Aug  9 12:59:22 bitler apcupsd[22622]: Power failure.
Aug  9 12:59:23 bitler apcupsd[22622]: Power failure.
Aug  9 12:59:27 bitler apcupsd[22622]: Power failure.
Aug  9 13:59:24 bitler apcupsd[22622]: Power failure.
Aug  9 13:59:28 bitler apcupsd[22622]: Power failure.
Aug  9 13:59:34 bitler apcupsd[22622]: Power failure.

As you can see, all the EMI notices correspond exactly with the UPS switching over to battery; all the EMI notices are 1 or 2 seconds after the power failure notice, without exception. And no, I didn’t just show the EMI notices that suit me; these are all of them.

APC suggested it might have something to do with the 3rd party software (because they don’t support Linux themselves), but that’s ridiculous of course. The software doesn’t have the ability to command the UPS to switch over to battery, so the order of events has to be that the UPS switches and that the USB hub is disrupted by that. This is exactly the order of events the logs show.

I think this problem is common in the CS type of UPS’s and perhaps in other models as well and that just because of the frequent switching it shows more often. I still have to find out whether it’s the proximity of the UPS to the computer or if the EMI is traveling over the USB cable. Putting the UPS about a meter below the machine didn’t help, anyway.

One very big problem with this situation is that I can’t reliably connect a USB hard disk to the system for backups. The filesystem and the data on it will not take kindly to connection interrupts.

© 2022 BigSmoke

Theme by Anders NorenUp ↑