Wednesday, February 10, 2016

The Netbook Server - Installing Debian or Raspbian

Funny how writing a blog can be.  I have been thinking how to write this bit for a couple weeks now.  I came to the decision that the easiest way is to step back and let someone else do some of the "heavy lifting".

If all this information is a big much, I will make the links you really need to follow in bold.  So if you trust my blog, just jump to the link and click.  If it is "later" and the link is broken, you can click an earlier link.

Remember, if you are installing an operating system onto a computer you WILL lose everything that was previously on the hard drive.  Back it up before proceeding.

Also, standard internet weasel words - This is obviously at your own discretion.  I have done these instructions as I wrote them down, they worked for me.  So at your own risk, I'm not responsible for any damage or time wasted, extra electricity burned, or whether your netbook sprouts wings and demands to be fed an offering periodically.  Lawyers are respectfully welcome to take their lawsuits, roll them into a little ball and file them where they will not effect (or affect?) me.

I have done both processes successfully more than once.  With Debian, all but one of my computers run that operating system.  I wrote this guide while doing the steps for Debian, so it should be pretty close.

Finally - take your time.  If you've only ever used Windows, Linux is a completely different philosophy.  Everything is free, but you pay for support.  So if you have a question, look to your favorite search engine, and see if you can find it yourself.  You would be shocked at how much information is out there for Linux, and the quality of the write ups are usually much better than I find for windows.

RaspberryPI

If you have one of these beasts, I am assuming you have already looked into and installed the operating system once.  That simplifies my own tasks.

Get yourself an unused memory chip, I strongly recommend larger than 8GB.  16 is acceptable.  Why is because I found that Raspbian has a quirk or a bug in it.

If you want to copy a lot of files to a shared drive on Raspbian, it looks at the empty space on your chip and says that is the maximum you are going to be able to copy to it.  When you install Raspbian, go back in to the preferences and make sure that Noobs releases the entire chip to be used.  Typically, it will be set for 2GB, noobs will let you reclaim your entire 16GB plus.

Why Raspbian?  Because it is based on Debian, and because it has "official images for recommended Operating Systems".  That and since Debian is so stable and well known, it works for my own knowledge - I can do it in two places but only write one set of instructions once you're "there".

RaspberryPi's instructions really are simple, and you can follow them on this page.
https://www.raspberrypi.org/documentation/installation/installing-images/



Debian - You want this.

There are other Linux distributions that are more "user friendly" but few are anywhere near as stable as Debian.  You could put a computer inside a wall running Debian and as long as it gets power, you can ignore it and let it happily run.

Since this is Netbook oriented, I am pointing you to a 32 bit copy of Debian.  If you discovered this blog posting elsewhere, consider for yourself whether a 64 bit copy is right for you.  It will not work on a netbook, but on a Core 2 Duo or newer, it may be right for you.

One other decision to make.  Debian has another quirk.  Debian's maintainers are very adamant about not having any software on their operating system that is owned by other companies.  It is called "Non-Free".  To you and I, that can get in the way of having what you need on your computer.  In the case of my Lenovo S10-2 netbook that I will use for this project, I need the Non-Free version of the wifi drivers.

Thankfully someone else has put all that together for you.  If you don't need the Non Free version of Debian, or you want to see what on earth I am talking about, go and download the other version.

In my case, the Non-Free saves me the step of waiting on the network cards. 

I know, it all sounds very odd because Windows has all that stuff "on the DVD".  In reality, since Windows is 95% of the market, they make sure that Microsoft has the drivers needed.

For most this is all you will need.  There still was a file it wanted during the install.  Broadcom Wifi Drivers are a BEAR.  So I stopped the install after I found the ones I needed online.  It was looking for b43/ucode15.fw series of drivers.  The solution is actually to install Non-Free Debian with an ethernet cable plugged in to the Netbook for the network.

While Servers should be connected to the network with ethernet for speed, this is just a sloppy omission - Non-Free or Not.  Since this bothers me and other owners of the Lenovo S10-2, I'll solve it by restarting the install with ethernet plugged in.  Weirdly enough, after all of that on my first boot, it came up without a problem.  It must have found what it needed "magically" on the install disk or the internet.

For Debian, the DVD you want is on this link:
http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/i386/iso-hybrid/

To explain what that file name means:
  • That "Including Firmware" is what you really need.
  • That "i386" says 32 bit operating system - for netbooks.
  • That "current-live" says I want to be able to test this on my computer and run it from the DVD without ever touching the hard drive because I don't trust anything.

When you click on that link, it puts you with a bewildering list of weird scribbles and file names.  The one you want is the one with "xfce" and "iso" in the name.

Why?  Because the "place" in the file name tells you which desktop you are going to get.  That desktop is called xfce.

Why XFCE?  Because it has a balance of looking like Windows 7, is highly configurable, and is relatively lightweight so it will run well on older computers.  I trained a 69 year old little old lady how to use Linux as a daily driver using XFCE and her son uses it to this day after she passed on.  It really does look that familiar.

The direct link for the file, as of today, is:
http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/i386/iso-hybrid/debian-live-8.2.0-i386-xfce-desktop+nonfree.iso

Click on the link, and save the file somewhere meaningful to you.

When this is finished, you need to make a copy of the operating system on a 2GB or larger USB Memory stick.  Remember, your Netbook will almost certainly not have a DVD drive on it, so you're doing this most likely on your windows system.

The instructions for Linux and Windows are on the following link.  What they are telling you to do on Windows is download a program, install and run it, then tell the program where you put your copy of Debian.

