Search Results: "tim"

5 February 2009

Maximilian Attems: initramfs-tools new Lenny features

initramfs-tools design principle is to ship a generic initramfs. The design explicitly allows lots of customization through hook and boot scripts. A previous post focused on the history of initramfs-tools. Several contributors enhanced initramfs-tools since the Debian Etch release so the non exclusive new feature list: As bonus to some cleanup and docs update we have also seen a Ubuntu sync and are not too diverged.

MJ Ray: The Phone Co-op Workshop AGM and Voice09

On Saturday (7 February), I should be attending both The Phone Co-op AGM and The Phone Co-op Members Workshop before it. I ll be asking a question at the AGM, if we can get the wording nailed down in time. Sadly, travel from Bristol to Chipping Norton by train is totally screwed by engineering works near Didcot and the usual poor connections from the cross-country line, so I ll be making a 2 hour car journey instead of a 5 hour train+bus combination. If you re travelling from the Bristol area and can car-share, please get in touch. Next Tuesday/Wednesday is Voice09 in Birmingham and I should be there if things come together in time. This is the Social Enterprise Coalition s annual conference. Conservative Party leader David Cameron MP will open as keynote speaker, with Liam Byrne MP, Minister for the Cabinet Office, opening on Wednesday. Would live-blogging or similar be interesting to people reading this? If you d like to meet up at either event, get in touch somehow - comments here, instant message, email, or phone. If you ve something you d like to send to either, also get in touch.

Jeff Bailey: BSG

Everytime I see people talking about "BSG", I think of the Brotherhood of Saint Gregory.

It's all Thomas Bushnell's fault.

4 February 2009

Holger Levsen: FOSDEM streaming

So for those of you, not going to FOSDEM, there should be streaming. :-)

For the sake of full disclosure: this is the first time streaming is officially planned at the FOSDEM Debian dev room, but so far maybe the worst prepared. So this announcement is probably a bit too brave...

But I thought I send it anyway. I'm quite very confident it will happen, despite my desorganisation atm (and the little time to set up and test on saturday). And as it would be very sad, if there were streaming, but no viewers due to lack of announcement of the streams, I decided to write this here.

The URL of the streams should be announced/linked on http://video.debconf.org but will definitly be also announced on our wiki page where we keep track of the volunteer shifts (for those watching at home, those times are UTC+1). Please enter your name in the schedule there, if you want to help us, we have 60 shifts to fill. (15 talks, 4 positions for each: 2 camera operators, video mixer, audio mixer.)

Watch this space :-) (Though a proper announcement shall also be send to the project mailinglist.)

Russ Allbery: git-pbuilder 1.6

Tim Skirvin sent me some enhancements to this script, so I took a moment to write documentation and put it up on my miscellaneous scripts page. This is my version of the integration script between git-buildpackage and pdebuild with cowbuilder. There isn't very much to it, but it does handle automatically adding the etch workaround option where needed and supports selecting the chroot in which to build via an environment variable. As usual for these sorts of little scripts, it hard-codes some of my preferences and will probably require modification to work smoothly in your environment. Unlike the larger packages I maintain, these random scripts are little things I use to speed daily tasks or obscure scripts for specific needs I have. I make them public on the outside chance that they'll solve some problem someone else is having or will serve as a useful example. Further updates generally won't be announced in my blog.

Neil Williams: Active LUGs

Theodore wonders about LUG activity - well, I have been very active over the years in the Devon and Cornwall GNU/Linux User Group but the problem is that Debian (and more specifically Emdebian) is taking up the time that I used to put into the LUG. The LUG itself has remained very active, although geography means that meetings are actually difficult. The LUG continues to attract new members, existing members continue to contribute and learn new stuff themselves and a number of the long-standing members have joined free software organisations in their own right - including Debian. If there is going to be another DD in Devon or Cornwall besides myself, I'm pretty sure that the person will have been part of the DCGLUG before considering joining Debian.

I'm still webmaster for my local LUG, I get to some meetings although some do conflict with existing Emdebian meetings.

What do I get out of it? Local friendships and exposure to GNU/Linux issues outside Debian.

Debian can be a very insular world - we care about Debian, we talk about Debian, we get together as Debian but sometimes we lack comparative input. We don't really know how we compare with other operating systems and other distributions at a user level. Debian Developers, in particular, can easily lose touch with ordinary users of other systems. Debian, for me, is also a distant world geographically. I live a long way from other DD's in the UK who gravitate towards Cambridge, 300 miles away. It's just nice to have people within 10-50 miles, people I can contact about hardware issues and who have just the part I need because they kept it "just in case".

