Netbook Server – Sharing An External Hard Drive In Linux

So if you have followed my instructions, you now have a:

Computer that runs Debian Linux
http://www.ramblingmoose.com/2016/02/the-netbook-server-installing-debian-or.html
Computer that you can look into using Remote Desktop
http://www.ramblingmoose.com/2016/02/the-netbook-server-you-need-to-be-able.html
Computer that you can share part of the local hard drive
http://www.ramblingmoose.com/2016/02/the-netbook-server-how-to-actually.html
Congratulations.  You now have a file server!

If you followed those directions, it also installed a bunch of other programs that will let you do other things.  I noticed that something called “CUPS” was installed, and that will let you plug a printer into the same machine and act as a “Print Server” or a “Network Printer” – if you can find the instructions on how to configure it.

Debian and Raspbian both come with enough that you could use that machine as your one and only daily driver computer.  The browser is called “Iceweasel” and is Firefox, rebranded.  You have Libre Office to write letters, work with spreadsheets, and make presentations that are all compatible with Microsoft Office.

Yes, it really is, I use it every day.  No, you don’t have to pay for it.  Ever.

There are more apps, and I would suggest looking into some of the software that is out there, all free.  If you start “synaptic” from your terminal as root or “sudo synaptic &” you will find so much free software that your mind will fog up and get tired before you find everything you want.

But that all is just the preamble to this discussion.  You came here to share an external drive.  This is like any other shared drive on the network, you have to have it plugged into the server (USB Port on your netbook), you have to tell the computer where it is, and you have to tell it how it is to be shared.

Remember, I am trying to write this for a Windows audience so I’ll go as basic as I can.  You Windows folks are in a new world, and you will want to have this go well.  If you are a Linux expert or even intermediate, you may find this needlessly wordy.   Not to worry, you’ll be right.

One Step At A Time.  Divide and Conquer.

First step – Make sure you can read the drive from Linux.


Before you get anywhere, start the computer.  Log in.  Get to your desktop.  Then plug in the drive.

Start your terminal session by clicking on the (start) “Applications Menu”, then click on Terminal.  Sign in as root by entering “su” and your root password.  You will eventually need this

Now, launch the file manager by clicking on the (start) “Applications Menu”, then click on “File Manager”.

In the left pane of the file manager you will see Devices, Places and Network.  In “Places” your external drive will come up with a little eject arrow to the right of it.  Click on the icon for the drive.  A little wait icon will start to rotate.  When it is through it will do one of two things:

Success is if you are dropped into a view of whatever files are on the disc.  It means that all the drivers are in place.  Most likely this drive is something called “vfat” or “fat32”.  Remember this for later.

Failure is if you get a big ugly warning message up.  That means that you don’t have the drivers for the format that the drive has on it.  Most likely you will have to install the set of drivers called “ntfs-3g”.  This would be where your external is a really big drive and you did it to make things faster.  To install that do the following steps:

  1. apt-get update
  2. apt-get upgrade
  3. apt-get install ntfs-3g
  4. shut down the server
  5. unplug the drive (It isn’t shared yet and you don’t want to wait for the computer to release it)
  6. start the server
  7. and plug in your drive when you have logged back in to the desktop, terminal, and file manager.

No matter what, at this point, you should be able to read your external drive.

You also need information.  When you worked with the server software “samba” you created a user and a password, and you will need that later.
 

Next step – finding where Linux thinks that drive actually is.

Here is where Linux people will be saying “gparted“.  If you know how, go for it, this is the slower but less risky method.

To determine what is plugged into your machine type into the terminal:

  • dmesg | tail -30

Linux keeps a log of whatever is important to the system.  Since you “just” plugged that external drive into the computer, the last thing on that very long stream of text will be what was reported when the computer detected the hardware.  The “tail” bit will tell terminal to just show the last 30 lines of what are in the display of messages (dmesg).