http://crunchbang.org/forums/viewtopic.php?id=23267


When you go to run Win 32 Disk Imager You need to run it as an administrator.  Right click on the icon in the start screen/menu and select "Run As Administrator" and follow the instructions on how to create the disc by selecting the ISO Image File, and the correct Device, then click Write.

Now that you have all that on the USB Stick, you can test it in the Netbook by plugging it in to the USB port.  Then turn on the Netbook, but hit the key that you use to get into the temporary boot menu - typically F12 when you are booting.  To get to see what Debian looks like, select "Live (586)" and hit enter.

When your computer is up completely under Debian, check to make sure that you have Wifi connectivity, Ethernet connectivity, and that there isn't anything missing.  Basically a Netbook is an old laptop these days and with the Live DVD or USB stick you just made, It would be pretty rare if you are missing anything on it, so just sniff around and make sure it found all your hardware.  When through you can shut everything down and take a breather.

Installing Debian from the Live USB Stick onto the Netbook.

It's surprisingly easy.  The video at the end will help if you get worried or lost but it boils down to you need to enter just a few things in.

Start by selecting "Graphical Install" at the "Boot Menu".

Language (English)
Location (United States)
Keyboard (American English)

Computer Name:  It will spend a bit gathering itself together then ask you for a name of the computer.   My own habit is to name it after large Moose, Reindeer, Elk and that sort of thing.  Really, It doesn't have to be anything meaningful, so have fun with it.  My test installs were Rudolph and Blitzen.  Or be bland and call it "server".  The default is "debian".  But it has to be unique to the network.  Two computers with the same name cause confusion, just like the year I had five Karen's in my classes.
Karen.  Should I call it Karen?... Naaaah!

Domain Name - if you know of one use it, but I leave this blank.

Setting up users and passwords.  

First there is the Root Password.  This is the Administrator on Windows but it is password controlled.  It's one of the many reasons why Linux security is stronger than most.  If you have someone trying to install something on your linux computer, a window will come up and ask the user to enter in this password.  It should be meaningful, and ideally it should be complex.  Write it down because a Linux computer without a root password is useless.

Second, there is the Regular User Name.  This is the "Non-Root" user who gets to sign onto to the machine.  It is you, but it could be anything.  Just write this down or else you won't be able to log onto the computer, and no you may not use Root.

Third,  you will need a password for the regular user.  It can be the same as the Root password, but if it is, don't tell anyone because they will have full control over your computer.  Can't have that can we?

Fourth, you need to enter in your time zone.  If you don't know it, you are probably lost.

Partition Disks:

Here is where you end up losing everything on your hard drive to give the netbook a new life as a Linux Server.  If you did not back up your computer, proceeding will delete the old data.  That may be what you want, it may not be.  Now is the time to pause and backup the data, unless you want to delete it all.  It is a One Way Trip!

Partitioning disks is something I have always found easiest to simply take what they give me here.  The "Guided  - Use Entire Disk" prompt is what I select.

The Disk naming is different on Linux than Windows.  They call things HDA and HDB, and each partition on the disk gets their own number.  Typically what you will want to do is look for a disk that has the same size as your netbook.  Many netbooks have a 160gb or less drive in it.  The install stick may also be spotted - but you should be able to determine that logically.  Most likely it will be called sda...  Select that hard drive, tell it to create a new partition table, and if it looks right, click continue.  Mine actually had a string saying "SCSI3 (0,0,0) SDA - 60GB Hard Drive" and a second one on "SDB" that was the 2GB Generic Disk

When you are done setting up the disk with "All Files In One Partition", you highlight "finish partitioning and write changes to disk", and let the computer create your partitions.  It gives you a warning at the end to write changes where you have to select "Yes" and continue.

At this point, Debian will write the data out to the base system - your hard drive.  You are on the way to getting a new operating system.  Go make a sandwich or a cup of coffee and come back later...

Now that it is later...

Package Manager:

It will come back and ask you to configure a Package Manager.  Linux is free.  There isn't one central place that all is kept.  You will be asked if you have a network mirror - and that is the location of the place that that software is kept.

Yes. (Always.)
Country:   United States. 
Please Select the Debian Archive Mirror:  debian.gtisc.gatech.edu or a closer one
Proxy - leave blank unless you know otherwise.

All the software is spread around the world on different archive mirrors.  So Debian, and most other Linux distributions, share the burden of putting the free software out there by creating a place for it to reside.  Here in Florida, my nearest place is at Georgia Tech in Atlanta, but you could be using a server anywhere.  Pick one, nearest is best and you can change them later.

Here is where you can get your second mug of coffee and comeback later.

When it finishes installing all those packages, it asks you if you want to "Install Grub To Hard Drive".  Yes.  Continue.  Why is so the computer will boot from the hard drive, so you really do not have a choice.

It will ask  you what drive to write it to.  /dev/sda is your main hard drive and that is your choice.  My generic USB stick was in /dev/sdb at that time and obviously you do not want that.

It will write out that GRUB which is a boot menu, then bring up a page saying to "Finish The Installation".  Make sure you remove the memory stick, and click continue.

On the first boot:  "Welcome to the first start of the Panel"

When you log into the computer the first time, XFCE will put up a message asking you to configure panels - you want to "Use Default Config".  That gives you a control strip at the top, and a launcher at the bottom.  Both are completely configurable from your system settings.

Now you are running Linux on your netbook.   Have fun!

Video is at https://www.youtube.com/watch?v=TIuOFqQ-XTk

No comments:

Post a Comment