wakeonlan – remotely starting another computer

This is something I have been using for literally decades.  Since I have been setting this up in my home office, I am reminded that some people just may not have an idea this exists, and that they almost certainly have it on their computers.  Just a matter of turning it on.

I would have my “big” machine in a room away from where I was seated, then I’d wander off and sit on the couch with the little machine. Then I would need something on the big machine across the network. Since it was typically on my third floor it was impractical to take the laptop upstairs when the TV was on in the downstairs living room. To make it handy I wanted to turn that beast on so I could play music in the kitchen or read a document I have on it on my little machine. This little trick would let me do it.

Wake On Lan” is simple conceptually. You send a “Magic Packet” to another computer on your network, or across the internet. The packet talks to the ethernet card, some wifi cards reportedly work but I have never figured that bit out. When the packet gets there, the computer turns itself on.

Think “Magic Bullet” to wake the computer sleeping at home while you are at work.

Mind you, there are steps to get this to work.:

You have to turn it on in your BIOS.
Ok, better said, you have to find out where it is in the pages of your BIOS, then turn it on.
If you have ever seen your BIOS, and know what’s up in there, you probably are in a small minority of people, but trust me there are good things there.

You look for a prompt that says “Enable Wake On Lan” and make sure it says yes or is turned on or “selected”, then save and reboot the computer.

That computer must be using a wired connection to the internet – an ethernet connection must be used and not Wifi, although I have seen that some people have managed to get this to work on Wifi.

Technically that’s all you need on the “distant” computer you want to wake up, however you do need a few bits of information.

Every network card has a “MAC Address“. Think of it as a telephone number. That network card, and only that network card has that specific number. I have mine, you have yours. Same thing as the phone number on your phone, or your IMEI number on the phone. You and only you have THAT number. It may also be in your BIOS, but every BIOS may vary.

You feed it into a wee little program and it fires off a magic packet to your network. The packet wanders around your network and the ethernet card is listening. If that packet matches the address on the card, the card will wake up the computer from hibernation or turn it on with a “cold boot”.

Then you can get your “stuff”.

The business of across the internet is a bit more complex. You actually would have to punch a hole in your firewall for the purpose, and this is beyond this posting of “Hey look at this cool stuff”.

RaspberryPi users, sorry, you can’t wake a Pi across the network, and I really wish you could! The hardware is built more simply, and the Ethernet port actually sit on the USB Bus.

For Linux users (and BSD) with Debian XFCE, you can find out your MAC Address by looking at the connection information when you right click on the Network Connections icon in the status bar or in the Settings, Network Connections on the applications menu. Right click on the Wired Connection you have hooked up. Look for “Hardware Address:: and you will find a number that looks like 01:23:45:67:89:AB

Windows users, check your hardware manager under My Computer.

Mac, sorry, one isn’t handy to me but the base commands should be there under your network manager.

Look for the Mac Address, again it’s six pairs of Hex numerals that look like 01:23:45:67:89:ab, and write them down.

To test, hibernate or shut “this” distant computer down. Then go to the “other” computer, and launch a Wake On LAN Client. There are many, and they are generally free. Mine is called “wakeonlan” on Linux. It runs at a command line (gasp!) by typing (horrors!) in “wakeonlan 01:23:45:67:89:ab”.  You can easily encapsulate it in a bash shell, of course.

Then after a short pause, the computer turns itself on and presents itself at a login prompt.

Your network shares will be available on that machine, or you can use Remote Desktop or VNC to use it directly from where you sit.

Wake on Lan clients are available:

Linux – called wakeonlan and is available by “apt install wakeonlan” in Debian.

Windows – there are a bunch of them that are available here.

Mac OSX – wakeonlan is available here.

When You Need A Home Server, How About A Low Power Netbook or a Raspberry Pi?

I had a problem, and this is the thought process behind how I solved it.  It isn’t the solution itself.  I have to take pictures and write all that stuff down.  I simply haven’t yet.  That will come in the future.  By the end of the process, I’ll have created a nice tidy, low power consumption file server that can be ignored because it will just work.

What this does also is to take that computer that was slid into the back of the closet with data on it, and clean all that once- important stuff off of it, and give the machine another 3 to 5 years of very important use.

Great way to reuse something that you were wondering how to get rid of isn’t it?

But here is the thought process, if you are curious…

 

 

We like to collect “stuff”.

Drive down any street in Suburbia during the weekends and you are guaranteed to find a $20,000 or more car sitting in the driveway because the garage is stuffed with things you can’t bare to get rid of.

That extends to the digital world too.

On my Main Computer, I have a 128 GB memory chip that I use as an external drive.  You know, like the one you stuff into your camera?

On it are my resume, personal files, picture collection, and many many more files.  That stuff is very important to me and must be safeguarded by frequently backing it up in case that chip gets lost or destroyed.

