FreeBSD move onto PKGNG

I just upgrade my FreeBSD and using PKGNG instead, as old pkg_add is currently marked obsolete.

Ref
pkgng – best thing since sliced bread!

pkgng: First look at FreeBSD’s new package manager

After these steps, run pkg update.

Report following packages conflicts with newers.

after that, pkg update should work.

Reboot.
following 2 libs reported missing:
libgcrypt.so.18 and libpcre.so.1

New system fonts display seems not good,  anti-sawtooth font’s option cannot be enabled.
it should be owned by the auto dependency installed wqy fonts.
problem is involved by a wrong-configured fonts.conf, which applied to all fonts size<17

W/R:
Edit: /usr/local/etc/fonts/conf.avail/85-wqy.conf

replace 16 with 8, or just remove the 85-wqy.conf file.

解决FreeBSD/DragonFlyBSD字体抗锯齿设置无效的问题
X下antialias设置对所有字号小于17的字体均不生效

xarchiver shows empty on zipfile

It’s a stranger issue on my box fc15.

##xarchiver-0.5.2-13.fc15.i686

Xarchiver to show zip/bz2/tar/rar… files correctly but not function for long time on zip.

when Xarchiver opens zipfile, it showed empty window, but it can correctly extract files.

I tried re-install Xarchiver rpm or re-compile from src. it still not working.

[Root cause]
it’s the problem of zip version

[suse@suse ~]$which zip
/u01/app/oracle/product/11.2.0/db_1/bin/zip

well I installed 11.2 db on this box that’s why zip directs to a wrong path. xarchiver only choose binary from $PATH, not hard coding..

## PATH=$ORACLE_HOME/bin:$PATH; export PATH

to solve, put /usr/bin/zip before the $ORACLE_HOME/bin

it’s not always a good practice to put $ORACLE_HOME/bin in $PATH……

Opensuse 13.1 installation on Thinkpad T430

[Installation:]
1. using opensuse 13.1 image from http://www.opensuse.org
openSUSE-13.1-DVD-x86_64.iso

2. format iso to bootable, ignore the warnings.

# isohybrid openSUSE-13.1-DVD-x86_64.iso
Warning: more than 1024 cylinders (4361).
Not all BIOSes will be able to boot this device.

3. write image to the flash-disk.

# cat openSUSE-13.1-DVD-x86_64.iso > /dev/sdb

4. using the flashdisk to boot T430, cleanup current partition tab, taking up full disk.

Done.

Recovery from “rm -rf /bin”

Just hit such a case, mis drop the folder “/bin”.

Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Linux 2.6.32-100.37.1.el5uek

os still work. just /bin/ tools no longer functioning, no new access as “/bin/bash” not available.

#Solution.

Now what can be used: scp, vim .. and others in /usr/bin/

Lucky, to find a similar configured box, which should be the same packages version level or lower.

Im using :coreutils-5.97-23.el5
tried to find a box using :coreutils-5.97-23.el5_4.2

##
[root@box09 bin]# scp -r ractest@box06:/bin/ /

##
the bins with a bit lower version works fine within current os, as current platform libs provide a compatible runtime.
to solve the problem completely, run #yum update/reinstall to replace all binaries.

Regards,
-suse

Configure Xendump for Oracle EL Linux 5.9 xen guest

this post also works for Redhat EL5 compatible.

My Configuration:

Host: testbox       2.6.18-128.2.1.4.37.el5xen  EL5.7
Gust: testbox-vm1   2.6.18-348.el5              EL5.9

Steps:

   1. on Host, enable dumps and restart xend service.

[root@testbox xen]# vi /etc/xen/xend-config.sxp
enable dump:
  (enable-dump yes)

restart xend service:
[root@testbox xen]# service xend restart

As the root part on my box doesnt have enough space(2G+) for crash cores. using following link

[root@testbox 21_testbox-vm1]# rm -fr /var/xen/dump/
[root@testbox 21_testbox-vm1]# ln -s /var/ovs/mount/CC94A2F6CC2A4FD2957BB3FE6B6BA694/suse /var/xen/dump

 

   2. change vm1 guest cfg file.
[root@testbox running_pool]# pwd
/var/ovs/mount/CC94A2F6CC2A4FD2957BB3FE6B6BA694/running_pool

[root@testbox running_pool]# cd 21_testbox-vm1/
[root@testbox 21_testbox-vm1]# vi vm.cfg
enable:
on_crash = ‘coredump-restart’     
on_reboot = ‘restart’

shutdown vm using cmd: (If the box is not yet created, no need to shutdown, just create a new.)
xm shutdown 21_testbox-vm1
restart vm using new cfg:
xm create  21_testbox-vm1 -f ./vm.cfg


3. inside vm1.

enable sysrq:

kernel.panic_on_oops=1
kernel.panic=1
kernel.sysrq = 1

       choosing RH compatible kernel, instead of the UEK kernel for dumps.
--OEL5 UEK kernel not working well with xendump service.

[root@testbox-vm1 ~]#  vi /etc/grub.conf
default=1    <– the # of RH kernel

We are now using kernel:
kernel-2.6.18-348.el5
Install following RPMs for further cases:

kernel-debuginfo-2.6.18-348.el5
kernel-xen-2.6.18-348.el5
kernel-debuginfo-common-2.6.18-348.el5


reboot the guest, root access and issue:
[root@testbox-vm1 ~]# echo c >/proc/sysrq-trigger

a new core was generated in Host:

[root@testbox dump]# pwd
/var/xen/dump
[root@testbox dump]# ls
2014-0219-0905.44-21_testbox-vm1.49.core

 

4. how to analyze the core.

scp the core into testbox-vm1. for example:
(there should be some other ways to share files between guest/host, like via NFS)

[root@testbox-vm1 0013]# pwd
/var/crash/0013
[root@testbox-vm1 0013]# ls
2014-0219-0905.44-21_testbox-vm1.49.core

        issue crash utility:

 

[Test:]

[suse@suse ~]$ssh root@testbox-vm1
[root@testbox-vm1 ~]# echo c >/proc/sysrq-trigger

a new core (sizeof 2G, memsize of the guest vm1) is generated in testbox:/var/xen/dump

[Reference:]
How to enable automatic core dumps of xen guests?
Core dump Xen domU/guests