Wednesday, January 25, 2006

NFS errors...


# umount /var/cache/apt/archives
Cannot MOUNTPROG RPC: RPC: Port mapper failure - RPC: Unable to receive
umount: /var/cache/apt/archives: device is busy


and


# mount /var/cache/apt/archives
mount: RPC: Remote system error - Connection refused


Hmmm... the NFS daemon was not running on server.

I did this on the server:


/etc/init.d/portmap start
/etc/init.d/nfs-kernerl-server start


After I had done this I got:


# umount /var/cache/apt/archives
Cannot MOUNTPROG RPC: RPC: Program not registered


and


# mount /var/cache/apt/archives
mount: RPC: Program not registered


I had to add an entry to /etc/hosts.allow on the server like this:


ssh sshd : ALL@ALL : ALLOW
ALL : 127.0.0.1 LOCAL : ALLOW
portmap : 192.168.254.0/255.255.255.0 : allow


then...


# umount /var/cache/apt/archives
umount: /var/cache/apt/archives: not mounted


YAY! got it!


# mount -v /var/cache/apt/archives
mount: uaine:/var/cache/apt/archives failed, reason given by server: Permission denied


Whoops! I had the wrong directory on the server in the /etc/fstab on the client machine...


# vi /etc/fstab
# mount -v /var/cache/apt/archives
uaine:/mnt/hda1/var/cache/apt/archives on /var/cache/apt/archives type nfs (rw,addr=192.168.254.6)



# mount
...
uaine:/mnt/hda1/var/cache/apt/archives on /var/cache/apt/archives type nfs (rw,addr=192.168.254.6)


All sorted :o)

Tuesday, January 17, 2006

Files with spaces in their names...

If you want to process the output of find and some files have spaces in their names, you don't need to use double quotes...

find has the -print0 switch and xargs has the -0 (or --null) switch.


find . -type f -print0 | xargs -0 ls -l

Monday, January 09, 2006

Debian public key expired...


Reading package lists... Done
W: GPG error: http://ftp.uk.debian.org testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F
W: You may want to run apt-get update to correct these problems


and something like this:


10 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B/14.7MB of archives.
After unpacking 557kB of additional disk space will be used.
Do you want to continue [Y/n]?
WARNING: The following packages cannot be authenticated!
  apt apt-utils libgimp2.0 gimp-svg gimp gimp-data
Install these packages without verification [y/N]?
E: Some packages could not be authenticated


This page explains it:

http://secure-testing-master.debian.net/

And this year (2006) while the link on the secure-testing page is still out of date, you can fix it with this:


gpg --keyserver subkeys.pgp.net --recv-keys 084750FC01A6D388A643D869010908312D230C5F
gpg --export 084750FC01A6D388A643D869010908312D230C5F | sudo apt-key add -


(thanks to #debian irc channel on freenode.net)

NB1: This will only work this year (2006) - because next year's key signiture will be different.

NB2: This has the side effect of adding the public key to root's keyring which you can see with:


gpg --list-keys


which gives:


pub   1024D/2D230C5F 2006-01-03 [expires: 2007-02-07]
uid                  Debian Archive Automatic Signing Key (2006)


You may want to remove it from there once you've imported it into apt, you can do this with:


gpg --delete-key 2D230C5F