I still contribute on the LUG mailing list, although my contributions are generally related to licences, avoiding non-free rubbish and issues around embedded devices. I'm not as active as I'd like to be or as I have been in the past but I still want to be part of the LUG.

Joerg Jaspert: Package -> File mapping

Yesterday I merged a patch from weasel into our dak repository. We are now generating a mapping between a package and the associated files on our mirrors. While the initial customer for this is a new snapshot.debian.org implementation, it might be useful for others too. If you want to have a look at it, it is on every mirror, file indices/package-file.map.bz2. The entries are plain rfc2822 format and currently have the following information: It currently doesn t make any difference for suites, but if that is needed it could be added, i guess. Well, one could also look in the suite-*.list.gz files in files/components and take that together with the above to get this info. (And yes, you could get this information by parsing all Packages and Sources files of all suites. I bet you will waste way more cpu time, coding effort, whatever, in doing that. :) ) Anyway, whenever you need something like this, don t hesitate to ask. Especially not if you yourself get us the code for it. :)

MJ Ray: Reject the Term Extension Directive

One of the most frustrating things about Copyright Expansion is that it s being driven through at international levels, far away from most of the people that it affects. When we try to contact our international representatives, such as national government ministers or officers, or Members of the European Parliament (MEPs), it usually takes me at least two attempts to convince them that I actually understand the issue that I fell they re about to bodge. So, here we go again:-
The European Parliament is being asked to nearly double the term of copyright afforded to sound recordings. Industry lobbyists suggest that extending copyright term will help increase the welfare of performers and session musicians. But the Term Extension Directive, which will be voted on by the Legal Affairs Committee in a few weeks time, will do no such thing.
Follow developments on EDRI s Copyright page and Write to your MEP, like Stuart Langridge did. I ll contact Neil Parish MEP directly and hopefully he ll remember me, so I won t have to do that stop sending me copy-pasta from Malcolm Harbour dance. I ll also see if I can get nice responses out of the other parties this time.

Dirk Eddelbuettel: Correct Datetime / POSIXct behaviour for R and kdb+

We have started to look into kdb+ as a possible high-performance column-store backend. Kx offers free trials -- and so I have played with this for a day or two, both the general system, data loads and dumps and in particular with the interface to R, Based on the few files (one C source with interface code, one R file to access the C code, one object file to link against, one header file and a simple Makefile), it took just a couple of minutes to turn this into a proper CRAN-style R package. Anyway, the reason for this post was that the R / kdb+ glue code works well ... but not for datetimes. I really like to be able to pass date/time objects natively between systems as easily as, say, numbers or strings (and see e.g. my Rcpp package for doing this with R and C++) and I was a bit annoyed when the millisecond timestamps didn't move smoothly. Turns out that the basic converter function in the code had a number of problems: it converted to integer, only covered a single scalar rather than vectorised mode, and erroneously reduced a reference count. A better version, in my view, is as follows:
static SEXP from_datetime_kobject(K x) 
 
	SEXP result;
	int i, length = x->n;
	if (scalar(x))  
		result = PROTECT(allocVector(REALSXP, 1));
		REAL(result)[0] = (kF(x)[0] + 10957) * 86400;
	  else  
		result = PROTECT(allocVector(REALSXP, length));
		for(i = 0; i < length; i++)  
		    	REAL(result)[i] = (kF(x)[i] + 10957) * 86400;
		 
	 
	SEXP datetimeclass = PROTECT(allocVector(STRSXP,2));
	SET_STRING_ELT(datetimeclass, 0, mkChar("POSIXt"));
	SET_STRING_ELT(datetimeclass, 1, mkChar("POSIXct"));
	setAttrib(result, R_ClassSymbol, datetimeclass);
	UNPROTECT(2); 
        return result; 
 
This deals with vectors as well as scalars, converts Kdb's 'fractional days since Jan 1, 2000' to the Unix standard of seconds since the epoch -- including the R extension of fractional seconds -- and as importantly, sets the class attributes to POSIXt POSIXct as needed by R. With that, a simple select max datetime from table does just that, and vectors of timestamped records of trades or quotes or whatever also come with proper POSIXct behaviour into R. Note that it needs TZ to be set to UTC, though, or you get a timezone offset you may not want.

