External drive not found in Windows 10

I had a USB hub fail yesterday. The 3 external drives connected through the hub all disappeared from my system. I almost went into panic mode when I moved the external drives’ cables to a new USB hub and they were still were not working. However, I knew some keys to the process.

tl;dr: Restart has benefits that shut down/power up do not. Make one change at a time.

In Windows, the process of moving a drive from one USB port to another can be fraught. I have seen this problem in the past. I don’t know the exact reason Windows has this behavior.

When the hardware configuration changes, the naïve way of just unplugging the drive from one port and installing the cable in another doesn’t always work. When there is a problem, Device Manager might show the drive, but it could have a error flag. [See below for an easy way to launch Device Manager.]

Before pulling out the heavy guns on the problem, it might be that some simple steps are enough. Some actions unlikely to succeed:

  • Device manager’s driver uninstall.
  • External hardware manager software.
  • Registry changes
  • Disk management changes
  • For emphasis, making changes in Device Manager, even if you see errors there
  • Modifying BIOS settings

Some of these are suggested as the first line of defense, but I’ve found them unhelpful when USB drives are not recognized.

Device Manager can show your progress but you do not need to make any manual changes there. Especially true: Online help that says you should download and install special tools shouldn’t be trusted.

The two keys are

  • “Shut down/power up” is not always equivalent to “Restart” when it comes to USB devices.
  • Only make one change at a time.

Shut down/power up is safe but sometimes a restart is still needed.

The steps I took to successfully transfer the drive is as follows. It’s wiser to disconnect/reconnect while the power is off, but Restart is still needed after the power is turned on.

  1. Power down and unplug the drive from their old ports.
  2. Power up and Restart the system
  3. power down and put the drive’s cable into its new USB port
  4. power up and restart the system again.

At this point the device manager showed the external drives under the “Disk drive” category.

I was disappointed that, at first, Windows didn’t show the drives in Explorer and Device Manager didn’t show any errors. To fix this didn’t require any extra magic steps. I did an extra restart and shut down the system and turned off the power strip. I did not change anything in administrative tools nor device manager.

My point in this description is to explain that the error when I moved a drive from one USB port to another required some extra steps but no wizards hat.

A similar problem can happen when you move a USB hub from one USB port to another. That also requires multiple reboots. You just make each change one at time.

Fortunately, changing usually works without any trouble. Unfortunately, when you do have trouble, many online help sites give identical suggestions that don’t work. The pedestrian steps of change, restart, change, restart can be enough.


To launch Device manager in windows 10, just go to search in the taskbar and type Device Manager. You can also search in the configuration tool (the gear in the start menu). You don’t need to remember the name of the tool’s file any more.

Second Day Notes: Sharing a folder from Linux to Windows 10


Here are some notes about my experience sharing files from Linux so that my Windows 10 computer could access them. I’m going to try to make this useful but not give excessive details. It’s already going to be long!

The technology I used to share the files is called Samba. It uses the SMB networking protocol. According to wikipedia.org, the Samba name was chosen because it has the letters ‘S’, ‘M’ and ‘B’ in the same order as SMB.

These comments are about “second day” issues. I shared successfully on the “first day” by following tutorials. However, I forgot what was important. I couldn’t access the Linux computer when I turned the computers back on the next morning.