The clue there are the lines that say “usb 1-2” and “sdb”.  When I plugged in the drive, it said “new high-speed USB device number 2”.  So what we’re going to tell the system is that the drive is sitting on a device called sdb.  The partition we will be using will be the first one, so it is officially “/dev/sdb1”.  In windows, it would come up as your D drive if there is no DVD/CD drive present, E Drive if it is, this is the same thing.

Since my stick is formatted to be removable on Windows, it is a format that Linux calls “vfat“.    My big 4 TB drive is formatted NTFS, so I would have to mount it as “ntfs-3g

Create a place to store the data in.  In my case, it is “/home/bill/external“.  You should change “bill” to the name of your user that you logged into when you started this exercise.  To make the directory, open terminal again as a regular user and enter this command:

  • mkdir /home/bill/external
  • chmod 0770 /home/bill/external

You just created the directory and set it up so that you and root can use it.

There is one file that you need to edit in Terminal with the following command:

  • nano /etc/fstab

This file tells linux where all of your disc drives sit, so be careful and don’t delete anything.  You will be adding a line, as below:

  • /dev/sdb1 /home/bill/external vfat defaults 0 0″

That says – put the external drive’s first partition “in” the /home/bill/external directory.  It also says that it is “vfat” format so change that if it is an ntfs-3g format.  The defaults are lengthy and you can go into them in great detail on the Wikipedia Article.

If you wanted to go further and add multiple partitions for other people, you could do it in /etc/fstab by adding multiple entries.

Once you restart the computer, you should be able to find the drive on Windows, and you are on your way.  Just find the drive in Windows File Manager, enter in your login from Linux, and you’re good to go.

One final wrinkle

What this does is to “bind” the external hard drive or memory stick to the server.  It is now set to automatically mount and share the drive whenever the power comes back on.  If you do not have a drive plugged in, Linux will boot, but put you into a terminal session as root into what is called “Single User Mode”.  You can do the following edit at that point with the commands below.

To remove the hard drive so that the server is no longer looking for the drive at boot, in terminal as root:

  • nano /etc/fstab
  • find the line with the external drive and enter a # as the first character in the line
  • save the file and restart the computer

This now turns your server into a machine that only serves the local hard drive.

I’m Sorry, It has Six Months To Live. Windows XP Is Dying.

Sure, lets be melodramatic for a bit.   I kept thinking of a doctor’s office with dark walnut book cases and the doctor talking to the patient in hushed tones. 

I guess I watch too much TV. 

We had this discussion last night.   Sitting on the bench, Bill, Kevin, and I, and our dogs Rack and Ellie, were watching life go by.  Bill’s Mom, Lisa, has an aged Windows XP computer.   We may be able to get some more use out of it by adding more memory since it only has 1 GB.  Maybe not.  But the thing that most needs to change is Windows XP.

On April, 8, 2014, Windows XP support from Microsoft will end.   Customers who pay lots of money will get support, but that won’t help you since Microsoft won’t be sharing that with the world. 

All of the dates for the end of life of Microsoft Windows are on this page.  You are safe with Windows 7 until 2020, although I suspect that you will find your software won’t work with it near the end.  Things might get a bit “weird”.

There are reports of people writing viruses to be set out into “the wild” on April 9, 2014 to create havoc.

Bot-nets, Trojans, and Viruses, Oh My! 

The result is that if you are running XP on your computer on that day or later, you really need to change that to a newer operating system.

So there’s the typical decision tree:

If you don’t need it, recycle the computer or pass it on to someone who can do that for you.  Problem solved!

If you still think you can use it, or you must keep it for “records”, or you’re just one of those paranoid people who can’t stand the idea of your old hard drive falling into someone else’s hands, you may be able to upgrade it.  Just don’t get onto the internet with Windows XP next April.  You’ll have a bad time of it, eventually.

Bad boys, Bad boys, What’cha gonna do when they come for you?!

