Archive for 22 febrero 2014

Upgrading Debian Unstable system at 22th Feb 2014

febrero 22, 2014

I am going to upgrade my Debian Unstable system. First of all I am going to check my sources.list and my sources.list.d directory.

I’ve seen this entry:

# Needed for oyranos Check preferences
deb http://ftp.de.debian.org/debian squeeze main

which I am going to remove because I’m not using oyranos as a colour management system.

I am going to leave:

deb http://www.deb-multimedia.org sid main non-free

although I suspect that it’s the reason why I cannot install pidgin without uninstall kvirc.

I’m also going to disable some old stuff that I supposedly do not use:

# No need for apple-bl-gmux because Linux 3.10 includes it
deb http://ppa.launchpad.net/sforshee/apple-bl-gmux/ubuntu precise main
# Another colour management tool that I do not use
deb http://download.opensuse.org/repositories/multimedia:color_management/xUbuntu_13.04/ /
# This repo let me install an Orange 3G pendrive even if the repo is for Movistar
deb http://www.tgcm.es/repo/ubuntu stable main
# Oyranos repository
deb http://download.opensuse.org/repositories/multimedia:color_management/Debian_6.0/ /
# I bet this is for trying to do some hibernating in my mac without loosing my mind
deb http://ppa.launchpad.net/thomas.tsai/ubuntu-tuxboot/ubuntu precise main
deb-src http://ppa.launchpad.net/thomas.tsai/ubuntu-tuxboot/ubuntu precise main

So that’s it. Let’s update and upgrade. I use it inside byobu so that if ever Xorg system gets wrong it continues to run.

apt-get update
apt-get dist-upgrade

Now I’m getting this error:

Se encontraron errores al procesar:
 /var/cache/apt/archives/python-mysql.connector_1.1.5-1_all.deb
Error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.PermissionsInvalid: The permission of the setuid helper is not correct
E: Sub-process /usr/bin/dpkg returned an error code (1)

I’m going to run apt-get install -f and if it fails again I will remove that package for installing it later.

Well, actually the problem is about not having free space. I will run apt-get clean right now just after running apt-get install -f. And then I will re-run apt-get install -f. I always tell myself to remove libreoffice packages before updating but I sometimes forget about it.

Finally I remove some packages I do not need:

syncevolution
jack-audio-connection-kit

and I remove local packages to make some free space in root partition:

apt-get clean

.

After updating my system I have had to remove special windows settings for KVirc because I was not seeing it when it was setup to be found in all of the desktops. I will need to add that special settings again and see if it’s a configuration version problem or if it’s KWin window special settings which are faulty.

Cloning Debian system in extra partition before update

febrero 21, 2014

My system among others has a home partition, a main Debian system and an extra Debian system. My extra Debian system is for saving current Debian Unstable just before updates or upgrades. That’s what I’m going to describe here.

So my current partition is sda4. The Debian clone partition is /dev/sda6.

The overall process is:

  • Copy system data
  • Change fstab to reflect new partition as root partition
  • Update grub

I do not install grub from Debian clone partition because I’m updating the current system and not the clone one.

In order to copy system data I need to mount the current system in a special directory so that only the sda4 partition is seen and not all of the partitions mounted in it (we do not want to copy /home).

mkdir /mnt/origen ; mount -o bind / /mnt/origen

We also need to mount the destination partition

mkdir /mnt/destino ; mount -t ext4 /dev/sda6 /mnt/destino

Now we are going to do a live copy. I’m not stopping any services because I personally do not use any of them. If this was a production server you would need to run the commands twice making sure the last time you run it you stop all the services you want to preserve previously.

rsync -aHK --delete --delete-during /mnt/origen/ /mnt/destino/

This is the most efficient way of copying the files because if the files are the same ones they are not copied… although I think Rsync in local copies does not help too much because usually all the destination file has to be read to decide to overwrite it or not. But I’m not quite sure. Anyway… let’s continue.

Now we are going to edit fstab and reinstall grub

mount -o bind /dev /mnt/destino/dev
mount -o bind /proc /mnt/destino/proc
mount -o bind /sys /mnt/destino/sys
chroot /mnt/destino/
vim /etc/fstab

Now inside fstab I’m going to replace:

/dev/sda4 /               ext4    errors=remount-ro 0       1

with:

/dev/sda6 /               ext4    errors=remount-ro 0       1

and save the file. You might probably want to use LABELs or UUIDs instead of me.

Once we have saved it we are going to update grub:

update-grub

Now we just need to exit from chroot and umount all the partitions and folders.

exit
umount /mnt/destino/proc
umount /mnt/destino/sys
umount /mnt/destino/dev
umount /mnt/destino
umount /mnt/origen

So that’s it! If you boot your system with Super Grub2 Disk or another tool you will be able to load your grub.cfg and boot this SDA6 system without too much effort.

Now I’m ready to upgrade or update my Debian Unstable system in sda4 without fear for loosing my daily functionality because it has been cloned in sda6.