Install Debian Linux in Gateway laptop
1. Obtain a bootable mininal CD for network install from here: http://www.debian.org/CD/netinst/
Or burn the CD from iso: http://cdimage.debian.org/debian-cd/3.1_r0a/i386/iso-cd/debian-31r0a-i386-netinst.iso
Reference 2.7 Debian and the kernel: http://www.debian.org/doc/manuals/reference/ch-system.en.html#s-kernel-details
Install KDE in the package.
Enable default X program KDE:
echo "exec startkde" > ~/.xsession
Install a new Kernel:
- C.4.5. Install a Kernel
If you intend to boot this
system, you probably want a Linux kernel and a boot loader. Identify
available pre-packaged kernels with
# apt-cache search
kernel-image
Then install your choice using its package name.
# apt-get install kernel-image-2.X.X-arch-etc
Install a customized Kernel
http://www.holtmann.org/linux/kernel/debian.html
apt-get install kernel-package libncurses5-dev wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.20.tar.gz cd /usr/src/ tar xzf /root/linux-2.4.20.tar.gz mv linux-2.4.20 linux-2.4.20-mh9 cd linux-2.4.20-mh9 zcat /root/patch-2.4.20-mh9.gz | patch -p1 cp /root/config-2.4.20 .config make oldconfig Remember to revise .config: CONFIG_KALLSYMS_EXTRA_PASS=y
Remember to check ...USB_UHCI_HCD=y for 2.6 kernel to enable MS optical USB mouse
make-kpkg clean
make-kpkg --initrd kernel-image dpkg -i kernel-image-2.4.20-mh9_10.00.Custom_i386.deb cd /boot; makeinitrd -o /boot/initrd.img-2.6.13 2.6.13 make changes in the /boot/grub/menu.lst reboot
----------------------
Enable Dual boot
title
Microsoft Windows XP Professional rootnoverify (hd0,0) makeactive chainloader +1 title Other operating systems: root # This entry automatically added by the Debian installer for a non-linux OS # on /dev/hda1 title Microsoft Windows XP Professional root (hd0,0) savedefault makeactive chainloader +1 |
--------------------
Configure touchpad and external usb mouse:
Section
"InputDevice" Section
"InputDevice" Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" "CorePointer" InputDevice "GlidePoint Mouse" "AlwaysCore" EndSection |
--------------
Install Broadcom 802.11g wireless driver, through ndiswrapper
(requires kernel 2.6 above)
1. install ndiswrapper debian src package
2. ln -s /usr/src/linux-<kernel-version>
/lib/modules/VERSION/build
3. Install Wireless Tools in debian if not done yet (package:
net/wireless-tools)
4. Compile the source and install
( the above method is not ready for kernel 2.6.13 yet. No debian
modules found.)
6. modprobe wlan0
OR modeprobe ndiswrapper to start.
dmesg to see if the wireless card is recognized or not:
ndiswrapper
version 1.2 loaded (preempt=no,smp=no) ndiswrapper: driver bcmwl5 (Broadcom,02/17/2004, 3.40.65.0) loaded ACPI: PCI Interrupt 0000:02:09.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10 ndiswrapper: using irq 10 wlan0: ndiswrapper ethernet device 00:90:4b:da:f3:75 using driver bcmwl5, configuration file 14E4:4320.5.conf wlan0: encryption modes WEP, WPA with TKIP, WPA with AES/CCMP |
use alsamixer to adjust vol
Remember to mute the External Amplify by press "M"
Put the modem sound module to blacklist file: Add snd_intel8x0m
to the file /etc/hotplug/blacklist
Also, in KDE control center, in Sound and System, Choose "Threaded
Open Sound System" in the hardware option.
# apt-get install zsh (install zsh shell)
You will need a text-editor. nano is installed by default, and it is really easy to use.
I currently prefer emacs because it is very powerful.
# apt-get install emacs21-nox
Sometimes, I use jove because it is small and fast.
# apt-get install jove
You should make yourself familiar with the UNIX "manual pages".
These are built-in documentation manuals for almost all commands and
programs.
For example, to see the man page for the
ls command, type:
] man ls
Other helpful man pages:
] man man
] man wget
] man ping
Before going any further, you need to be aware of security. Linux is a real multi-user OS and it is important that you secure your system against unauthorized access. If a Linux box is on a network, and bad people get into it, they can run programs and do nasty things without having any physical access to the hardware.
# apt-get update
# dselect update
# apt-get upgrade
In UNIX (and Linux), there are some things you must do as root.
For everything else, use your regular user account.
Login: user
Password: ****** (your regular user password)
Whenever you want to logout:
] logout
] exit
You can create user accounts for your family and friends:
# adduser
If you want to change your shell from bash to zsh, find zsh's path with which
] which zsh
then run "change shell" with the correct path to your new shell:
] chsh -s /bin/zsh
Hit Alt+F2 and login again. You're now running zsh.
With sudo,
you can run
commands as root without logging-in as root. Sudo is nice
because, while doing necessary tasks as root, you still have your
familiar
shell, aliases and environment. This seems to reduce mistakes and
typos.
Install sudo:
# apt-get install sudo
Configure sudo:
# emacs /etc/sudoers
add a line:
user ALL=(ALL) ALL
To run one command as root:
] sudo command
For more commands, run your shell with sudo.
] sudo zsh (if zsh is your shell.)
Be careful when you are root. When you are done, type exit
] lspci
] lsmod
] cat /proc/cpuinfo
] cat /proc/interrupts
# updatedb
] locate file
] df
] free
] uptime
] uname -a
Before you turn your computer off, run:
# halt (wait until it says "Power Off")
To reboot your computer, run:
# reboot
These often-used commands are for manipulating the debian packages and system files. Replace pkg with the exact name of the package.
# apt-get update update the package lists
# dselect update update the available package lists
# apt-get upgrade upgrade all installed packages
# apt-get install pkg installs package
# apt-get remove pkg uninstall package
] dpkg -l show all installed and removed packages
] dpkg -l pkg show install status of package
] dpkg -l "*pattern*" show all packages that match pattern
] dpkg -S pattern list packages that contain string
] dpkg -L pkg list files in package
] dpkg -s pkg show status of package
] dpkg -p pkg show details of package
] apt-cache search string list relevant packages
# dpkg -i file.deb install package from a deb file
# dpkg -P pkg purge package (and config?)
# dpkg-reconfigure pkg re-run the configure for a package
# apt-get source pkg get the source
# apt-get build-dep config build-deps for source and install as needed
# apt-get -t release install pkg install package from specific release
# update-rc.d -f name remove prevent name from running at bootup
I always install X one package at a time. (you could use tasksel)
# apt-get install xlibs
# apt-get install xutils
# apt-get install xbase-clients
# apt-get install rxvt
# apt-get install xterm
# apt-get install xserver-xfree86
# apt-get install fvwm
# apt-get install fvwm-icons
# apt-get install xfonts-75dpi
# apt-get install xfonts-base
# apt-get install xfonts-scalable
# apt-get install xlibs-dev
Getting X totally tuned up can sometimes be a challenge. You may need to know the model and specs of your video card and monitor. Run lspci to help figure out what video card you have. Be careful when configuring XFree86. If you enter incorrect specs, your monitor and video card could be damaged. The configure script will ask you questions about your hardware. Below is an example of some of the answers I gave:
autodetect = no
driver = depends on your video card
keyboard rule = xfree86
keyboard model = pc101
keyboard layout = us
mouse = /dev/psaux (for PS2 mouse on PS2 port)
mouse = /dev/ttys0 (for serial mouse on "com1")
monitor setup = advanced
horizontal = from monitor spec
vertical = from monitor spec
depth = (depends on your hardware)
resolution = (depends on your hardware)
# emacs /etc/X11/XF86Config-4
mouse protocol = PS/2 (yours may be different)
emulate3buttons = no (mine has 3 buttons)
The most personal component of your X environment is your window manager. There are many different window managers available, but I use fvwm, because it is versitile, fast, and extremely efficient.
Login as user to configure your Xinit resource configuration:
] emacs .xinitrc
#!/bin/sh
xset m 31/20
xset r rate 250 35
xset b off
rxvt -geometry 144x6+0+100 &
rxvt -geometry 127x39+0+200 &
xsetroot -solid '#444488' &
fvwm2 &
rxvt -geometry 50x10+102+21
(xset is used here to turn off the annoying beep)
Next, get your .fvwm2rc file from the sample:
] mkdir /home/user/.fvwm
] cd /home/user/.fvwm
] wget http://linux.simple.be/jump/sarge/sample.fvwm2rc
] mv sample.fvwm2rc .fvwm2rc
Lets try starting up X:
] startx
If you get stuck in X, you can usually exit immediately by pressing the keyboard combination Ctrl+Alt+Backspace. This should take you back to the console command prompt.
For more info and help, read the "man pages" for XFree86:
] man XF86Config-4
] man XFree86
My preferences are below, (YMMV):
# emacs /etc/X11/XF86Config-4
keyboard section:
Option "AutoRepeat" "200 200"
Mouse Section:
Option "Resolution" "900"
To set the default X video mode, put it before the others. Then restart X.
The coolest aspect of X is its client-server design, which allows the remote display of applications over a network. For example: You you can run an X-server on an old (slow) laptop, and then run an X-client (application) on a different (fast) computer. The application is displayed on the laptop's screen, and you interact with the application with your laptop's mouse, and keyboard. The application runs fast while using very little of the old laptop's RAM and CPU. Additionally, an X-server is not needed on the computer that sends X-client displays to other computers. The terms “server” and “client” may seem backwards here, but they are correct. One X-server can accept connections from multiple X-clients.
On the X-client side:
From the X-server side:
# apt-get install xearth
# apt-get install gimageview
To see what type of processor is in your computer, run:
] cat /proc/cpuinfo
Update your package lists:
# apt-get update ; dselect update
Read the package descriptions to find the kernel type that best matches your processor:
] dpkg -p kernel-image-2.4.27-2-386
] dpkg -p kernel-image-2.4.27-2-586tsc
] dpkg -p kernel-image-2.4.27-2-686
] dpkg -p kernel-image-2.4.27-2-k6
] dpkg -p kernel-image-2.4.27-2-k7
If you want more choices, see the entire list:
] apt-cache search kernel-image | grep
kernel-image
User apt-get to install the kernel package.
# apt-get install kernel-image-2.4.27-2-foo
Follow the directions carefully. Then run
# /sbin/lilo
# reboot