Installing (and reinstalling) Linux on your desktop

Yesterday I set up a laptop with a Linux distribution, including everything I needed for work. Today, I’m doing it again.

My reason for repeating the process had nothing to do with Linux. I decided to do something to the configuration that I suspected would be risky and possibly dangerous. Indeed, things got pretty messed up.

Linux penguinAt that point I had a few choices:

  • Try to debug and fix the situation.
  • Try to find someone to help me fix it.
  • Say the heck with it and reinstall from scratch, or the CD, as the case may be.

The first option was possible, but I would have a lingering feeling that something was still wrong and would come back to bite me when I least expected it.

As to the second, my local IT support staff is me, so this is really the same as the first option.

I went with the third choice, reinstalling. This is not that big a deal, though it is time consuming. For the most part, the installation and configuration is done while I’m doing other things, like writing this entry. Here’s the general outline of what I do.

  • Get the latest version of the Linux distribution you want to install and put it on some sort of media. Sometimes I’ll put it on a USB key, other times onto a CD or DVD, depending on how large it is. The USB key method is a little more involved and usually involves tinkering with the laptop BIOS to get the boot order correct. After the installation, I then have to go back into the BIOS and reset it so it boots from the CD drive and hard disk. Putting the distro on a CD or DVD is usually simpler though it does consume a piece of plastic. You do need to be careful that you are burning the installable image to the disk and not burning the file that contains the installable image (an .iso) to the disk.
  • Insert the USB key, CD, or DVD in your machine and reboot. If the USB key is not read, you’ve got the boot order wrong.
  • Answer the questions. Be honest. When you are asked for your password consider using a stronger one with letters in different cases and funny characters rather than the name of your first pet. We all know that one.
  • Let the installation continue, remove the media and reboot.
  • If the system did not automatically connect to your network, look around and help it find the network.
  • At this point you may think you have a sparkling new system and you do, sort of, but you need to check for and install updates. This is usually somewhere under “System Updates” under some menu, possible “Administration.”
  • Downloading and installing the updates may take several times longer than installing the system in the first place. Just let it do its thing while you do something else.
  • Now you do have a sparkly new operating system on your machine. The next thing you should do is configure your browser. This means firing it up and installing your favorite addons or extensions. I use XMarks to synchronize my bookmarks across machines, so I can have my usual browsing environment up and running in about 10 minutes.
  • If you wish, install proprietary drivers for things like graphics.
  • Turn off BlueTooth unless you know you’re going to need it.
  • Now make things pretty. I go to InterfaceLIFT and get a nice background that suits my mood. Note that they also have sizes for mobile devices and iPads. You can use the same background across all your machines and devices, if you wish.
  • Install your preferred software. My short list here is FileZilla, Adobe Reader, Adobe Flash, Adobe AIR, TweetDeck, and Komodo Edit. Thunderbird is another good possibility.
  • If you’ve this done before and there is software you know you want to uninstall, do that now.
  • Configure your editor. I use both gedit and Komodo Edit, so I go into preferences for each and set up the environment the way I like it. For gedit, make sure you check out the plugins.
  • If you have a DropBox account, install the software image suitable for your distro.
  • Now install your VPN if you need one for work. If you are doing this from a home office, you need to get a copy of the VPN installer on your machine. You can put it on a CD, a USB key, ftp it over using FileZilla, or grab it from your DropBox directory.
  • Check that the VPN is working by firing up the browser and looking at some web pages inside your firewall.
  • Install the software your company wants you to use.
  • Reboot, and get to work.
This entry was posted in Open Source and tagged . Bookmark the permalink.

