Friday, October 23, 2009

firefox download flash

do a about:cache?device=disk and search for the URL or filename


many thanks to
http://labnol.blogspot.com/2005/11/save-flash-from-firefox-and-ie.html

Wednesday, October 21, 2009

MYSQL grant REMEBER 'user'@'server'

REMEMBER THIS:
grant all on DB1 to 'user'@'localhost' identified by 'password';

putty connect to session instead of server from command line

to make putty connect to session (based on the name of the session) instead of server from command line DO:

putty @SESSION_NAME

putty default font permanent

To change the default font in putty change the font settings in the Default Settings in the main window

Thursday, October 15, 2009

linux upgrade problem

If you get something like "there are multiple partitions labelled /, they must be unique" simply use remove the label by:

tune2fs /dev/sda2 -L ''

# HOORAY

Sunday, October 11, 2009

error reading information on service keytable: No such file or directory

if you get
error reading information on service keytable: No such file or directory
error: %trigger(kbd-1.08-10.2.i386) scriptlet failed, exit status 1

rpm -e kbd-1.08-10.2 --noscripts

Grub set default boot option just once

echo "savedefault --default=1 --once" | grub --batch
reboot

Remote upgrade linux RHEL redhat 3 to 4

1. mount the installation cd and copy vmlinuz and initrd.img to /boot renaming them to vmlinuz_remote and initrd_remote.img
2. vi /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux AS (2.4.21-15.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-15.EL ro root=LABEL=/
initrd /initrd-2.4.21-15.EL.img
title Remote Install
root (hd0,0)
kernel /vmlinuz_remote ks=hd:hda1:/ks.cfg vnc vncconnect=192.168.162.1 ramdisk_size=8192
initrd /initrd_remote.img

replace the above devices with the ones on your system(hd:hda1->points to /boot)
3. vi /boot/ks.cfg
#System language
lang en_US
#Language modules to install
langsupport --default=en_US
#System keyboard
keyboard us
#System mouse
mouse generic3ps/2
#network
network --bootproto static --ip 192.168.162.129 --netmask 255.255.255.0 --gateway 192.168.162.1 --nameserver 192.168.162.1 --hostname l
#Use interactive kickstart installation method
interactive
#Use hard drive installation media USE YOUR OWN HARDDRIVE
harddrive --dir=/iso --partition=hda2 #replace with your own device (this points to /)
bootloader --location=mbr
#Reboot after installation
reboot
#Upgrade existing installation
upgrade
%pre

#!/bin/sh

mkdir /tmp/boot # create mount point
#-USE YOUR OWN HARDDRIVE ADDR
# mount filesystem on /dev/sda1 onto /tmp/boot (hiding mount's boot dir)
# /dev/hda1 point to /boot
mount -t ext3 /dev/hda1 /tmp/boot
# so below here /tmp/boot/... is actually /boot/... on harddrive device
# 'date' preserves original grub.conf through multiple boot attempts
cp /tmp/boot/grub/grub.conf /tmp/boot/grub/grub.conf.$(date"+%Y%m%d-%H%M%S")
cp /tmp/boot/grub/grub.conf /tmp/boot/grub/grub.sve
cp /tmp/boot/grub/grub.bak /tmp/boot/grub/grub.conf

4. put your CD or DVD iso in /iso, they can be multiple isos

5. just to be safe try loading the second option to grub you just added once as below, so if things went wrong you can come back

echo "savedefault --default=1 --once" | grub --batch
reboot

Saturday, October 10, 2009

Linux YP NIS config with autofs

1. mkdir /data/user10

2. useradd -g users -d /data/user10 user10

3. vi /etc/auto.master
# add this
/data auto.data --ghost

4. vi /etc/auto.data
* /data/& #something like this

5. vi /var/yp/Makefile
make an auto.data entry just like auto.home

6. do a make in var/yp

7. on the client service autofs restart