/home/drscream

  • home
  • blog
  • gallery
  • studies
  • about
  • grsec pax update-grub, terminating task grub-probe

    I’ve installed a debian machine with the grsec kernel from kernelsec.cr0.org. Everything looks good and working fine, after some time i’ve found out that update-grub doesn’t work anymore.

    [root@grapefruit]:~ # update-grub
    Searching for GRUB installation directory ... found: /boot/grub
    

    So looking in the dmesg output we will see the problem is grub-probe:

    Nov  7 23:07:57 grapefruit kernel: [96585.754724] PAX: From 127.0.0.6: execution attempt in: , ...
    Nov  7 23:07:57 grapefruit kernel: [96585.761809] PAX: terminating task: /usr/sbin/grub-probe(grub-probe):20649, uid/euid: 0/0, ...
    Nov  7 23:07:57 grapefruit kernel: [96585.769773] PAX: bytes at PC: 41 ...
    Nov  7 23:07:57 grapefruit kernel: [96585.776171] PAX: bytes at SP-8: 0000000000000006 ...
    

    Now it’s time to checking the pax flags of grub-probe, here we will see the default options:

    [root@grapefruit]:~ # chpax -v /usr/sbin/grub-probe
    ---[ chpax 0.7 : Current flags for /usr/sbin/grub-probe (PeMRxS) ]---
     * Paging based PAGE_EXEC       : enabled (overridden)
     * Trampolines                  : not emulated
     * mprotect()                   : restricted
     * mmap() base                  : randomized
     * ET_EXEC base                 : not randomized
     * Segmentation based PAGE_EXEC : enabled
    

    We should disable paging and segmentation based PAGE_EXEC:

    [root@grapefruit]:~ # chpax -ps /usr/sbin/grub-probe
    

    And, tadaaaaa, update-grub working:

    [root@grapefruit]:~ # update-grub
    Searching for GRUB installation directory ... found: /boot/grub
    Searching for default file ... found: /boot/grub/default
    Testing for an existing GRUB menu.lst file ...
       found: /boot/grub/menu.lst
    Searching for splash image ... none found, skipping ...
    Found kernel: /boot/vmlinuz-2.6.32.15-1-grsec
    Updating /boot/grub/menu.lst ... done
    

    Posted

    November 8, 2010

    Tags

    debian, grsec, grub, grub-probe, linux, pax, update-grub

  • Ubuntu, downgrading a package

    Situation
    You would like to install a package but the dependency of this package require an older version of another package (we call it libABC). The current version of libABC is 6.8.1.blub but we would like libABC 6.4.1.blub.

    Solution
    Use the following command to show the different versions, that are available:

    $ apt-cache showpkg libABC
    Versions:
    6.8.1.blub ([...])
     Description Language:
                     File: [...]
                      MD5: f61a69e6c5dea15bee1ea40fb16e0a5c
    
    6.4.1.blub ([...])
     Description Language:
                     File: [...]
                      MD5: 85e8417bf7ce534d4649cd38557780b1
    


    You should see the lower version there. If not, PANIC!

    Next we tell the system to install that package, but we will specify the lower version number using the equals (=):

    apt-get install =libABC-6.4.1.blub

    Now we need to hold back (under gentoo it called “mask”) the new package version. Currently i’ve found the solution with “forbid-version”:

    $ aptitude forbid-version libABC-6.8.1.blub

    A better way could be “holding an package back”, some information could be found in the Ubuntu Help – Pinning HowTo.

    Posted

    August 27, 2009

    Tags

    debian, downgrade, downgrading, hold, mask, package, ubuntu

    1 comment

  • Set default editor under debian systems

    Everytime I forgot this “update-…” Debian foobar:

    $ update-alternatives --config editor

    For not global changes you can also use the EDITOR variable in your .bashrc:

    export EDITOR='/usr/bin/vim'

    Posted

    April 26, 2009

    Tags

    debian, editor

  • apt-key / GPG error

    Ab Debian etch gibt es apt in der Version 0.6.xx, welches als grandiose Neuerung die Absicherung der Echtheit der Update-Server durch GPG mitbringt.
    Was ansich ja eine gute Sache ist, jedoch erhaellst der Benutzer direkt nach dem Updaten auf die neue apt-get – Version folgende Fehlermeldung:

    W: GPG error: http://update.server testing Release: The following signatures couldn't be
    verified because the public key is not available: NO_PUBKEY 010908312D230C5F

    Loesung folgedes Problems konnte bis jetzt so behoben werden:
    Die Datei /usr/bin/apt-key zeigt:

    ...
    ARCHIVE_KEYRING=/usr/share/keyrings/debian-archive-keyring.gpg
    REMOVED_KEYS=/usr/share/keyrings/debian-archive-removed-keys.gpg
    ...

    Diese Dateien sollten ersteinmal mit touche angelegt werden, damit apt-key auch arbeiten kann:

    touch /usr/share/keyrings/debian-archive-keyring.gpg
    touch /usr/share/keyrings/debian-archive-removed-keys.gpg

    Um die TrustDB anzulegen muss man nun noch apt-get mit dem Parameter list ausfuehren:

    apt-key list

    Damit wird die Datei /etc/apt/trustdb.gpg erzeugt und auch gleich mit dem Schluessel fuer die Debian Standardarchive gefuellt. Nun muessen nurnoch die gewuenschten Schluessel eingepflegt werden (damit auch apt-get update keinen Fehler mehr bringt):

    gpg --recv-keys --keyserver KEYSERVER bemaengelter_Schluessel
    gpg --armor --export bemaengelter_Schluessel | apt-key add -

    Dabei bindet der erste Befehl den Schluessel in den Keyring ein. Die zweite Zeile exportiert den Schluessel dann wieder und uebergibt ihn direkt an apt-key.
    Ein passender KEYSERVER ist zum Beispiel hkp://pgp.mit.edu.

    Posted

    June 5, 2006

    Tags

    apt-get, bash, debian, gpg, linux

  • Debian und mplayer

    Jeder verwendet doch gern den guten und allseits beliebten mplayer oder gmplayer. Jedoch hat man gerade unter Debian ein Problem, da mplayer nicht im Paketsystem enthalten ist.

    Dieses Problem laesst sich jedoch auch auf eine einfache Weise loesen. Hierzu traegt man einfach in seine ”/etc/apt/sources.list” (fuer testing):

    deb ftp://ftp.nerim.net/debian-marillat/ etch main

    Sehr wichtig ist nun vorher die Source Liste per apt-get update zu aktuallisieren. Nun ist es moeglich per apt-cache search mplayer die verschiedenen mplayer Pakete sehen.

    Posted

    February 5, 2006

    Tags

    bash, debian, linux, mplayer