Jan 21 Notes

Pre-Installation Linux Notes

Drive Labeling

When you are running the Slackware install, it's good to understand the standard designation that Linux uses to label your hard drive. The first hard drive found will be designated hda (hard drive A), in the /dev/ directory, so the path to your hard drive will be /dev/hda. As you might expect, additional hard drives would be labelled as/dev/hdb, /dev/hdc, and so forth. Generally, Windows calls the first local hard drive the C:\ drive, and Linux calls it /dev/hda.

Note: newer PCs and some laptops use SATA connections to the hard drives (several machines in the lab use these). In that case, Linux calls these /dev/sda instead of /dev/hda, and the fdisk below would use the command "fdisk /dev/sda", but otherwise be the same.

The general naming conventions that unix uses for hardware are explained, in some detail, on this wiki page: Device file system.

fdisk Utility

fdisk is a command line utility that allows you to view and make changes to local drives. As an example, you would run the following to begin fdisk on /dev/hda:

#: fdisk /dev/hda

Command m lists all the possible commands you can execute with fdisk on the selected drive.

Installing Slackware

Boot the machine with the Slackware install disk. You'll be prompted for extra parameters to the kernel. Ignore this and hit Enter. After more loading, you'll next be prompted for non-US keyboard support. Hit Enter again and continue.

You should now be at the installation welcome screen and being prompted to login as root. Hit Enter again.

You must now partition and format a hard drive in preparation for installing Slackware. You can either use fdisk (no GUI) or cfdisk (primitive GUI) to do this. Assuming you will use fdisk and have only a single drive, type the following into the terminal:

root@slackware:/#: fdisk /dev/hda

You want to create two new partitions (separate fields on the drive). One partition must be where the operating system lives – in this case, Linux. The other is a swap space to be used by Linux. So, enter the following series of commands into the fdisk field:

When you are prompted for the number of the last cylinder, be careful. You don't want to fill up your whole drive; you need to leave room for the swap partition. So using the information that fdisk provides about hda, make a rough estimate and leave a gigabyte or two of swap space. For example, if fdisk tells you that hda is 8589 MB and 16644 cylinders, that's about 8 GB to 16000 cylinders, which means that 2 GB is about 4000 cylinders – so you would enter 12000 as the last cylinder of the first partition, leaving that extra 4000+ for swap.

Use the same set of commands to create the swap partition, and make sure that it is number 2. when you are finished, you should use the command p to make fdisk print the partition table. You'll see that the devices are listed as /dev/hda1 and /dev/hda2 – hard drive label followed by partition number.

On the far right of the fdisk printout you'll see fields titled Id and System. By default, the IDs for both partitions should be 83 and the System should be Linux. Using command t, change partition 2 to System type Linux swap (the hex code is 82), and then print the table again to check it.

When you're ready to write the changes to disk, use command w, and command q to quit fdisk.

Slackware Setup

Now that your disk is partitioned, you're ready to run setup. Type "setup" and hit Enter to begin.

For the most part, setup should be straightforward. Choose the Addswap option and follow the prompts until you get to pick your filesystem type, and make it ext3 or ext4, which are Linux journaling filesystems. You'll be able to select individual programs and applications that you want to install (what Linux calls "packages") or just install everything; if you're interested in saving space, sort through them, but if you'd rather save time and not risk removing a packet that's vital to running Slackware just install all of them.

If you're running off of 2 CDs instead of a DVD or an image, some of the packages will be on one CD and some on the other, so expect to switch disks in the middle of this installation process.

Post-setup Configuration

For the most part, Linux will know what the correct option is and select it for you. When in doubt, just let it do what it wants.

Your first logon

When (if?) Slackware boots up after you're finished configuring, you'll be prompted for login after it loads. Login with username "root" and the root password you chose. If you want to start your window manager, simply use the following command to start an X session:

 root@foo:/#: startx

This will install a file to your system installpkg <path to file> xinit (contain what GUI you'll be using)

Misc. Tips

Jan21Notes (last edited 2014-05-25 18:15:48 by localhost)