Ok, so how do you know whether to upgrade?  If you really want to know, here’s a great oversimplification of things, but basically:

  • Windows 8 will work on a machine with 4GB of memory but if you are looking at a computer with XP on it, you’re going to be shocked when you start it with Windows 8.  You might want to stick with Windows 7.

  • You can install Windows 7 or Linux if you have 2GB of memory, an Intel Core Processor, or newer.

  • Assuming you need to keep the software and data on the computer, and your older computer has 1GB of memory and won’t take any more than that, Windows 7 Home can be installed, but it may be slow.  You probably won’t want to use it for much more than that “archive” look around for your old records or recipes.

  • If you don’t need the data and you’re comfortable with playing with new software, look into Linux.  Specifically Ubuntu Linux.   All the software you will need for normal “office” or “web surfing” use is free, including Libre Office to do what your Microsoft Office did for you.  One thing to consider with Linux is that there are very few viruses on Linux.  I don’t even run a virus scanner on my Linux laptops.

  • With older computers it gets more complex, but basically Linux will be your only option to use the machine on the web.  If the computer can’t take 1GB of memory, you really are limited.

Checking your memory is easy.   Start, find “My Computer” and right click on it.   Select Properties and it will be there for you.  Whether your machine can take more than what it has in it is another story, and you will have to do that research on the computer vendor’s website.  Good luck there, there are way too many combinations to fit in the scope of a blog article, so I can’t be all that specific.

Personally I have a mix of things here.   My older machines are either Linux or Windows 7.  While all of my computers are old, and some as old as 10 years old, I haven’t had to throw any out due to this XP thing – they’re all still serving a purpose.  Basically, this is the process I’m going through here as well.   Remember your mileage will vary and one size doesn’t fit all, you’re going to have to actually think this through, but it isn’t that tough, I’ve got faith in you!

Need Excel or Word? Try Libre Office Free

Sure, it’s written like a spam or a sales document but the truth is that most people won’t need anything else and yes, it it is completely free.  Libre Office, is a complete office suite, and it really is free.

Ok, why am I talking like a salesman?  Simple, someone asked me if they could “borrow” my copy of Microsoft Word.  6:45 AM in the middle of my dog walk.  I told them to check my blog today for links for downloads for Libre Office instead.

First, you don’t really borrow software, you do that and it is considered piracy.
Second, you don’t really need to spend the money for a word processor or spreadsheet program when there is an excellent free piece of software out there.

Yes.  Free.

As in Free and Open Source Software.  “FOSS“.

Keeping this simple, basically “FOSS” works.  People do write software to do things and sometimes it is put out there for everyone to use.  You know, good guy stuff?

In the case of Libre Office, you can replace Microsoft Office with it.

Word is replaced by Libre Office Writer
Excel is replaced by Libre Office Calc.
Access is replaced by Libre Office Base.
Powerpoint is replaced by Libre Office Impress.
and Visio is replaced by Libre Office Draw.
They also have something called Libre Office Math, which I believe is a replacement for Mathematica but I don’t have any experience with it. It lets you solve equations like the ones you had in Algebra and Calculus by typing in the formula.  Don’t tell your high school kid but it should solve their homework for them.

Now, if you are a professional, you’ll realize that in certain cases you simply can’t use anything else.  Your IT Department decided this is what you’re going to use.  Go for it.

But if you are like the majority of computer users, on Linux, Mac or Windows, all you really need these days are a good browser and an occasional Word Processor and Spreadsheet.   The rest is overkill but hey, it’s all free.  They do make their money by donations, so if you’re fully employed you might want to drop some money in their tip jar

Think about it, Five Bucks for a Microsoft Office Work-alike Replacement.  Pretty cool, huh?

I use it on my machines here, Windows, Mac, and Linux.  In fact it came free with Linux Ubuntu, I didn’t have to think to install it … there it was.  It’s on my CentOS Linux Server that I’m building right now.  My Linux People will know – Synaptic has all this stuff for the asking on Ubuntu and Debian. I loves me some Synaptic!

