May 142016
 

I just finished a major heart surgery on my laptop. Many thanks to the guys who made some youtube tutorials about taking that laptop apart! The Acer E5-571G is definitely NOT built to be taken (apart) lightly (Here is the german tutorial that I was following, and here is an english one).

After swapping out the 2x 4G memory modules for 2x 8G ones, and the 1TB laptop hard disk drive for a 1TB SSD disk, and putting everything back together, the real fun began.

  • install the old harddisk in an external USB3.0 harddisk enclosure (the drive was still good after all)
  • boot from a Windows 10 installer
  • partition the disk and install Windows 10 in about half of the available space
  • the usual windows installation hijinx: install a driver, reboot, repeat ad nauseam
  • when windows is about done with the initial installation stuff, plug in the old harddisk on USB3.0 and copy the data from your old user account to your new

Then the linux fun begins, but be aware that this method will only work if the existing linux installation on the old disk was based on a LVM setup!

  • boot from openSUSE 13.2 installer DVD, but boot into rescue mode!
  • partition the unused space on the new disk as follows:
    • 250MB /boot
    • one LVM physical volume from the remaining space, but do not create the actual PV yet
  • plug in the old disk again
  • mount the /boot partition from the old system somewhere
  • create ext4 filesystem on the new /boot partition, and mount it somewhere
  • rsync the content of the old /boot to the new one
  • unmount the old and new /boot partitions
  • check that you can see and access your old logical volumes via the usb3 connection to your old disk (lvs, lvdisplay, vgs, vgdisplay, pvs, pvdisplay)
  • now create a PV on the new partition that you created a few steps ago
  • add that PV to the volumegroup on your old disk
  • move all used extents away from the old disk with pvmove
  • once this is done you can remove the pv that is located on the old disk, unplug the disk and use it for something else.
  • make sure the /boot partition on the new disk is not mounted
  • mount your root volume to /mnt
  • prepare your mounted root for chroot
    mount -o bind /dev /mnt/dev
    mount -o bind /sys /mnt/sys
    mount -o bind /proc /mnt/proc
  • Change into your installed system with chroot
    chroot /mnt /bin/bash --login
  • Edit /etc/fstab, make sure all references to mounted filesystems are correct (partition label/identifer for the EFI partition, UUID for /boot, etc)
  • regenerate the initrd with mkinitrd
  • recreate the grub2 configuration with grub2-mkconfig
  • reboot, enter the BIOS setup, go to the UEFI boot settings and make sure the boot order is correct and secure boot is OFF.
  • the next reboot should get you into a working GRUB2 that lets you boot linux but not windows, so boot linux, start yast2 and reinstall the grub bootloader again from there.

That’s it folks!

Nov 232014
 

I’ve done it again… a live upgrade from openSUSE 13.1 to 13.2.

I’ve been following the usual process that I’ve outlined in a few posts so far, and it went pretty smoothly on three different computers.

The actual process has evolved into this:

  1. run this script (after editing to fix the version numbers):
    #!/bin/bash
    old=13.1
    new=13.2
    repodir=/etc/zypp/repos.d
    newrepodir=/etc/zypp/repos.d_${new}
    
    mkdir -p ${newrepodir}
    cd ${repodir}
    for repofile in *repo; do
    {
        echo -n converting ${repofile} to ${newrepodir}/$(echo ${repofile}|sed -e "s/${old}/${new}/g") ... ;
        cat "${repofile}" | sed -e "s/${old}/${new}/g" > "${newrepodir}/$(echo ${repofile}|sed -e "s/${old}/${new}/g")" ;
        echo done.
    }
    done;
  2. move /etc/zypp/repos.d out of the way, for example rename it to /etc/zypp/repos.d_old
  3. move /etc/zypp/repos.d_13.2 to /etc/zypp/repos.d
  4. clean zyppers cache:
    zypper cc --all
  5. refresh zypper:
    zypper ref

    When you do this, you might get errors for some repositories because they don’t exist yet for 13.2. To disable them, do this:

    zypper mr -d -R 

    On the other hand you might want to investigate if there are 13.2 versions of those repositories, and edit the repo files accordingly.
    Then, repeat the zypper ref command.

  6. Once you can run through zypper ref without errors, get updated versions of zypper, libzypp and rpm, and install them:
    zypper up --download only zypper libzypp rpm
    zypper up zypper libzypp rpm
  7. Once that finished without errors, do the same two commands for the whole distribution (Pay attention to any warnings and/or conflicts here. You’ll have to make the right choices about what should be done to resolve them, and I can’t really give you a recipe):
    zypper dup -l --download only
    zypper dup -l
  8. After all is done you can reboot. The first reboot should lead into textmode in case you have to re-install/upgrade your nvidia or AMD binary drivers. To boot into text mode, append this kernel parameter:
    systemd.unit=multi-user.target

Have a lot of fun!

May 312014
 

In my never ending story for single sign on on KDE4 the last post I had was this one.

There was just one little problem with that method: It stopped working when KDE 4.13 came around…

Now there is a new candidate for solving this, and it works just fine so far.

At this point all I can say is that anyone interested should read this blog post, and that the pam_kwallet package in my OBS project has been updated to the code in that post.

Have a lot of fun!

