Friday, April 30, 2010

GetDeb: Ubuntu 10.04 kick-off

The GetDeb and PlayDeb repositories for Ubuntu Lucid provide packages including more than 100 applications and 100 games, this was the first time we had most of the previous release packages already available on the new release day. The credit goes to Christoph Korn which tested/fixed most of the packages, thanks also to all the others which helped.

We have recently added change logs generation to our build system, when using update-manager you will be able to check the change logs before deciding to upgrade to a getdeb package.

Tuesday, April 20, 2010

When "recovery" mode fails to boot

*** Don't try this unless you understand what you are doing ***
The recent changes to the boot process with the integration of the graphical boot loader and logger (Plymouth) and the continuous development of upstart and associated jobs brought a significant improvement to Ubuntu's Lucid boot experience.
Because the the code is new and is rapidly changing there are some good chances of bugs which may lead to an non bootable system.
Some of the bugs found (promptly fixed, or being worked) on the development stage shown that if you have an issue related to plymouth/mountall the rescue option on the boot menu will not work.
Rescue mode as implemented now depends on plymouth/mountall being started in the first place.

To work around this you will need to be able to boot without automatically starting upstart, you can do this by appending using the init kernel option, from the boot menu, press e for edit, search for the linux line, append the init=/sbin/sulogin, press ctrl-x to boot. If you don't get a root prompt then something was wrong during kernel load/initialization, or while the root filesystem was mounted (removing the quiet option from the linux kernel line might provide some hint on the problem).

So now we are in a root shell, what's next ? On my case I am going to set the console keyboard layout: loadkeys pt .
We can't yet start services, we are running from an sulogin process and we need upstart to be able to start services. We will just backup and disable the upstart services first:
# Remount the root fs in read-write
mount -orw,remount /
# Backup the upstart jobs config
cp -a /etc/init /etc/init.orig
# Nothing will start
rm /etc/init/*
# Add 2 console virtual terminals
echo start on startup > /etc/init/sulogin8.conf
echo exec openvt -c 8 >> /etc/init/sulogin8.conf
echo start on startup > /etc/init/sulogin9.conf
echo exec openvt -c 9 >> /etc/init/sulogin9.conf
Now we can start upstart: exec /sbin/init .
The console will just hang because nothing was started, except our virtual terminals 8 and 9, now let's swtch to VT8 with with CTRL-ALT-F8.
Now list the the available services: initctl list, a bit boring, only our sulogins, let's put the regular jobs in place: cp -p /etc/init.orig/* /etc/init .
Try initctl list again, a long list of services now, which you can start with "start service".

Please note Upstart is an event driven job management system, starting a service will most likely trigger other services which depend on events emitted by the first one. My next research will be on how to avoid the chain reaction, or if not possible request such a feature :)

I hope you don't need this instructions :)

Sunday, April 18, 2010

Upgrading to Lucid with Virtualbox USB support renders the system unbootable

Last friday Mina Shokry joined in#Ubuntu+1 reporting an unbootable system after upgrading to Lucid. Even booting with rescue mode it was hanging without any error message, apparently it was after mounting the file systems (guessing by the "mounted filesystem" message).
After several hours trying all sort of boot options we are able to identify the problem.
The /proc/bus/usb on fstab which was previously required for USB support in VirtualBox mount was failing, however upstart/mountall (not sure where is the fault) did not provide an error and simply stopped the boot process.
The bug for the mount issue is bug 565109 .
I have also filed a bug for upstart, bug 565890, simply making it verbose when using rescue would allow to easily identify the problematic task.

If you use VB's USB support make sure you remove the /proc/bus/usb entry from your fstab.

Monday, April 12, 2010

Update Manager will display 3rd party change logs

There was an old bug reported on update-manager about it's lack of support for non official repositories change logs display. This was something already requested on getdeb and it benefits most people which use PPAs, checking the change logs usually provides a good hint on the upgrade risk.
I had proposed a possible solution in the past, today I have check with Michael Vogt that the proposal was ok. I got positive feedback so this was the time to help with some code.

I don't have much experience with python-apt so the research over the weekend using winpdb (the python debuger) was fundamental. I have found the function responsible for the changelog file retrieval, get_changelog() at UpdateManager/Core/ and added the change log URI construction based on the package origin server, later Michael fixed it using the ArchiveURI from the package.
The patch introduced a new feature so it required a Feature Freeze approval, it was granted quickly, it is a small patch providing a perceived benefit.

Please note this feature depends on the changelog files being available on the server, at ARCHIVE_URI/changelogs/... (pool structure). The repository maintainers need to implement their own changelog extraction utilities. GetDeb has already implemented it, however it will only be available once we upgrade our build server to 10.04 (there are some other building related changes blocking).
A task was also submitted to Soyuz so PPA's should support it in the future.

Saturday, April 10, 2010

Crashes with Ubuntu 10.04 beta 2

I have been using Ubuntu 10.04 since beta 1 and it has been quite stable until this week.
Yesterday on my laptop openoffice simply topped launching, running oowriter from the terminal did not reported any error but nothing happened. I was in a rush to finish a job so I was unable to debug the problem further so I simply rebooted.
During boot the root filesystem was found corrupted, the graphical boot just kept looping changing the message on the screen from "Checking disk blah blah" to "key X por blahblah". I was unable to do recovery, next step, reboot in recovery mode.
Still not good, now it was just looping on the text console, I was unable to read the output.
Another reboot, this time I kept pressing the key that was supposed to bring the recovery console, this time I was able to get into the recovery shell after some iterations of the message loop. I was able to run fsck on the root filesystem and successfully boot.

Today I have booted my desktop (also running Lucid), was about to do some draft html for a status page, decide to install "quanta" for it.
During the install I just got a white screen with X hard locking, well time for another reboot.
I was not sure about the quanta package install status, I have found that quanta was installed by quanta.desktop file was truncated with 0 bytes.
Later I have found that other quanta dependency packages where corrupted

I have filled bugs 559915 and 559915.

Anyone with such bad experiences lately ? I am a bit concerned about having such critical failures on 2 completely different systems.

Friday, April 9, 2010

Installing a Debian schroot with debfactory

I have recently had the need to teste a package on Debian Lenny, it was a good reason to add support for Debian on the debfactory script.
Durint testing I have found bug 557316, you will need to add to /etc/apt-cacher-ng/backends_debian before proceeding.

To create and test on a Debian Lenny schroot just run:

bzr branch lp:debfactory && sudo debfactory/bin/ -c /home/chroot -p debian -d lenny -a i386 && schroot -c lenny.i386 -p

Tuesday, April 6, 2010

GetDeb/PlayDeb: Ubuntu 10.04 Lucid Lynx Repository Available

The repository for Ubuntu 10.04 repository is now available.
Lucid is an important release (LTS status) and we have a significant number of packages/updates which will not be available on the official repositories, with such in mind we are now building/testing only for Lucid.