Translate

Image of Modern Operating Systems (3rd Edition)
Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)
Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
Image of Linux Kernel Development (3rd Edition)

How to Determine Hardware Mode of Intel CPU

Consider the following output: # grep flags /proc/cpuinfo flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc pni monitor ssse3 lahf_lm How can you the maximum size of a long that can be used with this CPU? The answer is 64-bit because of the presence of the lm flag. The following flags can be used to determine the maximum size of a long for a CPU: lm – Long Mode (64 bits) tm – Protected mode (32-bit) rm – Real Mode

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

Check Available Text and Graphic Modes From UEFI Shell

Some time ago a reader of this blog contacted me for assistance with enumerating possible screen modes from the UEFI shell. This post is in response to that request for help. The original EFI (Extensible Firmware Interface) specification and EDK (EFI Development Kit) supported a text output protocol and UGA (Universal Graphic Adapter), a device-independent VGA-derived graphics protocol. In 2005, Intel handed EFI standardization over to an industry consortium, UEFI, and that consortium decided to replace UGA with GOP (Graphics Output Protocol) to remove the remaining VGA hardware dependencies. The following code should work with any of the UDK (UEFI