Debian GNU/Linux Squeeze to Wheezy upgrade

Useful tips

How to print previous command?

497 find . -name '*.jpg' -and -size +2000k -exec cp -v {} ./final/ \;
767 h | grep find
770 h | grep find

To access Nth command without execution, add “:p” to !N.
$ !497:p
It would display

find . -name '*.jpg' -and -size +2000k -exec cp -v {} ./final/ \;

Then, to reload it on prompt, press Ctrl+p for command modification.

$ find . -name '*.jpg' -and -size +2000k -exec cp -v {} ./final/ \;

Apt-Pinning for Beginners It explains how to manage stable, testing, and unstable packages all together.

When downgrade or upgrade of package fails due to unmet dependency, the safe and simplest solution is to download package using .deb file. It has two steps:
locate and download the package file
dpkg -i package_name.deb

How to get rid of package list update error like “Failed to fetch …”?

When I install new package, the first thing is to update the package list. Sometimes aptitude or apt-get update creates weird errors. Here is one of them.
Failed to fetch 403 Forbidden [IP: 80]

Replace http to ftp in site name.

deb testing main contrib non-free
deb-src testing main contrib non-free

How to extract bz2 tarball?

Use xjf options:
$ tar xvjf compat-wireless-2012-03-12-p.tar.bz2
It will extract the tarball in current dirctory

How to find package version?

dpkg -l | grep package_name

How to find all groups of a user?
$ id user_name
$ id penguin
uid=1000(penguin) gid=1000(penguin) groups=1000(penguin),4(adm),5(tty),20(dialout),24(cdrom),25(floppy),30(dip),40(src),44(video),46(plugdev),108(netdev),109(bluetooth),114(scanner)

How to find all members of a group?
I found simple script on other site.
cat /etc/group | grep –regex “^audio:.*” | awk -F: ‘{print $4}’

Troubleshooting and system modification

Pulseaudio Flash sound bug

I’ve been experiencing sound issue on Flash video on Google Chrome since Pulseaudio installation.

I applied the following method and it worked out.

PULSE_SERVER= google-chrome &

$ more /etc/environment
# Pulseaudio Flash sound fix

Add two lines in /etc/profile
# Pulseaudio
. /etc/environment


Atheros Communications Inc. AR8161 Gigabit Ethernet
[Solved] built kernel modules from compat-wireless-2012-03-12-p

vlc with pulseaudio shows scratch sound.
I’ll check into this solution later.
Fedora 11: Complete guide to fix PulseAudio and video/audio VLC Media Player issues


Installed kexec and set up warm boot.

Installed bootlogd (2.88)

Added Caps lock function to Colemak keyboard layout.

Installed AMD Catalyst driver 12.6 for Xorg.

Replaced pulseaudio with alsa due to no sound issue after reboot.
The symptom was pulseaudio fails to recognize the sound card for audio output. It selected Dummy output. Is it misconfiguration of group access related to sound device files?

Reinstalled pulseaudio after removing alsa packages. pulseaudio has been running fine.
How to turn on and off auto mute? I use alsamixer to do it.

Everything works fine as of today.

One site triggers Java plug-in update to 1.7.5. I’ll update it when other sites recommend Java 1.7.5 too.


[Solved] The printer - HP LaserJet P1005 - stop printing.

The printer has been working fine through hplip package.
ii hplip 3.12.6-3 amd64 HP Linux Printing and Imaging System

Firmware upload makes the printer working again.

$ sudo hp-firmware

HP Linux Imaging and Printing System (ver. 3.12.6)
Firmware Download Utility ver. 2.4

Copyright (c) 2001-14 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Using device: hp:/usb/HP_LaserJet_P1005?serial=BB03QHK

[Solved] libreoffice shows broken menu and status bar.

Something was serious wrong when I started it. And it showed void menu bar which on top of the window. (Bug #666565)

It seems libcairo2 1.10.2-7 is only solution to fix it for now. 1.12.2-2 on testing, 1.18.x on unstable has the same problem – broken menu and status bar.

I followed the normal procedure to downgrade libcairo2 1.10.2-7, it failed due to unmet dependency both aptitude and apt-get unless I would remove hundreds packages.

I located libcairo2 1.10.2-7 ( because I installed libreoffice from squeeze-backports and has been using it almost a year.

I downloaded libcairo2_1.10.2-7~bpo60+1_amd64.deb from a mirror site, and installed it using dpkg.

$ sudo dpkg -i /home/penguin/Downloads/libcairo2_1.10.2-7~bpo60+1_amd64.deb
dpkg: warning: downgrading libcairo2:amd64 from 1.12.2-2 to 1.10.2-7~bpo60+1
(Reading database ... 167725 files and directories currently installed.)
Preparing to replace libcairo2:amd64 1.12.2-2 (using .../libcairo2_1.10.2-7~bpo60+1_amd64.deb) ...
Unpacking replacement libcairo2:amd64 ...
Setting up libcairo2:amd64 (1.10.2-7~bpo60+1) ...


[Solved] Vlc does not have GUI front end
apt-get install vlc

$ dpkg -l | grep vlc
ii libvlc5 1:2.0.3-dmo1
amd64 multimedia player and streamer library
rc libvlccore4 1.1.3-1squeeze6
amd64 base library for VLC and its modules
ii libvlccore5 1:2.0.3-dmo1
amd64 base library for VLC and its modules
rc vlc 1.1.3-1squeeze6
amd64 multimedia player and streamer
ii vlc-data 1:2.0.3-dmo1 all
Common data for VLC
ii vlc-nox 1:2.0.3-dmo1
amd64 multimedia player and streamer (without X support)
ii vlc-plugin-notify 1:2.0.3-dmo1
amd64 LibNotify plugin for VLC
ii vlc-plugin-pulse 1:2.0.3-dmo1
amd64 PulseAudio plugin for VLC

First letter -> desired package state ("selection state"):

u ... unknown
i ... install
r ... remove/deinstall
p ... purge (remove including config files)
h ... hold

Second letter -> current package state:

n ... not-installed
i ... installed
c ... config-files (only the config files are installed)
u ... unpacked
f ... half-configured (configuration failed for some reason)
h ... half-installed (installation failed for some reason)
w ... triggers-awaited (package is waiting for a trigger from another package)
t ... triggers-pending (package has been triggered)

The installer removed vlc and libvlccore4 apparently.

During boot right after fresh installation, network file system daemons would hang on. I removed NFS packages after log in rescue mode.

$ sudo apt-get --purge remove nfs-kernel-server nfs-common portmap

[Solved] sudo doesn’t work.

Add /usr/local/sbin, /usr/sbin, /sbin directories in PATH variable in /etc/profile as root.

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), …).

