Skip to content

Category Archives: Linux

Converting an IP Address to Hex

09-Nov-10

Convert an IP address to hex using the “gethostip” command: This is useful for naming files in a pxelinux.cfg directory, for instance.

Generating Crypted Passwords for Kickstart Files

04-Oct-10

For Red Hat or clones, or ESX/ESXi, use “grub-md5-crypt”: Copy and paste to “rootpw –iscrypted” as appropriate.

Example checkinstall arguments

02-Aug-10

Query Architecture of RPMs

15-Jun-10

To query the architecture of installed RPMs, use a custom query format:

Mount an ISO image on Linux

15-Jun-10

Flushing nscd’s cache

22-Dec-09

By default, in RHEL, nscd is configured to have a persistent cache – one that is “stored on the disk and therefore survive[s] a nscd restart or e.g. machine reboot” according to the nscd.conf man page. To flush the cache, you must run nscd with the “-i” flag instead of simply restarting it: sudo nscd [...]

Creating an XFS Partition

23-Jun-09

Steps for creating an XFS partition on /dev/sdc which encompasses the entire disk. (LVM is not used in this example. Post written using Scientific Linux 5.3, but should be relevant to any RHEL clone with XFS support.) Partition the disk using fdisk; we want the standard Linux partition id of “83″, so no need to [...]

Extracting an RPM without installing it

01-Apr-09

If you want to inspect files in an RPM without installing it, use rpm2cpio piped to cpio: rpm2cpio file.rpm | cpio -id Note that this will create a (local) directory tree under which the extracted files will be placed. In other words, expect the files to be extracted under a newly created “usr” directory or [...]

Access control lists on Linux

15-Jan-09

To view ACLs on a file: > getfacl file.txt To modify the ACL on a file: > setfacl -m user:rwx file.txt To recursively change an ACL: > setfacl -R -m user:rwx . To modify the default ACL for a directory: > setfacl -d -m user:rwx. See the getfacl and setfacl man pages for more information.

Displaying Boot Messages on Ubuntu

06-Jan-09

To display Ubuntu boot messages one time, do the following: Press “e” while the GRUB screen to select a kernel version is displayed. Edit the kernel line, again by pressing “e”, to remove any references to “quiet” – it is generally at the end of the line, with “splash”. Edit the fifth line, below the [...]