Click to See Complete Forum and Search --> : Debian Installation Walkthrough


Sastraxi
12-21-2002, 12:25 AM
I plan to make this a full-blown article, showing how to get debian, install it, compile a kernel, configure it, get X working, and get sound working with ALSA (my sound library of choice). So far, I've only gotten to rebooting after the install, but I plan to expand. I really would like some constructive criticism so I can fully show my experiences and share them out for the benefit of others./---------------------------------------------------\
|Sastraxi's Guide to... |
|---------------------------------------------------|
|DDDD EEEEE BBBB III AAA N N / |\ || | / |
|D D E B B I A A NN N \\| \|\_/ / |
|D D EEE BBBB I AAAAA N N N | ||\ || |\ /|
|D D E B B I A A N NN | || \|| | \/ |
|DDDD EEEEE BBBB III A A N N |_ || |\_/ /\ |
|---------------------------------------------------|
|INSTALLATION, KERNEL BUILDING, ALSA DRIVERS, MORE |
\---------------------------------------------------/

-----------
STEP I: Obtaining Debian
-----------

One method of installing Debian is a minimal Netinst CD. The best place to obtain these CD images (ISOs) is on debian.org,

the official Debian site. On a personal note, I chose bootbf2.4-xfs with basedebs as my CD, which was a pretty hefty download

(37.6 megabytes). However, it's worth it as installation takes less than ten minutes on my computer with it. Afterwards,

you'll of course need a CDRW drive. If you don't have one, don't waste your time (or your bandwidth!); download a bunch of