The thing is that even the output files that you create using Libre Office are the same format as those out of the more popular programs like Microsoft Office.  The only rub is that you have to make sure you tell it to use the docx or xlsx formats when you save, or configure Libre Office to do that once and for all.  I forget once in a while and then get a little confused as to why my resume is not in docx.

The download page is here.  Like I said, you don’t have to pay for it.  It’s free.

Windows 8 Start Screen – Something’s Missing Here

After about 2 weeks of installing software on the Windows 8 laptop, this was what my start screen looks like.

Never mind that in the picture the text is a bit too small to read.  My idea actually, you can’t blame Microsoft for that. 

I’m doing that for a point.

You see, we have been trained to look at that skyscraper of program names that are groups of icons and more names to find our programs.  If you had someone show you how, you even know that you can pin the ones you like the most to the top of your Start menu.  That has been true at least since Windows XP, and I only personally started using the Pin To Task Bar or Pin To Start Menu a couple years ago when I got my Windows 7 laptop.

It made it quite a lot easier.

With Windows 8 the rules all changed.  You now have a screen.   When you hit your windows key, the monitor shifts to this screen from your desktop or your app.  It does so a bit dizzily as if you are physically turning the monitor to look at the back of it where, surprise! there is your start screen.  

Eye candy aside, the presentation is again geared for a tablet.  What you are seeing is my very own start screen.  Big chocolate colored rectangles represent those programs I installed, the other pastel colored rectangles are those that Microsoft put there.  Color is a visual clue.

The rectangle for the desktop is a representation of the background of your desktop all shrunk down.  Makes some sense to do it that way because most of us who will take the time to add your own picture to the desktop will want to see it some time, even if it’s only there since we’ve got too much work on top.

But that raises the question, where is all my “stuff”?

That’s just it, the Start screen only has those icons that you put there when you added the program.  Not every program will add an icon to it, so you’ll be lost. 

What you have to do is search for your programs.

First you scroll to the right.   Since everything is so blasted big, you are scrolling… and scrolling… and scrolling until you hit the end of the screen.  You might be confused because the program may not in fact be there. 

Now what to do?   Yes, you have to search for it.

But windows doesn’t make it readily apparent how you do it… the combination Win plus the Q key will work and has worked for a couple of versions back.   With all this nonsensical gigantic icon crap going on, there really should be an icon there with a magnifying glass saying “Find my Stuff”.

Ok, so that not withstanding, here is what you get in Windows 8 when you do the search by hitting Win + Q:

Better get used to seeing this screen.  While most folks use only a few programs in the course of a day, this is geared to your using “Apps”.  When you find the app you want, right click on it and add it to your start screen to save your sanity by clicking on the “Pin to Start” button.

By going through all these steps that should have been done for you, you’ll have the ability to use the app.  It may be in the desktop which is not where Microsoft wants you to run your programs, er, sorry… Apps now.  No, that’s a very different space. 

You see Desktop is now intended to be the place where only the grumpy old programs run that don’t look like your New And Shiny Apps.  They don’t really want you in the Desktop any more.   Microsoft are betting the bank on converting your desktop to a big old Tablet computer.

The biggest problem I have with Apps are that they are full screen.   Just like your Android Tablet or iPad.   Great.  That will work for some folks, but if you use a computer professionally, that gets old very fast.   Sure the Apps are intended to give you the same functionality that a windowed app would, but these new things take up the entire screen.

That works great if you’re using a Surface Tablet.  That works terribly if you are on a laptop.  

Think about how you actually WORK on a PC.  We’re not talking about playing a game like Solitaire.  In fact, Solitaire was not installed on my Windows 8 install, I would have to add it at their App Store.  Just so Microsoft would be watching over you when you get your new apps and know what you are doing…. just like Google and Apple do every time you run your app there.

I don’t really like that, it’s decidedly creepy.  I REALLY don’t like that on the desktop.