if [ "`id -u`" -eq 0 ]; then
export PATH

[Solved]suspend doesn’t work

Removing hal and hal-info packages as Debian Wiki didn’t solve it.

Turned on the debug mode of pm-utils by adding “export PM_DEBUG=true”
on /usr/lib/pm-utils/pm-functions file as below.

# vim:noexpandtab

# Default values go here. It is important to _not_ initialize some
# variables here. They are:
# for great debugging!
# __8/10/2012__
export PM_DEBUG=true

[ "${PM_DEBUG}" = "true" ] &

failed suspend traced back to 56nfs, which is the script file for Network File Services that I replicated while ago. I moved it to /etc/pm/ directory. Suspend works again.

$ more /var/log/pm-suspend.log
+ hook_ok /etc/pm/sleep.d/56nfs
+ local hook=56nfs
+ [ -f /var/run/pm-utils/pm-suspend/storage/disable_hook:56nfs ]
+ [ -f /var/run/pm-utils/pm-suspend/storage/disable_hook:nfs ]
+ [ -x /etc/pm/sleep.d/56nfs ]
+ return 0
+ /etc/pm/sleep.d/56nfs suspend suspend
/etc/pm/sleep.d/56nfs: 10: /etc/pm/sleep.d/56nfs: /etc/init.d/portmap: not found
/etc/pm/sleep.d/56nfs: 11: /etc/pm/sleep.d/56nfs: /etc/init.d/nfs-common: not found
+ local status=127
+ log
+ is_set true
+ return 0
+ local fmt=%s\n
+ [ = -n ]
+ printf %s\n

+ log -n /etc/pm/sleep.d/56nfs suspend suspend:
+ is_set true
+ return 0
+ local fmt=%s\n
+ [ -n = -n ]
+ fmt=%s
+ shift
+ printf %s /etc/pm/sleep.d/56nfs suspend suspend:
/etc/pm/sleep.d/56nfs suspend suspend: + hook_exit_status 127
+ log Returned exit code 127.
+ is_set true
+ return 0
+ local fmt=%s\n
+ [ Returned exit code 127. = -n ]
+ printf %s\n Returned exit code 127.
Returned exit code 127.
+ return 1
+ inhibit
+ echo
+ IFS=

+ IFS=

+ [ -a = reverse -a 55NetworkManager ]
+ [ ! ]
+ inhibited
+ [ -f /var/run/pm-utils/pm-suspend/storage/inhibit ]
+ break
+ IFS=

+ inhibited
+ [ -f /var/run/pm-utils/pm-suspend/storage/inhibit ]
+ return 1
+ date
+ log Fri Aug 10 19:34:48 KST 2012: Inhibit found, will not perform suspend
+ is_set true

56nfs script

# removed autofs

case $1 in
/etc/init.d/portmap stop
/etc/init.d/nfs-common stop
# /etc/init.d/./autofs stop
sleep 3
/etc/init.d/nfs-common restart
/etc/init.d/portmap start
/etc/init.d/portmap stop
/etc/init.d/nfs-common stop
sleep 3
/etc/init.d/nfs-common restart
/etc/init.d/portmap start

How to remove nfs kernel modules?
[solved 9/11/2012]

$ lsmod | grep nfs
nfs 312243 0
nfs_acl 12511 1 nfs
auth_rpcgss 37143 1 nfs
fscache 36739 1 nfs
lockd 67328 1 nfs
sunrpc 173671 4 lockd,auth_rpcgss,nfs_acl,nfs
penguin@theblue:/etc/pm$ mod
modinfo modprobe module-assistant
penguin@theblue:/etc/pm$ modinfo nfs
filename: /lib/modules/3.2.0-3-amd64/kernel/fs/nfs/nfs.ko
license: GPL
author: Olaf Kirch
depends: fscache,sunrpc,lockd,auth_rpcgss,nfs_acl
intree: Y
vermagic: 3.2.0-3-amd64 SMP mod_unload modversions
parm: callback_tcpport:portnr
parm: cache_getent:Path to the client cache upcall program (string)
parm: cache_getent_timeout:Timeout (in seconds) after which the cache upcall is assumed to have failed (ulong)
parm: enable_ino64:bool
parm: nfs4_disable_idmapping:Turn off NFSv4 idmapping when using 'sec=sys' (bool)

About janpenguin

Email: k2.mountain [at] gmail [dot] com Every content on the blog is made by Free and Open Source Software in GNU/Linux.
This entry was posted in GNU/Linux and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s