3 February 2009

Chris Lamb: Committing every time you save in Vim

I wonder if there are any non squash-heavy workflows that this goes well with.
" requires vim-python and python-git
function! CommitFile()
python << EOF
import vim, git
curfile = vim.current.buffer.name
if curfile:
    try:
        repo = git.Repo(curfile)
        repo.git.add(curfile)
        repo.git.commit(m='Update')
    except (git.InvalidGitRepositoryError, git.GitCommandError):
        pass
EOF
endfunction
au BufWritePost * call CommitFile()

Gustavo R. Montesino: libgda3 3.0.2-4

This new Debian release of libgda moves gtk-doc and related packages back to build-depends-indep, and add some makefile logic on debian/rules to detect if gtk-doc is installed (looking for gtk-doc.pc) and enable or not documentation (re)generation on-the-fly. Of course, I've also been bitten by the sha1 checksums on the changes files, as I had a new version of dpkg-dev and an old devscripts/debsign installed. It took me some time to figure how to fix this one.

Gustavo R. Montesino: Blogger and comments

To my surprise, I've recently discovered that Blogger doesn't defaults to sending the comments to the blog owner (ie, myself) by e-mail. This means I've missed a lot of good feedback during my SoC project last year. Thanks for everyone who has posted comments, and sorry for not noticing/using/answering them before. /me wonders if it's time to think about moving to some other blog platform... maybe a free one...

Aigars Mahinovs: Superbowl 2009

It has become a hidden tradition for me to watch Superbowl every year, despite disappointment in the game and coverage quality in the years before. It started as before: pre-game show, pre-pre-game show, coin toss show and kick-off show It is clear that the show is planned by and for advertisers and not for the viewers. That is a shame and a disgrace - the viewer must be the master of the TV programming and NOT the advertisers. In soccer the program starts, you see the captains exchange a handshake, you see the referee throw a coin and 10-15 seconds later the game is going full steam. Why do you need 3 ad breaks and 2 songs before the game is beyond me - get to the game! The camera work and NBC commentary is MUCH better than last year - stable shots with good close-ups and explanations that actually make sense even to people that are not American football experts. Oh and they actually use units - saying they won x out of y games this season and not they are x in y this season , mostly at least. The game had more fun than usual in the beginning, but the legal things slow it up again - it is weird that a guy got over the line but was called beck because of the knee touching and then a penalty for a false start ? Too much rules and regulations. Soon you ll have a team of lawyers on the sidelines and lawyer drafts will be more important than player drafts. And then again holding and chopping - isn t that what the blockers are supposed to do? Is that some kind of sissy sport? Maybe not. 100 yard interception return run I am speechless. Now that was a great, great play. That episode alone made watchig this thing worth it. Not the best sport thing I ve seen, but the best American football moment for sure. I like the basis of the game, it is a good game, but there is way too much fluff on it. That game needs to be cut down - less rules, less breaks, less interruption, less advertisements, less time to think and relax for the players. 10 seconds of play and 5 minutes of players chatting is not a sport, even curling has more action. The whole Superbowl should be over in 1 hour real time. If the TV transmission starts at 17:00, it should be done before 18:00. There is no content there to justify anything longer than that. Why is there a limited number of challenges? Do the referees make only a limited number of mistakes per game? No. Illogical. And when I though it was done and sealed, Arizona does a great drive and get a great touchdown. One more drive like that and the game could go either way. Now that is a good game. But again penalties spoil the whole game Fitsgerald gets a touchdown, another great play to turn the game around, but only because of the holding penalty giving Arizona safety score. Not deserving in my opinion. And the Steelers drive back AMAZING game! Now this is actually close to the best sports game that I have ever seen. I sure was not expecting that. And Arizona tries to drive back again. I was sleepy when I started to watch this, no sleep now. That was a great game. Despite all the commercialization, it is still a great game and it is very watchable if you download it from the Internet or watch it with TiVo and can skip the adds and the slow parts.

2 February 2009

Ingo Juergensmann: Asrock P4V88 and 4 GB barrier

Dear Lazyweb,

today I bought 2 GB addtional RAM for my Asrock P4V88 mainboard to max it out with 4 GB RAM. So, 2 GB RAM were already installed. I'm well aware that I can't use all of the 4 GB due to PCI address space allocation.
Asrock states on their webpage:

