2012-12-29

HOWTO: fix gksu not accepting your password

Sometimes you can get into a situation when gksu (or any application dependent on this GTK+ su frontend) doesn't accept your password (while gksudo may work OK).

It can be caused by incorrect gksu settings; to correct the situation:
  1. execute gksu-properties (without any arguments), so the "Privilege granting preferences" dialog window should pop up;
  2. select the correct authentication mode from the drop-down list:
    • su, if the system has an active root user with password;
    • sudo, if there's no active root user, and the superuser privileges are granted to a normal user through the use of sudo;
  3. close the settings window;
  4. finally, try to execute some gksu-dependent stuff to test it.

2012-12-27

HOWTO: fix HDD partition order with fdisk in Linux

Sometimes (usually after some repartitioning operations) disk partitions can get into the wrong order (e. g., "sdb1 sdb7 sdb2 sdb5 sdb4 sdb3", as you can see it in lsblk / fdisk / Parted / GParted etc.).

Usually it's harmless, but anyway can be easily fixed in Linux with a fdisk utility (from the util-linux package): just start fdisk with a HDD device as an argument (e. g.: fdisk /dev/sdb), then sequentially press 'x', 'f' and 'w' keys, and finally reboot your system (for the changes to take effect).

Be careful:
  1. you can do this from a some sort of Live CD / Live USB environment;
    please don't try this on a running production system;
  2. partition numbers get changed, and some OS's (and especially OS bootloaders) sometimes don't like this;
  3. the partition table can get corrupted — make backups prior to any experiments.

Here is a sample output log:
# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.21.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): x

Expert command (m for help): m
Command action
   b   move beginning of data in a partition
   c   change number of cylinders
   d   print the raw data in the partition table
   e   list extended partitions
   f   fix partition order
   g   create an IRIX (SGI) partition table
   h   change number of heads
   i   change the disk identifier
   m   print this menu
   p   print the partition table
   q   quit without saving changes
   r   return to main menu
   s   change number of sectors/track
   v   verify the partition table
   w   write table to disk and exit

Expert command (m for help): f
Done.

Expert command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
---
Last updated: 2014-06-17

2012-12-21

HOWTO: boot from a USB drive without BIOS support (using Plop Boot Manager & GRUB 2)

Plop Boot Manager is a freeware featureful x86 boot manager which can be executed from different media (e. g., HDD, CD / DVD, FDD, network, PCI option ROM). It can be loaded by BIOS or by another bootloader (LILO, GRUB, Syslinux etc.). It also has a (unique?) USB drive boot feature with no BIOS support requirement (note: PlopBoot's USB driver currenly provides exclusively a read-only DOS USB drive access).

In case you've installed some GNU / Linux distribution with GRUB 2 bootloader, here is a quick example of how to boot from USB drive using Plop Boot Manager started from GRUB 2:
  1. download the current version of Plop Boot Manager, extract the plpbt.bin file from the archive and put it into the /var/tmp/ folder (you can remove that file later when it's not needed anymore; no admin / root / superuser permissions needed to access this temp folder);
  2. reboot and wait for the GRUB menu interface to appear;
  3. press the 'c' key to enter the command-line interface (CLI) of GRUB:
    grub> _
  4. in case /var/tmp/ is not located on the boot / root partition, but, for example, on the 2nd partition of the 1st HDD, you should start with this GRUB CLI command:
    set root=(hd0,2)
  5. load the PlopBoot itself:
    linux16 /var/tmp/plpbt.bin
    boot
  6. after the Plop Boot Manager has been executed, you can select 'USB' from its menu to boot from your USB drive.
You can also permanently put Plop Boot Manager into the GRUB 2 boot menu (please read the appropriate section of the Plop Boot Manager documentation).
---
Last updated: 2014-06-10

2012-12-13

Debian Multimedia vs dmo

Be careful:
  • http://www.deb-multimedia.org [AKA "dmo",
    formerly debian-multimedia.org (CAUTION: as of June 2013, the old domain has expired and been taken over by some cybersquatters; thanks to the official Debian Project blog for news)]
    is not an official Debian repository —
    it's a private archive administered by a DD [Debian Developer] named Christian Marillat (with some assistance from another DD, Thibaut Varene):
    please read the explanation in the Debian Multimedia FAQ and a discussion between Christian Marillat & Stefano Zacchiroli (the DPL [Debian Project Leader] at that time) regarding the dmo domain name etc.;
  • well, dmo contains some useful software which still hasn't made its way into Debian archives or simply can't be pushed there due to non-free licenses, software patents etc.;
    some packages duplicate the official Debian ones, but differ in some configurations etc.;
  • installing multimedia software from dmo also pulls dmo versions of related libraries (e. g., libavcodec*);
    all installed packages which have corresponding dmo ones will get "upgraded" to dmo versions too (if you don't lock them explicitly);
    it can not only break some "unrelated" software functionality:
    if you decide to stop using dmo repository, you'll also need to restore the affected packages to Debian official versions manually
    due to version conflicts (e. g., to get a higher priority, dmo packages often use a greater "epoch" version number compared to packages in official Debian archives);
  • the best way to use that resource is not to add it to the APT reposiories lists;
    instead of that, it's better to download & install individual packages from there;
    in many cases, dmo's binary DEB packages wouldn't install correctly on a clean Debian system, so you need to download the source packages, correct them (in most cases, all you need is just to correct / modify / clean the dependencies) and build the binary packages with an automated tool like pbuilder;
    after that, manually install the built packages:
    # dpkg -i somepackage.deb
    
    and attempt to resolve the dependencies:
    # apt-get -f install
  • if you still want to use dmo as an APT repository, consider using mirrors to save some bandwidth for the main dmo website :)