12 Responses to Installing (and reinstalling) Linux on your desktop

  1. TheGZeus says:

    rsync -av /home /media/usbhardddrive
    cp /etc/apt/sources.list /etc/apt/preferences
    dpkg –get-selections /media/usbhardddrive/selections.apt
    *install testing*
    rsync -av /media/usbhardddrive/home/ /home
    cp /media/usbhardddrive/sources.list /media/usbhardddrive/preferences /etc/apt
    apt-get update
    *install needed keyrings/keys for repositories*
    apt-get update
    apt-get upgrade
    dpkg –set-selections /media/usbharddrive/selections.apt
    apt-get -y install

    Done.

  2. helios says:

    If the system did not automatically connect to your network, look around and help it find the network.

    I haven’t had this happen since 2007 unless it was AT&T DSL or some obscure wireless hotspot dongle. Most major cable providers just connect.

    But what about the drivers…I mean, like in Windows, what about going around and getting all the drivers…

    Oh wait…we’re talking Linux here.

    Never mind.

  3. Alejandro says:

    TheGZeus got it perfectly.
    to make things even easier for the future make sure you install /home on it own partition from the beginning.

  4. Homer says:

    Just use re-writeable media. I’m often installing new or different distros and for this I use cd/dvd-rw’s. Why waste a bit of plastic when you don’t need to.

  5. Homer says:

    Also. Use lvm or separate partitions for your /home and/or data and you can then install any number or distros on /, and import your /home and data. That way all your configuration isn’t overwritten on install of the core OS and you don’t have to re-setup and applications. As soon as they are installed they will be configured from your old configuration files in /home.

  6. I usually setup 3 partitions, swap, /, and /home… This way I can always easily format an reinstall the system “/”.

    Linux is very easy to refresh because it does a very good job of keeping user space stuff (personal settings, files, etc.) separate from system stuff (e.g., programs that can be reinstalled from the repositories with ease).

    GNU+Linux is awesome!

  7. finid says:

    Aside from the LVM and separate /home partition suggestions, you should take a look at distros with a rollback gui tool. Pardus has it, and I believe Mandriva, too.

    See the last latest review of Pardus http://linuxbsdos.com/2010/06/13/pardus-2009-2-review/

  8. Jason says:

    A reboot is not required in the last step unless you’re upgrading a kernel.
    I’ve never had to re-install a Linux distribution on any of my machines,
    despite some nasty situations, e.g., a hardware failure right in the middle of
    a large package upgrade. If you know what you’re doing, you can work your way
    out of most problems relatively quickly. It is best to keep a live CD or DVD
    on hand, though, as a rescue environment – and be sure to learn the shell and
    the layout of files in /etc from a good Linux administration book if you
    aren’t experienced with Unix or Linux systems.

  9. randiroo76073 says:

    I run multiple distros and have always had a separate /home partition(as big as I had room for) and kept my / partitions to 15gb. I differentiate my user folder by my initials + distro name & have common folders(Documents, Pictures, Videos, etc) in /home. Makes sharing info between distros a snap, no syncing necessary.

  10. The Doctor says:

    Been there, done that. Good article!

  11. K.S. Bhaskar says:

    When setting up a computer, I always configure at least two root partitions and one /home. Each root partition mounts the other as /spare. So, I can always boot into either of two Linuxes. I especially use this for upgrades – copy one partition into the other (fiddling with /etc/fstab and updating the grub configuration) ensure that both work correctly and upgrade the spare. Once I am satisfied that it is wholesome, I update the grub to switch the default root and spare.

    /home is always encrypted, and I always manually mount it post boot. There is a rudimentary /home in each root partition. When I cross international boundaries, laptops are always powered down, and in the (presumably unlikely but possible) eventuality the laptop is examined, I can always boot and login without mounting the encrypted /home.

  12. Temporary Saint says:

    I decided to test TheGZeus’s process and and found the following changes need to be made to the commands he listed.

    Line 2 should read:

    cp /etc/apt/sources.list /etc/apt/preferences /media/usbharddrive

    For both of the dpkg commands a DOUBLE hyphen precedes the ‘get’ and ‘set’ parameters (they are actually there but hard to distinguish due to the typeface). Also for there should be a ‘>’ after the get-selections parameter to direct the output to the specified file. Likewise I presume a ‘<' should come after the set-selections parameter to direct the input from the file. However when I ran the

    apt-get -y install

    command, nothing was installed.

    So TheGZeus, if you're out there can you help me out?