I’m using Ubuntu 18.10 and Windows 10. Other flavors of Linux may use different commands, but the principles should be the same. Other flavors of Windows might work in the Windows 10 manner, but I didn’t try.

  • On the Windows side, I want to connect to the Linux computer’s name, not its IP address.

    \\192.168.1.5\Documents bad.
    \\Sesqui412\Documents good.

    The IP address changes easily. The tutorials use an IP address, but that’s not the second day solution.

    I can also use net use L: \\Sesqui412\Documents to access the files as L:.

  • I don’t need the ‘samba‘ service running on Linux. I want the ‘smbd‘ service. This was a big rabbit hole. Once I gave up on the “samba” service and started using the “smbd” service, it worked correctly on the Linux side. I didn’t see any message online “Hey! you don’t want the samba service, you want smbd.” That would have been appreciated.

    This whole effort may have been completely unnecessary. if I had started with the smbd service instead of the samba service, I might have seen that everything was already correct from yesterday.

    This was a big battle. I was looking for information about starting samba. When I installed Samba
    sudo apt-get install samba
    I would get an error message
    "Samba is not being run as an AD Domain Controller: Masking samba-ad-dc.service".

    However, I didn’t notice the message right away. Reinstalling Samba with
    sudo apt-get install samba --reinstall
    let me eventually see the error. Trying to fix the message led me to a lot of grief and DuckDuckGo searches.

    There is a lot of information on serverfault.com and askubuntu.com about Samba problems. I found the basic commands to use are
    sudo systemctl enable smbd
    sudo systemctl start smbd
    To check for error messages, use sudo systemctl status smbd. Some references also suggest starting nmbd. I didn’t verify that nmbd is necessary but I used it.

    Again, to emphasize, this whole section is probably unnecessary. It was certainly “educational.”

  • I didn’t need to manipulate file permissions on the Linux computer. I didn’t manipulate any file permissions and they weren’t necessary to make the share work. Some online helps make chmod suggestions about that but I could safely ignore them.
     
  • Yesterday, I set up the configuration file /etc/samba/smb.conf. It was pretty straightforward. Network Administration: Samba smb.conf file describes options in the file. There’s also help at How to set up quick and easy file sharing with Samba.

    Some tutorials explain that when you change smb.conf, you need to run
    sudo systemctl restart smbd
    to activate the changes

  • If you find a tutorial site that gives a long story without explaining their purpose, try to understand the situation, not throw attempts on the wall and hoping they stick. (Disclaimer: This post isn’t meant as a tutorial, but rather some observations. For example, I don’t say anything about how I did the “first day”.)

    Two help sites that I feel are worth avoiding are http://social.microsoft.com/forums and http://ubuntuforums.org. If I see a link to either of them in a search result, I should keep looking somewhere else. Other resources are likely to have more “signal” and less “noise.”

    The three http://serverdefault.com, http://askubuntu.com and http://superuser.com are communities that are more likely to have reliable information.

  • The passwords for Samba use the program smbpasswd on the Linux computer. I had trouble with the passwords. This was the command to fix it. I’m not sure exactly what I did. I might have just used the wrong password.

So, on the first day, I got it working. On the second day, it broke. It was a lot of work fixing it. I hope these notes help someone else know some of the principles so that they can have a happier second day than I did!

Weekend

Three colored hexagonsThis was a pleasant weekend. I got a bunch of things done and felt pretty comfortable.

I worked on some Perl scripts that allow data entry and calculations with my budget information. I could have done it with an Excel spreadsheet, but developing code was more enticing.

I also have been upgrading my laptop. I installed Windows 10 on it. The system is unacceptably sluggish but I can’t justify upgrading to a new laptop. Right now it is synchronizing my 200k+ files in dropbox. That is taking a long time. I’ll have to see how the laptop behaves once dropbox is settled.

I installed Scrivener, Cygwin and ActiveState Perl. Also Office 365 and I built the 4.07.0 OCaml system. The laptop I’m keeping slightly more “stock” by not installing utilities like Avast and possibly also not other browsers like Chrome and Firefox.

I’ve built a couple websites recently. One, http://alphaomegaonline.org has morphing colors. It’s not interactive although clicking flips between different algorithms for the color transformations. I’m designing an update that reacts to mouse clicks by “fracturing” the screen into sub-screens that morph independently.

The other site http://sesquibits.com/planets.html calculates and displays a running summary of the distance between the planets. It also shows relative velocities and acceleration. You can pick any planet as the center point. A future goal for the site is to present interactive graphs of the planetary distances.

Other pleasant escapades in the weekend were visiting friends, going to the Y and reading a couple of books. I ate way too much pizza.