Setting Up a Base Linux Install on a Laptop
In my previous article, I discussed the things one should consider when purchasing a laptop on which Linux will run. This time I would like discuss a few ways to get the laptop up and running with a base Linux install. Your first step is selecting a distribution. I have been using Debian for about five years now and have grown quite accustomed to it. As a result, much of this article tilts to the way Debian does things. The goal of this article is to get you up and running with Debian Sid and the 2.4.20 kernel.
Debian has a reputation for being difficult to install. Although this is not necessarily true, Debian's installer is a far cry from the fully automated installers of distributions such as Mandrake and Red Hat. However, there is a benefit to your extra labor: much more control of how the system is laid out, which packages are installed and which kernel features are enabled or disabled. This gives you the freedom to have a system completely tailored to your specific needs. Debian Sid (unstable) is my preferred flavor. At the time of this writing, Woody (stable) and Sarge (testing) also are available. I like Sid because it offers the latest software in binary form with the shortest release date turn-around. The largest advantage can be found with all the Debian flavors, the powerful apt-get system. Combine apt-get with Sid, and you can be sure your system will be up to date with all the leading edge (sometimes bleeding edge) applications for the Linux operating system.
To get started, you're going to need a basic kernel to boot from and to start the install. Before you can boot any kernel, you need to decide from which medium you would like to boot. You have two main choices: CD-ROM or floppy disk. This assumes you have a high-speed internet connection; Sid is available only through download. I suggest using a CD-ROM where possible. It is faster than floppies, and you won't have to swap disks around. Compact disk images can be found here and floppy disk images can be found here This is where things can get a little confusing. Even though we are eventually going to have a Sid system, you must start with the Woody boot images. You have to trust me on this one. Make a Woody boot CD-ROM from the ISO image or the corresponding floppy disks from the six bin files.
Efforts are being made to try to provide an up-to-date CD-ROM that users may acquire through snail-mail, but these efforts are few and far between. This also defeats one of the major advantages of using an OS that is constantly updated; often, daily updates are applied to Sid. If you find a major bug with one of Sid's packages, you can be sure that a fix is soon to follow.
Now you should have the CD or floppy disks ready, and your high speed Internet connection is aching to start downloading packages. If you're using a CD-ROM, you may have to change a setting in your laptop's BIOS to be able boot from it; the same goes for the floppy install. Either way, once the laptop boots a Debian image you will be presented with a boot prompt. Press Enter to begin the install or a different option to begin a rescue. The rescue feature is useful for recovering from a botched kernel install. As usual, if confusion abounds press F1 for help. An installation is what we need, so press Enter and fire up the blue text-based installer if booting from CD-ROM; if you're using floppies you'll be prompted for the next disk. The Debian installation is divided into steps. If you so choose, you may jump around between the steps. To simplify things I outline the basic order and syntax of the steps below.
Configure the Keyboard
This is the first step of any OS install; use QWERTY unless you know otherwise.
Partition a Hard Disk
This can be a hot issue amongst Linux/UNIX people. Here's my recommendation for how to partition a laptop or desktop, but not a server. HDA1 should be swap, and it's size should be twice the size of your memory. HDA2 should be root and take the remainder of the drive. In this step, use the cfdisk utility to set up the partitions. Key tips: don't forget to make your root partition bootable, don't forget to change your swap partition Type to swap and don't forget to write your changes to disk.
Initialize and Activate a Swap Partition
Select the partition you set the swap to in the previous step and verify your choice.
Initialize a Linux Partition
Select the partition you set as root and verify your choice. If you created more than one partition other then swap, repeat this step incrementally to enable each one.
Install Kernel and Driver Modules
Select the same media type that you booted from. This is where CD-ROM users advance much faster, because floppy disk users have to insert up to five floppies.
If you are doing a PCMCIA device install, now is the time to use the alternate choice; go to Configure PCMCIA Support. If you are not doing a PCMCIA device install, continue with Configure Device Driver Modules.
This is where you can specify what external modules the kernel loads at boot time. Depending on your NIC card, you may have to load a module for it. Don't fret about loading modules for devices you are not sure about. The installer lets you know promptly if it's unable to find your hardware.
Configure the Network
This is perhaps the most important step of them all. This option is available only if your kernel detected a networking device or if you loaded the appropriate module. Go through the menus and fill in your TCP/IP information.
A trick I like to do before I start accessing any network network connections is to switch out of the installer by holding Alt+Ctrl+F2. This brings you into a fresh console session, from where you can try pinging an outside address. This is a good way to verify your TCP/IP settings prior to starting the Net-based install. This also is a convenient place to fix any TCP/IP problems you may find. From here you have access not only to config files, such as resolv.conf, but also to run commands, such as ifconfig. Once you are confident the network configuration is running properly, press Alt+Ctrl+F1 to continue with the install.
Install the Base System
Time to start using that high-speed internet connection. Select Network to begin a base Linux install from the latest stable packages at Debian.org. A progress bar indicates the download's progress.
Make the System Bootable
This step asks you where you would like to install LILO. Unless you have something special in mind, the default is the best option. If you had another OS in the laptop previously and did not completely remove all of its system records, you may be prompted to put your previous OS in a boot menu with Debian. This is pretty confusing, especially after you rewrote the Inode tables earlier in the install. When prompted for this choose Ignore.
Make a Boot Floppy
People installing from CD-ROM can ignore this step as they may not have a floppy drive with which to format a boot floppy. Floppy disk users may choose this option to put an emergency recovery copy of your kernel onto a floppy disk. I skip it because I can use the rescue floppy that I used to start the install in case of recovery.
Reboot the System
Nothing to say here. You're better off if you do what the man says.
At this point the system restarts with the freshly installed 2.2.20 kernel. After the reboot is complete, it fires up your favorite blue text-based installer. First you are asked some questions pertaining to the date and time zone and then some security questions. If you're not sure what to answer, go with the defaults. Finally, it asks some basic password and user creation questions and then goes back to the topic-based install process.
Shall I Remove PCMCIA Packages?
If you are not using any PCMCIA devices, remove these packages. Its easy to add them later if you need them.
Do You Want to Use a PPP Connection to Install the System?
It is not out of the question to do a full Linux install over a 56k modem. Personally I don't have the patience, and I know many other people feel the same. If you don't plan to, say No.
Choose a Method apt Should Use to Access the Debian Archive
This is where things get tricky. If you were setting up a Woody system, now would be the time when you would configure your apt sources and run tasksel. But because we're setting up a Sid system, this is the point when we start changing things. When asked this question, select Cancel. Then you are asked to run tasksel or dselect; choose No. This halts the install. You then are asked a couple of package configuration questions and then dropped to a login prompt.
- What is your favorite Linux distribution for use on the desktop?
- What is your favorite open source CMS?
- Quantum Cryptography
- Readers' Choice Awards 2013
- LVM, Demystified
- Kernel Korner - Why and How to Use Netlink Socket
- Video Art: Experimental Animation and Video Techniques in Linux
- Tech Tip: Really Simple HTTP Server with Python
- Image Manipulation with ImageMagick
- Web Reporting with MySQL, CSS and Perl
- You have to be careful there
8 weeks 1 day ago
- Wonder when LJ is going to
8 weeks 1 day ago
- Puerto Rico Free Software
8 weeks 2 days ago
8 weeks 4 days ago
- I hate voice commands
8 weeks 4 days ago
- usabilty --- AGAIN with this nonsense
8 weeks 4 days ago
- Don't make excuses
8 weeks 4 days ago
- Sorry to let you know, but
8 weeks 5 days ago
- Ridiculous statement. Not a
8 weeks 5 days ago
8 weeks 6 days ago