So now you sit down and find your copy of Microsoft Word and Excel, and normally I start three Excel windows, one Word window, and Firefox every time I start the computer.  Since the new idea is to go full screen, what do you do if you want to refer between two of those windows?  Better get used to full screen app flipping and being much less effective at your job because now Word and Excel will be (eventually) full screen apps.

Despite the fact that the latest version of Microsoft Office doesn’t really work well with being an App.

You get a lot of visual clues if you run a windowed operating system in a windowed mode.   Some folks will use their browser full screen, and if that is their choice, my recommendation is to be happy with Windows 8 or a Surface tablet.   Everything will look familiar and fairly new.

If you find this app flipping confusing and wonder why you can’t keep a calculator app on your desktop visible when you’re trying to get back to Word… you will find yourself frustrated beyond words with Windows 8.

Frankly they broke the way you will work.

You see, while the Desktop is in its own little penalty box of Desktop Land, all the Apps are in their own place of App Land.  You’ll have to find the little hot corner (Upper Left) and hope you have the mouse cursor jammed up there long enough to see the little icon fly out so you can pick your app.  

All of this is very clumsy on the desktop where you’re used to having precise control over your mouse and selecting things as small as an individual dot.   It has to be because on a tablet there is no mouse, there is only your finger.  Some of us have very large fingers indeed, and Microsoft has done a fairly good job of accommodating that, but if you are not using that touch screen you’ll find yourself scratching your head and thinking what were they drinking or smoking that day when they decided to go with this way of doing things.

In my case, I’m looking forward to my next weekend project – getting rid of Windows 8.  It’s terrible.  At least Windows Vista was useable!

Reset Microsoft Word Page Layout Paragraph Spacing to No Added Space

This has annoyed me for quite a while and I finally got ticked off enough to track down the solution.

Dear Microsoft.

Please Stop Helping.  Word is a very strong program.  I have used it for years but being a touch typist, I don’t need your help with adding an extra space between paragraphs.   If I want one there, I will put it there.  I like the little squiggles, red for when I misspell, green for questionable grammar, but this “Feature” just irked me.

Thank you very much.

RamblingMoose

You see they thought they’d help you type away with saving one key stroke each time you put in a paragraph.  When I was taught by “Miss Mommy” back in High School (Yes, they really called her Miss Mommy), she had some rules to remember as we all struggled to learn how to type.   Two spaces after a period.  Two Lines after a paragraph.

See, real simple.   Business Writing 101.

Microsoft in their wisdom thought they’d automate that two lines.  It irks me.  I know what I’m doing, Microsoft, Let Go Of My… Hands.

Ok the link to their instructions are at this link, if you can’t follow mine, maybe having the pictures will help.  I did it and now I’m back to typing my documents the way they should be.   Why is it a problem?  Well because if you edit in Word, the paste it into a web form you get extra spacing.  Some web pages really have a hard time with it and it messes up the formatting.

Hey if you loved this “feature” you wouldn’t have searched for this blog posting would you?

  1. Open Word 2007.
  2. Click the Home tab if you aren’t already there, it is where you go by default.
  3. Toward the right of the control ribbon you will see “Change Styles”.
  4. Click “Change Styles”.
  5. Select “Style Set”
  6. In the pop-up, select “Word 2003”.
  7. To save, click “Change Styles”.
  8. Select “Set as Default”.

Remember that you have to save, Step 7 and 8 will make this permanent, Steps 1-6 will only set it for this document.

Done.  Now you won’t have that pesky “extra line feed”.  Can you tell I think “Focus Groups” should die a painful death in modern Western Business?

WHEW!  Thanks Microsoft but you’re trying TOO hard on this one.  There will be many folks out there that want to do this on their own or are trained to do it on their own.

Plus there’s always Libre Office for the rest of the world which I use on the other laptops and it doesn’t have this annoying “Feature”.  Oh and it’s free and you can get it Here!