A friend contacted me with a problem booting into Windows. I asked him to boot into Ubuntu and this is what we found. Gparted reported the disk as ‘unallocated’ and ‘Cannot have overlapping partitions’ an ‘fdisk -l’ told me ‘Partition table entries are not in disk order’. The NTFS partition for Windows could not be… Read more »
Posts By: jonny
Using Sed to convert Mac Address
I have output from a router (but I believe modem output may be similar) with mac addresses in the format: 0050.56AC.4022 Four digit blocks separated by dots but I needed it in the format of 2 digit blocks separated by colons. My router output was lines like this: INTERNET 123.111.123.111 8 0050.56AC.1765 ARPA VLAN.1.16… Read more »
Install PEAR modules on CentOS
Pear is used to fetch and install additional PHP packages from the Pear project. To use on CentOS first install Pear so we can run the pear binary: yum install php-pear Now pear is installed we can install the Net_MAC package – which can be used to discover the manufacturer from a Mac address: Example… Read more »
Windows Permissions
After restoring files from a backup on Windows 2008 I was receiving the message: “unable to display current owner”. To recursively change the owner on the folders right-click on the Command Prompt and choose “Run as Administrator” then use the command: takeown /f “c:\folder\subfolder” /r I also had to use the icacls command to actually… Read more »
Windows 7 ATI Mobility Radeon 1600
So my laptop graphics card is legacy! And on a Windows 7 install the graphics were poor – not sure whether to blame AMD or Microsoft because it was all very smooth under Ubuntu 12.04. Anyway to allow the install of Vista drivers the Mobility Modder needs to be used on the drivers first. After… Read more »
BIND Convert Slave Raw Format
In Bind v9.9.0 the default option for zone file format on a slave is a raw binary format. For troubleshooting these can be converted back to text using named-compilezone. An example is shown below: /usr/sbin/named-compilezone -f raw -F text -o /tmp/zone.domainname.co.uk domainname.co.uk /var/named/data/zone.domainname.co.uk Then the contents of the tmp file can be viewed: cat /tmp/zone.domainname.co.uk… Read more »
ProFTPd CentOS 6: PAM unable to dlopen /lib64/security/pam_stack.so
Installed ProFTPd on CentOS 6 and found that users could not log in. The proftpd logs showed: USER jonny (Login failed): Incorrect password. The /var/log/secure log showed: proftpd: PAM unable to dlopen(/lib64/security/pam_stack.so): /lib64/security/pam_stack.so: cannot open shared object file: No such file or directory The solution is to replace the /etc/pam.d/proftpd file with the following (as… Read more »
WordPress Galleries
The quick way to add Galleries to WordPress is illustrated below: First create a new Page (with the Gallery page as a parent if necessary) Click the Upload/Insert icon above the WYSIWYG editor Click the ‘Select Files’ button and locate the images on your computer Once the images have uploaded you may click the ‘Show’… Read more »
Web Screenshots with Xvfb and Khtml2Png2
To get that headless Linux server capturing screenshots of web pages we need: Xvfb e.g. apt-get install xvfb Khtml2png2 (and dependencies) After installation of the above the steps are below and I wrapped it up into a PHP script which also did some database tasks to keep records of the screenshots. 1.Check if the Xvfb… Read more »
Beginning PostgreSQL
As a MySQL user for a number of years I needed a translation tutorial from MySQL to PostgreSQL. So to get started on CentOS: Installation yum install postgresql-server If you also want the phpPgAdmin WUI: yum install phpPgAdmin php-pgsql httpd Create the configuration file and initialise the database: cp /usr/share/pgsql/postgresql.conf.sample /var/lib/pgsql/data/postgresql.conf /etc/init.d/postgresql initdb Make changes… Read more »