Memory:
- Dual Channel DDR memory technology
- Supports DDR400/333/266 non-ECC, un-buffered memory
- DIMM slots: 4
- Max. capacity of system memory: 4GB*

*Due to the chipset limitation, the actual memory size may be less than 4GB for the reservation for system usage under Windows XP.


So, everything should be fine with adding 2 more Gigs to the already existing 2 GB of RAM, right?

Well, sadly it isn't. When adding the additional DIMMs I get a black, blank screen after powering the machine on. It seems to hang in POST. The HDD-LED ist lit all the time, but despite waiting for about 5 minutes nothing happens anymore. Just a blank and black screen.
Alas, the machine runs fairly well with 3 GB RAM, but then it's not Dual Ranked anymore.

I've already upgraded the BIOS to version 1.80 but no improvement. Anything else I can try? TIA!

David Moreno: And now Apache2::EmbedMP3 for your songs collections!

After I spent time working on Apache2::EmbedFLV, I thought it was a good idea to do the same for audio files, specifically MP3 files. So now that you have your MP3 files on your web server and they are accessible to the world, you may want to show them with an embedded audio player. Well, Apache2::EmbedMP3 is exactly for you! EmbedMP3 uses the fabulous WP Audio Player, a small, elegant, GPL Flash audio player, similarly to how Apache2::EmbedFLV uses Flowplayer. The interesting thing about EmbedMP3 is that you can display more interesting data on the template such as song name, artist, album, year and also lyrics, which was an interesting feature I added. In this fashion, it s very easy to just drop a whole bunch of files into a directory and all be served with the custom interface. You have to instruct Apache2:
<Files ~ "\.mp3$">
       SetHandler modperl
       PerlSetVar wpaudioplayer /audio-player/player.swf
       PerlSetVar wpaudioplayer_js /audio-player/wpaudioplayer.js
       PerlResponseHandler Apache2::EmbedMP3
</Files>
And that s it. Take a look at the documentation to see how to point it to specific locations for WP Audio Player, template file, etc. You can see the hack in action at http://dev.axiombox.com/~david/mp3. If it struggles a bit by buffering, it s because that s directly from my home Internet connection, so give it a small break :-) And, as I suggested the Radiohead video with EmbedFLV, I suggest now this Black Eyed Peas song, Like That, it s very catchy and I love it ;-) Go get the code at the Git repo or at CPAN (once it s updated and published).

MJ Ray: Annual Reports Finished for Now

So now our annual reports have been submitted. Despite the problems with the tax office mentioned in that article, it all seems to have come together just in time. In general, we re in pretty good shape at the moment. I saw this in A Cambridge Co-operator: December and January s Area Committee Meetings and I think it applies to us too:-
It s become slightly surreal how, when the rest of the economy seems to be in dire straights, the monthly figures that the area committee receives for each of the locally-accountable businesses seem to be largely unaffected. As worrying as the wider situation is, it appears that it has yet to really impact on our businesses. Let s hope that the national enconomy improves before it does so .
Whether it s because we re cooperative or because small free software businesses are in good shape (Webconverger - well done!), I m not too gloomy. Most of the time. Thanks to all the members and associates who helped TTLLP in our year ending mid-2008! If you ve not already had a copy, an annual report should be with you shortly. We ll start work on the next one in a few months, aiming for publication in autumn 2009.

Obey Arthur Liu: Debian Summer of Code 08 : Where are they now (part 3/3)