Just a few years ago, that would have been an inconceivable amount of space, if you could have found it at all.  Now, that size of an actual hard drive is getting to be Low End and harder to find.

What do You do now?

You being An Average Home User.  You have a Main Computer.  It could be any given thing from Mac to Windows to, if you are “odd” like me, a Linux Workstation.   You may or may not have other machines in the house.  Phones where you take pictures.  Actual cameras.  iPods and your music collection.

Where do you put all that “stuff”.

First choice.  External hard drive.  They’re about $50 for a reasonable sized drive, or $100 for a drive that will take you years to fill up.

But where do you connect it.  You start with plugging it into your computer’s USB port.  That works for a while, until someone else wants access to it.  After all “they” have stuff to save too!

It’s that Digital equivalent of the Two Car Garage.  But that doesn’t help the phone, it is not exactly easy to plug an Android phone into a standard external drive, and forget it for the iPhone.

Not to go too deeply into this whole thing, The First Choice hard drive needs to be moved.  If you are lucky your Wifi Router will have a USB port.  A Slot.  If you look in the little slot, the plastic tab should hopefully be blue for USB 3.0, but at least it should be USB 2.0.

(Yes, I know that is an inexact way of saying things, but I have a very broad audience here)

If it isn’t in use, that is, you plug your drive in to that USB port and go surf the administrative page of the router.  Mine is at http://192.168.1.1 and it brings up a login box asking me for user and password.  That is the page you use to configure where and who has access to that drive and your network.

I could spend hours writing here on how to configure your router.  I’m not.  See this is more of an intro to something that has been sitting in my mind.

Why?

You see we have already used that port with something else that needs to sit there.   It’s in use with the backup for that 128GB chip I was talking about earlier.

So I had to decide what to do next.

I have been given a number of “old” or “low power” computers over the years.  I won’t say specifically “Obsolete” because there’s always something you can do with a computer that is too slow to run Windows.

And that’s the crux of it.

The first time I tried this, I had attempted to use a RaspberryPi as a server.  Now, a RaspberryPi, or at least the “Model B” I have has the computing power of a cell phone of a couple years ago.   When I first got it, I put a lot of energy into turning it into a web server.

Take my word for it, there are better ways to make a home web server than a RaspberryPi.  It’s too slow for that.   You have the base operating system, and when you add all that “web stuff” it runs too slow to be useful.

But, the RaspberryPi is “just enough” for you to use as a desktop machine, if you aren’t slapping it around too much.  By that I mean, one browser with one or two tabs open, or some programming tasks.  After all it is not meant to be a “Screaming fast” computer.  Small tasks.

I did find out that the Pi was “just enough” to be a file server.

There is a software bug in the main operating system as I had it configured that had me choose another machine.  The amount of data that you copy onto an attached drive on the version of Linux called “Raspian” was limited to the free space on the boot drive.  Since it is common practice to use a 4 or 8GB memory chip for that, I only had 3 gigs free.   Another solution would be to get a larger chip and try again.  I will later.

You see the Raspberry Pi runs with so little power itself that it is like one of those old glowy neon nightlights that were used for years before they ended up being an indicator light in a power strip.

In other words it’s a Low Power Consumption alternative – very “Green”.

But since that didn’t work without my buying a very large chip, I looked around for an alternative.

The solution was that I had an old Netbook that was gathering dust.  After all, it was a Windows XP Era machine looking for a use case.

A Netbook of that first era had a very small display, 10 inches, with a small display of 1024 by 600.

Never mind the numbers, it was designed to be the machine you would use on the couch while watching TV.  That was why it ended up being set aside, I do too much graphics work to be able to live with such a small display.

Despite that the old beastly big CRT Monitors of the last century would not be able to do that resolution.

So I put that Netbook back on the air as what I call a “Drop In File Server”.

A Drop In File Server would be a computer configured to accept an external hard drive, sit on the network, and serve files.

The reality is that when you install the needed software, the Print Server comes along for the ride.  Configure and plug in a printer as well and you can print anywhere on your network.  You end up having a lot of benefits from having a dedicated machine doing that work.  All from something that was slow when it was new.

Another very important benefit is that all that runs on less than 10 watts of power, a refrigerator bulb of power consumption for something that will be left on pretty much whenever I am awake, 16 or more hours a day.

Now, the high order of this is that once you install Debian or Ubuntu Linux to do the actual work, you’re able to take that little netbook and put it on someone else’s network and serve files there.

That sounds kind of a strange need, but the idea for this would be to hand the little machine off to someone else let them plug it into their network and their own drive into the machine and that way I don’t have to be involved with computer support for someone who is 200 miles away.

You know, a Loaner Server.  Something to serve a need but not need a lot of service.

But it worked.  It would also work with just about any laptop made within the last 10 years, just like that old computer you forgot about under your jeans in the closet.

All that will just have to wait for another time.