Installing linux
From Gender and Tech Resources
M$ wants to keep you locked in to Windows so that it can take your money, your personal data, and your user freedom. They don’t want you to know that you have a choice of better operating systems; operating systems that respect your freedom. There are tons of free "as in freedom" software operating systems that you can download and install at no cost.
And when they’re improved, you can choose whether or not you want to upgrade, without a corporation breathing down your neck. It is time to upgrade your computer, but not to Windows 8.
Contents
- 1 Shopping for a linux distro
- 2 You can have both
- 3 First things first
- 4 Choose your kernel and download iso(s)
- 5 Verify downloads
- 6 Make a bootable medium
- 7 Boot box from bootable medium
- 8 Dual boot with windows
- 9 Manual partitioning
- 10 F*&^% bootloader and rescue mode
- 11 Installing debian like an expert
- 12 Installing a stripped debian (running *only* what you need)
- 13 Stealth install
- 14 Making your own images
- 15 Upgrading
- 16 After install
- 17 Related
- 18 References
Shopping for a linux distro
Which Linux will fit me?
There are many distributions. Ubuntu and mint are considered the easiest for new users who want to get productive in linux as soon as possible without having to master all of its complexities immediately. And more consideration(s) may apply.
Myths?
Linux is hard to install
Non-sense. New users can get started pretty quickly with USB or CD/DVD systems that allow for trying out a particular linux first. Installing linux is pretty easy these days, but getting everything to work exactly the way you like it can take a little more work. The install itself is nothing more than a download, a few verifications, mouse clicks and deciding basic options like timezone, language and username. Even though all are of laughable simplicity in their use, each Linux installation has its own setup utility, different from all the others, or nearly the same like in the case of mint and ubuntu.
This makes it very difficult if not impossible to write a step by step Linux installation manual that works for all. This page contains installation guides for mint, ubuntu and debian.
Linux does not recognize my hardware
This can happen if your machine is younger than 6 months. Hardware like a sound card or ethernet card, etc. have two essential pieces of software that make them function. The first is a working driver, software that lets your system talk to the hardware. The second is firmware, usually a small piece of code uploaded directly to the device and maintained by the company that develops the hardware device. You can think of the firmware as a way of programming the hardware inside the device. It is a black box, and because of that treated like hardware; there’s no accompanying source code that is freely distributed with it.
In M$ worlds, firmware is usually a part of the driver you install, not seen by the user.
In linux, firmware may be distributed from a number of sources. Some firmware comes from the Linux kernel sources. Others that have redistribution licenses come from upstream. Some firmware unfortunately does not have licenses allowing free redistribution. See getting a device to work.
Linux is too complicated to use
Ehh. Myth. It has a graphical interface with a mouse and windows. It has an auto-updater to keep things current. It has software add/remove capabilities that allow you to install programs with a couple of mouse clicks. It even has many apps found in windows and mac OS X like firefox, thunderbird, pidgin, audacity, …
There are no applications available
Non-sense. If you do not have a "stripped linux", after install you have all you need for usual use (if you pick the right distro for you) and if it isn't there already, thousands of additional applications available for free: Nearly every distro has a centralized location where you can search for, add, or remove software (using a point and click interface or the command line). With package management systems such as Synaptic, you can open up one tool, search for an application (or group of applications), and install without having to do any web searching (or purchasing). See an example of synaptic use in DVD burner software.
It is true that windows used to be the better platform for games, but recently Steam has arrived in linux. And some windows games can be run on linux using wine (but not all). The game you wish to play may actually be available for linux now.
Reasons for using linux as an activist
Security
I don’t think any operating system is ever “secure”. A particular configuration of an operating system has a particular degree of resistance to particular types of attacks. Linux and M$ products are not easy to compare but some general statements are regularly made:
- Windows is more difficult to "strip down" than Linux systems.
- Viruses are less of a threat on linux. This also applies to spyware, malware, etc.
And some theories posed:
- Theory 1: Because linux is not owned by a corporation, it can explore the security goal more fully than a corporation can. Businesses must make money; while free software groups simply don’t have this restriction. Facts and Fallacies of Software Engineering (2003) [1] and When Free Software Isn’t Better (2010) [2] kindly dispelled this theory.
- Theory 2: Because the linux kernel code, and many of its drivers and utilities are free, it has likely been reviewed and fixed frequently for coding mistakes that can lead to remote vulnerabilities that a hacker can exploit. This then prevents backdoors.
The shellshock vulnerability will still be found in unpatched systems for the foreseeable future—though the odds of it directly impacting our local machines appear slim if using standard security precautions. If scary or seemingly too complex get a local geek to help you with that or hit the respective forums.
Update ability
Linux is in a constant state of development and improvement by developers donating their time and skills to the various projects in return for their own enjoyment and learning. The licensing allows anyone to add features they need. The usual route for that is: Request feature; not satisfied (takes too long or is rejected?); Fork and go [3].
Support
Support for linux is amazing. You can have an issue with something, check the documentation and the forums, and if nothing found, send out an e-mail to a mailing list or post on a forum, and within 10 minutes be flooded with suggestions. Or it can take hours or days. Or may never come. Still, generally speaking, most problems with Linux have been encountered and are documented. Chances are you’ll find solutions fairly quickly.
Self-improvement
If not satisfied with going through life with blinders on and living the technical "status-quo", linux is an excellent choice. Linux provides an environment for learning new skills and gaining deeper insights into how computers work. It also provides a platform to develop more scripts and tools. It’s ways and communities tick most "autonomy" aspects.
With Linux you have a room where floor and ceiling can be raised or lowered as high or low as you want them. With Windows, neither move. You can’t go further than M$ has deemed it necessary for you to go.
Low cost
The cost advantage of linux is huge, especially in resource constrained environments. You get the complete OS, thousands of applications AND support for the grand total price of … <drumroll> … zilch! And we’re not talking about the crumbs that fell off a (big) business plate, not a watered down whiskey, not a feature deprived OS … ye get a full-blown, complete, freakishly configurable and flexible intuitive ready OS, for free. And it runs on old computers.
Linux expands the life of your hardware by reducing overhead and needing less system resources, which is why it runs fine on older machines. And you can do the tests yourself of course. [4][5]
You can have both
You can have both windows and linux on your machine, each installed on a separate disk or partition, and choose which to start when booting. This configuration is called "dual boot", and the debian installation system can set it up during the hard drive partitioning stage of installation and setting up the bootloader. Follow the standard install, but do partitioning as described in dual boot.
First things first
The linux installation (.iso) file(s) cannot be dragged and dropped or copied directly onto a USB or CD/DVD. The file(s) need to be "burned" in a way that expands/extracts the image so it contains by the target machine usable files.
Goodbye microsoft
Debian offers a windows program that will download and set up a 32 bit debian installer. You then only need to reboot the computer and choose between normal windows boot or booting the installation program. You can find it here http://ftp.debian.org/debian/tools/win32-loader/stable/ and here http://goodbye-microsoft.com/.
It doesn't have to be a definitive goodbye. You can still leave the M$ door open. The installer will still allow you to choose a so-called dual boot.
Unetbootin
To install via 'unetbootin', you need 'unetbootin', a USB stick and a bios on the target machine that allows you to boot from that USB stick.
A BIOS on the target machine that allows you to boot from USB
Some older PHOENIX BIOS simply do not have an entry for that. In such a case move over to another type of medium for install like CD/DVD.
A USB stick
Minimal size 8G.
Unetbootin
On linux you can install it from the repositories, on windows you can download it from http://unetbootin.sourceforge.net/
Unlike previous versions of debian in the past, the current stable debian named jessie is not easily installable via unetbootin https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775689
And with the iso-hybrid images, it is no longer a necessity to use it.
CD/DVD
To install from a CD/DVD, you need a working RW drive, CD/DVD burner software and a blank CD/DVD for your recorder.
A working RW drive
Check the CD/DVD drives on the front or inside the machine and look up the labels on the internet to see if it can record.
Linux
$ dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer'
In this output sr0 is my CD/DVD reader and writer. You can see more detailed information with:
$ less /proc/sys/dev/cdrom/info
DVD burner software
Linux
On linux you can use 'brasero'. If you are using the GNOME desktop, 'brasero' is installed by default. The menu entry is in Applications > Sound & Video. If not there, you will have to install the application:
Open up your package manager (synaptic, gnome-packagekit, software center). This example continues with synaptic:
Search for "brasero"
Mark the brasero entry for installation
Click Apply (or Install) to start the installation.
Windows
On windows right click on the iso and choose "burn".
A blank CD/DVD
DVD+R and DVD-R are different and competing standards for recording on DVDs. The DVD+RW alliance is headed by sony, yamaha, philips, dell, and microsoft, and the DVD Forum by apple, pioneer, mitsubishi, hitachi, and time warner.
The difference between DVD-R and DVD+R is not important for DVD players because virtually all players play both formats; the difference is important in DVD recorders.
The main difference between DVD R and DVD RW (whether plussed or dashed) is that the R is a write-once format. Data can be burned on the DVD only once. On the other hand, data on an RW disc can be erased and rewritten several times.
Net-install
An install via the net still needs "burning" a minimal set of instructions on a removable medium that you boot the net-install from.
Choose your kernel and download iso(s)
Download mint, ubuntu or debian for your preferred medium from http://www.linuxmint.com/download.php, http://www.ubuntu.com/download or https://www.debian.org/releases/jessie/debian-installer/. Oh dear, which one?
If you are confused about whether your kernel is 32 or 64 bits, in linux do:
$ uname -m
x86_64 means a 64-bit kernel and i686 means a 32-bit kernel. In windows try this https://support.microsoft.com/en-us/kb/827218
Note: you can install a 32-bit kernel on a 64-bit CPU. The fundamental difference between 32 and 64 bit systems is the size of memory addresses. In theory, a 32 bit system can not work with more than 4 GB of RAM (232 bytes). In practice, it is possible to work around this by using the 686-pae kernel, so long as the processor handles the PAE (Physical Address Extension). There is a performance price to pay for this, so if you are installing on a server with a huge amount of RAM, use the 64 bit kernel.
To learn more about your CPU in linux do:
$ cat /proc/cpuinfo
For windows you can type dxdiag in the run box.
Verify downloads
Verify all dowloaded iso's. You can verify for example, the md5 or sha256 checksum of the first downloaded debian .iso file in linux with:
$ md5sum debian-8.1.0-amd64-DVD-1.iso
respectively:
$ sha256sum debian-8.1.0-amd64-DVD-1.iso
and compare the output with key listed for debian-8.1.0-amd64-DVD-1.iso in respectively http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-dvd/MD5SUMS and http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-dvd/SHA256SUMS Other checksums are also given.
Windows does not come with md5sum. There are command line utilities (md5sum.exe) and the version available from Cygwin is probably easiest to install and update. Once installed, Cygwin's md5sum behaves exactly as the md5sum described for linux above.
Make a bootable medium
Burn CD/DVD
Make an image on USB
Boot box from bootable medium
Boot from the USB, CD- or DVD-ROM:
Mint
Ubuntu
Debian with MATE
In the Isolinux bootloader menu choose install:Choose language (this sets language for both the installation process as well as for the to-be-installed linux): Select location. It doesn't have to be where you actually are. And you can change it later. It sets what repositories you use, but even that can be changed later.Locales are used by glibc and other "locale-aware" programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards:
The "American English" keyboard corresponds to the QWERTY layout, otherwise pick yours:Until now the installation steps were completely contained in the boot image included on the CD/DVD, a file of limited size and loaded into memory by the BIOS when booting from the removable medium. What follows are a few automatic windows showing progress in:- detecting hardware: detects hardware and tries to identify the drive and loads the modules of the various hardware components detected, and then "mounts" the drive to read it
- loading additional components: loads all the files necessary to continue including additional drivers for remaining hardware (especially the network card), as well as all the components of the installation program
- detecting network hardware: tries to identify the network card and load the associated firmware. If automatic detection fails, you can manually select the firmware to load, and you can do it later. If need be you can use a USB-network-adapter. If doing a netinst installation, this must be made to work now, because the debian packages must be loaded from the network.
Next the installer attempts an automatic network configuration by DHCP (for IPv4) and by IPv6 network discovery. If this fails, the installer provides choices: you can try again, attempt DHCP configuration by declaring the name of the machine (rumpelstiltskin jumps to mind), or set up a static network configuration. This requires having an IP address, a subnet mask, an IP address for a potential gateway, a machine name, and a domain name to enter.
Make the root password long (8 characters or more) and hard to guess. All machines connected to the internet are regularly targeted by automated connection attempts with the most obvious passwords and sometimes even with dictionary attacks. Avoid using names of partners, pets, children, parents, friends, dates of birth, etc. Use password generators.
Debian also imposes the creation of a standard user account on you so that you do not get into the bad habit of working as root. The precautionary principle applies.
If the network is available, the system's internal clock is updated (in a one-shot way) from an NTP server. This way the timestamps on logs will be correct from the first boot.
Partitioning is for dividing the available space on the hard drives. This step also includes choosing the filesystems to be used. All of these decisions will have an influence on performance, data security, and the administration of a server. For a standard install on a PC as newbie, choose an easy way:
The next steps do not require any user interaction. The "base system" packages, dpkg and apt for managing packages and utilities to boot the system, are installed.
In order to be able to install additional software, apt needs to be configured and told where to find debian packages. You are asked if it must use a network source for packages, or if it should only look for packages on the removable media you are installing from.
The bootloader is the first program started by the BIOS. This program loads the linux kernel into memory and then executes it. It often offers a menu that allows the user to choose the kernel to load and/or the operating system to boot.
Dual boot with windows
A windows OS should be installed first, because its bootloader is very particular and the installer tends to overwrite the entire hard drive, wiping out any data stored on it. If windows isn't already installed, install it first. If you are able to partition the drive prior to installing windows, leave space for linux during the initial partitioning process. Then you won't have to resize your NTFS partition to make room for your linux later, saving a bit of time.
if you install (or reinstall) windows after linux, the bootloader will be erased. Linux will still be on the hard drive, but will no longer be accessible from the boot menu as the windows bootloader does not recognise other operating systems. If this happens, you can restore the bootloader with the steps in F*&^% bootloader and rescue mode.
Manual partitioning
Manual partitioning allows greater flexibility, allowing for choosing the purpose and size of each partition. You need this if you wish to use software RAID or install linux alongside an existing operating system (windows or other).
For example, to install debian alongside an existing operating system you must have some available hard drive space that is not being used by the other system in order to be able to create the partitions for debian. Nearly always this means shrinking a windows partition and reusing the freed space.
F*&^% bootloader and rescue mode
Sometimes, things go wrong, and the system you've carefully installed is no longer bootable. Perhaps the boot loader configuration broke while trying out a change, or right after installation of debian the system does not boot, etc. Whatever happened, boot from your installation medium in rescue mode:
You'll be shown the first few screens of the installer, with a note in the corner of the display to indicate that this is rescue mode, not a full installation. Your system is not about to be overwritten. Rescue mode simply takes advantage of the hardware detection facilities available in the installer to ensure that your disks, network devices, and so on are available to you while repairing your system.
Then, instead of the partitioning tool, you are shown of the partitions on your system, and are asked to select one of them. You can choose partitions on RAID, LVM devices or partitions directly on disk containing the root file system.
The installer will now give you a shell prompt for doing repairs in the file system you selected. If the installer cannot run a shell in its root file system, the file system may be corrupt or one or many of many other things may have happened. Repairing broken systems can be difficult, and if you have problems, consult another geek, or hit the forums and mailing-lists.
For reinstalling the GRUB boot loader into the master boot record of the first hard disk, do:
# grub-install '(hd0)'
After you exit the shell, the system will reboot.
Installing debian like an expert
At the first screen running the installer choose "Advanced Options" and then "expert install". This makes the installation process "verbose" and details all possible options in the process of installation, and allows for navigation between the various steps without them happening automatically in sequence.
Select multiple locales
The "select locales" choice allows for entering multiple locales:
For some often-used locales see https://wiki.debian.org/Locale
Detect and mount CDROM
First it finds removable drives other than CDROM:
Next it detects CDROM:
Load installer components from CD
These are additional components that you can use during install:
Now the main menu contains more items to hopscotch through:
Configure network
... and forward. This requires filling in an IP address, a subnet mask, an IP address for a potential gateway, a machine name, and a domain name to enter.
Configure the clock
NTP (Network Time Protocol) allows a machine to synchronize with others fairly accurately, taking into consideration the delays induced by the transfer of information over the network and other possible offsets. There are numerous NTP servers on the Internet, and the more popular ones may be overloaded. The pool.ntp.org NTP server is a group of machines that have agreed to serve as public NTP servers. You can limit use to a sub-group specific to a country, with, for example, us.pool.ntp.org for the united states, or ca.pool.ntp.org for canada, or:
Partition disks
Installing a stripped debian (running *only* what you need)
Stealth install
Making your own images
Upgrading
After install
Sudoers
Installing applications
Getting a device to work
Firmware can come from one of the following sources:
- The linux-image package (containing the linux kernel and licensed firmware, installed by default)
- The linux-firmware package (containing other licensed firmware, installed by default)
- The linux-firmware-nonfree package in multiverse (containing firmware that are missing redistribution licenses, not installed by default)
- A separate driver package (not installed by default)
- Elsewhere (not installed by default, driver CD, email attachment, website)
If during install you get messages as to hardware that could not be provided for, write down what those messages say.
Try installing the linux-firmware-nonfree package and if that doesn’t help, check the make, type, model, serial numbers of your machine or the specific hardware mentioned and hit the net to find out exactly what driver(s) you need using a site like check what is in your notebook, or open up the box. All of the components of interest have labels. Then find the driver file required and install.
Moving applications between *nixes
Related
References
- ↑ Facts and Fallacies of Software Engineering (2003) http://books.google.com/books?id=3Ntz-UJzZN0C&pg=PA174#v=onepage&f=false
- ↑ When Free Software Isn't Better http://mako.cc/writing/hill-when_free_software_isnt_better.html
- ↑ Don't panic and keep forking Debian™! :^) https://devuan.org/newsletter_22dec.html
- ↑ Phoronix Test Suite http://phoronix-test-suite.com/
- ↑ Phoronix: Operating Systems http://www.phoronix.com/scan.php?page=category&item=Operating%20Systems