The Computer Corner Take II (#32) by Bill Kibler

To see more Computer Corner articles look here: CCII page or check out the Home Page .

The How and Why of Debian Stable

The Why

NOTE: If your not sure what Debian is, or Linux in general, go here: About Debian , a good place to start learning about Linux and Debian specifically. You will find many links to detailed discussions about Linux, hardware, support, versions, history, and FAQ pages. After checking out the "About", come back here to see why I only use Debian Stable Releases.

NOTE - Windows XP Upgrade: Microsoft has stopped supporting Windows XP and is flooding the world with their FUD[1] about buying new systems and switching to Windows 7 or 8. There are many versions of Linux that will give you the look and feel of Windows XP. The modular design of Linux and past speed improvements to the kernel will give users a performance boost over XP. The internet is full of articles describing how to convert from XP to Linux and continue to use your old data and programs. This article is but one that focuses on converting to a Debian stable release version of Linux.

For whatever reason, you have come to this site to get help installing Linux on your system. You might be an XP convert who feels there is plenty of life still left in your old hardware. Many Windows users might want to change to Linux to save money, which it can do. Linux offers stability, options to customize a system that meets your needs, a very large selection of applications for your every need, and compatibility with Windows data, file systems, and many of their applications. Linux is used in many commercial applications, in fact, it is what makes Android phones work so well.

Converting to Linux is not difficult, but there are some steps to take if you want to save and reuse all your Windows data. Typical users find it takes about six months to a year to fully understand Linux, un-learn all their previous bad habits, before they start trying to convert all their friends to Linux. Your experience will depend on the state of your current system, how much unique hardware you use, software needs such as support for visually impaired users - which it has, or simply your desire to learn.

For many users their biggest problem will be selecting a version of Linux. With the support for Windows XP stopping, there have been several new versions of Linux distributions that offer the look and feel of XP. Linux is a modular operating system, and as such offers the user the options of selecting and changing the entire look and feel to match their needs. Windows was never modular and as such users never had a choice of matching their working habits to how they used the operating system. Linux provides many options from selecting how you will use the system, to being on the "bleeding" edge of development, or plodding along with only minor changes to match newer needed features.

I start this how-to by reviewing why I like the Debian stable release and think you might want to select it for the same reasons. Much of what I cover however, can be used with most of the distributions based on Debian and derivatives there of.

A bit of History

I have used for many years now some version of Linux for all sorts of reasons. Before I had a usable and reliable internet connection, I used SUSE because it came on many CDRoms that represented their entire repository of applications. Several years back, due to the success of Ubuntu and their six months update cycle, SUSE tried to update faster as well. The results was horrible - too many broken applications and not ready changes. So I checked out other distros and settled on Debian due to it's many classes of releases. I like that they gave me the choice of selecting where on the development cycle I can be. I settled on "stable" for the "will not ship until it is truly stable" concept. I could also do "testing" or "experimental" branches if I wanted to get closer to the bleeding edge. However I left SUSE due to their trying to do bleeding edge and failing, so trying Debian testing didn't match my idea of a good choice.

It has been several years now, of using Debian stable, and although I have seen some minor issues the overall releases have been great. I haven't seen anything to make me want to change distros other than the occasional missing hardware driver that is supported in a newer kernel. For those few times, I can use their "backport" repository and get a newer kernel, or application for that fact. I have come to trust the work the teams have done and feel the overall output is top notch. Where I see an issue is with "testing" branch. The on-line support says that "testing" is pretty stable and only a preview of what will be in the next release. Although that is a true statement, the fact is the branch is not "stable" but ever changing and sometimes broken. I tried twice over the past six months to use testing only to revert back to stable after a week of use. I found too many broken packages, half completed changes and updates, with an overall high level of disappointment.

Current State of Affairs

So what happened to testing and what is going on. I see several things inside Debian and outside that are causing the problem. For the Debian team, they got lots of flack over taking almost three years to do the 7.0 stable release. By the time they released, some items were already a bit behind the times and thus a shorter release cycle was being demanded. They promised to try for a two year cycle, which seems to me that "testing" might be less stable as they rush new items onto the branch. From past experience, I found testing to only be usable, after they locked the branch. That is when the list of packages is fixed and versions of the code are frozen. Only really broken package selections can be changed. It really starts the beginning of their bug find and fix cycle. Up till that "locking" point nothing is really "stable".

Here is where I have changed my "recommendation" about distros and am now saying only stable or stable derived versions should be used. Ubuntu, Linuxmint, and others, are derived from Debian testing, which is no longer "somewhat" stable. Most of the derivatives were - I feel, relying on Ubuntu developers to find and fix any bugs in the testing code. Ubuntu however has gone bleeding edge and is now focusing it's attention on phones and other special projects to the point I feel that bug fixing of testing is suffering. I have seen several reviews of derivatives where the reviewer found something broken that I saw when trying Debian testing branch. That says to me that "testing" bugs are not being found and fixed as they used to be.

I can not recommend using testing for new users as well. I have seen some of the bleeding edge changes that require a good understanding of Linux tool usage to make use of. Clearly a beginner can not be expected to handle these updates and new features with possible bugs. Let's be frank, new users are not concerned about the bleeding edge, all they want is something that works, is easy to use, and will replace what ever they were running before. So to meet this concept I feel only something truly stable, has a life cycle more than one year, can be recommended for new users. New users typically take over a year to become proficient with Linux and thus you need a release that doesn't change during their learning curve. Which for me says - Debian stable.

The Starting How

At this point you have decided that Debian stable is for you, or maybe your helping someone convert to Linux and want a "stable" distro for them. Your first step will be to get a copy of their ISO images. Simple step, but way too many choices even for those with some experience. If we go to the "", we can find out about all the different ways to get Debian on CD images. It has links to vendors selling CD, DVD, and BlueRay sets, which for users that do not have hi-speed access to the internet, offer cost effective means of getting the entire Debian library of Linux. It is possible to buy the complete set of what is in the debian repositories, or you can usually just buy a set of installation disks for not much more than the cost of the disks themselves.

For those users who do know how to download images and burn them to disks, the main page offers several links sorted by "http", "jigdo", and "BitTorrent". For those not sure of the options, "HTTP" is the slowest, but typical method for new users. There are plenty of pages on-line that will cover using both "jigdo" and "BitTorrent", and as such check them out as they offer some speed and reliability improvements over downloading large images with a web browser. "jigdo" is your best option, as it downloads the images as small bits and can update previous downloads - the DVD images are "jigdo" downloads only. I have used the tool and it works well, especially for slow networks and unstable connections.

They also list links for live images of debian, and I covered building your own live image in article #31. I might suggest doing that, as like jigdo, the images are downloaded in small bits, but the skill set is clearly not for beginners. The main reason for getting a live image, is being able to boot off of the disk and test drive the release before loading it on a hard drive. The problem with this approach is the size of the image - they can be rather large to give you a good example of what your going to be installing. I have created a smaller live image that I feel gives the user a good taste of xfce4 that is about 400MB in size. That is still larger than I would like, but small enough for most to download and get a usable "same as regular" release. The link is at the bottom of this page.

Starting the install

If you decide not to try the live, but just want to get and install the real thing, follow the Debian links ( ) based on your download method, where more information will be presented to help you select the mirror location to use and platform to chose. If your using a "x86-64" bit system, select the amd64, otherwise use the "i386" for regular Intel style CPUs. In the i386 download list, there are 12 images shown and 8 update images. It takes 8 CDs to make a complete copy of all the repo packages of which CD 1 and three other CDs contain the desktop install. The CD #1 is the gnome desktop - their current default, while you have KDE, LXDE, and XFCE as other CD #1 options. The "netinst.iso" is the smallest at 277MB and has a basic system without desktop for loading everything from the internet. By default it will load gnome if the "debian desktop" is selected. Therefore you need to "not" select the desktop install from the internet if you want other than "gnome".

If we want to do an xfce desktop install, we need to use the "debian-7.4.0-i386-xfce-CD-1.iso" a 629M CDRom. Download the image and burn to CDRom. If you don't have a burning tools, you can install "xorriso" on Linux and use the command line given below. "xorriso" is for Linux, window users need to find one of the many web pages and free iso burning tools listed on them.

# sudo apt-get install xorriso
$ xorriso -as cdrecord -v dev=/dev/sr0 blank=as_needed debian-7.4.0-i386-xfce-CD-1.iso
Once you have the disk, the next step is rebooting your system you want to install Linux on, and run the install option. A few comments about this are needed, you must have the system BIOS setting such that it will boot from the CD/DVD player. If it doesn't boot, you will need to change settings in the BIOS, this can be a problem with new systems, as they try to prevent you from getting access. In a couple of cases, I have had to open the unit and remove the hard drive cable to get it to fail starting up and thus give me access to the BIOS settings. Note as well that with Linux, you can actually install to a hard drive on one system and use the drive on another. For example, you could install a i386 image on a laptop hard drive on a amd64 system, then install the drive on a system that doesn't even have a working CDRom device. Just remember to make sure and install "grub" on the drive and not do anything based on the host system or its hardware. Might take a few tries before you get it right, but nothing in Linux will prevent you from doing it. You can as well load the install on a USB drive, a Flash drive, or a SD card - there are instructions on the web for doing that - in some cases a one line command.

Whether on the install image or running the live disk, the install gives you two options, plain text or graphic mode. Both do the same steps, just I find the text mode faster and it can be done without a mouse, which is great for embedded or server systems. You basically will follow the steps with three points of concern - hard disk setup, to mirror or not, and gub install. The hard drive setup seems to cause a lot of concerns if your not installing on the whole drive - for whole drive setup just let the tool do it - selection option 1. If you want to do anything else, you will need to select the advanced option and manually select size and type of partitions. You will need at least one swap partition and one root partition. Select the root as one partition, it normally works best. For complex arrangements, I suggest using the "gparted.iso" boot disk and setup or shrink partitions as needed. You need to exit this step with a root and swap set for formatting and mount points defined.

NOTE: If you have windows on the whole disk, you will need to shrink the partition and create enough space to load Linux. If you have a spare drive, add it to your system as the main drive, and the old drive as secondary - that will give you a whole new drive to use for Linux and just let the installer do it all. For shrinking you need the gparted or a rescue disk with the parted tools set. I have had problems trying to shrink windows partitions due to the drive being corrupted. In the corrupted case, it is better to use another disk and try later to use or fix the bad drive under Linux. During the install disk setup step, it is possible to select the old partition and mark it for use with a defined mount point. I noticed however that "NTFS" was not an optional mount file system and thus might not be mounted correctly. For more on this subject see the later discussion under "mounting drives and partitions".

Your next option of concern is the "mirror" choice. This is where the install goes out to the internet and finds updates or packages for your installation. This is great if your using a 7.0 disk and the current patch level is 7.4 - it will automatically update everything to the latest stable state. This is also a good option point to say "no" if you have a really bad network connection and need to load only from disk. If your using the "netinst" disk and said no, you will be installing a "standard" no desktop system, where you can install what you need later from the network. This is handy if your network is not very stable, as you keep re-running the update process until it has all the packages needed - apt is smart enough to not reload packages already on your system, but just not installed.

The last problem step for many is installing "grub". "grub' is the boot loader, it is what is run when booting up the system and can handle window partitions and Linux partitions as well. To work properly you must have at least one partition marked as boot or active, and install grub to the MBR or master boot record - note, drives of 3 TB or larger have special steps and tools to be usable, so check the web for them. If your doing a cross platform install, just make sure the hard drive your updating is the one intended and not your host system's drive. The installer should prompt with a list of options and in most cases just take the main MBR of the drive you have been installing the image on. As part of the grub install it should show you all the operating systems it found on the hard drive(s) - you will need to make sure it found all of them or skip those of the host system if not wanted. If your dual booting this is where you can set which and how many you want to use. If there is an issue just make sure the new Linux will be booted, so that you can adjust things later once the new system is up and running. As to the rest of the install, most should be taken with the defaults and entering passwords. The only exception to clicking on a highlighted option, is the partitioning step, where it wants you to confirm the action, as it will change the partition table with no option to back out any changes. Keep in mind that if something goes wrong, you can just reboot and start over. In my early days with Linux, I often took three or four start and stops doing installs before I felt I understood what I was doing and had the right selections.

After the install completes, it will re-boot the new system and you should be ready to do updates and testing of your new system. What if grub didn't work right? I recently discovered that the install disk has a trouble shooting option that allows you to run a rescue like process. It will load it's own version of Linux and allow you to mount and run a command line from the freshly installed drive. What I liked most is one option - install grub - it is a life saver. I recently added new hard drives and was manually updating the grub settings and made a typo that prevented things from working properly. I used the live boot option and grub install steps to correct the problem. So if you have problems with your install, go back to the install disk and use the advanced options to login or fix your problem.

Package how-to

Depending on which disk or process you used, at this point it is assumed you have a running system. If you did xfce4 disk 1, it has a full desktop and your somewhat ready to do work. Please note that sometimes the desktop doesn't startup, especially if you don't have a desktop manager installed like "lightdm"( my live image does not have a DM). When prompted after rebooting, login as your user and enter "startx" to "start" the "X" desktop. If you took one of the other options say "standard" or "netinst" and skipped the network updating, you will need to do an update/upgrade and add programs. If you did network updating or installed a fuller XFCE4, you may have synaptic installed - the graphic frontend to apt - it will need some "setting up" - see "note". In all cases your setup is not complete and you will need to do some command steps to make things work.

NOTE: If your install included synaptic, it must be setup to work properly to install everything you might need. Start synaptic and it will ask for the root password, enter the password. After the program has started up, click on the pulldown "settings", select "repositories", the screen will be at the "Debian Software" tab - make sure all four boxes are marked. Click on "other software" and highlight the CDRom line if there - click on the remove button to make sure it doesn't try to load software from CDRoms. Note however that if you are loading from CDRoms, skip removing the line. Click next on updates tab and "security" should be checked, and you may check the updates box as well. I do not suggest experimental updates at all. Select automatic notices if you want those. By default it will use the main Debian repository, but if you want a different or closer repository, go back to the Debian software tab and select from the "Download" options the repository of your choice. Close the "repositories" selection box and go to "Edit" menu and select "Reload Package Information". This will update the internal "cache" of available packages. You can search for packages by entering text into the "Quick Filter" box at the top. synaptic should now be ready for use and can be used where "apt-??" steps are shown below.

There are many times where the best step to do something in Linux involves using the command line. Often those steps require you to be root. There is a program called "sudo" that will run a command as root and is great for those one off command lines. I show most of the following commands using "sudo". First make sure it is installed, by doing:

> dpkg -l | grep sudo
If nothing was returned, it is not installed. To install you will need to login as root and run "apt". Do:
> su
root@> apt-get install sudo
The next step is setting up "sudo". This utility allows us to run programs as root without logging in as root. You will need to add your name to the "sudoers" file and we do so by using "/usr/sbin/visudo". Note that "visudo" will invoke the default editor selection of "nano" or "vi" depending on your current settings. "nano" is a "curses" based editor that works by moving the cursor around using the arrow keys and control key combinations. You make edits and use "^O" to save the changes, or "^X" to exit and not save any changes. You will need to do the changes as root. The changes are:
For nano as root:
root@> visudo
  move cursor to "root" line
  add a new line under the "root" line that is the same as "root" line
  replace the "root" with your "user login name"
  You should now have two lines that look like this:
     # User privilege specification
     root	ALL=(ALL:ALL) ALL
     kibler	ALL=(ALL:ALL) ALL
  The second line should have your "username" not mine!
  Do "^O" (the control key and "O" key pressed at same time)
  Make sure to save the buffer and that the prompt saves changes made.
  If you do not get a message that sudoers was updated, try steps again.

For vi as root:
root@> visudo
  cw your_user_name

After either commands do:
root@> exit
> sudo cat /etc/sudoers

So what did we do? We switched to root user by doing "su" - it will ask for the root users password, and if correct, the prompt will show "root@.." instead of your "username@...". Your are now root and could do everything needed without using the "sudo" command given in the below examples. You will find "sudo" handy so fixing it to work correctly is important. You edit the "/etc/sudoers" using the command "visudo", which not only edits the file, but checks for proper usage before updating the file. Do "man visudo" to learn more. If your default editor is "nano" follow the nano steps and be sure you get "sudo updated". If you know the editor vi you will understand the listed vi commands shown under "visudo". For review they go like this - "/root" find the first use of the string "root" and moves the cursor there. The "n" finds the second usage, which is the line starting with "root" and the one we want to make a copy of, which we do with the "Y" or "yank" command. A copy of the line is now in a buffer and we "paste" the line by doing "p". We now have a copy of the line and want to change the "root" string to that of our user name and we do that doing a "change word" operation. The "cw" marks the string for change, and we type in our user name and hit the "escape" key to stop or finish the edit. We exit and save our changes by doing ":wq", where "visudo" will check out changes and save if all is correct. At this point we do "exit" to stop being root and can test the changes by using "sudo" to cat the file we just edited.

After getting "sudo" all setup, your next step is checking on the apt sources list and making sure it is correct. You will find the list as "/etc/apt/sources.list", use vi or nano to open this file as root user ( or log in as root and drop the "sudo" from the steps shown):

> sudo vi /etc/apt/sources.list
> sudo nano /etc/apt/sources.list
You want to make sure the CDRom line is commented out or removed, since you will not be using the CDRom again. At this point you also need to decide if you want to use other than "main" packages. There are three types of packages in Debian - "main", "contrib", and "non-free." "main" is the normal packages, while "contrib" are from other sources and "non-free" are or have "private" code, such as video drivers from Nvidia. To get all the possible packages, I always have all three selections, while by default only "main" is listed. So you will need to edit the file to look like this:
# deb cdrom:[Debian GNU/Linux wheezy-DI-b4 _Wheezy_ - Official Snapshot amd64 NETINST]/ wheezy main
#deb wheezy-backports main contrib non-free

deb wheezy main contrib non-free
deb-src wheezy main contrib non-free
deb wheezy/updates main contrib non-free
deb-src wheezy/updates main contrib non-free

Your options might be slightly different as in "http" instead of "ftp", but you need the two sets of regular and security sites, with all three types of packages listed. You can add the "backports" line by removing the "#" comment marker, which gives you access to newer kernels for this release. This is not normally needed, but sometimes it can solve a hardware issue. After you have updated the file, you need to update the apt cache structure to have all the current data. You do that by:
> sudo apt-get update
That will update the cache with fresh data. Follow that with:
> sudo apt-get dist-upgrade
Say "y" to the prompt and it will start downloading all the packages that changed from the time your install disk was created, or it will say nothing to do if you did network updating as part of the install process. In either case, your distribution is now up to date and ready for the next task of application loading.

Unlike other distros that only come with one desktop selection, debian has about 10 or more desktops to chose from. The four main desktops require considerable disk space and as such have their own disk. The other options, like OpenBox or iceWM, are very small and can be installed using update tools like "apt". You can even install all the desktops and use one of the many login managers to select which one to try. I like xfce4 and have been using it for some time. LXDE is also small and light on system resources - good for older systems, but I chose xfce4 as it can be installed with a smaller footprint - in other words a bit more modular than LXDE. If you did not install a desktop, your first step after a "dist-upgrade" is to install the desktop of choice. To install the xfce4 desktop (or to fill out a mini-xfce4 ) you will do "sudo apt-get install task-xfce-desktop" to install everything that the xfce4 team thinks you should have. The key word here is "task", which is more encompassing than a "meta-package". The package "ssh" is really several packages covered by one string, and is called a "meta" or multiple packages because of that. The "task" package name however covers a special set of meta packages by using a special package name. Try "sudo apt-cache search --names-only ^task-" to see a list of "tasks" ( about 140 items).

"apt-get" will check to see what is installed and find all the missing items and give you a list of what it thinks needs to be installed. You can decide that is too much, or not really what you want and say no, otherwise a yes will start the downloading. For a proper xfce4 desktop and to fill out the installation I suggest the following ( in synaptic you can do all of the same operations, I just find the command line faster and simpler):

> sudo apt-get install task-xfce-desktop
> sudo apt-get install xfce4-goodies
> sudo apt-get install iceweasel synaptic
> sudo apt-get install lxterminal gnome-system-monitor
> sudo apt-get install cups cups-bsd printer-driver-hpcups
> sudo apt-get install parted parted-doc
At this point you are probably wondering what all these packages are and do. The task-xfce-desktop will fill out the desktop to what would normally be on a full xfce release, while xfce-goodies are optional packages that add some extra features to xfce that most user appreciate getting. "iceweasel" is "Firefox" and fuller featured than midori, while "synaptic" is a desktop version of "apt-get". For most user, you will use "synaptic" to do the remainder of your updating and adding packages to your Linux release. What still needs to be done? If you did the smallest standard install, you will have no office suite, no video player, no music player, in short none of the now days expected features most users want in a Linux release.

There are three ways to find packages in Linux. The most simplest is just doing:

> sudo apt-cache search browser
to get a list of packages with "browser" in their name or in the description. Another popular way is a google search using "debian stable browser" and see what others recommend. Debian has some web pages that highlight and review options, such as their page on "desktops" which highlights and provides links to most of their desktop options. In synaptic the packages are broken up in to groups and you can brows through those looking for topics of interest. If you need more information on a package you can do:
> sudo apt-cache show iceweasel
and get a detailed list about the package that gives depends, a brief description, and other recommended packages. When using "synaptic", your third choice if you will, it will group the packages based on the "Section" tag returned in the "show" command and thus you can scroll down through a list of section tags and pick a package from that grouping. There is a "description" tab that will present the information in tabbed format that you would get back if you had done the "apt-cache show" command. Remember that in Unix/Linux, most of your desktop tools are simply wrappers around command line options, and thus you can do the same from a command line that is done with a GUI based program.

Tweaking XFCE4

By default xfce4 has a top of screen panel and I wear tri-focal glasses. Needless to say tilting my head back all the time to look at or use the top panel is something I rather not do. Over the years I have developed the habit of having multiple workspaces and using certain workspaces for certain activities. This came out of doing remote support for multiple servers all over the world. I would setup a workspaces for a group of servers to help me track my activities and keep me from doing something on the wrong server. However, the default setup is for four workspaces and not my normal 8, and even worse, the workspace switcher applet is not installed. For me the first step is just a few changes, but these will show you how to do even more later.

The first thing I do is move the top panel and remove the bottom partial panel. We do that by going to the settings manager and selecting the panel tool. If you click on the "Panel 1" tab selector, and click on "Panel 2", the focus is now panel 2 which can be removed by clicking on the "-" button. The lower panel should be gone now and the "Panel 1" is the focus. un-click the "lock" button and it is possible to move panel 1 now. It is not necessary to have the control window open while moving the panel - just close it for now. You can do all this by "right-clicking" on the panel and selecting properties. I have had trouble doing this, but you are to right-click the panel, select move, and grab the panel and move it to the bottom of the screen. After doing that, go back to the properties or setting panel and lock the panel. The "automatically increase the length" should also be checked to make sure it goes from one side to the other. Of course you can make your own variations, but this is the tool controlling the panel settings. While in this section, select the "items" tab and the "+" key to add the "workspace switcher" applet. You should get a small panel with four boxes that control which workspace is active. You can change and name the workspaces using the workspace tool in the setting manager screen.

I find having the "focus follow mouse" setting works for me, that means you can move the mouse into a half shown terminal session and center click a paste operation to put text into a command line while still keep the full terminal session on screen. This can allow for multiple pastes before you switch the terminal session to full screen. There are all sorts of other options you can personally decide work for you, from background color as well as the style of window decorations. All these settings are in the setting manager display. I suggest you open and look at each settings group to get an idea of just how much and how easy the desktop can be made to match your style of work. Keep in mind that there are lots of panel applets to help you monitor your system or check on the weather, you only need to brows the repository looking for xfce applications.

Mounting Extra Drives or Partitions

A common reason to install Linux is to stop using windows. So when it is installed you might want to get some of those older files from the old windows drive. All the Linux office tools will read windows doc files and even most presentation files as well. During the partition selection and formatting step of the installation, you will have left the partition un-touched, or using gparted will have shrunk the partition to make room for the new Linux setup. After installing Linux and doing lots of the above stuff, you are now ready to go get those files. I checked and xfce does not have a tool to mount partitions. Their "mounting" setup tools are for "auto-mounting" options which I normally turn off. With auto-mounting on, any new USB/SD device will get mounted when installed or hooked up, and you will have little choice as to where that is. I found that most of the mount paths are way too long or complex for command line tool usage and thus I prefer a shorter path of my own choosing. Some of my own paths are "/mnt/bkup", "/mnt/iso", and "/mnt/sdh", where "bkup" means backup device. You can mount "iso" images from the command line and thus I have a mount point for those.

There are several steps to mounting a partition or second drive permanently in Linux. All the steps are from the command line and start by finding out what the system calls the partition you want to mount. To find all the partitions the kernel knows about, do:

NOTE: When installing USB drives, it can take as much as a minute for the system to see the new drive. If your newly installed drive does not appear in the below table, check back after a minute or so and it may be there. If your drive still does not appear it may be due to some problem with the drive - do "dmesg" and the error messages should be shown.

> cat /proc/partitions
major minor  #blocks  name

   8        0 1953514584 sda
   8        1   10485760 sda1
   8        2  943718400 sda2
   8        3  999309400 sda3
  11        0    7191286 sr0
  11        1    1048575 sr1
   8       16 1953514584 sdb
   8       17 1953513560 sdb1
   8       32 2930266584 sdc
   8       33 2930265088 sdc1

You can see on my workstation that I have three drives and two CDRom/BlueRay disk drives. SDA drive is divided into three partitions, one being swap and two being data. To see how they are currently used, try:
> df
Filesystem                                              1K-blocks       Used  Available Use% Mounted on
rootfs                                                  928910792  380039208  501685664  44% /
udev                                                        10240          0      10240   0% /dev
tmpfs                                                      794016        432     793584   1% /run
/dev/disk/by-uuid/0c5a197b-0f1a-466a-b952-fac665867266  928910792  380039208  501685664  44% /
tmpfs                                                        5120          0       5120   0% /run/lock
tmpfs                                                     3685160         68    3685092   1% /run/shm
/dev/sda3                                               983627764  406294484  527367812  44% /work
/dev/sdc1                                              2884283608 1415893656 1321876700  52% /vid1
/dev/sdb1                                              1922859912 1241988052  583196184  69% /vid2

You can see that "sda3", "sdb1" and "sdc1" are mounted and that "sda2" appears not to be mounted, but is in fact the "rootfs". We see that by checking what the disk/by-uuid links are. We simply do a:
> ls -al /dev/disk/by-uuid
total 0
drwxr-xr-x 2 root root 140 Mar 10 10:06 .
drwxr-xr-x 5 root root 100 Mar 10 09:35 ..
lrwxrwxrwx 1 root root  10 Mar 10 08:16 09b6c1b6-4cd0-475d-8693-7266bbcaea2d -> ../../sdc1
lrwxrwxrwx 1 root root  10 Mar 10 08:16 0c5a197b-0f1a-466a-b952-fac665867266 -> ../../sda2
lrwxrwxrwx 1 root root  10 Mar 10 08:16 3502e77e-1206-4624-a5a5-c6f7da32a9ad -> ../../sda3
lrwxrwxrwx 1 root root  10 Mar 10 08:16 d88ee29c-d954-49f5-b43f-8aed7bb9fc8b -> ../../sda1
lrwxrwxrwx 1 root root  10 Mar 10 08:16 ffb920c2-a602-4d4d-94df-5d65e9deef1f -> ../../sdb1

Which shows that the "uuid" - the log string of letters and numbers shown in the DF command - point at "sda2". Why the uuid and not just the /dev/sda2? In the current scheme of BIOS tools and operations, the actual drive value may change during the boot operation. If you later add a new drive, it might push the /dev/sd? value to something new, while the drives that have not been reformatted or repartitioned, will still have the same uuid. My current workstation suffers from this problem, and I must use uuids in grub2 setup files, else it can't find the drives to boot from. For older systems, or single drive setups, use of /dev/sda2 normally will work, however the installer will generally use uuids.

For this example, suppose we have a "/dev/sda4" and we want to mount it as "/winC", since it might have been the old main windows drive. Here is all you do for a one time mount:

> sudo mkdir /winC
> sudo mount /dev/sda4 /winC
> df
> ls -al /winC
So first we make the mount point, "/winC", and then we mount the partition. Since it is a windows file system, the Linux mount command will automatically recognize the type of file system and use the proper driver to work with it. To unmount the drive we do:
> sudo umount /dev/sda4
For mounting the drive permanently, we need to add it to the "fstab". We start by figuring out what the system defines as the mount parameters. We get them from the "mtab". We do that by::
> cat /etc/mtab
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
/dev/sda4 /winC fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0

The last line in "mtab" is the mounted partitions setup string showing our partition and the driver that allows us to talk to, in this case, the NTFS drive. To make the mounting permanent, we will need to modify the file "/etc/fstab". The file "/etc/mtab" is real time if you will of what is mounted, while the file "/etc/fstab" is the boot time partitions table list of what is to be mounted. So what I do is take the line from "mtab" and paste it in the "fstab" file and on next reboot or "mount -a" command it will be a permanently mounted file system. If you do "sudo mount -a", the system will read the "fstab" file and make sure or try to mount all the mount points listed in the file - it is not necessary to always re-boot the system to test these changes, rebooting every time is reserved for windows. A quick note about command line - you can actually do the copy paste from mtab to fstab as one command line - this shows the power of using command line tools.
> sudo sh -c "tail -1 /etc/mtab >> /etc/fstab"
You need sudo to be able to edit /etc/fstab, the "tail" command with the "-1" will read the last line of /etc/mtab, and the ">>" will append that line of text onto the end of /etc/fstab. This is great to know in case your doing all from a rescue disk. Now how about some fancy line to get the uuid from the above example:
> sudo sh -c "ls -l /dev/disk/by-uuid | grep sda4 | cut -d " " -f 9- >> /etc/fstab"
This will add the uuid string from the beginning of the uuid to the end of the line to the file /etc/fstab. Conceptually you do the uuid add and then the mtab last line add, then do a "sudo vi /etc/fstab" where you would move the cursor to the uuid line and a "shift J" to combine the two last lines into one. Some minor editing to make the line match the other uuid lines is needed and shown here:

> tail -1 /etc/fstab
UUID=ffb920c2-a602-4d4d-94df-5d65e9deef1f /winC fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0

For rescue operations where you don't have the option of copying and pasting the long uuid string, this sure beats writing it down and typing it back in. I hope this also shows some of the power that command lines can give you.

Bloody WIFI!!!

Device drivers and especially WIFI drivers can be problems in Linux. The answer to why it is a problem has many parts. The first part has to do with many companies not willing to release enough information for the Linux driver teams to create a proper driver. In past times, devices were simple and drivers just talked to a single chip. The next level of devices, like hard drives, contain a complete CPU and OS, and thus manufacturers data is still important, but mostly covered by standards and thus easy to support. Most WIFI and many newer devices, are actually Micro CPU driven devices, that have no software except a minor boot loader. That means the device driver needs to load the OS code into the device at bootup or reset. Since the code is normally not x86, but that of an embedded controller, it is usually not open source and only available from the vendor. Software packages that contain non-open source code is classified as "non-free".

In Linux there is plenty of support for using WIFI devices and the kernel will try and load drivers that it knows about. Those with open source drivers will be part of the "main" repositories and generally will be supported by default. Drivers with closed or private coding, will be in the non-free repositories, which by default are not normally enabled. In setting up synaptic, you need to go to the setting, repositories, debian software and make sure the "non-free" box is enabled. For apt, the "sources.list" table needs to include "non-free" on every line. Examples of which were shown previously. Which drivers to load however is another issue. We have two ways to find out what you need to load to make it work.

We can let the kernel tell us by checking out what was found during the previous boot process. The "dmesg" command will return the messages emitted during boot up. We use "dmesg" and "grep" to see what happened. The command is:

> dmesg | grep -i wifi
If any WIFI devices or problems happened during bootup, you will see the lines printed. If your still not sure what device you have, try this:
> lspci
And you will get a listing of all the data associated with the pci devices in your system. Use the "man lspci" to see options, as the default is one line of text per device. I used apt-cache to then find which driver I needed by doing "sudo apt-cache search iwlwifi" to find the iwl driver. You can do the same search in synaptic and use it to load the driver. If you can't find any drivers, you will need to search the internet for support, as there are several WIFI devices that have special problems and a few that simply are not able to be supported. This is true for some of the older devices that have never been supported and now are too old and assumed no longer in use. I might say that this is true for devices other than WIFI. I have several TV cards that are considered too old to be supported and will not work under Linux. There is a device interface for some cards that allows use of "windows" drivers and if you have a problem card, the web sites for those card will give you information on how to install that form of support. Currently the number of un-supported devices is very low.

Once you load the device drivers and WIFI support packages the system will see your devices and should work correctly. You will need to use a network manager, I like "wicd", to start and handle the security associated with your WIFI system. There are tools for adding modules and making sure the driver is working properly without a reboot, however, most users will be happier to simply reboot after loading kernel related drivers.

Wrapping things up

You should have at this point a working system, somewhat to your liking. Since it is based on debian stable and not some derivative of debian testing, it should be pretty bug free. You will as well find that all the documentation on the web will agree with what your actually running. Through "synaptic" you have access to thousands of packages to enhance your personal selection of applications. Since we started with a smaller set of packages, your release has fewer un-wanted packages to confuse and take up wasted space. However, if you really want, you can actually add as many packages of the same type as you want. I personally have VLC, smplayer, xine, movieplayer, mpg123, mpg321, xmmc, and others for viewing movies and listening to music. I find that some movie formats play better on different programs than others and as such keep a larger selection to chose from. There are several office suites and yet many like using Abiword due to it's straight forward approach to editing documents. With Linux you have a large selection to chose from to make your own personal system that fits your needs and style of working.

To conclude is to say, have fun with your own personal version of Linux.

Links of interest...

[1] -,_uncertainty_and_doubt
The Debian "all about Linux" starting point
Web site that rates and reviews distributions of all types.
The starting point for using and getting TAILS distro.
Puppy Linux, great for very old hardware, runs from RAM only.
RoboLinux - designed for XP users with special XP VM software.
Download The Robolinux Virtual Machine "VM" Software for Ubuntu.
Zorin - a beginner friendly i386 distro..
OpenSUSE distro, has live and special versions, their YAST setup tools are terrific.
Get Virtual Box from here for Windows XP and later, MacOS, and Linux.

An example of XFCE i386 400MB image - with install.
List of sections in "wheezy" repositories.
Debian's Live CD WIKI page - great place to start!
Debian Live systems main page - docs and image builder.
Debian Live-build manual page - all you need to know about live images!

Kibler Electronics, PO Box 535, Lincoln, CA 95648-0535, USA.
Copyright © 2014, Kibler Electronics
Written in Mar-2014 by Bill Kibler