% latex generated by the script '/home/project-web/bumble/cgi-bin/text2latex.cgi' 
% with help from the sed script 'text2latex.sed' 
% query string: 'books/linux-config/linux-hardware-book' 
% sFileName= 'linux-hardware-book' 
% sDirName = 'books/linux-config' 
% sName = '' -->
% latex by http://bumble.sourceforge.net/scripts/text2latex.sed 
% this script is a work in progress 
\documentclass[11pt]{article} 
\usepackage[hmargin=2cm, vmargin=2cm]{geometry} 
\usepackage{url} 
\usepackage{hyperref} 
\begin{document}
 
 \\&\\& The Linux Hardware Booklet
 -----------------------------:

 This should become a booklet about using bits of hardware with
 the Linux operating system.

DEBUGGING DRIVERS

 
 Viewing and modifying linux modules requires you to be 
 the 'super-user' root. 

 * run a series of commands as to super user 
 >> sudo bash

 * search for available modules for a Realtex RTL8139 ethernet card
 >> sudo modprobe -l | grep 8139
 >> modprobe -l | grep 8139

 * search for available modules for a Boradcom wireless card
 >> modprobe -l | grep b43

 These commands search for what modules (called 'drivers' in the 
 microsoft world) are available to install, not what modules
 are currently being used.

 * list all loaded modules which have '8139' in their name 
 >> lsmod | grep 8139

 * see if the Broadcom wireless module is currently installed (loaded) 
 >> lsmod | grep b43
 
 * load the 'b43' module
 >> modprobe -v b43

 * list all modules currentlly installed
 >> lsmod

HARDWARE INFORMATION 

 * get a full report of hardware and operating system in html format
 >> hardinfo

 * another way to get lots of hardware and operating system info
 ---------------------------------------------------------------
 uname -a > eg.txt
 lspci >> eg.txt
 lspci -vv >> system.txt
 ,,,

WIRELESS

 * check what network interfaces are available
 >> ifconfig -a
USE AN MS WINDOWS DRIVER ON LINUX

 first find the .INF file for the hardware

 * install a windows driver
 >> ndiswrapper -i \texttt{/path/to/.inf}

 * view the ms windows drivers being used current
 >> ndiswrapper -l

 * stop linux from loading linux driver 'b43' (broadcom wireless card)
 >> echo "blacklist b43" >> \texttt{/etc/modprobe.conf}
 

NOTES:

 Unclassified notes

 * Get info on RAM Slots and Max RAM.
 >> dmidecode 2.9 | grep "Maximum Capacity"; dmidecode -t 17 | grep Size
 
 * Quickly (soft-)reboot skipping hardware checks
 >> \texttt{/sbin/kexec} -l \texttt{/boot/\\$KERNEL} --append="\\$KERNELPARAMTERS" --initrd=/boot/\\$INITRD; sync; \texttt{/sbin/kexec} -e
 
 * Lists the supported memory types and how much your board can
 >> sudo dmidecode -t 5,16
 
 * Backup your OpenWRT config (only the config)
 >> curl -d 'username=root\\&password=your-good-password' "http://router/cgi-bin/luci/admin/system/backup?backup=kthxbye" > `date +\\%Y\\%d\\%m`\\_config\\_backup.tgz
\end{document}
%end generated latex
