Posts Tagged ‘Linux’

The documentation bugs

Saturday, March 8th, 2008

While setting up Maemo dev environment, I found following thinko… On the dev-environment setup page, it mentions to read “install.txt” which contains following section:

To install scratchbox first download the script (from the same
directory where you found this INSTALL.txt file) to your host
computer and just run the maemo-scratchbox-install_3.1.sh as user
root:
  $ sudo chmod a+x ./maemo-scratchbox-install_3.1.sh
  $ sudo ./maemo-scratchbox-install_3.1.sh

But real life is different:

...
E: This script should NOT be run as user root.

Testing out bisecting

Monday, February 11th, 2008

About the time to take some action:

chi linux # git-bisect good
Bisecting: 4814 revisions left to test after this
[d2e626f45cc450c00f5f98a89b8b4c4ac3c9bf5f] x86: add PAGE_KERNEL_EXEC_NOCACHE

Also.. back in Tartu. A new semester, weather feels crappy and this time I forgot my toothpaste.. ;)

Linux and RAID partition autodetection

Saturday, December 22nd, 2007

Few days ago I was setting up a machine which was supposed to have two hard disks running in RAID1 (mirror mode). As I do not have much experience with RAIDx stuff I encountered few problems during the setup ;)
My first approach was to create a kernel with embedded initramfs image which worked until it had to mount the filesystems from RAID device, failing with following error:

The filesystem size (according to the superblock) is
212144483 blocks. The physical size of the device is 212144384 blocks.
Either the superblock or the partition table is likely to be corrupt.

Quite quickly we discovered (as I was installing remotely, relying on Taavi feeding me the error messages) when using ext2/ext3 filesystem one has to fix and resize the filesystems before using them in RAID system. This is because the RAID superblock will be written near the end of the partitions thus reducing the physical size of the filesystem. So here it goes:

mdadm --create /dev/mdx --raid-devices=2 /dev/sdax /dev/sdbx
e2fsck -f /dev/mdx
resize2fs /dev/mdx

Before I even tested it I wanted first to try out another trick - I tried the partition type for all raid components to 0xFD. I then quickly made another kernel image without initramfs and booted it.. Voila.. everything worked even without initramfs :D

So to sum it up:

  1. First set the partition type to 0xFD which stands for “Linux RAID autodetect” for all the partitions taking part in the RAID setup.
  2. After assigning partitions to RAID, run a forced filesystem check (forced because otherwise utility refuses to check clean filesystem)
  3. Resize the partition because added RAID superblock has shrinked the filesystem area…

Swfdec git ebuilds

Thursday, November 8th, 2007

As people seem to be looking for working ebuild for swfdec-mozilla (current one in portage is b0rked). I have uploaded the latest git snapshot ebuilds here: