Friday, 10 April 2009

Upgrade from kubuntu 8.10 to 9.04 with raid disk : no block devices found

Well... I could have waited 15 more days to have the stable version of Ubuntu 9.04 available for upgrade... but no... It seems I wasn't aware i've so much time to loose.

So I've upgraded my kubuntu 8.10 (64bit) to the 9.04 version.

All went smoothly until I reboot where I get this nice message :

no block devices found (4 times)
Gave up waiting for root device.
ALERT! /dev/md3 does not exist. dropping to a shell!

Apparently the raid configuration has been dropped during the upgrade.

I've filled a bug here :

I don't know exactly what in my setup causes this, but it seems that it's a bug of the last kernel.
Probably my raid setup.

My computer is made of :

P5N32-E Sli plus motherboard
C2D 6250
4GB of RAM
2x 250GB SATA, RAID1 software for linux (sdc, sdd)
2x150GB Raptor SATA Raid0 for windows (fake raid from motherboard) (sda, sdb)

To get my system back on line I just need to do this in the busybox shell :

mdadm -As

The first line reassemble my RAID1 array, and the second line leave busybox, which lead the system to try to resume the boot process. (well i've found this at almost 3AM grrr...)

I didn't figure out on how to fix this (ie no more drop to a shell).
Apparently, booting with a previous version of the kernel solves the issue, but during the upgrade process, it has erased all my previous kernel ;)

Also I've been able to chroot to my system (I tryed to reinstall grub with no luck) and I did the following :

mdadm --assemble --scan

mkdir /mnt

mount -t ext3 /dev/md3 /mnt

mount -o bind /dev /mnt/dev
mount -t proc none /mnt/proc
mount -t sysfs none /mnt/sys
mount -t ext2 /dev/md0 /mnt/boot
mount -t ext3 /dev/md2 /mnt/var
chroot /mnt /bin/bash

Don't try to startX from there, it will start but with no mouse & keyboard you can't do that much...

I'll update if I found a fix...

18/04/2009 : update, the last kernel solves the issue.

Saturday, 4 April 2009

Send mail through gmail smtp server with Exim4 - What to do when gmail account has been disabled

To send mail from a machine using gmail smtp server see this tutorial :

I've just ran into a problem with this config.

I've created a gmail account just for this purpose because you need to set the gmail account password in exim4 configuration file on each machine.
I didn't want to use my personnal gmail account for obvious reasons.

As it's a technical account, I never log into it through web interface.

Which lead to the account beeing disabled by gmail.
As a result, all mail that exim4 tryed to send gives this warning message in /var/log/exim4/mainlog :

R=send_via_gmail T=gmail_smtp defer (-53): retry time not reached for any host

To solve this issue, you need to

  1. Login to with the account you use with exim4. It will ask you to login a second time with a captcha... do so
  2. login on all of your machine that use this technique and issue the following command :

    sudo exim -qff
and you should now recieve all mail which was unsent.
In exim4 logs you should see the following line :

2009-04-04 17:07:44 1Lq7Jf-0007WM-VJ => R=send_via_gmail T=gmail_smtp [] X=TLS1.0:RSA_ARCFOUR_MD5:16 DN="C=US,ST=California,L=Mountain View,O=Google Inc,"
2009-04-04 17:07:44 1Lq7Jf-0007WM-VJ Completed

One more thing, don't forget to login once in a while on your gmail account so that it's not disabled. A solution is maybe a firefox extension like gmail manager.