Oct 262013
 

…at least with KDE4 on openSUSE 12.2.

In a previous post I mentioned that there are single-sign-on methods available for KDE to open the wallet right on login, but they do not work when you’re using NIS accounts.

Turns out they do work after all, you just need make sure that the references to the pam_kwallet module is after pam_unix2.so in common-auth, like this:

#%PAM-1.0
#
# This file is autogenerated by pam-config. All changes
# will be overwritten.
#
# Authentication-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
# traditional Unix authentication mechanisms.
#
auth required pam_env.so
auth required pam_unix2.so
auth optional pam_kwalletopener.so use_first_pass
auth optional pam_gnome_keyring.so

After this, you just add the two modules pam_dbus_launch and pam_kwallet in common-session like this (pam_dbus_launch needs to be before pam_systemd, and pam_kwallet at the end):

#%PAM-1.0
#
# This file is autogenerated by pam-config. All changes
# will be overwritten.
#
# Session-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define tasks to be performed
# at the start and end of sessions of *any* kind (both interactive and
# non-interactive
#
session required        pam_limits.so
session required        pam_unix2.so
session optional        pam_umask.so
session optional        pam_dbus_launch.so dbus-launch=/usr/bin/dbus-launch
session optional        pam_systemd.so
session optional        pam_kwalletopener.so    maxwait=60 session_timeout=360 localwallet start_daemon kwalletopener=/usr/bin/kwalletopener
session optional        pam_gnome_keyring.so    auto_start only_if=gdm,gdm-password,lxdm,lightdm

With these settings the pam modules work with any kind of useraccounts. Keep in mind that it will not work for automated logins where the system doesn’t actually prompt for a password.

The required pam modules can be installed from this OBS project.

Sep 212013
 

As anyone who has attended a RH124 or higher class, or has any experience in Unix/Linux knows, we usually set the system to assume that the local clock runs in UTC. This gives us the advantage that the correction for daylight savings time (DST) gets applied automatically.

The problem with that is that on a dual boot system, Windows automatically assumes that the local clock runs in the local time zone, which messes things up.

The solution is one quick registry hack away:

Start Windows, open regedit, and add a 32bit DWORD in this location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal=1

That’s all there is to it.

Really.

Original source (in German) is here.

Mar 072013
 

As part of my job a senior Linux systems engineer and freelance consultant, I am often asked to do staff training on various Unix and linux related topics. One such training is “UNIX and Linux – an introduction”, a 2-day intensive course which I developed.

The content is aimed individuals who are familiar with Windows back-office operations.

Click on the Slideshare link to access a read-only copy of the presentation.

Jan 032013
 

If you notice that your ssh agent and/or gpg agent aren’t running after logging in to KDE4 on openSUSE, and you just upgraded your KDE from the KDE:Release:49 buildservice repository, there is a simple fix.

Run this command as root:

ln -sf /etc/X11/xdm/Xsession /usr/share/kde4/config/kdm/Xsession

That will do it. By the way, the bug report for this bug is here. Please add your 2 cents worth if you are hit by it.

Dec 242012
 

If you are working with TGA images a lot, you might have seen the bug where KDE apps like Gwenview can’t open them and give you a weird message about being unable to read metadata.

This is a bug in qt. KDE4 brings its own image readers for TGA, but only uses them when the qt ones are not available. So let’s delete them (as root, of course):

rm /usr/lib/debug/usr/lib64/qt4/plugins/imageformats/libqtga.so.debug
rm /usr/lib/qt4/plugins/imageformats/libqtga.so
rm /usr/lib64/qt4/plugins/imageformats/libqtga.so

Some of these commands can fail, depending on whether you have debug information or 64bit versions installed.

Dec 232012
 

Ever had this happen?

You open the file requester in a GTK app to open or save a file, but the names don’t come with icons so it’s kind of hard to tell the difference between a folder and a file without extension.

Here’s the reason: your KDE styles have been updated but the gtk icon cache was not refreshed.

And here is the solution: run the following command as root to refresh all icon caches:

for i in /usr/share/icons/*; do [ -d $i ] && gtk-update-icon-cache $i; done
Nov 142011
 

It seems that “the community” consists of three separate groups of people:

  1. the people who loudly demand features
  2. the developers who loudly debate the ethic, moral, technical religious impacts if the features demanded by 1. would be implemented
  3. the small group of developers who watch 1. and 2. and at some point say “Oh for crying out loud. What a noise over 5 lines of code.”

As an example, look at the discussion over the feature request in kmail where someone wants kmail to be able to remove attachments from mails.

As another example, look at this one. Some people would like to see single-sign-on in KDE4. The discussion was long and loud.

And, if you Google a bit, you find that the wallet daemon has had the required dbus call since KDE 4.4.2, for crying out loud!

Just that noone has bothered to point a finger at the required pam modules and helpers.

I’ve packaged them for openSUSE, get them from my OBS project and configure them as described in the readme files included in the packages, and you have single sign on.

Note: single sign on only happens if you actually enter a password on login. The typical suse setup with an user session starting automatically on boot can’t work with this.

Note: this seems to work only for local useraccounts, but not in a NIS environment.

Optimization WordPress Plugins & Solutions by W3 EDGE
%d bloggers like this: