Title ........................... Debian 101 Author .......................... cwade12c Site ........................... http://haxme.org/ Shouts .......................... #haxme, #darchoods, #suidrewt Debian is one of the older Linux distros which is still maintained today. Debian was first introduced to the world of *nix in the 90's, and the most recent X.x.x release was in 2009. Debian is a very robust and precise linux distro which requires time and practice to master; and is on a far further level than Ubuntu, which is basically a linux distro full of GUI structure and novice whereabouts. Debian is very stable compared to other distros of Linux, and is a must-have for any classical *nix user, or new *nix user who wants to do it right this time around. If you are going to dive into Debian for your first time, expect some challenge; as there isn't much hand holding / if any at all. If you're ready to enter a legitimate world of excitement and challenge, then lets begin. First, you will need to decide if you are going to be installing Debian on a virtual machine or having it boot from your disk. If you are going to boot from a disk, and want to have multiple booting options, then GRUB (GRand Unified Bootloader) or LILO (Linux Loader) is definitely the way to go. So what to use? Grub or Lilo? First off, you need to know what a boot loader does. A boot loader... loads an operating system. LILO and GRUB are both boot loaders. LILO, for the longest of times, was the default bootloader among many *nix developers; LILO does not depend on a given file system and is capable of booting images from various devices. GRUB came along, and became RedHat Linux's primary bootloader. This is when GRUB started to get recognized from various developers. GRUB can be used to select various images on system partition's - and GRUB is also extremely flexible. There are some features that GNU GRUB has which LILO does not; for instance, command interface and network booting. In the world of *nix; there are more dominant distros than others. In the world of bootloaders; there are great bootloaders, and then there are fantastic bootloaders. You won't go wrong by using one over the other - but if you want more features, the GNU GRUB project (v2 legacy in development and available) is the way to go (in my opinion); whereas everyone has their opinions, that does not make one right and one wrong. You choose your own bootloader! For LILO, configure /etc/lilo.conf For GRUB, configure /boot/grub/menu.lst Go ahead and download Debian - if you are setting it up in a virtual environment, do so by mounting your iso path to your newly created OS, and starting it up. If you are doing this via booting on your computer, set your boot priority to read from disc @ 1. -> and make sure the iso is burnt and is in your drive. The installer will boot up, and you're going to have the following options: Install OR Graphical install OR Advanced Options Go to Advanced Options -> Expert Install Try not to select the graphical version. We want to refrain from "hand holding" as much as possible. First, choose a language -> UTF8 (or whatever works best for you). Next, select your keyboard layout -> I'm keeping my kernel default. We will then detect and mount your CD-Rom. This should detect your distro. Now, load installer components from the CD itself. You will be presented with a list of "optionals". These are what I have chosen; select what you wish, but there is personal reference the certain selections --> cfdisk-udeb --> crypto-dm-modules --> crypto-modules --> ipv6-modules-2.6.26-2-486-di --> irda-modules-2.6.26-2-486-di --> load-media --> loop-aes-modules --> lowmem --> multipath-modules --> network-console --> (you may or may not want this) ntfs-modules --> openssh-client-udeb --> squashfs-modules --> ufs-modules --> wireless-tools-udeb These optional components give us access to extended modules, tools, and permissions. Remember - read the screen. Space = select, Enter = continue -- don't just take everything here for granted, despite how "straight forward" things are trying to be put out. Notice that once we add these new components, we will be presented with more installation inclusions - such as Install the GRUB boot loader on a hard disk, etc. I will be skipping the inclusions. If you include the components, then learn how to configure them on your own - in other words, research what is and is not important. For example: openssh-client-udeb might not be important to you because you might not want to continue your installation remotely; which this will allow you to do. Continuing on, we will detect network hardware. You should probably do this before configuring the network. public/style_emoticons/default/wink.gif Next we will configure our eth0. Select Configure the Network. You will be walked through with supplying the dynamic host config protocol, and with some extended terms to configure the network. You should have your DCHP and DNS information on hand just in case an automatic detection fails... or, if you decide to do things manually. Now, detect disks. If you're going to partition anything, then you need to detect it first. Alas; time to partition. If you are in a virtual environment, you can use a Guided method, which will use standard schemes. If you are interested in setting up an logical volume manager (which can also be encrypted), you can do this as well. If you are not familiar with the LVM; what it is exactly is a manager of drives and devices which hold storage. If you want to install a root filesystem, you may want to go this route. Lets not get ahead of ourselves though; that's only if you are familiar with some of the ends and terms. Lets just move on. I am going to select "manual". I'm going to select my IDE1 master hda, which has an allotted 18GB on it specifically for Debian. I am going to partition it. We need to select a partition table to use. We are offered with multiple options... like aix, bsd, msdos, loop, etc. Go ahead and continue on, and I am setting my partition to Primary. In primary, we are faced with a few options. Mounting point: Mount point for the partition. partition notes edited (By: ratdance) / mount point /opt add-on application packages /boot static files of boot loader, kernels /root root file system. Should just contain /bin, /sbin, /dev, /lib libraries /etc miscelaeneous(from video drivers to password file and all inbetween) /home user home directories,user data and "stuff". /usr Programmes and source code. /var variable data, such as spools, man pages, news and mail queues, logs, database data. /tmp temporary file locations My mount point is / with default mount options. I have reserved my blocks to 7% for the super user, and everything else left default. My final setup for the partition is: IDE1 master (hda) @ #1 primary f ext3 / Create another partition with about 500MB of space -> logical -> swap. The final setup should be: logical f swap swap So now we should have a primary and logical partition @ ext3 & swap. I have finished partitioning my disk, now I am ready to Install the base system. A lot of dependencies will be installed, which will allow debian to function appropriately. We will be prompted mid-way through the installation to select a console common which installs the kernel. Go ahead and select the default. When getting confronted with udev to install drivers, you should probably install all of them; I myself, chose the manual option. As we are finish the base install, we continue on to setting up our user(s) and password(s). Make sure you enable shadow as a security precaution. If you decide to disable root, you can enable it later on via sudo. Create your user(s) with some secure passwords. e.g. Don't use toor as your password, or anything that is common. public/style_emoticons/default/tongue.gif Next, configure the package manager. Choose HTTP or FTP - - > if it's FTP you're looking at, provide the mirror. If it is HTTP, select from the list; I myself, from the HTTP list, chose debian.org This part of the general installation will configure apt; also be sure to allow security and volatile updates from debian from the package management configurator. After your apt finishes configuring itself, it's time to get down to business. Are you going to install a boot loader to your disk? I am, and I'm going with GRUB. Pass on GRUB 2 Legacy as it is in a beta stage, and you don't want anything unreliable to be installed as your boot loader! We will need to select our boot loader path for installation as a device via: /dev/hda = master , /dev/hda2 = second partition of first drive , /dev/sdc5 = first extended partition . I have added a password for security for grub (separate from my user account(s)). Please note if you are going to go without a boot loader like GRUB or LILO, you will need to boot manually with /vmlinuz on your partition. Next I will select "Finish the Installation". Things will tidy up, and you will be prompted to configure a few things like your system clock and whatnot. When things are finished, you will need to reboot. After you reboot, GRUB should appear. I'm going to select Debian GNU/Linux kernel ... done deal! We should have a lot of bash in front of us now. The next step would probably be to get the hang of the shell and some of the commands. ls ----- List directory. --> ls [path] ----- cd ----- Change directory. --> cd [dir] (.. ~ up etc.) ----- clear ----- Clear shell. --> clear ----- exit ----- Exit shell, bin, network. --> exit ----- su ----- Super user or substitute. --> su [-] [username] ----- apt-get ----- Advanced Packaging Tool for Debian and variants. --> apt-get [install] [update] [remove] etc. ----- apt-cache ----- Advanced Packaging Tool for Debian and variants. --> apt-cache [search] [dump] etc. ----- wget ----- Web Get robust file downloading. --> wget [protocol://address] ----- touch ----- Change file access. --> touch [file] ----- nano ----- Based off of Pine Composer, Nano is a text editor with a straightforward design and a compatible interface. --> nano [file] ^G = Help ^O = WriteOut ^R = Read File ^Y = Prev Page ^K = Cut Text ^C = Cur Pos ^X = Exit ^J = Justify ^W = Where Is ^V = Next Page ^U = UnCut Text ^T = To Spell ----- After you have gotten a hang of the commands, their syntax/usage, and a feel for the command interface itself... the next step would be to probably get yourself a window manager. Get your video drivers (if you're having trouble, check your pci, or, grab module-assistant X and read it's usage. It'll help you get your drivers.). Once you get your video drivers, get yourself a WM (windows manager), setup your xinitrc file, with (exec ...) so we can startx after booting up into Debian. Oh, and last but not least... welcome to the world of Debian.