Welcome back for the last part of the reviews. You may want to look at the previous parts : part 1 and part 2. Jigdo-ivory, a JavaScript Jigdo client Presentation Debian CDs and DVDs take up a huge mount of space on download servers. Using jigdo to download those images can significantly reduce the amount of bandwidth and space needed on the central servers. Unfortunately, jigdo currently needs special client software to be downloaded/installed first. Adding support directly into a browser-based application could potentially make a very big difference for first-time users here. Jigdo was created in 2001. It allowed to create ISOs from .debs grabbed from regular mirrors. It eliminated the need to duplicate the entire contents of the package repository into ISO files for each release, or even more importantly, for weekly snapshots of testing/unstable/whatever. You may find the complete proposal from the student here. The original idea originated from the Debian-CD people, who wanted to explore ideas about creating a light web client. The project was mentored by Steve McIntyre, who developed a new version of the Jigdo tools, jigit, which is much more efficient. Student Dustin Rayner was a 5th year senior undergraduate student at the Oklahoma Christian University in Oklahoma City, Oklahoma. I studied Computer Engineering for 3 years as a Computer Engineering student before deciding to pursue a Mathematics and Computer Science degree. Result This project was unsuccessful due to numerous issues. First, because of an inadequate technical preparation of the original proposal. The Debian-CD people were too optimistic with the possibilities of Javascript. In the end, the copying and checksumming part of the Jigdo process were implemented but the checksumming (with a Javascript implementation of md5) was so slow that it was unusable (think 50kb/s on a regular laptop at full CPU charge). The student did the right thing to investigate Java and ActiveX but it was too late unfortunately and he ultimately lacked the experience and knowledge in the relevant technologies. If the proposal is tried again, the student would be requested to have much more experience with Java (and possibly ActiveX). Those would be much more efficient for the task, as they are the most used technologies among on-line anti-virus scanners, which have a workload somewhat similar to Jigdo. I could not find further public involvement of Dustin Rayner within Debian. Aptitude-gtk, usability and GTK+ GUI for the Aptitude package manager Presentation A GTK+ GUI for Aptitude that will work alongside improved current ncurses and command-line interfaces. This will offer an alternative to Synaptic with an interface design geared toward usability and advanced functionality. Debian currently supports multiple non-command-line package managers, the most used being Synaptic and Aptitude. Synaptic uses a GTK+ interface but offers no command-line mode. Aptitude offers a command-line mode but no X interface, although it offers a ncurses interface.
Comparing the interfaces of Synaptic and Aptitude reveal many design differences. Although Synaptic may be more accessible to beginners, Aptitude offers many interface behaviors and functions that are useful to the regular to advanced users : fully hyperlinked tabbed navigation between packages and versions of packages, mostly modeless interface, interactive dependency conflict resolver The proposal was introduced by the student in coordination with Daniel Burrows, the mentor and developer of Aptitude. Student Obey Arthur Liu was a 22 year old french student of Computer Science and Applied Mathematics at Grenoble Institute of Technology - ENSIMAG, in France. Did I mention that he s also yours truly ? If you want to know more, you might be interested in my previous post. Result This project was successful. The interface was mostly done and functional by the end of the summer. Daniel merged the code into the main post-lenny branch. Development is still ongoing and packages are released into Experimental. For further information, just read the rest of my blog. I could find some further public involvements of Obey Arthur Liu within Debian. Doh! Lintian for fuller automated setups Presentation lintian, the Debian package checker, at the moment presents possible problems in three categories: errors, warnings and informational messages. This leads to several problems, most importantly that the severity and certainty of a check can t be expressed separately. In the course of this project, the student should design and implement in lintian an improvement of the current situation, for example by using a two-letter code (one for certainty, one for severity). This project would make lintian errors much more fine-grained and help in maintaining pertinent quantitative analysis of package quality. The project was mentored by Marc Brockschmidt. The project proposal was commonly introduced by the Lintian team. Student UPDATED: Jord Polo Bard s has done a lot of work with translation in Catalan, his native tongue. He can usually be found on #debian-catalan. He also maintains a few packages as a DM. Result This project was successful. The classification was entirely done. Jord also helped with the new lintian.debian.org website. The Lintian team was very satisfied with the revamped errors list and new website. They have an immediate impact on packages quality reporting. Jord is still active within Debian, helping package a few games. Debexpo, a generic web-based package repository Presentation mentors.debian.net is currently a very specialized web-based repository that allows everybody to contribute software packages to Debian without the need to be a Debian Developer (or Debian Maintainer). It has successfully helped simplifying the sponsoring process in the last years. However it needs to be refactored and in the process should be turned into a generic piece of software that can be used for other Debian source/binary package repositories, too. Mentors is a very good initiative to recruit new packages maintainers (and needs your help!) and the software underlying it could be reused for many different purposes (think PPA). The project was mentored by Christoph Haas. The project proposal was commonly introduced by the mentors team. Student Jonny Lamb was a Computer Science student in the United Kingdom. He was already quite involved within Debian, maintaining a lot of significant packages. Result This project was successful. The whole proposal was perfectly executed. Jonny now continues to develop debexpo, with the mailing-lists and commit logs showing interesting activity. Of course, help for debexpo is appreciated to get it into full shape. Jonny has since become a Debian Developer (here is his AM report). Congratulations to him. It s nice to end on a nice note isn t it ? Now that we re done with the individual reports, I m going to write down my recommendations report. Hopefully it will help with next year s Summer of Code.

