Navigatie overslaan.

Linux

Recovering an inactive and dirty RAID

Last night my computer crashed, and today my RAID5 array wouldn't start. That was extra painfull as the array was already one drive short.

dmesg looked something like this (the device is /dev/md6):

[ 2577.637615] raid5: device sdb5 operational as raid disk 0
[ 2577.637626] raid5: device hde5 operational as raid disk 3
[ 2577.637633] raid5: device hdg5 operational as raid disk 2
[ 2577.637639] raid5: device hdc5 operational as raid disk 1
[ 2577.638576] raid5: allocated 5264kB for md6
[ 2577.638629] raid5: cannot start dirty degraded array for md6
[ 2577.639471] RAID5 conf printout:
[ 2577.639476] --- rd:5 wd:4
[ 2577.639482] disk 0, o:1, dev:sdb5
[ 2577.639488] disk 1, o:1, dev:hdc5
[ 2577.639494] disk 2, o:1, dev:hdg5
[ 2577.639499] disk 3, o:1, dev:hde5
[ 2577.639504] raid5: failed to run raid set md6
[ 2577.639509] md: pers->run() failed ...

I don't have backups for that data, so I was adamant on getting the array back to work. Afterall I knew it was at least 99% correct. I would be more than happy to accept a little corruption to get the majority of my data back.

I was able to force my kernel to believe that the disks were okay using the following commands.
WARNING 1: don't try this unless you are desperate and all alternatives have failed.
WARNING 2: I wrote the following down from memory. My brain does not do raid, and I'm not entirely sure the procedure below is complete and correct. However, as the information below is hard to find, I decided do write it down anyway. Look it up _before_ you use it!

