Effective speed is lowest speed of device, cable and hub
Classes of USB devices :
Human Interface Device (HID) - Input devices: mice, keyboards, etc.)
Communications device - Modems
Mass storage device - Disk devices, flash readers, etc.
Audio - Sound devices
IrDA - Infrared devices
Printer - Printers and USB-to-parallel cables
Linux kernel supported USB in v2.3.x, backported to 2.2.18
Linux drivers may be host controller drivers (e.g. usb-ohci.o), class drivers (e.g. hid.o, usb-storage.o, printer.o, audio.o) or device-specific drivers
Modularized USB drivers are loaded by the generic /sbin/hotplug kernel support
lsdev - shows hardware including IRQ info, I/O ports and DMA channels
lspci [-t] [-vv] - info about system’s PCI buses and installed PCI devices
A module is dynamically linked into the running kernel when it is loaded
insmod/rmmod - insert/remove mocule, no dependency checking
modprobe [-r] [-a] [-t type] - list, insert or remove modules. Does dependency checking.
lsmod - list modules modinfo module-object-file.o - info about a module file
sysfs is a RAM-based filesystem derived from ramfs. It provides a means to export kernel data structures to user space. mount -t sysfs sysfs /sys
The udev process uses sysfs info to create dynamic device files as kernel modules are loaded. /etc/udev.d holds rules to be applied when adding or removing a device.
D-Bus is an IPC system that uses sysfs to implement a message bus daemon used for broadcasting system events e.g.“new device added” or “printer queue changed”.
hal was a hw abstraction layer (hw access API) on top of udev using D-Bus. It has been deprecated and rolled into udev and the kernel.
101.2 Boot the System (LCN-4 CTL-5)
Provide common commands to the boot loader and options to the kernel at boot time
Demonstrate knowledge of the boot sequence from BIOS to boot completion
Boot Loader (LILO or GRUB) launches the linux kernel, passing kernel parameters if needed (/etc/lilo.conf | /boot/grub/menu.lst | /boot/grub/grub.conf)
Module options (as well as aliases and post-install and pre-remove actions) are stored in /etc/modules.conf .
dmesg displays kernel messages logged at last system boot.
/var/log/messages contains all syslog messages.
101.3 Change runlevels and shutdown or reboot system (LCN-4 CTL-5)
Set the default run level
Change between run levels including single user mode
Shutdown and reboot from the command line
Alert users before switching run levels or other major system events
Properly terminate processes
Knowledge of basic features of systemd and Upstart
On Debian, 2 is default and 3,5 are not used. On Redhat, 3 is the default.
/etc/rc script to change runlevels on redhat (also init/telinit script)
/etc/rc.sysinit (Redhat) or /etc/init.d/rcS (Debian) - system init script launched by init before system daemons
/etc/rc.local- local startup actions called at end of startup
/etc/init.d contains startup/shutdown scripts for all system services
/etc/rc0.d - /etc/rc6.d contain softlinks KNNservice or SNNservice specifying whether to start or stop services and in what order for that runlevel (done by init process). Kills done before starts.
/etc/inittab contains “id:N:initdefault:” for default runlevel N
runlevel shows current and previous runlevel
shutdown [options] time [warning message] - -f=fastboot -h=halt -r=reboot -F=force-startup-checks -k=just-send-warning . Time is “now” or “+N” in N minutes or absolute time e.g. 23:58.
102 Installation and Package Management 18%
102.1 Design hard disk layout (LCN-5 CTL-3)
Allocate filesystems and swap space to separate partitions or disks
Tailor the design to the intended use of the system
Ensure the /boot partition conforms to the hardware architecture requirements for booting
choosing a disk layout for linux depends on amount of disk space, purpose of the system, size of the system and backup strategy. Some general guidelines are
If diskspace is limited, just /boot, / and /swap
/boot is a separate 50MB partition because older kernels/BIOS require kernels under a 1024 cylinder limit.
For larger systems keep / smaller/simpler to reduce risk of corruption.
Can use separate partitions for /var (to isolate system logs), /tmp (to isolate tempfiles), /home (for backup and RAIDing of user's data)
Using a separate partition for /usr allows it to be shared via read-only NFS which allows for saving space and easier maintenance of apps/updates.
Superblock on filesystem contains critical metadata so multiple redundant copies are kept.
Filesystems must be mounted (listed in filesystem table) before being accessible. /etc/fstab is a list of filesystems to mount on boot up.
Master Boot Record on first 512 bytes of first sector of disk contains info on partitions and bootup. Can be backed up and restored with