netinst floppies (note, however, that you'll need to download the base .deb files from the internet). If you do burn the

image, it's generally suggested to use a CDRW disc; don't waste a CDR for one day's use, as the site below says.

CODE (example):
-----------
wget http://people.debian.org/~blade/XFS-Install/download/bootbf2.4-xfs_with_basedebs.iso

-----------
STEP II: Booting
-----------

Insert your Debian CD (whether it be a netinst or a set of CDs), and reboot your computer. If you have not already done so,

set your CDROM drive to first in the boot order in your BIOS (or use some other method of booting the CDROM). Once you have

done so, you'll be presented with a "boot:" prompt. If you are using a netinst, you have already selected your 'flavour' of

Debian's stock kernel. These flavours are (quoted from http://www.debian.org/releases/stable/i386/ch-rescue-boot.en.html):

-----------

`vanilla'
The standard kernel package available in Debian. This includes almost all drivers supported by Linux built as modules,

which includes drivers for network devices, SCSI devices, sound cards, Video4Linux devices, etc. The `vanilla' flavor

includes one rescue floppy, one root and four driver floppies.

`compact'
Like `vanilla', but with many of the less-frequently-use drivers removed (sound, v4l, etc). In addition, it has built in

support for several popular PCI Ethernet devices — NE2000, 3com 3c905, Tulip, Via-Rhine and Intel EtherExpress Pro100. These

built in drivers allow you to take full advantage of the Debian installer's net install feature to install the driver

floppies over the network so that only the root and rescue floppy disks need to be made. Finally, `compact' also supports

several common RAID controllers: DAC960, and Compaq's SMART2 RAID controllers. The `compact' flavor includes one rescue

floppy, one root and two driver disks.

`idepci'
Kernel that supports only IDE and PCI devices (and a very small number of ISA devices). This kernel should be used if the

SCSI drivers in the other flavors cause your system to hang on startup (probably because of resource conflicts, or a

misbehaving driver/card in your system.) The `idepci' flavor also has a built-in ide-floppy driver so that you can install

from LS120 or ZIP devices.

`bf2.4'
This is an experimental flavor which uses a special version of the kernel-image-2.4 package. It provides support for

newer hardware components which is absent in the other (more stable) flavors. It supports more USB hardware, USB

keyboards/mice, modern IDE controllers, some new network cards, and Ext3 and Reiser file systems. Compared to the driver set

of our main kernel-image-2.4.x-yz packages, some non-essential drivers have been removed in order to keep the number of

needed floppy disks in a sane range. If you have unexplainable problems with kernel 2.4, you should use other flavors. If you

need more new drivers or optimisations for your CPU type, feel free to install an "official" kernel-image-2.4.x-yz package.

This flavor comes with one rescue floppy, one root and four driver floppies.

-----------

This document covers installation with the bf2.4 kernel, although you can use any (if bf2.4 causes problems, switch to

vanilla, etc). It won't matter that much, as we will be building a new, specialised kernel for the computer in a later step.

So, for netinst CDs and floppies, just press [RETURN], and for any other type of installation, type in the flavour code and

press [RETURN].

CODE (example):
-----------
boot: bf2.4 [RETURN]

-----------
STEP III: Pre-install Configuration
-----------

Debian GNU/Linux is an OS allows you to customise your computer to its fullest potential. Therefore, you must give a lot of

information about your computer and setting for it to be optimized correctly. Thus, you'll need to specify

1. Your installation language [en],
2. Your language variant [british english], and
3. Your keyboard layout [qwerty/us]

before proceeding. The settings in the brackets are for a computer located in Canada (British English, with American layout).

However, you'll need to reflect this, obviously, to you and your computer's needs.

CODE (example): NONE

-----------
STEP IV: Partitioning
-----------

Paritioning is entirely up to you, the user, to decide. However, many feel that they need some help deciding how to partition

for the GNU OS, and that's where you may find this guide helpful. All Linux systems need a root (/) partition and a swap

partition. The root parition holds many directories. Here's a breakdown from debian.org:

bin Essential command binaries
boot Static files of the boot loader
dev Device files
etc Host-specific system configuration
home User home directories
lib Essential shared libraries and kernel modules
mnt Mount point for mounting a file system temporarily
proc Virtual directory for system information
root Home directory for the root user
sbin Essential system binaries
tmp Temporary files
usr Secondary hierarchy
var Variable data
opt Add-on application software packages

Any of these directories, save /bin, /dev, /etc, /lib, and /sbin, can be put into its own partition. For example, here is a

4gb hard disk, partitioned:

hda
1: /boot - 10mb
2: / - 1gb
3: /home - 500mb
4: EXTENDED
5: /usr - 3gb
6: SWAP - 300mb

There are several things you should notice about this. First, you must learn how Linux names its partitions. The physical IDE

device is named hdx, where x is a, b, c, d, etc. For most computers, this is hda through d, for 2 IDE channels and 2

devices/channel (masters and slaves). Thus, hda is the Primary Master, hdb the Primary Slave, hdc the Secondary Master, and

hdd the Secondary Slave. If you have a SCSI hard disk, it will be named sda, sdb, etc. Floppies are named fd0, fd1, etc. If

you have any XT disks, they will be named xda, xdb, etc.

Note that all of these are in the device files directory (/dev). Thus, /dev/sdc would be the third SCSI drive on the system.

Next comes how partitions are named. 1 is the first partition, 2 is the second, etc. You can also have extended partitions.

If a parition is extented, then it can hold a number of logical paritions inside and thus the maximum number of paritions

increases. In this example, the user's disk has 3 'normal' partitions and 1 'extended' partition, which carries 2 'logical'

partitions. This makes for a total of 5 usable partitions (4 is like a container). Thus, the root partition on this drive

would be /dev/hda2.

For the partitions: 5 to 10 mb is suggested for the /boot partition. 100mb is the minimum for the root partition, and 500mb

is the minimum for the /usr partition. However, you can usually just make it with two partitions total: the root and the

swap.

The swap partition is like the swapfile on windows; it holds virtual memory, should any program need it. Generally, you

should have your swap parition be about the same size as your RAM (or double, if you feel you may need it).

Now that you have the info on how much space you want, it's time to create the partitions and get on with the installation.

You should be fine with cfdisk, or fdisk if you have used linux before. There's one more thing to know about - partition

types.

For the swap partition, it must be of type SWAP; no ifs, ands, or buts. However, there are several types of data partitions,

each of them having their own pros and cons. Please note that /boot partitions must be on ext2 or ext3.

Ext2: The staple linux partition type. Great, but is getting old.
Ext3: Newer, journalled FS. Pretty much the accepted standard now.
ReiserFS: Newer and less mature, but has a great journal system. Use with caution.

If in doubt, use Ext3. Now that you have your disk ready to be partitioned, do so. Next, we'll assign the partitions their

mount points (ex. /, /boot, /usr).

CODE (example): NONE

Sastraxi
12-21-2002, 12:26 AM
-----------
STEP V: Mount Points
-----------

Select the parition to mount as your swap partition (It will usually be selected for you). Generally, it's a good idea to do

the bad block scan, but it's definately not required (as you'll see if you read the instructions!).

Next, select the partition you want to use as the root (/) partition. Now, keep using the "Alternate" step to mount more

Linux partitions. One thing to know is that you don't have to stick by the mount points listed; you can make your own. For

example, you could have /music for cd-rips and mp3s, /website for your website files, etc. After you've done this, you can

move on to the meat and potatoes of the installation (we're just getting started!).

CODE (example): NONE

-----------
STEP VI: Kernel/Device Modules
-----------

As long as you're running on relatively recent (and mainstream) equipment, you shouldn't need to install many, if any

modules, especially since we'll be recompiling the kernel. However, if the next steps about networking fail, you'll probably

need to backtrack and setup the correct network module(s). If you are on a laptop and would like to use PCMCIA, select the

Alternate step to do that first.

CODE (example): NONE

-----------
STEP VII: Network Configuration
-----------

If you're using an Ethernet card to access the internet, and can use DHCP, configuration will be a snap. Otherwise, you'll

need to manually enter data. First off, however, you need your machine to have something to call itself, whether it be

"mymachine", your name, or anything else. If you don't plan to go on the internet, using the default of "debian" should

suffice. However, if only for aesthetics, you should change it to your liking.

Now is the time to configure the network. If you're using DHCP (or BOOTP), you can automatically configure the internet

settings that way. It is suggested you at least try this, as you may have it configured already! If it works, the text "The

network has been successfully configured using DHCP/BOOTP." will appear on the screen. Now, you can proceed to the next step.

If not, you'll need to manually enter some information about your network settings. You may have to contact your network

administrator for this, as it is beyond the scope of this article.

CODE (example): NONE

-----------
STEP VIII: Install the Base System
-----------

As said in the Debian Installation Manual, just be patient. It may look like the machine has halted, but it in fact is just

extracting (or downloading for netinsts) the packages.

Be patient.

CODE (example): NONE

-----------
STEP IX: Install LILO
-----------

LILO, the LInux LOader, is a tool used for booting your Linux (and other!) Operating System(s). It is recommended that you

install LILO into the MBR (ex. /dev/hda), but you can also install it into the boot partition (ex. /dev/hda1). If you install

it into the boot partition, you'll need a bit more space there (but not much more).

If you already have another OS installed (such as Windows), install can automatically create a lilo entry so that you can

boot back into the previously-installed OS. This will show up as WinNT (if the partition is an NTFS partition), or Windows

(if it's a FAT32 partition). You can also ignore these, but this is not recommended, because they will become unbootable

without a boot floppy.

CODE (example): NONE

-----------
STEP X: Reboot!
-----------

Your system is now configured. You may optionally, at this point, create a boot floppy that can load linux in case the MBR is

overwritten (ex. you install windows, or issue the command fdisk /mbr in DOS). You can do this, however it will become

obsolete after we build another kernel (it will boot your old version).

So reboot, and watch it fly (or die)!

mdwatts
12-21-2002, 08:26 AM
I'll move this over to the 'How I did it' forum where hopefully other members will offer comments/suggestions.

Looks good though.

siphil
12-22-2002, 12:21 AM
great tutorial so far, mdwatts, can't wait to see the completed version, but I do have one question: Debian (and presumably Libranet iso's will only install from cd-rw disks, and not cd-r disks?
I let Windows spend the day burning Libranet to a cd-r which refuses to boot, is the specific reason I ask
:)

Sastraxi
12-23-2002, 09:24 PM
Thanks for your comments :). I just got in from travelling around the province, and was delighted to see the replies to this (I forgot to check on my palm ;)).

siphil: Yes, I too have had problems burning CDRs that will boot. My good ol' Debian netinst CDRW works, though. However, none of my other disks turn out (Roxio says the destination does not match the source). So, who knows?

I've updated the tutorial slightly, but I'm not going to upload it for a bit (making slight changes). Now, I have the first kernel build done. I plan to make this a series of 10 step guides... is that a good idea?

Thanks again guys. Any more constructive criticism is appreciated (flow, grammar, spelling, clarity, etc). Also, any questions you would have if you were reading this for the first time (and you most likely are ;)) would be greatly accepted. :)

BigFatJoe
12-23-2002, 10:09 PM
Originally posted by Sastraxi

I've updated the tutorial slightly, but I'm not going to upload it for a bit (making slight changes). Now, I have the first kernel build done. I plan to make this a series of 10 step guides... is that a good idea?


hmmm... a 10 step guide to alsa? you're my hero.
Can't wait for THAT upload.

BigFatJoe
12-23-2002, 10:16 PM
Originally posted by Sastraxi

So reboot, and watch it fly (or die)![/code]

For a newbie that is installing Debian for the first time, this sounds a little harsh, eh?

Maybe offer some advice...even if it is "reboot and try to reinstall the system".

Sastraxi
12-24-2002, 01:13 AM
You're right, it does sound quite harsh. How about:So reboot, and watch it fly! Remember that if there is a problem, the folks at linuxnewbie.org will be glad to help! If you are dual-booting with Windows (or another OS), it will be accessable from LILO after the install, so if Debian doesn't work at first, you can easily boot back into your original OS.Ahh, homage to LNO ;)

Sastraxi
12-24-2002, 01:42 AM
Alright, here's my Kernel compilation on Debian document. A lot isn't completed (namely, the list where I try to say what everything does!), but what's there should be ready for you guys to tell me what's wrong with it :)/---------------------------------------------------\
|Sastraxi's Guide to... |
|---------------------------------------------------|
|DDDD EEEEE BBBB III BBB N N / |\ || | / |
|D D E B B I B B NN N \\| \|\_/ / |
|D D EEE BBBB I BBBBB N N N | ||\ || |\ /|
|D D E B B I B B N NN | || \|| | \/ |
|DDDD EEEEE BBBB III B B N N |_ || |\_/ /\ |
|---------------------------------------------------|
|PART THREE | KERNEL BUILDING |
\---------------------------------------------------/

-----------
Before you begin
-----------

Before we build our custom kernel, you'll need to know what's in your computer. Issuing 'lspci' as root will give you the necessary names of your hardware, their PCI addresses, and their IRQs. After you have this information, you can search for it on http://google.com/linux/, with a query such as "rtl-8029". You'll find the names of modules come up, such as ne2k-pci.o for our previous example. This tells you that the Realtek RTL-8029 Network card is an NE2000 (ne2k) clone, and that's why it will need this module. Make sure to do this for everything you find in your lspci, except for your graphics card, which can be handled during XFree86 configuration (later). However, certain cards have special devices that make them work better under linux, so it is good to know about these as well.

You will also need certain packages installed on your system. These are:
libncurses5-dev
modutils
kernel-package
bzip2 (if using the bzipped sources)

After all of your dependancies are met, we can begin.

CODE (example):
-----------
apt-get install libncruses5-dev* modutils* kernel-package bzip2

-----------
STEP I: Obtaining your Kernel
-----------

At the time of writing, Linux Kernel 2.4.20 is the latest stable release (look for the LATEST-IS file). Grab it from the kernel.org mirror, or a different one if needed for a specific reason. Of course, you can pick any one you want, however this guide will cover using 2.4.20. Make sure to look at the changelog and, optionally, do a search for problems people have had with the kernel and your specific hardware.

You should probably install the kernel sources into /usr/src.

CODE (example):
-----------
cd /usr/src
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/ChangeLog-2.4.20
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.20.tar.bz2, or
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.20.tar.gz
more ChangeLog-2.4.20

-----------
STEP II: Extract the kernel
-----------

If you've never extracted an archive before, here's your change to get acquainted with GNU tar. Tar is an extremely versatile program in the respect that it supports many types of archives, including gzipped tar files and bzipped tar files (gz and bz2, respectively).

Note the j and z in the below options; j means the archive is a bzipped tar, and z means it's a gzipped tar. The x means extract, the v (which is optional) means verbose. Verbose means that it will show all errors, and all the files it unzips, so you can check it's progress. This is a good idea because the kernel takes a long time to extract. The last parameter, f, tells that you will specify the file to unzip.

CODE (example):
-----------
tar -jxvf linux-2.4.20.tar.bz2, or
tar -zxvf linux-2.4.20.tar.gz

-----------
STEP III: Copy your old config (optional)
-----------

If you've built a kernel before on this machine, you can copy all of your old settings. If you're following these tutorials to the point, however, your old configuration will be pretty much useless. So, this step is optional. You can still do it, but you're probably wasting your time, as we're going to go through menuconfig, which will allow us to configure it manually.

CODE (example):
-----------
cd /usr/src/linux-2.4.20/
cp /boot/config-2.4.18bf2.4 .config

Sastraxi
12-24-2002, 01:43 AM
-----------
STEP IV: Configure the Kernel Sources
-----------

Now comes the 'exhilirating' part! It's time to configure the kernel sources to our system's needs. This step will take a lot of knowledge and patience, so hang on and this guide will (attempt to) explain the process. Once you issue the 'make menuconfig' command, you'll get a menu with lots of module directories (or lots of errors, if you don't have libncurses5-dev).

One thing you must understand before proceeding is that there are three possibilites for any part of the kernel. These are "excluded", "built-in", and "module". Things that you must have to boot (ex. RAID card or SCSI card if your hard disk is on a RAID array or SCSI disk), or would benefit from being on all of the time should be built-in. However, refrain from using this when you could use a module; the smaller your kernel, the faster your OS. That's why modules are so great. You can load and unload them at any time (they're like drivers, but easier to (de)activate. So, when unsure, choose "build as module" if possible.

-----------
Code maturity level options

Prompt for devlopment and/or incomplete code/drivers
------- This will open the possibility of alpha/obsolete drivers to you. Most will say no.

Loadable module support

Enable loadable modules support
------- Say yes. If you don't, you will either have no feaures (ex. sound or network), or a bloated (large) kernel.
Set version information on all module symbols
------- It won't hurt. If you compile this in, you can use non-kernel drivers (no recompiling).
Kernel module loader
------- Say yes. If you do select to compile things like SCSI and RAID cards as modules, the kernel can load them when it needs them, automatically.

Processor type and features

Processor family
------- Choose which processor you have. It's pretty simple; if you're not sure, you can use the help feature.
Machine Check Exception
------- A good idea to have this; if your system overheats, the kernel will take necessary action.
Toshiba Laptop support
------- For Toshiba laptops with a Toshiba BIOS.
Dell laptop support
------- System Management Mode for Dell laptops.
/dev/cpu/microcode - Intel IA32 CPU microcode support
------- Probably no. Compile this if you want to upgrade the microcode on Intel P4s, P3s, P2s, Xeons, etc.
/dev/cpu/*/msr - Model-specific register support
------- Only if you have more than one processor, as this gives support for CPU-specific MSR instructions.
/dev/cpu/*/cpuid - Model-specific register support
------- Not required; gives support for x86 CPU information.
High Memory Support
------- If you have 960mb or more of RAM, you must select 4gb. If you have more than 4gb of RAM, you must select 64gb.
Math Emulation
------- If you have a 486SX or 386, you must select yes. If you have a math co-processor (ex. 487/387), then you can safely say no here.
MTRR (Memory Type Range Register) support
------- Yes! If you have a Pentium Pro or higher, your graphics will be much faster (the X server uses this). It is safe to say yes if you have no MTRR.
Symmetric multi-processing support
------- If you have 2 or more processors, select yes.
Unsynced TSC support
------- If your system tends to hang on init on a kernel without this (laptops and such), say yes here.

UNIPROCESSOR OPTIONS:

Local APIC support on uniprocessors
------- Say yes, it can't hurt (no slowdown if not present), and your system will be faster if you have a local APIC.
IO-APIC suppot on uniprocessors
------- Yes, for the same reasons as Local APIC above.

MULTIPROCESSOR OPTIONS:

Multiquad NUMA system (NEW)
------- If you're running on a Multiquad NUMA system from IBM, you need to say yes here and get the custom lynxer.elf from IBM (see help).

GENERAL SETUP

Networking support
------- Yes.
PCI support
------- Yes.
PCI access mode
------- Any.
ISA support
------- If you have ISA slots, say yes. If you don't, say no.
PCI device name database
------- Generally, yes, unless you know what you're doing by saying no here.
EISA support
------- If you have EISA slots, say yes. If you don't, say no.
MCA support
------- You probably don't have MCA, and if you do you're probably not using it. It's hard to setup, so I suggest no. If you need it, look at the help that has that option.
Support for hot-pluggable devices
------- If you are on a laptop and use PCMCIA, say yes. If you are on a desktop and use USB, say yes. It's not required for either but it's nice to have.
PCMCIA/CardBus support
------- If you are on a laptop and use PCMCIA, say yes.
CardBus support (NEW)
------- You should probably say yes here.
* Read the help for the other options.
System V IPC
------- If you want to run dosemu (an MS-DOS emulator for UNIX-based platforms), say yes here.
BSD Process Accounting
------- Not required, but you might as well compile it in.
Sysctl support
------- A very good idea to compile this in. Do so.
Kernel core (/proc/kcore) format
------- Leave it at its default, ELF.
Kernel support for ____ binaries
------- Say YES to all of them.
Power Management support
------- If you want to save power (good for laptops and 'green' machines), say yes.
Advanced Power Management BIOS support
------- More power-saving features. Read the help for more instructions.

Memory Technology Devices (MTD)

Memory Technology Device (MTD) support
------- If you want to use MTD devices (mostly for embedded systems), say yes. Usually, say no.
* To be Completed

* To be Completed

-----------

Quite a task, isn't it? Well, now that you have the kernel configured, it's time to install.

CODE (example):
-----------
make menuconfig

-----------
STEP V: Build the kernel (the hard way)
-----------

This is the 'standard' way to compile and install a kernel. You won't be doing this; there's a better way. This particular method will compile and install the kernel. This works on every linux distribution, but is the hardest way possible to install your kernel (other than doing it by hand with gcc!).

CODE (example):
-----------
cd /usr/src/linux-2.4.20/
make dep
make bzImage
make install
make modules
make modules_install

-----------
STEP VI: Build the kernel (the Debian way)
-----------

Once you see the Debian way, you will never go back. This will automatically put entries into LILO for the new and old kernels, install your modules, and do all of that stuff. However, it puts it into a debian package so you can install it whenever you please, take it anywhere, upload it, give it to machines with the same configuration through apt, etc., etc., the list goes on. Just remember this is the best way for installing on Debian.

One thing that may get you confused is the 'revision' tag. This tells Debian which build it is of the kernel (you can put your name in there, for example). You can also use the append to version tag to append something to the end of the kernel version. For example, 'make-kpkg --revision s-serv1 --append-to-version -sastraxi kernel_image' would give a kernel called 2.4.20-sastraxi and it would be identified as s-serv1.

CODE (example):
-----------
cd /usr/src/linux-2.4.20/
make-kpkg --revision $HOSTNAME kernel_image
cd ..
dpkg -i kernel-image-2.4.20_$HOSTNAME$_i386.deb

-----------
STEP VII: Reboot!
-----------

Here's another smoke-test for your system. However, we're not yet done. If you can reboot into your system with the new kernel, you're almost all set. Login as root and load the necessary modules for your network card (ex. 'modprobe ne2k-pci'). Now, run 'ifconfig eth0 up' which will put your network interface up (and running, possibly). If you've configured your network interface through dhclient and it still isn't working, run 'dhclient eth0' to get the new subnet mask and IP address. If you think you've got it, ping a site! If everything's working to the point it was before, congratulations; you have successfully compiled a kernel!

And, that brings us to the end of this tutorial. Next time, we'll be setting up ALSA so you can listen to all your tunes!

CODE (example):
-----------
modprobe ne2k-pci
ifconfig eth0 up
dhclient
ping linuxnewbie.org

BigFatJoe
12-24-2002, 01:30 PM
You may want to recommend making a bootdisk of the old kernel...before booting new one. This way, in case something goes terribly wrong....

; )

Sastraxi
12-25-2002, 03:37 PM
Debian automatically puts a boot option in lilo, LINUXOLD, to the kernel you compiled your new kernel on (aka. the last known working kernel). Therefore, a bootdisk is not necessary.

Sastraxi
12-25-2002, 03:48 PM
And, if you want this ALSA guide so much, here's a rough draft:- You need configured kernel sources for your current kernel.

1. Download latest 0.9 series ALSA-driver, -lib, and -utils from alsa-project.org.

2. Unzip them.

3. Go to ALSA's soundcard matrix and figure out the name of the ALSA module for your soundcard (use lspci if necessary). For example, my VIA AC'97 audio is "snd-via82xx".

(Note: It is a good idea to do all of the compiling and making as ROOT).

4. Go to the alsa-driver directory. Compile like this:

./configure --with-cards=your_ALSA_module's_name (ex. via82xx, notice there is no snd- on the start) --with-sequencer=yes
make
make install

(Note: --with-sequencer=yes only required if you want to use your external MIDI port, I believe. Do it anyway, doesn't hurt)

Now, do the following:

./snddevices
chmod a+rw /dev/dsp /dev/sequencer /dev/midi /dev/dsp

5. Go to the alsa-lib directory. Compile like this:

./configure
make
make install

6. Go to the alsa-utils directory. Compile like this:

./configure
make
make install

7. Load the modules:

modprobe snd-via82xx (for my AC'97 VIA)
modprobe snd-pcm-oss

8. Set volume and store settings:

alsamixer (ESC to quit!)
alsactl store

9. Put these in your startup script(s). You can do this using the /etc/modutils directory and the excellent update-modules tool that comes with Debian.

touch /etc/modutils/alsadrv (the name is a matter of preference)

Open /etc/modutils/alsadrv in your favourite text editor (ex. pico or mcedit). Now, to load all of these modules, stick this in:

# /etc/modutils/alsadrv
# load modules for alsa
alias char-major-116 snd
alias snd-card-0 snd-via82xx (once again, replace with the name of your module)
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
# end alsadrv

10. Enjoy whatever music program! (note that the ALSA drivers don't have the frequency restrictions that the OSS ones do on certain cards, like my AC'97).Good?

BigFatJoe
12-25-2002, 04:01 PM
Originally posted by Sastraxi
Debian automatically puts a boot option in lilo, LINUXOLD, to the kernel you compiled your new kernel on (aka. the last known working kernel). Therefore, a bootdisk is not necessary.

I didn't know that...but yeah, i checked my lilo.conf, and sure enough there it was. Cool.

I have a question: is there a difference between menuconfig and xconfig, when it comes to the options it offers...because if the options are the same, wouldnt it be easier for them to use xconfig? (easier - no; maybe prettier and more appealing) And if it isn't, then I need to go an recompile my kernel with menuconfig...because I guess I missed out on something.

Also, I've read somewhere that it is possible to put the user into the "src" group, and then one can do everything without actually being logged in as root. This would help a lot...but I haven't gotten it able to work. I had problems during compilation because it wanted to touch a file. I'll try it again, next time I compile, but you may just want to look into that.

BigFatJoe
12-25-2002, 04:11 PM
As far as the alsa is concerned: looks fairly good for a rough draft. The problems I had were related to the soundcore.o and related modules. I'll prolly recompile my kernel (tomorrow?), so once I get those fixed I'll follow your directions to the letter, and see what's missing (if anything). How's that.

As for the draft, you will probably want to expand the startup scripts step.
; )

Sastraxi
12-25-2002, 04:17 PM
The only difference between the two are the dependancies and the GUI. Menuconfig requires only ncurses, but to people that like that stuff it's their choice. For others, xconfig requires X running and a few other things. But, it is definately more visually appealing. I prefer console mode myself.

And about the startup scripts: I'll check into it. I never did that step because it's only two modprobes. But, I'll go change it now.

Thanks for all of the criticism Joe!

Sastraxi
12-25-2002, 04:27 PM
Oh, and by the way, for ALSA you need sound and soundcore (Sound support and OSS driver support in the kernel). However, I'm sitting here listening to some christmas music on my *nix box without either module loaded...

Cheers and merry christmas!

BigFatJoe
12-25-2002, 05:18 PM
I have a question. I'm running the latest 2.2 kernel. I'm thinking of upgrading to 2.4.20 (already downloaded it), but before I compile it I just need to know if there are any drawbacks (anything that 2.2 handles differently or better?)

Also, if I compile the 2.4 kernel, will I need to manually reconfigure anything else (ie. change default directories, install new packages, etc.) If so, what steps do I need to follow.

PS. And a very merry christmas to you!

Sastraxi
12-26-2002, 12:17 AM
Maybe you'd like to read this, then:
http://www.freeos.com/articles/3579/

BigFatJoe
12-26-2002, 07:59 PM
Thanks for the link. Yeah, I just went ahead and took the plunge. : )

I just finished configuring it, and am running make-kpkg as I speak. A couple things about your kernel how-to:

1. Don't you have to create a symbolic link "linux" to the correct directory (ie. linux-2.4.20)?
(I have always done this, because that's what I've always read needs to be done...maybe I'm wrong....but just in case, I went ahead and made it anyway)

2. if you use xconfig (my X is up...might as well use it): it offers you help for almost all the modules. Does this also exist in menuconfig? If so, maybe your explanations are a little repetitive...maybe you should just mention some that may be undocumented or unclear.

3. --revision $HOSTNAME just might be a bad idea. What if the user decides to recompile the same kernel version. Maybe something numeric that can be incremented might be better.

4. ^brings me to the last point...you should mention if one needs to recompile the same kernel (because they forgot to include some module, or something) then one does not need to go through all the steps. Instead:

make-kpkg clean
make menuconfig (or xconfig)
make-kpkg --revision XXX kernel_image
(this is where numeric revisions come in really handy)

EDIT:
make menuconfig
THEN
make-kpkg clean
make-kpkg --revision...

Sorry about that.

Sastraxi
12-27-2002, 05:39 PM
:eek: I don't know how that got there, I thought I had removed that! It won't even compile if you just use $HOSTNAME (it complains there are no numbers). So, I'll fix that.

I think that may be the case as well about the help... menuconfig does have it, so I suppose it would be okay just to remove it. But, I thought I'd make it a bit easier for someone to understand.... but if everyone's fine with the kernel documentation, it's gone.

the /linux dir, I read somewhere, is for something a bit different. I usually symlink mine as well, but if it's not 100% correct to do so I don't want to put it in. Usually, you can specify the path to the sources, and many programs find it just as easily themselves.

Joe_Atlanta
12-27-2002, 06:10 PM
Originally posted by Sastraxi
But, I thought I'd make it a bit easier for someone to understand.... but if everyone's fine with the kernel documentation, it's gone. No, no, no! The more explanation of the esoteric options in kernel config the better.

Penrich
12-29-2002, 02:01 AM
Good job! I was just about to upgrade my kernel in a brand new Debian install, so this was a very timely (for me!) post!

Minor point CODE (example):
-----------
apt-get install libncruses5-dev* modutils* kernel-package bzip2 should be libncurses (the beauty of cut and paste!)

Another minor point - in section IV, configuring the kernel, mention menuconfig (and xconfig) before you give a description of the options. The code to enter got lost, and I was wondering for a minute what i should be typing when.

And I agree to leave the descriptions of the kernel options in. In plain English!

Major point : the page is too wide!!! ;)

Good job Sastraxi.

Sastraxi
12-30-2002, 01:29 PM
Hmm, yes, the page is too wide :D I planned to release these in a nice formatted text style, but I'm unsure as to which type of document I would use. I didn't think I could use the Word (DOC) format, because that's from Microsoft. Is there one that apps like StarOffice and OpenOffice use?

I'll fix the typo in my local TXT versions, thanks.

I did mention make menuconfig before it, though because you didn't see it I'll go back and clean it up.

Thanks :) I couldn't do this without you guys!

BigFatJoe
12-30-2002, 01:40 PM
hmmm....*.doc format?
c'mon...you can do better than that. Do you know LaTeX? Then you could release it as a nice formatted .ps or even a .pdf

If you don't know LaTeX, maybe its high time to learn.
; )

Or you could release it as a multiple (or single) page html file. But please...for all of us out there...don't use a .doc format (unless you release it in other formats as well). PLUS, LaTeX will make it nicer than anything word can do....

Sastraxi
12-30-2002, 01:55 PM
Time to find out what LaTeX is ;).

BigFatJoe
12-30-2002, 08:50 PM
Originally posted by Sastraxi
Time to find out what LaTeX is ;).

This should probably be in a new thread, eh?

but this is a DEBIAN walkthrough, so I guess it could cover lots of stuff.

Anyways, the famous (infamous?) guide to getting started with LaTeX is the Not So Short Guide to LaTeX.

I seem to have an outdated version (3.20) but I looked around and it looks like you can get the newest version (and previous ones) here:

http://people.ee.ethz.ch/~oetiker/lshort/

As far as for help, you can find what you need if you know what you want to do with Google, but its kind of hard if you dont know what you want to do (kind of like the *nix man pages). So, if google doesnt work, go ahead and post to LNO...there seems to be decent number of us out there.

; )

Luck!

je_fro
02-11-2003, 03:31 PM
I'm subscribing!

jlmb
02-16-2003, 11:51 PM
Sastraxi maybe i missed something. You haven't upload the walkthrough right? i would really like to give it a try.

please, post any news about how you are doing with it.

je_fro
02-17-2003, 08:48 AM
Are you talking to me?
I think the others have long since moved on...

Nu-Bee
02-17-2003, 09:37 AM
Originally posted by Sastraxi [B]I plan to make this a full-blown article, showing how to get debian, install it, compile a kernel, configure it, get X working, and get sound working with ALSA (my sound library of choice).

When you can get it down to the Mandrake install process of:

[list=1]
Insert CD #1
Follow the prompts.
[/list=1]

You'll have accomplished something.

Mandrake can be just as "stable" and "easy to install programs" as Debian...so what's the fuss?

The so-called "bloat" does not warrant going to an install right out of the Night Gallery.

je_fro
02-17-2003, 09:47 AM
It makes no sense to compare Mandrake and Debian. they are two very different animals.

Forgive my terseness...I've been up for awhile. ;)

Hayl
02-17-2003, 09:49 AM
Originally posted by BigFatJoe
I have a question: is there a difference between menuconfig and xconfig, when it comes to the options it offers...because if the options are the same, wouldnt it be easier for them to use xconfig? (easier - no; maybe prettier and more appealing) And if it isn't, then I need to go an recompile my kernel with menuconfig...because I guess I missed out on something.

imho make menuconfig is a way nicer interface than the X one, and less confusing. and yes, the options are the same.

Hayl
02-17-2003, 09:52 AM
Originally posted by Nu-Bee
When you can get it down to the Mandrake install process of:

[list=1]
Insert CD #1
Follow the prompts.
[/list=1]

You'll have accomplished something.

Mandrake can be just as "stable" and "easy to install programs" as Debian...so what's the fuss?

The so-called "bloat" does not warrant going to an install right out of the Night Gallery.

you can install Debian by: insert CD1 and follow the prompts if you uise the GUI installer, as I have pointed out numerous times - however, everyone seems to think it is somehow cooler or something (imho) to do the debian install the long way. http://hackers.progeny.com/pgi

<Hayl is confused why people like the old install method>

je_fro
02-17-2003, 10:03 AM
I use Debian on machines that have no CDROM's (Net-Install)

BigFatJoe
02-17-2003, 10:32 AM
Originally posted by Hayl
. . . it is somehow cooler or something (imho) to do the debian install the long way.

<Hayl is confused why people like the old install method>

you answered your own question (I don't care if this was taken out of context). :D

I haven't used the pgi tool, but I'm assuming that if it does it differently its too bloated. The *old* (if you like me to call it this) installs the base system, sets up a user and root account, sets up lilo and pops you into a shell acount. What else do you want?

all you then do is change apt sources.list, apt-get your proggies, recompile, maybe create a tripwire db, maybe create a cd snapshot of your system, and you're set.

Easy as 1-2-3. Now, try doing that with pgi. As you can see from above, the only thing pgi could do for me is use better graphics for the install - b/c I don't want a gui installer downloading and upgrading a bunch of packages and libraries I'll never need.

Nu-Bee
02-17-2003, 10:43 AM
however, everyone seems to think it is somehow cooler or something (imho) to do the debian install the long way.

And, therein lies the silliness of it....

It is mostly the "mystery" of Debian that attracts most people...and, in my opinion mostly the vanity of having overcome needless hurdles that keeps people there.

I have seen no promotion of Debian that can't be done just as well...with less trouble...in tweaking some other distro.

It's nice that we don't have to create such long DOCs just to get Mandrake installed.

And, URPMI (...or GURPMI depending on ones preference) is just as efficient & easy as "Apt-Get".

Hayl
02-17-2003, 11:02 AM
Originally posted by BigFatJoe
you answered your own question (I don't care if this was taken out of context). :D

I haven't used the pgi tool, but I'm assuming that if it does it differently its too bloated. The *old* (if you like me to call it this) installs the base system, sets up a user and root account, sets up lilo and pops you into a shell acount. What else do you want?

all you then do is change apt sources.list, apt-get your proggies, recompile, maybe create a tripwire db, maybe create a cd snapshot of your system, and you're set.

Easy as 1-2-3. Now, try doing that with pgi. As you can see from above, the only thing pgi could do for me is use better graphics for the install - b/c I don't want a gui installer downloading and upgrading a bunch of packages and libraries I'll never need.

it isn't bloated. it only installs what you want. you still get the same base system if that is all you want.

try it before you make assumptions about it.

shortly it will be the "supported" way to install a debian system.

Hayl
02-17-2003, 11:14 AM
Originally posted by Nu-Bee
And, therein lies the silliness of it....

It is mostly the "mystery" of Debian that attracts most people...and, in my opinion mostly the vanity of having overcome needless hurdles that keeps people there.

I have seen no promotion of Debian that can't be done just as well...with less trouble...in tweaking some other distro.

It's nice that we don't have to create such long DOCs just to get Mandrake installed.

And, URPMI (...or GURPMI depending on ones preference) is just as efficient & easy as "Apt-Get".

nah. there is more to debian than just apt-get. go to their web site and read their social contract. also - stable in debian actually means stable - even their testing and unstable branches are more stable than many other distros. debian is an easy distro, not a difficult one like some people lead everyone to believe. the only reason it has a reputation of being difficult is because it doesn't (in the current supported versions) have a newbie-friendly installer like the other distros (red hat, mandrake, suse, etc).

that all being said - i do think that in its present form, debian is not for me for a workstation. the apps in stable are way too old and i don't like running unstable. so, i will keep my server as debian (woody) and stick to gentoo for my workstation.

i've never used urpmi - what is it? is it a mandrake-specific util?

jlmb
02-17-2003, 12:29 PM
ummmm, nobody answered.....is the Debian Installation Walkthrough finished or close to it?

im just curious, would really like to read it *final version*

Sastraxi
02-17-2003, 07:45 PM
I've been away from the forum for such a long time, it's been literal months since I even looked at this thread. I can finish the walkthroughs provided that I can remember how to do all of this stuff (I don't have Debian installed, and don't have my secondary computer anymore). So, I will get to work on that ALSA thing, and I'll put it into an HTML page (so it looks better ;)).

Does anyone of you need a specific part of it right now? If so, I can concentrate my efforts on the most-needed parts!

I'm going to blow the part in the kernel config. about the selections, as I really don't see the point of putting it in now, I believe many sites have already documented this (I will find out and post a link if relevant enough).

So.... be back in a bit =)

workingitout
02-24-2003, 11:47 PM
I don't want to jump into the middle of a Mandrake vs Debian peeing match here, especially since I am a RH user, but I feel like throwing my 2 cents in. I'll try to make this a short story. Here goes:
Saw many posts asking about Linux on older 486 hardware. Dug out my old Dell 486 laptop, no cd. Decided to try Debian because of the network install. Ended up using the 20 floppy base install, well documented, install went very well. Using Apt, installed x-windows, synaptic, ssh, lynx, dillo, sylpheed, nedit, fluxbox, gkrellm, & all the dependencies that go along. Small glitch in x-windows due to OLD hardware, working fine now. End result, a 274M install on an old 486 laptop that runs surprisingly fast. Installing the hard way was too damn easy, thumbs up Debian.

shadowrider
02-25-2003, 07:05 PM
hi...since i was having a trouble installing debian , and this topic seems to be suited pretty well for my problem.
i tried the pgi installer (and i believe i'm using the latest one pgi-woody-i386.iso), and it just wouldn't detect my eth0 therefore it wouldn't be able to configure the network for further installation.
well, the thing is my network card works pretty much with the other distros (including gentoo even i didn't finish installing, but it worked).
so it asks me for dhcp/manual/shell: dhcp didn't work.
tried manual (put all the info from ipconfig via dos) didn't work.
then i'm not sure what to do in shell?

my network card is SMC EZ Card 10/100 Fast Ethernet.

anyone has ideas?
thx

je_fro
02-25-2003, 07:27 PM
I used these (ftp://ftp-linux.cc.gatech.edu/pub/debian/dists/stable/main/disks-i386/current/images-1.44/bf2.4/) disks to install (net) with no problem.

shadowrider
02-25-2003, 09:02 PM
Originally posted by je_fro
I used these (ftp://ftp-linux.cc.gatech.edu/pub/debian/dists/stable/main/disks-i386/current/images-1.44/bf2.4/) disks to install (net) with no problem.

thx for the info, but can you tell me how to install using these disks?

je_fro
02-25-2003, 11:25 PM
05/16/2002 12:00AM 1,474,560 driver-1.bin
05/16/2002 12:00AM 1,474,560 driver-2.bin
05/16/2002 12:00AM 1,474,560 driver-3.bin
05/16/2002 12:00AM 1,474,560 driver-4.bin
05/16/2002 12:00AM 1,474,560 rescue.bin
05/16/2002 12:00AM 1,474,560 root.bin


--------------------------------------------------------------------------------
First off:
man dd

Then make disks like: dd if=driver-1.bin of=/dev/fd0
Boot with rescue.bin
Know your hardware.

shadowrider
02-26-2003, 12:43 AM
sorry...i'm kind a noobe myself and i never really had it done that way...so i'm not sure how to make the disks (do i need a software for that?)
and the same thing for "man dd", are you referring to "manual dd" under linux?

---EDIT----
oh damn..guess just found out that i have to do "dd" from unix system , but i don't have one though right now..only windows..that's why i'm installing debian..

je_fro
02-26-2003, 02:41 AM
ftp://ftp-linux.cc.gatech.edu/pub/debian/dists/stable/main/disks-i386/current/dosutils/

In that case go to the above and download rawrite, it's a tool you'd use in windoz to make iso's out of those floppy files I suggested above.

shadowrider
02-26-2003, 03:14 AM
Originally posted by je_fro
ftp://ftp-linux.cc.gatech.edu/pub/debian/dists/stable/main/disks-i386/current/dosutils/

In that case go to the above and download rawrite, it's a tool you'd use in windoz to make iso's out of those floppy files I suggested above.

oh cool...thx

so assuming i should make 6 disks then? when do i ever use root.bin?

je_fro
02-26-2003, 01:14 PM
It'll tell you. How good are you at XF86Configuration? You'll need to know your hardware, and I recommend (during install) just selecting X under tasksel, and do not run dselect. You can get whatever you want later through apt. Also, make sure you read this. (http://www.debian.org/releases/stable/i386/install)

shadowrider
02-26-2003, 07:14 PM
Originally posted by je_fro
It'll tell you. How good are you at XF86Configuration? You'll need to know your hardware, and I recommend (during install) just selecting X under tasksel, and do not run dselect. You can get whatever you want later through apt. Also, make sure you read this. (http://www.debian.org/releases/stable/i386/install)

how good? well...i think for some common knowledge , i should be able to pull it off, but let me put this installation aside for a moment 'cause i just read about gentoo and was very eager to give it a shot.
i actually have a problem in partitioning it, but let me post it in "linux installation" since this is not where it belongs.:o

je_fro
06-19-2003, 07:05 AM
****BUMP****

Tobbera
06-23-2003, 10:49 AM
Good work on the install guide!
Where can one get hans on a copy of the guide? (in its current state of cource)

Regards
Tobias

je_fro
06-23-2003, 10:51 AM
Copy...
PASTE!


Print!!!

je_fro
09-21-2003, 07:26 AM
This is one useful thread.....

wurzul
09-27-2003, 02:28 PM
If you are going to steal parts of other peoples work at least reference it.

http://www.debian.org/releases/stable/i386/release-notes/ch-whats-new.en.html

Wurzul

silvater
10-02-2003, 02:56 AM
This is a great tutorial a little harsh but good. Im waiting for my Debian linux to arrive. i bought it online, I wanted it on a DVD disk, it was very inexpensive and also u contribute $1 to the debian project.:D

Im working on my website. I would like ot have a copy of the tutorial if posible, to put it on the site.

Nick,
nsilva@purdue.edu:D

Lord403
10-02-2003, 07:22 PM
Great tutorial!

i have only downloaded cd1 of Debian. How can i run xfree?
I want to use KDE or GNOME, but i really need XFree86(x)
Can someone please explain me how i can make xfree work on my computer with Debian?

bandwidth_pig
10-03-2003, 09:38 PM
This most likely won't be a popular answer, but when I do a fresh Debian install, I always just download the source. Since you don't have X running yet, use lynx. If you don't have lynx installed, just apt it.

apt-get install lynx

Once you get it, fire up lynx, head over to xfree86.org and download the source and compile. Works great everytime. :cool:

Thrasher
10-12-2003, 07:55 PM
Wow, all that stuff may finally help me get it to work.

Thx peeps
:)