Chroot to repair grub2

The easiest technicque I've found for repairing a grub2 configuration is to boot from another *nix, chroot to the system you want to repair, and run update-grub. Here's how:

0. Prerequisites: The installed system is, or has been working. Or maybe you restored it from tar or cloned another system over ssh via rsync. The /etc/fstab file is correct for the system you want to boot. For simplicity, we'll assume that root=/dev/sda1 and that /boot is not on a seperate partition.

1. Boot (from Ubuntu into Live/Try Ubuntu mode, or from RHEL/Centos into Rescue mode). Launch a Terminal.

Move postgres cluster on RHEL

There wasn't a recipe for this online, here's what I found to do:


# su - postgres
$ pg_dumpall >cluster.dump
$ exit

At this point you have a full backup and the database service has been stopped.

# mkdir /newcluster
# usermod -d /newcluster -m postgres
# cd /newcluster
# vi .bash_profile (edit PGDATA line to /newcluster/data)
# echo PGDATA=/newcluster/data > /etc/init.d/sysconfig/postgresql
# su - postgres
$ (look in data folder, save any config files you might want, if you've customized pg_hba.conf, for example)
$ rm -rf data
$ initdb /newcluster/data

raspi-config locked me out and how I got back

Using the official Raspbian "wheezy" image from the downloads page, I encounter the following issue:

1. The image uses the GB english keyboard layout by default.
2. The raspi-config utility has you change the "pi" user password before setting the locale.
3. The password I chose uses the @ symbol, above the numeral "2" on my US keyboard, which is the £ character on an english keyboard.

Raspian Install

Raspian image went on to SD card easily. Then these instructions helped me resize the filesystem.

http://elinux.org/RPi_Resize_Flash_Partitions#Manually_resizing_the_SD_c...

Links:
http://www.raspberrypi.org
http://www.raspbian.org

bash: read a file

I can never remember how to do this, but it's essential when you want to process a file line by line. Usually I want to do this when my input terms contain internal spaces or other characters that that break words.

The trick is to use read

$ while read X; do
    something_to "$X"
done < input_file

Yahoo Small Business vs. Yahoo

My work uses Yahoo Small Business. They give you an email & password, where the email address uses the business domain name:

janie.jones@clash.com

When you log in, however, you're told that you must log in with a regular Yahoo ID. If you use your personal ID, as many here did, they cannot be unlinked without deleting the business email account and any saved mail.

How to unlink:
1. Set up an IMAP client to read the Yahoo business mail.
2. Faithfully create any folder structure in your Local Folders.
3. Copy all your saved mail from the server into the Local Folders.

Vanity Press

Oh, do not ask, "What is it?"

Let us go and make our visit.
In the room the women come and go
Talking of Michelangelo.

Syndicate content