Translate

Image of Modern Operating Systems (3rd Edition)
Image of Linux Kernel Development (3rd Edition)
Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
Image of Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)

Using PCI.IDS Database to Show PCI Vendor and Device Information in UEFI Shell

The UEFI Shell has a built-in command called pci for enumerating PCI (Peripheral Component Interconnect) devices. Here is what is outputted for a Lenovo T450 using this command: fs1:> pci Seg Bus Dev Func — — — —- 00 00 00 00 ==> Bridge Device – Host/PCI bridge Vendor 8086 Device 1604 Prog Interface 0 00 00 02 00 ==> Display Controller – VGA/8514 controller Vendor 8086 Device 1616 Prog Interface 0 00 00 03 00 ==> Multimedia Device – Mixed mode device Vendor 8086 Device 160C Prog Interface 0 00 00 14 00 ==> Serial Bus Controllers – USB

Examining Intel Microcode in Lenovo Firmware Updates

Recently, I decided to examine the contents of a Lenovo T450 firmware update before installing the firmware update and noticed that it included a number of Intel processor microcode updates. This blog post explores what information you can glean from these microcode updates and confirms the existence of an additional undocumented header in Intel microcode updates which was initially described by Chen and Ahn in their December 2014 paper Security Analysis of x86 Processor Microcode. Here is the contents of the latest firmware update (as of November 2016) for the Lenovo T450 laptop. It is a self extracting executable named

Sudo and Globbing

The question is how we can use the sudo utility to display a list of files in a directory to which we have absolutely no Unix filesystem privileges Consider the following directory and files contained therein: $ ls -l total 4 drwxrwx—. 2 root root 4096 May 22 21:14 demo $ su Password: XXXXXXXX # ls -l demo total 0 -rw-r–r–. 1 root root 0 May 22 21:14 file1 -rw-r–r–. 1 root root 0 May 22 21:14 file2 -rw-r–r–. 1 root root 0 May 22 21:14 file3 # exit exit Note the directory permissions are 770 and the user and

Gzip v Zip: Determing Which Type Of Archive

Sometimes it is different to easily tell which type of zipped archive you are dealing with because the zipped archive has an incorrect extension or no extension at all. Here is how to tell which you are dealing with: Zip file header: $ od -h zipped-file |head 0000000 8b1f … Gzip file header: $ od -h zipped-file |head 0000000 4b50 0403 …  

Remove Color Code Escape Sequences

Here is a simple way using sed to remove special characters such as color codes and other escape sequences from each line in a log file or the output from a utility like screen. $ sed -r “s/x1B[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g” If you wish to see the actual escape sequences, one way is to use the -r or -R options to the less utility -r or –raw-control-chars Causes “raw” control characters to be displayed. The default is to display control characters using the caret notation; for example, a control-A (octal 001) is displayed as “^A”. Warning: when the -r option is used, less