Saturday, July 26, 2008

fixing apt-get upgrade issues

apt-get install -f
dpkg -i --force-overwrite /var/cache/apt/archives/whatever.deb

crash during apt-get dist-upgrade how to recover

My nieces were playing (penguin racer i think) on my ppc running debian while it was being upgraded and the machine froze. After turning off I could not reboot into the system.

What to do? I downloaded a ubuntu live ppc disc and I booted into it.

Then I ran a root shell and did
mounted the /dev/hda4 partition which was my root partition.
mount /dev/hda4 /mnt

chroot /mnt /bin/bash
mount -a
then i still needed to set up a proc directory
so I did
mount -t proc proc /proc
then i did
ifup eth0
and then i did
apt-get update
apt-get upgrade
apt-get install -f
and I was able to reboot into the system!!

Yay for debian!

Wednesday, July 23, 2008

lvm how to cool

2) drive 2 setup as lvm!

fdisk /dev/sda
(use full disk) setup /dev/sda1 type 8e
pvcreate /dev/sda1
sets up the drive to be a physical volume
vgcreate lvm-vol /dev/sda1
sets up the volume group on the drive(s)
(could do vgcreate lvm-vol /dev/sda1 /dev/sdb1)
lvcreate -n 2005-big1 --size 221g lvm-vol
mkfs.ext3 /dev/lvm-vol/2005-big1

lvcreate -n 2005-big0 --size 221g lvm-vol
mkfs.ext3 /dev/lvm-vol/2005-big0

a) mount on machine
b) copy data to two partions

now can mount them all in raid-mount-script

how to do adjust and expand size of a partitions

what can do to find out:


How to expand?

umount /dev/lvm-vol/2005-big0
lvextend -L+100g /dev/lvm-vol/2005-big0
e2fsck -f /dev/lvm-vol/2005-big0
resize2fs /dev/lvm-vol/2005-big0

now we are expanded

Other commands?

lvremove kills contents
lvrename to renam
lvreduce make smaller
lvextend to make bigger

/etc/lvm/archive has list of commands performed on my machine!

How to move a volume group to another machine?
(call the volume group lvm1 say)
1) unmount file system say we have ie the logical volume 2006-data on the volume group lvm1
umount /dev/lvm1/2006-data

2) mark volume group inactive
vgchange -an lvm1

3) export from old system
vgexport lvm1

4) plug into new computer

5) pvscan to identify it

6) vgimport lvm1

7) mount /dev/lvm1/2006-data /mnt

You forgot to export from old system?
Then you try vgimport and get an error message

"Volume group "lvm1" is not exported"
??? what to do????

vgchange -ay lvm1
will activate the volume even though was not exported

vgscan will identify that it exists:
will indicate

--- Logical volume ---
LV Name /dev/lvm1/2006-big0
VG Name lvm1
LV UUID BZCkFH-MjH1-LS5r-giPN-g4GF-yiat-wCGtaC
LV Write Access read/write
LV Status available
# open 0
LV Size 359.00 GB
Current LE 91904

Now you can mount it
mount /dev/lvm1/2006-big0 /home/big0
and you are done.

? how to automatically mount it on the machine.

1. Problem just putting it in the /etc/fstab
it seems not to find it if I just put
/dev/lvm1/2006-big0 /mnt ext3
in the /etc/fstab
I get a hang during boot up.
2. Howrver this works: Create a perl boot script
that does
system("mount /dev/lvm1/2006-big0 /mnt");
runs fine;

? why does the output of the command look like
df -h
/dev/mapper/lvm1-2006--big0 354G 348G 5.8G 99% /mnt

when I did mount /dev/lvm1/2006-big0 /mnt?
what is meaning of /dev/mapper
what is meaning of the extra "-" dashes in the /dev/mapper/ name???

now what to put in the /etc/fstab to get it all to work???

Best sources:

Tuesday, July 15, 2008

software update for etch

i need to look at the changes for etch



need to make sure that the database is working before running script

debian useful reference

free dynamic dns services

Free Dynamic dns services or

Thursday, July 10, 2008

centricty log files

type platinum\service\logs\CentricyWS-Audit-log.xml|find "changed"
and look for changed to dictated

may have to look at the ones with log.xml.1 amd log.xml.2 and find the cases.

irritating. need perl script to parse log file better.

automating script to do rsync to another machine

You need to set up ssh without offering a passphrase. How to do this?

go to the

source machine

ssh-keygen -t rsa

accept the default location .ssh/id_rsa and .ssh/
then do (empty passphrase)

and now you can use the generated file .ssh/

scp .ssh/

(of course we are coming from only one preimage, otherwise just add line to authorized_keys

Friday, July 4, 2008

wireless issue on debian powerpc

i started to have difficulty on reboot of power macbook on debian and wireless about b43-cutter
so I updated all including kernel to linux-image-2.6.25 (i had trouble with sbcl kernel bug due
to lack of flag siet up)

so what to do about bcm43 cutter issue in broadcome

so i installed latest b43-fwcutte and I ran

i still get error

loading firmware version 351.126 (2006-07-29 05:54:02)
b43-phy0 warning you are using an old firmware image. support for old firmeware will be removed july 2000.
go to
and download latest firmware (version 4)