Cryptswap and Linux assigning different devices letters to disk

I had this weird issue recently: I had a simple Ubuntu setup with cryptesetup and swap, and the crypt swap device (say /dev/mapper/mycryptoswap1) keept disappearing.
Caution: fiddling with cryptsetup and disk devices is dangerous for data and OS. I personally made a full backup on a separate disk and then umplugged it to be sure it wouldn’t be involved in any mishap.

Turns out is a little worse that that: Linux is changing the drive devices assignations (eg /dev/sdb /dev/sdg) at every boot under my nose. I did not notice at first because I am using UUIDs, so everything looked fine. Unfortunately my raw partition did not have any UUID.  Probably there’s a way to assign an UUID to a general partition, but I didn’t address this issue.
Having the disk changing its letter any time was the reason why the crypttab device wasn’t created a boot.  I was lucky: would a partition with valuable data be present in the other disk, it would be overwritten with encrypted swap data.
Read More »


Linux Kernel 3.6 is here

I had to upgrade a Pangolin Precise to Linux 3.6 to issue a bug on Linux Vs my Logitech mouse.
So far I can say:

  • Nvidia_current 295.40 fails to build module in 3.6.0 amd64 (I suspect it would also on i386) Solution: install nvidia-current 304.51 from ubuntu xedgers. Works out of the Box.
  • Vmplayer VMware Player 4.0.2 build-591240 builds effortlessly (we no more breack havoc with Vmplayer on any major kernel issue…).

Installing mainline kernel is easy, and apart from disturbing Nvidia the new kernel just stays beside the stock kernel, having a different ABI namespace.

A quick and dirty udevadm script

This script (very dirty) was handful to me to discover some parameters (e.g KERNELS) to differentiate on udev/rules.d rules similar devices on a physical usb port basis.
It’s relased under the GNU General Public License and with no guaranties. Please read the Disclaimer.
It needs of course udevadm and less.
Syntax is:

# Copyright (C) Giuseppe Dia 06/May/2011
# this script is useful to peek into a device details.
# Syntax:
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License
version 3 oas published by
# the Free Software Foundation, .
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
if [ “$1” == “” ]
echo Please specify device e.g $0 /dev/ttyACM0
exit 1
# is a block device.
if [ -b “$1” ]|| [ -c “$1” ]
echo “$1 is a device.”
$UDEVADM_BIN info -a -p $($UDEVADM_BIN info -q path -n $1)|$LESS_BIN
exit 0
echo “$1 is not a device, or it doesn’t exist, please specify a valid device exiting”
exit 1

ALiveXFire-eSATA2 boot issue with memory: a BSOD story