Axel Beckert: Daily Snapshot .debs of Conkeror

Keeping track with packaging software which is under heavy development can be time-consuming. I noticed this while packaging Conkeror, because there was quite a demand for up-to-date packages, especially from upstream themself. So recently on the IRC channel #conkeror the idea of automatically built Debian packages came up. After a few hours of experimenting and a few days of steadily optimizing, I can proudly present daily built snapshot packages of Conkeror for currently Lenny and Sid, ready to be included in your sources.list:
deb     http://noone.org/conkeror-nightly-debs lenny main
deb-src http://noone.org/conkeror-nightly-debs lenny main
deb     http://noone.org/conkeror-nightly-debs sid main
deb-src http://noone.org/conkeror-nightly-debs sid main
The binary package conkeror-spawn-process-helper is currently only built for the i386 architecture, but other architectures may follow. The packages probably work also on any other Debian based distribution (e.g. Ubuntu) which includes XULRunner version 1.9. Surely they are not of the usual Debian quality, but they should do it for staying up-to-date with the Conkeror development just by using your favourite APT frontend. The script which generates those packages is also available in the Conkeror git repository at repo.or.cz. The APTable archive is generated with reprepro. Packages and the repository are signed with the passphrase-less GnuPG key 373B76B4 which is used only for the Conkeror nightly builds. (If anyone knows a better solution for automatic builds than a passphrase-less key, please tell me. :-) P.S.: I really like the new keybindings << , >> and G . :-)

1 February 2009

Patrick Winnertz: Midnight Commander revived (new version available)

After everybody though that Midnight Commander is dead and the next release of it will be released together with hurd, it is very cool to announce that a new team of developers are active again. We've taken over officially the development in December and now, after two months of work a new version of mc is available: 4.6.2. This is mostly a bugfix release addressing several very nasty bugs which are also present in the debian package. Here the notes what has changed in this release: As you see.. quite a long list of fixes :) Have fun and check the new release out right here! :)

Andre Luis Lopes: KVMing for fun and profit : how to make your toy become a serious business

