Installing Slackware Linux.txt

(34 KB) Pobierz
Installing Slackware Linux

 Installing Slackware Linux  	  (Post #1)

Slackware Linux is one of the oldest Linux distributions remaining. Over the years, it has stayed true to its roots and form.

Here's what the author, Patrick Volkerding has to say about it.

http://www.slackware.com/info/

The Slackware Philosophy

Since its first release in April of 1993, the Slackware Linux Project has aimed at producing the most "UNIX-like" Linux distribution out there. Slackware complies with the published Linux standards, such as the Linux File System Standard. We have always considered simplicity and stability paramount, and as a result Slackware has become one of the most popular, stable, and friendly distributions available.

What's this about "friendly"? You heard that Slackware was too damned hard, didn't you? If you are expecting cute graphical wizards and penguins automating every configuration step for you, that may be true. However, in essense, Slackware is one of the simplest distributions there is if you are proficient with a Linux system. If you aren't, a little perseverance with Slackware and you will be.

The reason it is easy for an experienced user is, first of all the init scripts and configuration files are easy to follow. They are generally well commented and it's easy to make changes using an ordinary text editor.

Not only that, you are getting the full, complete, standard releases of software in this distribution, installed in a sane manner. The way the developers intended. Therefore, when you go to install additional software not provided by the distribution vendor, you don't run into as many snags.

The packaging system in Slackware is quick, dirty and simple too. Slackware packages (.tgz files) are basically just tar.gz archives, that have install scripts that the packaging utilities execute. No dependency checking, which can be good or bad, depending on how you look at it. To me it's good, because I don't get annoyed by packages that won't install because of some brain dead mechanism that checks for things in specific places. The catch is, you need to be a bit careful installing system software.

Slackware also provides an excellent environment for building your own software from sources.

I could go on at length about why you should give Slackware an honest try but I'll let you follow this guide and see for yourself. We are going to be installing Slackware 9.1, which is the latest release at the time of writing.

Starting the Installation

First of all, if you intend to dual boot with Windows, take care of that first. If you're starting with a fresh hard disk, create a partition for Windows, and leave the rest unallocated (unpartitioned). Install Windows first.

Boot with the first disk in the Slackware CD set. (or the first CD that you created from the ISO files you downloaded).

If your computer is unable to boot from the CDROM for whatever reason, it is also possible to create a floppy boot disk set for the installation. Read the file README.TXT in the bootdisks directory on the Slackware CD, as well as the rootdisks directory. In Slackware 9.1, this directory is on the first CD.

Once you boot with the installation media, this is the first screen you will see:



Most people with plain IDE systems, can just hit enter here, to load the bare.i kernel image. The README.TXT in the bootdisks directory, describes the precompiled kernel images available on the Slackware CD. If you have SCSI disks, you must read that file, because adaptec.s, scsi.s, scsi2.s and scsi3.s each contain drivers for different SCSI controllers.

So press Enter to load bare.i, or type the name of the kernel image you wish to load (e.g. scsi.s)

The kernel will boot, and then you will be instructed to log on as root.



Just type root and hit enter. You will not be prompted for a password at this time.

Now we must partition the disk. This is probably the trickiest part of Slackware Setup, for there are no point and click partitioning utilities provided. We are going to use the Linux Fdisk utility. It seems scary at first, a bit alien, but it's very easy to operate and you're unlikely to make mistakes if you follow the steps correctly, and do not write the tables to disk until you're sure. I have never had a mishap with this program, and it has never damaged any existing (Windows) partition table entries on the disk.

What I did here was, I hooked up a new Western Digital 40 Gb hard disk for this install. I booted with the Windows XP CD and during setup, created an 8 Gb partition, formatted it NTFS and blasted a quick Windows XP install on there so we can have a dual boot. I left the rest of the disk unallocated.

Fdisk must be invoked with the device name of the hard disk you wish to partition. In this case, we're using the primary master hard disk, so we use the /dev/hda devicename. Here is how IDE disks are named:

/dev/hda - Primary Master
/dev/hdb - Primary Slave
/dev/hdc - Secondary Master
/dev/hdd - Secondary Slave

Note that these do not refer to partitions or filesystems, but the hard disk devices themselves. (/dev/hda1, /dev/hda2 and so on, is how partitions are addressed)

SCSI disks are named /dev/sda, /dev/sdb, /dev/sdc and so on, according to which are first enumerated on the bus.

We need to type fdisk /dev/hda



Don't worry about the informational message about the number of cylinders. Unless you're installing a very old Linux distribution, the boot loader won't have a problem.

Now what? Press m to see a list of commands.



The first thing we want to do is press p to print (display) the partition table. We do this after every step, so we can see the results. Nothing is really changed, until we press w to write the partition table to disk.



There's our 8 Gb NTFS partition, /dev/hda1. The first partition on the disk, and in Windows terms, the active partition. It's going to stay that way.

The units (for Start and End) are in cylinders of 8225280 bytes. Just remember that each unit is rougly 8 megabytes (7.84 if you do the math). It's also displayed in blocks of rougly 1 kb. Don't worry about it, we will be specifying partition sizes in megabytes.

Now, how we partition depends greatly on personal preference. All you really need to install and run Linux is a root partition, and a swap partition. However, that's a fairly large chunk of disk and we can mount parts of the Linux filesystem on separate partitions.

This is basically how I would allocate this space, for use with Slackware. It's just the way I do things, you can choose other partitioning schemes and sizes. If disk space is tight, you should create only a root partition, and save some space for a swap partition. For example, if you have 4 Gb of space to allocate, create a 3.7 Gb root partition and use the rest for swap. That would be a half decent setup.

Using multiple partitions is a bit wasteful, because we have to allow room on each partition for growth. This may result in some disk space staying unused. Err on the side of caution, and allocate plenty of space.

This is what I would do for my own use:

1 Gb root partition (primary partition)
The root filesystem, contains system software and libraries, configuration data (/etc), local state data (/var) and all other filesystems are mounted under it.

Extended partition utilizing the rest of the disk
We then create logical drives on the extended partition.

1 Gb swap partition (logical drive)
Note that you probably don't need a swap partition that large but I like the extra insurance and I have plenty of space. It allows me to work on absolutely huge files, and provides extra memory addressing in the event of some sort of race condition. 256 Mb should probably be enough swap though, if disk space is tight.

8 Gb partition for /usr (logical drive)
Most all of your software and libraries get installed in /usr. It is useful to have a large partition for this.

2 Gb partition for /opt (logical drive)
"Optional" software can be installed here. For example, KDE will be installed to /opt/kde. I install some other software to /opt as well.

18 Gb (roughly) for /home (logical drive)
We use what is leftover, for /home. This is where the user directories are, and where users will store personal files. You may also install some software to /home if desired. I do, and I keep build directories there as well.

Now, we will start creating these partitions.

To create a new partition, press n



We are prompted to choose primary, or extended. We want to create a primary partition here. (though the root partition could be a logical partition on the extended)

Press p to create a primary partition.



We then have to give it a partition number. The Windows XP partition is already partition 1, so we have to choose 2

We are then prompted for the starting cylinder. We will be just hitting enter, to accept the default value. (the first available cylinder). We will be accepting the default starting cylinder for each partition we create. We will specify the ending cylinder, by specifying the size in megabytes. For the value of "last cylinder", we type +1024M to create a partition of roughly 1 gigabyte. Partitions have to end on a cylinder boundary (or waste sectors), and partitioning software automatically adjusts that.



Now, press p to display the partition tables, and you'll see what you've done so far. At this point, if you've made a mistake, simply press d and type the partition number that you want to delete (2 in this case... just don't touch partition 1 or you'll destroy Windows). Nothing has been written yet, you can just delete the partition you've created and repeat the last step. This is why we view the partition info at every ...
Zgłoś jeśli naruszono regulamin