(In this example I'll use /dev/md6 as the raid device)

1. Stop the array:
mdadm -S /dev/md6

2. Make the array read only:
echo 1 > /sys/module/md_mod/parameters/start_ro

3. Force the kernel to believe the array is clean:
echo "clean" > /sys/block/md6/md/array_state
(ignore the error message)

4. Restart the array:
mdadm -A --force /dev/md6

You can now take a look at /proc/mdstat to see if the array has been started, and then try to mount it. You'll probably need to do an fsck.

(Now would be a good time to consider a backup strategy)

Netbooks and the supposed failure of Linux

During the first days of the netbook computer model these small and cheap computers mostly ran Linux instead of Windows. Some claims go as high as a 90% market share for Linux at a particular moment.
Nowadays the Windows/Linux rate is almost comparable to the desktop market.
Some claim that this shows that Linux has failed.

In my opinion it shows that Linux has reached the "good enough" stadium. When there were no netbooks with Windows available, people were happily buying Linux netbooks. If those machines have been unusable they would never have become so popular.
Microsoft must have felt very scared when that happened. Afterall, a netbook is just a small computer. If Linux is good enough for a netbook, people might start also using it on their desktops.

Microsoft took an unprecedented step by offering Windows XP again. They realised that Vista had not been accepted as a viable operating system for netbooks. Windows Mobile, on the other hand, was to limited. Their only option was to bring back Windows XP. This led to a huge price-cut for XP. People don't want to pay the full price for an 8 year old operating system, even if they prefer it to Vista. Especially when their is an (almost) free Linux alternative.
In the end Microsoft was able to conquer the netbook market.

It's not that surprising. As I wrote before, in the end a netbook is just another computer. Despite claims that netbooks should only be used for web browsing and other light activities, people use it as a "normal" computer.
Given that most people are fairly resistant to change; it's not surprising that they chose Windows over Linux when both were offered at pretty much the same price.

If you only see that Linux failed to become the dominant netbook OS you may be looking in the wrong direction. The really interesting part is that Microsoft had to do real work to claim their usual market share. For years it has been a no-brainer that Microsoft Windows would be the operating system on any (non-Apple) computer targeted at the general public.

This time Microsoft was able to remain in the saddle, but it should no longer be taken for granted that any computer-like device will run Windows. The mobile phone industry already seems to have given up on Windows Mobile.
Microsoft will have to be very carefull to maintain their position. At any mistake people will happily use an alternative such as Linux. It is expensive to lure them back, and if it happens to often they may never come back.

Waar blijven de innovatieve Linux computers?

Deze post is oorspronkelijk als reactie gepost op: http://tweakers.net/nieuws/58936/linux-op-netbooks-vergt-nieuwe-strategie.html

Waarom durven computer fabrikanten niet te innoveren. Ze bouwen allemaal elkaars producten na. Verder dan een centimertje groter of juist kleiner komen ze niet. Nu zijn alle computers hetzelfde, zo ongeveer de meest "aparte" computer is een laptop met een Ferrari logo. Zodra je hem aan zet draait het ding gewoon Windows.

Stel je voor...

De laptop is niet alleen Ferrari rood, maar zodra je hem aanzet (met je auto-sleutel, op afstand), maakt hij een blaffend motor geluid. Tijdens het booten hoor je een zware motor grommen en schakelen, en na exact de 12.4 seconde die een Ferrari nodig heeft om naar topsnelheid op te trekken verschijnt een desktop.

Niet zomaar een desktop, maar een dashboard. Als je in de auto stapt, zoekt de laptop via bluetooth verbinding, en worden de instrumenten van je auto gekoppeld aan de instrumenten op je dashboard. Als je niet in je auto bent wordt er vanzelf een race-spelletje gestart, wat gebruik maakt van diezelfde metertjes op je scherm.
Na het racen kun je je raceauto bij tunen, en met een druk op de knop die instellingen uploaden naar je eigen auto. Of een nieuwe auto bestellen met precies die configuratie.

Verder kun je met die laptop een beetje browsen, en verder hoeft het ding niks te kunnen. Ferrari zou zo'n netbookje zo kunnen laten ontwikkelen, en voor een paar honderd euro per stuk weggeven als relatiegeschenk. Ik durf te wedden dat hele volksstammen zouden vechten voor zo'n computer.

Ander voorbeeld, denk aan een netbook van je voetbalclub, die je "gratis" krijgt bij een jaarkaart. Op die netbook staat het clublied voorgeinstalleerd, en de webbrowser opent vanzelf op de website van je club, en als je het ding aan zet tijdens een wedstrijd krijg je automatisch een pop-up waarin je de wedstrijd live kan volgen.

Heel ingewikkeld is het niet, erg duur hoeft het ook niet te zijn. Op de een of andere manier hebben wij met z'n allen het idee gekregen dat computers allemaal hetzelfde moeten zijn. Zelfs de meeste Linux/Ubuntu fans roepen hard dat _iedereen_ Linux zou moeten draaien. Op een Windows machine vinden mensen het al schokkend als je een alternatieve Start knop hebt.

De marges op hardware zijn minimaal, er is geen droog brood mee te verdienen. De fabrikanten hebben elkaar helemaal kaal geconcurreerd, en toch blijven ze allemaal proberen om diezelfde hardware nog 1 euro goedkoper te maken. Ze zouden zich echt kunnen onderscheiden door andere software te leveren, en door de grote ontwikkelingen in de Linux wereld kan dat tegenwoordig.

Het grote voorbeeld is Apple. De hardware van Apple is niet zo heel speciaal, de echte waarde zit in de combinatie met software. Velen beseffen dat wel, maar niemand lijkt er les uit te trekken. Als een fabrikant al eens wat anders probeert is het bijna automatisch een Apple cloon.

Debian 6to4 configuration generator

I wrote a little webpage that helps you to get your Debian (or Ubunutu or other Debian based distro) computer on the IPv6 internet. Just go to the page and it will generate a configuration that is appropriate for your computer. Just append this configuration to /etc/network/interfaces and your ready. You can find this generator here.
This work is based on the Debian 6to4 Setup page by Craig Small. Thanks Craig, your instructions have been very helpful.

Bluetooth headset

I was recently given a Jabra5020 Bluetooth headset (thanks David!).
It took quite a bit of work to get it to work, allthough in the end the solution is rather simple.

1. install the appropriate Bluez and Alsa packages (sudo aptitude install bluez-audio bluetooth-alsa on Debian).

2. Add

pcm.bluetooth { type bluetooth }

to /etc/asounc.conf OR ~/.asoundrc

3. Put the headset in connect mode (by holding the "on" button for a few seconds until the light becomes blue).

4. Direct audio to the alsa blueooth device, for example: mplayer -ao alsa:device=bluetooth *mpg

5. Enter 0000 in the popup that asks for a pin-code.

The tricky thing is that the headset only works once, and then the driver has to be restarted. ("modprobe -r sco; modprobe sco"). That's a bit annoying, but not unacceptable, as I don't see myelf using it all that often. As long as it works on the first try I'm farily happy with it.

Unfortunately the sound quality is rather poor. I have no idea how it compares to other bluetooth headsets, but it was far worse than any wired headphones.

There is an alternative protocol around called A2DP that is supposed to deliver superior quality, but I was unable to get it to work. I'm not even sure of the Jabra 5020 supports this protocol at all.

Goodbye Minimize and Maximize buttons, and forget about the desktop while youre at it

Today I removed the Minimize Window and Maximize Window buttons. I run 95% of my software maximized, so I almost never use the minimize button. Must of the times I do click on it, is by mistake.
I don't use the maximize button either, as I've configured my system to maximize windows on double clicking the titlebar, which is a much bigger target anyway.

I did the same thing to my laptop a few days ago. As it's rather annoying to manipulate those small buttons with an inaccurate touchpad, I avoided them as much as possible. After only a few hours I was convinced that I'm not going to miss those buttons, so I did the same to my desktop machine.

The usabillity people should love this, two buttons less that used to be always on the screen.

PS. I dare say the minimize button should never have been added in the first place. The common use of this button is to clear the desktop as to get to the icons on said desktop. But what's the point of having icons (or widgets) on your desktop as there is a window over all the time.[1]
Once you no longer need to go to the desktop[2], the only other use of the minimize button is to go back to a previously used window, if you remember what's underneath the current window. Alt-TAB isprobably faszter.

[1] The KDE people were critiqued for Plasma, as it initially was unable to put files on the desktop, but I think they were completely right. Fortunately the sccientific process of thesis, antithesis and synthesis resulted in an interessting solution called the Folderview Widget.
[2] When you do need to see the desktop, a "Show Desktop" button or key-combo is much faster than minimizing all windows by hand.

Unimaas VPN succes

I've succeeded in connecting to the VPN of the Maastricht University. After a few days of trying to extract the necessary information from the helpdesk ("We think it's a Cisco. We don't do Linux. Change your kernel!"), and a very ugly VPN work-around, the solution turned out to be very simple.

Step 1. Get the Windows Client
Download the Windows executable from the website. It's Cisco's VPN client version 5.

Step 2. Extract it
Allthough the file is an executable zip file, zip was unable to extract it. Fortunately wine ran it just fine, and unzipped the contents to a temporary file.

Step 3. Import the profile
In the archive is a file called unimaas.pcf . This file contains all required information.
Start kvpnc and start "Import Cisco pcf file" from the Profile menu and select the unimaas.pcf file.

Step 4. Enter username
Optionally enter your username and password in the Authentication screen, and save the the profile.

That's it. Click connect and after a few seconds a VPN connection should get established.

note Do not forget to allow the VPN connection through your firewall!

180.000 (Linux) Thin Clients

According to Desktop Linux the country of Macedonia is rolling out a computer network based on Linux & thin clients consisting of 180.000 seats. What a huge project. Has anybody ever tried such a huge project? Read all about it at Desktop Linux

A side effect is that anyone who wants to sell educational software in Macedonia should port to Linux. Of course some companies will not do that, but there is plenty of competition willing to fill the gap. Such a surge in educational software for Linux will also make Linux more interesting to schools in other countries. Obviously the software will have to be translated, but translating is a much simpler job than writing from scratch, and can often be done with only a minimal knowledge of programming.

Secondly, any parent buying a computer for their kids will have to consider Linux. Usually parents buy computers for their children to help them with school. If the kids use Linux at school, they'll probably will want to use it at home as well.

All in all this could turn out to be very interesting.

T-DOSE

De T-DOSE komt er aan!
T-DOSE staat voor Technical Dutch Open Source Event. T-DOSE is bedoelt als bijeenkomst voor ontwikkelaars van Open en Vrije Software. Een soort Nederlandse FOSDEM dus.
Het programma is inmiddels bekend, en het zit bomvol interessante onderwerpen. Je kan wat lezen over de onderwerpen en hun presentatoren op de biografie pagina.

Hoewel Free Software aardig leeft binnen Nederland, was er nog geen evenement dat zich richt op FOSS ontwikkelaars in het algemeen. Uiteraard ben ik erg blij dat dit er nu wel is, en ik heb me dus direct opgegeven als medewerker.

Het beloofd een knaller te gaan worden, en ik nodig iedereen dan ook uit om langs te komen.

xmove

Roberto Alsina" blogged about the wonderful synergy and wondered how to move X applications between $DISPLAYs. The solution is called xmove. Xmove is starts a pseudo X server that allows it's clients to be relocated to another server.

I have a NVidia twinview dual-screen setup, which has the disadvantage that the second screen shuts off when the computer goes into fullscreen mode. Fortunatly my second monitor has two VGA connectors, and a switch to choose between them. I've hooked another computer to that second VGA port, and I use that to control my music and chat-client when I'm gaming.

Novell & Real announce WMV/WMA support for Linux

Real & Novell have anounced that they have developed an open-source implementation of the WMV & WMA codecs. Everybody and their sister thinks this is great news, but I don't really see the point. Sure, another open-source codec is nice, but what is so special about WMV?
If I want something that sounds better than plain old .mp3 I can use .ogg and .flac. If I just want compatibility I choose .mp3.
Why would one want to use .wmv ? The same holds for video. IMHO there is no compelling reason to use either format, except if, for some reason, you want DRM.
DRM does not go down well with the Linux crew. It will be hard for any company to not create a PR disaster among the Linux crowd by openly supporting DRM. Just writing code to play the stuff is acceptable, but pushing the usage of DRM will cause a serious backlash.

It should be noted that it is allready possible to play Windows Media files on Linux, as their is software that can use the Windows codecs for playback. Having an open-source alternative is nice, but I don't think it will any significant influence.

Motorola chooses Linux as primary platform

Infoworld reports that Motorola has decided that Linux will be their primary software platform from now one. New features will be developed on Linux first.
Recently I have been wondering on how Motorola thinks about Linux. Motorola is well on its way to replace Nokia as the biggest telephone manufacturer. As Motorola is also the frontrunner in using Linux on there phones, I wondered if there was any relation.
Either Motorola is becoming big because of Linux, or Linux usage is growing because of Motorola.
This announcement shows that Motorola considers Linux as a strategic advantage, and not just a piece of cheap software.
The decision to go with Linux probably also has something to do with Nokia being the primary backer of Symbian. It's hard to compete with the guys that also write the software to power your device. Although Symbian is more or less independent, it's clear that they are strongly influenced by Nokia. By not using Symbian Motorola can fight Nokia on two fronts.
Ofcourse Motorola could have used Windows Mobile, but that's a hornets nest in itself. Microsoft has an agenda of its own, and you never know how they will use their software against you. Once addicted to their products the quality falls rapidly (take a look at IE), and there is nothing you can do about it (except for replacing it). If there is a bug to fix, or a feature to add, you'll have to wait for Microsoft. In a market where a product is outdated after 3 months, that's unacceptable.
And if Microsoft doesn't like a feature (eg because it competes with a product of their own), you can entirely forget about it.

By choosing Linux the ball is back in Motorolas court. They can develop it as fast as they want, add all the features they need, and they don't even have to pay a dime for it. Ofcourse they will have to pay programmers to write the software, but if you are as big as Motorola, that's not a problem at all.

Inhoud syndiceren