Here I ll try to present you some tips on how one could easily make a playground become a paid fun. And no, I won t be teaching you how to become rich, although I would like if you would teach me how that could be accomplished as I m trying to come up with a way to do just that for a couple of years now and failed miserably. Recently, I ve been setting up KVM virtual machines in order to do a lot of testing for a project I m involved with. Letting boring details aside, one could say that a very long, boring and error prone setup was finished after a lot of work and it worked like a charm in the end, as a KVM machine. As always, laziness is a given and when you are into it you empower yourself to come up with some nice hacks and goes that extra mile to find out how one could not to have to do boring and repetitive things again and again, in the best spirit of let s have some work now and save me ten times more work later . As I m becoming more and more into that spirit of laziness, there I went looking for a way which would let me transform my beloved and nice working KVM machine into a fully featured real physical server. After some tips from microblogosphere friends (thanks fike), I had some ideas on how that could be accomplished. Turned out my ideas weren t really all that right so there I went again looking for a way to do what I wanted. After some research I found out that the KVM guys already gave some thought about it and even had a ready solution to my problem : it s called qemu-nbd. Yes, by now everyone should know that KVM builds on top of the excelent (just not so snappy) QEMU. However, as I m a Debian user, here I should say that in Debian, most notably Debian sid/unstable, the qemu-nbd binary was renamed to kvm-nbd, just as the KVM binary is called only kvm and not qemu-system-x86_64 or whatever else is called these days upstream. NBD (short for Network Block Device) is a nice thing. I hadn t tried it before (I certainly used and am still using in some projects of mine the not-upstreamed-yet-but-so-nice-that-I-couldnt-resist DRBD, which seems to share some ideas which NBD). In short (read NBD link for more info on that), NBD allows the Linux kernel to use a remote server as a block device. Also, its upstream is a fellow Debian developer (hello Wouter). How nice s it ? As NBD is an upstreamed kernel feature, you don t need to go to the external-module-route-hell. You only need the userland tools, which are nicely packaged and integrated into Debian as well. They re only one aptitude away, so you could use this command to bring it to your KVM host :
aptitude install nbd-client
After that, you will want to export your image file (the file which represents the disk of you virtual machine) as a NBD block device, so you will be able to mount it under your KVM host and do whatever you want to do with it. Here s how one would do it :
kmv-nbd conect=/dev/nbd0 myimagefile.img
I tested it using both qcow2 and raw disk images and both worked like a charm so I don t think you will have any problems here. Next, you need to create a directory structure under your KVM host which temporarily will be used to mount the partitions inside the virtual block device of your KVM machine. You could do this like this :
mkdir /newserver mkdir /newserver/usr mkdir /newserver/var mkdir /newserver/home
In the example above, I ve created these directories because I want my new server to have separated root, /usr, /var and /home partitions and mount points. Feel free to adapt to any kind of partitioning layout you please. Next, you will mount yout virtual machine filesystem under a temporary location, so you will be able to copy all of its content later to your final desired destination, i.e. the real partitions inside the real disk you are going to use in your future real server (not a virtual machine anymore). I did it using :
mkdir -p /mnt/temp mount /dev/nbd0p1 /mnt/temp
Notice that the /dev/nb0p1 above is my root partition inside my KVM machine, only that it s represented now in my KVM host in NBD s device node notation here. I ve only one partition inside this particular virtual machine (aside from the swap partition). Next, you want to mount the partitions on the real disk you want to be used in your new real server under the directories created earlier so you will be able to chroot to then later and do any tweaks you may want to, like fixing /etc/fstab, /boot/grub/device.map, /boot/grub/menu.lst and all these places we know makes references to block devices which may differ from the situation you had in your virtual machine running under the KVM. Here s what I used :
mount /dev/sdb1 /newserver mount /dev/sdb3 /newserver/usr mount /dev/sdb5 /newserver/var mount /dev/sdb6 /newserver/home
The device nodes above are from your real disk s partitions, not from any virtualized device block access method like NBD. Also, take care not to mount your primary disk s partitions (the ones you are using under in your KVM host) as you could destroy them easily. As you can see above, I m using /dev/sdbX as /dev/sda is my primary disk, the one under which my KVM host is running. Again, adapt to your scenario. Next, you just copy everything from your virtual machine filesystem (which is now accessible from within your NBD block device) to your real disk. I did it using :
cp -a /mnt/temp/* /newserver/
After that, you can disconnect your KVM virtual machine image file from the exported NDB device block using :
kvm-nbd -d /dev/ndb0
And then chroot to your real disk layout yout just copied to /newserver in order to fix anything which would make reference to block devices while running as a virtual machine under KVM but which now will be a completely different thing as a real server, like your /etc/fstab, /boot/grub/device.map, /boot/grub/menu.lst and so on. In order to chroot to your new soon-to-be-real filesystem you could use :
chroot /newserver
Then go nuts and start fixing everything you may think needs to be fixed so this filesystem could be used in a real server to boot it up. Im my case, I needed to fix /etc/fstab in order to mount my additional partitions (as under KVM I was using only a root and a swap partition and now, under the real server, I ll be using separated root, swap, /usr, /var and /home). Before I went changing more things, I fixed my /boot/grub/device.map and my /boot/grub/menu.lst files to point to /dev/sdb and /dev/sdb[1], respectively, so I could run grub-install from inside the chroot in order to install GRUB into the real new disk s MBR (master boot record), using :
grub-install /dev/sdb
Then, finally, I fixed /boot/grub/device.map and /boot/grub/menu.lst again so they would point to /dev/sda and /dev/sda[1], as /dev/sda will be the device node for this new disk when it wil be running under the new real server and not as a disk inside the KVM host machine. Next, I exited the chroot using :
exit
And umounted the new real disk s partitions, using (now already out of the chroot) :
umount /newserver/home umount /newserver/var umount /newserver/usr umount /newserver
Now you can take this new disk out of your KVM host machine, put it inside your new real server, physically install it there, turn on your new real server and everything installed while the filesystem in it was being used under the KVM virtual machine will be there, running nicely. And you re done. That s it. Also, it s important to point out that it s much easier being done than being said (or written, in this case) so, if it looks scary because of the size of this post, don t let it disincourage you as this whole thing is a pretty straightforward procedure, much easier than it seems. And as I know that I will receive lost of complaints from people which will tell me how inefficient this whole thing is and how I could have accomplished the exact same thing in a much easier and faster way (perhaps even with a already existing tool which would automate almost entirely the whole proccess), I would say to these people to please exercise their right to share ideas using the comments. Just be nice on me, please. After all, it was fun and I learned new things while doing it all, as well as I tried to share what I learned from this experience with my peers. That s what matters. Peace, love and geekness to all of you :-)

Next.

Previous.