I recently bought an Asrock ALiveXFire-eSATA2 R3.0 and I must say I am impressed on how much this board s*ck* (at least with Ubuntu 64bit Linux 10.10). and after a while (07/2011) solved some serious problems with this motherboard, mainly thanks to the new 4.00 Bios.
07/2011: I must say things are a little better after the 4.00 BIOS. The >4GB RAM boot issue is gone, and the other part of the post issue was due a Western digital USB disk needing “legacy USB” disabled and was not directly related to the motherboard. The motherboard is running fine now.
You may have a wonderful experience with this board and other operating system. My experience  isn’t wonderful, but again, I was coming from a Asrock ALiveNF6G-VSTA and I was quite fond of it, and  I suggest you to search for this board because it really works well with Ubuntu 10.10 64bit.  Pity  I just had to change it for a broken USB port and to have more SATA port…
But coming back to the AliveXFire, I’m not very happy with it (not I am):

  • RAM issues(solved in BIOS 4.00): the motherboard would not boot at all with 6GB of RAM (with the same RAM configuration I had on my NF6-VSTA), and has serious issue booting two identical sticks of 2GB RAM.First of all the BIOS would only map 3270mb of RAM instead of the usual 4096mb, an habit, they say could be reverted by using the ‘memory remapping hole’/’memory remap feature’ option/. Using this option the BIOS would report the right memory size but no boot would take place. Upgrading to the latest firmare (3.90) would not fix the issue.After a bit (a lot) of fiddling, I found a configuration that would lessen the problem, disabling the ‘Cool-n-Quiet ‘ feature in the bios. Note: when the system boots, a memory scan with memtest86+ would end with no errors, confirming the memory works.
    UPDATE: Bios 4.00  fixed the 6GB RAM issue for me (Asrock says it explicitly on the BIOS version: “Patch ATI VGA card with 6GB system memory for win7”. BIOS download here (Asrock site). Upgrading from Linux with no Windows OS at hand was not an issue. I made a Freedos usb stick with unetbooting (sudo apt-get install unetbooting did the trick for me), placed the uncompressed BIOS update utility for DOS into the stick root directory and rebooted into the stick striking F11 at post and choosing to boot from the stick. After selecting the unetbootin default entry, the only one for me, I waited and choosed to boot into Freedos “Safe mode with no drivers”. Other boot modes crashed endlessly. At that, simply changed to C:\ (as the Freedos system is usually  mounted into A: and C:\ is usually the usb stick root) and launched the BIOS update utility, after making sure my UPS was working correctly. Reboot was fine, reloaded BIOS defaults, booted again in Linux, got no issue, added 2 banks of RAM (6GB total) and booted into Linux again with no issues. Memtest86+ confirmed everything is running fine.
    Please don’t follow these steps as they may be harmful for your motherboard. If you decide to, always use a working and suitable UPS to protect the BIOS flashing process from power interruptions. Please read the Disclaimer before you do anything.
  • Issues with NVIDIA proprietary driver(07/2011:solved with BIOS 4.00. See Above): after correctly booting into GRUB and then into Linux, the mobo would crash with a BSOD and a powered off monitor.  This is not related to the ATI chipset/Nvidia Graphic card hypothesis, as other people reports this problem also with ATI cards both with 32bit and 64bit Linux. It seems again related to the memory mapping issue and the only know fix is…well, using less memory. What’s the point of having a 64bit system if you can only use less than 4gb, and even if you have 4gb I only have 3270mb available…Another common issue for me is RAID array corruption. After a successfull boot (and usually many failed one),  I find that one disk of my two of my software RAID array need complete syncing.
  • BOOT with USB connected(solved): another common issues is a boot problem when USB devices are connected. I found out that having USB disk connected, even if the boot order is correctly configured would stop the boot process with a blinking cursor.
    Solved: a Western digital elements issue, not a motherboard issue. Fixed disabling Legacy USB in the bios. Worked fine with other USB disks. I was too quick placing blame on Asrock for this one.
  • Issues with my microsoft mouse: this one is weird. Every now and then, my microsoft mouse is dead, but powered on. It needs plugging and replugging again.  It does not happen very often. The mouse works otherwise and both with the usb bracket and directly rigged to the motherboard.
    07/2011: also my new usb keyboard suffers from the same issue. It happens only when you take power from the motherboard completely, for example umplugging it from the grid.

Please note: once a successful boot occurs, the system works flawlessly. Every benchmark or  memtest86+ is completed I did not try booting into XP or newer system. I have a 64bit Ubuntu on it and I usually experience all/some of this problems. I must say I didn’t miss any boot while testing with Stresslinux or other distros not related to ubuntu.
What I usually try experiencing one/more of these problems, is fiddling with the memory banks, or reduce it.
Update:30/04/2011, as for the usb hard disk boot issue, it may be hard disk related. It boots fine with another external hard disk always connected.
Update 06/07/2011: found out, it was a Western Digital external USB disk issue. Read more of this here or read the original article and fix here.

Meego 1.1 on Toshiba nb 200 rocks

I recently axed Ubuntu on my netbook. Even if it perfomed correctly, I felt it was a bit overkill with netbook and did not cope well with the small screen. Panning with alt+mouse is ok, but I didn’t feel right.

I decided to go with Meego, a Linux from the Linux foundation. I just love the new interface, but I must say the stock system (speaking of 1.1) is a bit limited. You cannot simply expect to use the package manager to add missing things, it’s gonna be a little more complicated than this.  Please read carefully the Disclaimer before trying anything…messing with partition is dangerous for your data…always do a backup first.
Read More »