Search Results: "sto"

22 April 2007

Michael Prokop: Booting from USB pen: troubleshooting and pitfalls

As grml supports booting from usb devices (harddisk installation via grml2hd as well as booting from usb pens via grml2usb) and I helped many people at debugging booting problems I think I stumbled upon every existing pitfall. 8-) There are several situations where booting might fail. So here we go with a summary of the most common pitfalls and possible solutions:
  1. The Bootsplash is displayed, the kernel loads but you very soon get a:
  2. ran out of input data
    System halted
    
    Reason: everything OK, except for the filesystem used on your usb device. So instead of fat16 you use for example fat32. Fix: use the appropriate filesystem (fat16 for usb pens usually).
  3. When trying to boot from USB you get something like:
  4. Invalid operating system
    
    Possible reason: the partition layout is not ok. Very probably there’s no primary partition or none has the flag ‘bootable’ set. (Read on for further details.)
  5. When trying to boot from USB you get something like:
  6. No operating system found.
    
    Possible reason: you forgot to set the boot-flag on the partition. Or you did not install an operating system at all. ;-)
  7. When trying to set up the partition(s) on the USB device cfdisk reports something like:
  8. FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylinder
    
    Reason: the partition layout is not ok. Either use fdisk (requires detailed knowledge about partition setup!) or better: use a fronted of libparted, like gparted. gparted does an excellent job at setting up an appropriate partition layout for booting from USB (read on for details about the correct setup). As long as cfdisk has problems with the layout - it will exit on errors - your usb pen very probably does not have a valid partition setup for booting. Please notice that fdisk very often uses defaults which are not OK, whereas gparted uses the appropriate heads, sectors/track and cylinders settings. So if you really want to use fdisk for setting up the appropriate partition layout you might have to enter the ‘extra functionality (experts only)’ menu of fdisk.
  9. The system never displays the bootsplash of the usb device at all? Checklist:
    • does your system support booting from USB at all? Check settings in BIOS.
    • do you use the correct USB mode in BIOS? Check BIOS again, usually you want to use USB-HDD mode. Not possible? See USB-ZIP mode.
    • is "booting from USB" in the appropriate order of the booting sequence? Check the "boot"-section in your BIOS.
    • is the bootable flag set on the boot-partition? Check for example with cfdisk.
    • is the partition used for booting the first partition and a primary one on your device? Check with cfdisk again.
    • is the partition layout ok? The first partition (the one used for booting) has to start at cylinder 1/sector 63, otherwise booting will fail on most (all?) x86 systems. Check with ‘cfdisk -P s /dev/..’ or ‘fdisk -l -u /dev/…’. Do *not* trust the output of ‘fdisk -l /dev/…’. Really.
  10. syslinux does not work on your system (b0rken BIOS for example)? Possible solution: use grub instead.
  11. Kernel boots but fails to find the root filesystem with something like:
  12. kernel-panic: unable to mount root-fs...
    
    Yes? Then the root= argument in your kernel commandline (specified in the bootloader, usually lilo, grub or isolinux/syslinux) is pointing to the wrong device. Solution: adjust the root=-option in your bootmanager’s configuration. Tip: use root=UUID instead of root=/dev/[hs]d…
  13. All of the above tips don’t work? Maybe your USB pen is even larger than 1GB?
  14. Possible reason: Some BIOSes offer different modes for USB booting. The proper mode to boot a USB stick is USB-HDD. If that doesn’t work or is not supported by your system, you need to format your USB-Stick as USB-ZIP. To do this, the syslinux source distribution contains an utility called mkdiskimage, which you can use to re-format your USB stick in USB-ZIP format. For more information refer to the USB-webpage in the grml-wiki and Bootable USB Key in the knoppix-wiki.
I mentioned the correct partition layout several times. Reminder: a first, primary partition with fat16 (as filesystem as well as partition’s system id!) with bootable-flag set. The partition should start behind MBR at 1st cylinder and 63rd sector (see www.ata-atapi.com/hiwmbr.htm and thestarman.pcministry.com/asm/mbr/index.html for more details about MBR). So how does a correct partition look like? Output in several formats as reference:
# fdisk -l -u /dev/sda
Disk /dev/sda: 1039 MB, 1039663104 bytes
255 heads, 63 sectors/track, 126 cylinders, total 2030592 sectors
Units = sectors of 1 * 512 = 512 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     2024189     1012063+   6  FAT16
# fdisk -l /dev/sda
Disk /dev/sda: 1039 MB, 1039663104 bytes
255 heads, 63 sectors/track, 126 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         126     1012063+   6  FAT16
# sfdisk -d /dev/sda
# partition table of /dev/sda
unit: sectors
/dev/sda1 : start=       63, size=  2024127, Id= 6, bootable
/dev/sda2 : start=        0, size=        0, Id= 0
/dev/sda3 : start=        0, size=        0, Id= 0
/dev/sda4 : start=        0, size=        0, Id= 0
Tip: if you have a working stick, store your partition layout using ’sfdisk -d /dev/sda > sfdisk.sda’ for later restore (via ’sfdisk /dev/sda < sfdisk.sda’). This is also very useful for cloning a working setup to other devices (though you might have to adjust cylinder/units later on). And of course you can use it as backup if you ran [sc]fdisk-commands on the wrong device. ;-)

21 April 2007

Erich Schubert: More AppArmor FUD^W PR:

I didn't intend to write (ok, rant...) on this topic again, but a few days ago, this "AppArmor FAQ", was posted to the Linux Kernel Mailing list. Again, this is a lot of 'marketing stuff', and doesn't have the facts quite right...Some quotes:
In the traditional UNIX model, files do have names but not labels, and applications only operate in terms of those names.
No. In the traditional UNIX model, filenames point to inodes, and the inodes contain data such as file modification dates and permissions. This is where SELinux stores the labels it uses for access control. In fact, the "unix owner" and "unix group" are pretty much the same thing as SELinux labels. And also work pretty much the same way.
Contrary to popular belief, AppArmor is *not* "Pathnames R Us", but rather "Use native abstractions to mediate stuff": when you mediate something, you should use the native syntax that users normally use to access the object.
Maybe the appropriate term would have been "naive abstractions"?And, no, security systems shouldn't be designed around what a user can easily grasp, because that might just not work... it should be designed around the way resources are handled and how you can successfully restrict access."Contrary to popular belief", SELinux *does* use path names. Actually in a very convenient way for the users. So I wouldn't claim SELinux is really harder to use than AppArmor because of its use of path names.The difference is that SELinux doesn't rely on the path names, but it still gives the user the possibility to use them. In fact, the only way I know to get a proplerly labeled filesystem is based on path names.If I'd for example keep my web stuff in /home/www, I can tell SELinux that the appropriate label is httpd_sys_content_t by doing
semanage fcontext -a -t httpd_sys_content_t /home/www
restorecon -R /home/www
In AppArmor, I'd need to modify the policy for several applications to achieve this, because of it's dependency on path names. SELinux also uses an abstraction. One that is very convenient for users actually. SELinux does access control on object classes. What I'm doing in above example is to put these files into the "Web site data files" class. So please stop scaring people of "labels". That is just the technical term for what is an "object class", a concept every developer will be familiar with. (SELinux policy development has a couple of OOP-like features, btw., for example it is possible to give an application access to 'all log files'.)There are, however, some true statements hidden in there:
We also acknowledge that pathname based access control requires a way to perform pathname matching in the kernel, and this comes at a cost higher than comparing object labels [...]
So by providing string matching in the kernel, AppArmor trades run-time performance to grant reduced administrative work. It is however not obvious how large the difference in "reduced administrative work" is between AppArmor testing the filename "run-time" compared to SELinux using filenames to relabel files "on demand" (or, with restorecond, even on creation by using inotify).What I still seriously dislike is the FUD spread by AppArmor people such as
Label-based security (exemplified by SELinux, and its predecessors in MLS systems) attaches security policy to the data. As the data flows through the system, the label sticks to the data, and so security policy with respect to this data stays intact. This is a good approach for ensuring secrecy, the kind of problem that intelligence agencies have.
Why should this only be useful to "intelligence agencies"? Some people live in countries with very strict privacy requirements, and we might want to use these techniques to lessen the risk of leaking data. In AppArmor, I can copy a file with private customer data to the web server directory, and it becomes readable by the web server. In SELinux, the file will still be unreadable by the web server. Does that really sound like "only useful to intelligence agencies" to you?Dear AppArmor people, please stop trying to invoke fear of the NSA, just to make people use AppArmor. That makes you look very untrustworthy, you know...The SELinux kernel code is part of the Linux kernel, AppArmor is not. So in theory, that code has been reviewed much better than yours, and is maybe even less likely to contain a "NSA backdoor" than yours. Changes to SELinux are openly discussed on a mailing list, and go through peer review there. They foolow a very strict coding style, which makes review easier; obfuscated code doesn't have a place there. It's not like we were running a binary blob from the NSA we can't have a look at.

Daniel Burrows: Wikified aptitude TODO list.

I've been able to crib more time lately for Debian, so I'm hoping that I can stop just keeping my head above water (barely) and start on the pile of new work that I'd like to do. For a while I've been accumulating a mental list of stuff that sucks in aptitude, but mental lists have the drawbacks that no-one else knows about them and that they never seem to be available when I want them.

I've now got a nice page in the Debian wiki holding aptitude's current TODO list. The entries range from changes that are trivial but will improve the user experience, to deep and difficult changes that no-one will notice. Since I don't expect a team of magic pixies to do the coding for me, I figure I might have the majority of the design and coding done in a year or so.

Julien Blache: Call for help: SANE

I am currently going through the SANE bugs reported on bugs.d.o. There are quite a few of them, and verifying them already takes a long, long time; fixing them is another story entirely, given I own none of the affected scanners or platforms. I’ll be going through the bugs this week-end, re-reading the logs, tagging/retitling as needed so hopefully the list will be easier to read. If you have - or are affected by - an open bug against SANE, please try to reproduce the bug on an up-to-date unstable system. I’ll be uploading a CVS snapshot to unstable today for that purpose. SANE is a complex piece of software that is best maintained in a team, if only because there’s so much hardware involved that the more maintainers you have, the more different hardware you can have too. If you have a scanner, have some knowledge about USB, shared libraries, GTK among other things and want to help, mail me and tell me what you can/want to do. Some knowledge about SCSI can help too, though SCSI scanners aren’t exactly mainstream anymore. I currently own only 3 scanners, one old SCSI scanner and a pair of nearly identical USB scanners; so that really makes 2 scanners. If you have some scanners lying around that you don’t use anymore, I (and the SANE developers too) could probably use them. I’m primarily interested in any scanner that is involved in one of the bugs currently open against SANE. I’m also looking for a scanner supported by the epson backend (the Epson scanners I have are supported by the snapscan backend). Now, back to these damn bugs.

Andrew Pollock: [life/americania] On the right to bear arms

Steven's blog post reminded me that I had to make a note about the two email responses I received to my own. I received one email from Pro Guns Person A quite quickly after my blog post went up. He was quite civil, and had things to say such as:
The truth is, if a few good citizens were armed and nearby, they would have had a chance to stop the killer before he could do any more harm.
and went on to say how if a person really wanted to, they'd break laws to get guns, so gun control doesn't achieve anything, except leaving the good guys unable to defend themselves. Sure, they'd break laws to get guns. You can't stop them if they really want to, but you can make it harder. And you have to make it harder universally. It's no good if one state cracks right down, if people can just pop over to the next state and pick up a firearm instead. I agree with Steven. Leave the gun toting to the people trained in their use (i.e. law enforcement). Frankly, it disturbs me that "defending yourself" equates to being able to shoot the attacker. I think it's Texas where you can legally shoot trespassers. Scary stuff. Pro Guns Person A went on to say:
To close, again without intending offense, please do not call for gun control if you aren't even a citizen of this country. The real problem is the societal issues that drive people to do these things. The truth is, fifty years ago in this country, people could leave loaded guns in their unlocked cars, even in high school parking lots...and nothing like this ever happened. But now, even though we have far more restrictive gun laws, things like this do happen, because of the societal problems.
I have the right to express my opinion, irrespective of my citizenship, as do you, Mr Pro Guns Person A. You don't have to like my opinion, just as I don't have to like yours, but I respect your right to have your opinion. No offense taken, either. You were very polite in putting across your point, I appreciate it. (By the way, I agree. Society's gone to pot.) Pro Guns Person B's email was along a similar theme: the bad people will always get their mitts on a gun, and the good people won't be able to defend themselves.
Think about these figures (I'll write about the US, since that's the nation you wrote about now): In the state of Arizona the gun per person ratio is 2,5 (on average 2,5 guns owned by 1 person, and these are the legally purchased ones). In the state of New York there is an official prohibition on guns. So why is it that New York has the higher armed crime rate among those two? (and one of the highest across the country)
I don't think reverting the entire US to a "wild wild west" scenario is really going to help matters at all. Sarah was saying that she'd found some statistic somewhere, probably saying something like what this page is saying. Now this was done at a Federal level, so that's why it worked, whereas anything done piecemeal, is going to cause a situation like what Pro Gun Person B was describing in his email.

Dirk Eddelbuettel: Boston Marathon 2007

So this Monday was the 111th running, as they call it, of the venerable Boston Marathon, and my first time there. After the fairly serious storm warnings -- and the corresponding health warnings, delivered through two emails from the race organizers and a handout at registration, we got very, very lucky as the rain more or less stopped shortly after the start. And there was relatively little wind, and mostly laterally, rather than the 'in your face' gusts at the projected 30 to 50 mph.
There were actually six of us running from our little informal group in River Forest / Oak Park, and fellow rookie Russ and I decided to 'take it easy' and just 'go for a long run'. I ended up with a fairly even pace between 7:45 and 8:10, averaging 7:57 for a total of 3:28:24, or a few seconds faster than my very first marathon in Chicago. Which is quite pleasant, given the conditions, and the hillier course. The race went pretty well for all six us, which is nice too. Given how we trained together, it is neat how we all ended up within seven minutes of each other. The race itself is quite stunning. With the required qualifying time comes a 'seeding' system for the start, so one tends to run most of the course with runners of fairly similar speed. That made for nice cameraderie on the course -- and for beautiful sights of nothing but runners rolling through the hills of Massachusetts. I think I'll be back next year.

20 April 2007

Jaldhar Vyas: It's A Most Magical Time Of Year

Yesterday was Akshaya Trtiya (Akkha Trij in Gujarati.) It is notable for being auspicious all day long, one of only 4 days in the year when you don't have to look at the muhurta. I did Lakshmi puja (kanakadhara stotra patha) and began several new projects which I will blog about soon. But the real reason boys and girls love Akshaya Trtiya is it is the day when Akshaya Trtiya Akshaya brings presents to all the good children. This year I got Feisty Fawn from Kubuntu, a six-in-one games set for drinking about 20 gallons of Coke Zero courtesy of mycokerewards.com, and some Philip K. Dick books for winning a caption contest on a blog. All is not well. There are some atheist secularist communists who claim that Akshaya Trtiya Akshaya doesn't exist and people should refer to the day as "Thursday." Well boo to you I say. Boooooooooo!

Joerg Jaspert: Switching to bzr for &#8220;offline&#8221; edits considered - useless

Bastian describes his move to bzr, away from svn. Fine, use what you want, but please chose a better reason than one can do (small) local checkins and later a big commit or “like to have the whole repo stored locally”. :) You can do that with svn repositories too, using svk, and you wouldn t need to use a version control system that only scares people away. So, install svk. Then run the following commands for the svn repositories you want to sync (using an alioth.d.o one as example, replace the values as needed):
 svk mirror svn+ssh://joerg@svn.debian.org/svn/debconf-data/ //alioth/debconf-data
 svk sync //alioth/debconf-data
 svk copy -p //alioth/debconf-data //local/debconf-data -m "Copy to local"
Change to the dir you want the checkout in, run
 svk co //local/debconf-data
Later on you use the following commands to get updates from svn to your system:
 svk sync //alioth/debconf-data
 svk smerge //alioth/debconf-data //local/debconf-data -m "Merge to local"
 svk up
Obviously the svk up should run in the dir you checked it out earlier. Now work. Have fun, use svk instead of svn and do the stuff you would normally do, like svk add/remove files, commit changes, etc. Whatever. Changes wont go upstream, to get it synced you need to run
 svk smerge -l //local/debconf-data //alioth/debconf-data
which will get your changes propagated upstream, preparing a commit message for you that is based on your local logs. Oh, dont want to have one big commit upstream? Try svk help smerge and use -I. Instead of //alioth you can take whatever you want, just not //local, as we want to keep //local for those stuff that doesnt get committed upstream directly.

Bastian Venthur: Reportbug-NG migrated from SVN to BZR

The migration was rather easy
sudo aptitude install bzr-svn
# patch (see below)
bzr branch svn://svn.debian.org/reportbug-ng    # That's right I branch directly from a SVN repo!
# ignore the error
bzr push --use-existing-dir sftp://venthur@bzr.debian.org/bzr/reportbug-ng
To get your own branch:
bzr branch http://bzr.debian.org/bzr/reportbug-ng/
Bzr-svn really makes it easy to migrate from svn to bzr… well, in theory. In practice we have #415721, but fortunately there is an easy workaround. Just temporarily apply this trivial patch:
--- /usr/share/pycentral/bzr-svn/site-packages/bzrlib/plugins/svn/__init__.py 2007-04-20 09:30:00.000000000 +0200
+++ /usr/share/pycentral/bzr-svn/site-packages/bzrlib/plugins/svn/__init__.py.new 2007-04-20 09:30:24.000000000 +0200
@@ -23,7 +23,7 @@
import bzrlib
__version__ = '0.2.0'
-required_bzr_version = (0,13)
+#required_bzr_version = (0,13) def check_bzrlib_version(desired):
"""Check that bzrlib is compatible.

and life is good again. The reason why I switched from a centralized to a distributed RCS was that I really like the option to do (small) local checkins and just do the “real” checkin when the work is done. In terms of BZR it means commits to my local branch for smaller changes and pushes back to the mainline for every major change. Oh, and it’s also nice always having the full repository data locally stored. My requirements for the RCS were: it should be easy to use (no steep learning curve), well tested and somewhat mainstream. BZR fits quite well, especially since Ubuntu heavily relies on it for their launchpad stuff. PS: Thanks to the alioth team for creating the BZR repository so quickly, it just took like 1 minute.

19 April 2007

MJ Ray: The Tragedy of Targets

I've started using the phrase "tragedy of targets" recently for those situations where someone does something stupid to meet an ill-specified target, instead of working towards the result in the way the target-setter expected. This gem was published by a Conservatives candidate over in my home county of Northamptonshire and was mentioned in today's Weston and Worle News
"an offender visited approximately 550 domestic properties in Weston-super-Mare with a fake comic relief sponsor form. This person obtained property by deception, (i.e. convinced them to part with money) from no less than 542 separate victims. Following good work from the police, he was caught, arrested, interviewed and I understand he will be cautioned for all the offences. My sources tell me that as a result of the arrest, the North Somerset District was or is planning to claim 542 'detections' for this one job. This will prove to be an amazing result for the bean-counters and has no doubt salvaged the whole 'performance target' result for the area in 2006. Indeed, the local Police Community Support Officers have spent the week going door to door in an attempt to locate every household that was conned, and get them to sign a pro-forma statement of complaint to bolster the clear-up rate"
Do you know other examples where setting a target has had unintended effects? Do you have a suggestion how to set better targets for the police here? Me, I like the suggestion of one anonymous commenter:
"The Police should be measured on the absence of crime not by detecting it."

Daniel Baumann: Debian Live and Google Summer of Code 2007

Debian is this year again part of Google's Summer of Code. Last week, the final decisions about the proposed projects were made and Google granted 9 slots in total for Debian. I am very glad to say that Chris 'lamby' Lambs proposal for Debian Live is amongst those. Here is the abstract from his proposal:
	Live-helper is a utility to build CD, DVD, netboot and USB-stick live
	images of Debian, a GNU/Linux operating system. It boasts support for
	multiple architectures, auto-building images, amongst many other
	features.
	Live-helper is extremely flexible, allowing interested parties to create
	their own system completely specific to their needs, including support
	for custom package lists, kernel parameters, encryption, additional
	commands to configure the live system etc.
	My proposal is to construct a graphical user interface that can be used
	in conjunction with live-helper to build Debian Live systems, allowing
	editing of existing configurations and including a 'wizard'-style
	walkthrough for the first-time user.
	Providing less experienced users with the opportunity to easily create
	live distributions will generate more exposure for live-helper,
	providing more valuable feedback for its developers and ultimately
	helping Debian's image as an extremely flexible and free operating
	system.
	The GUI will be written in Python using the pygtk GTK+ bindings.
The next step on the timeline begins at May 28th, where the students start coding on their projects. I am happily looking forward to it.

MJ Ray: North Somerset Planning Farts

Two semi-related things. Firstly, I just got notice that North Somerset Council are going to let North Somerset Housing pointlessly tarmac over a square of grass near us. Planning application 07/P/0464/F claims to provide 3 additional car parking spaces, but it tarmacs 7m width of grass while marking 6m width of current tarmac as no-parking: a net addition of 1m! Not enough for even one additional car! Now they've made this officially-acceptable reasoning, I reckon it will feature in a planning application for building more houses on the village's green spaces. How about: you can build a new house as long as you mark an existing house as uninhabitable? Secondly, Clevedon residents are petitioning the Prime Minister to stop Tesco expansion as reported in the Mercury. Expanding the Tescopoly in Clevedon will harm what already looks to me like an endangered town centre. OK, it's not the PM's responsibility to stop one store expanding in one town, but it is his government's planning policies which are aiding and abetting the continued growth of unsustainable 'big box' stores. I can see Clevedon from my office window. I'd need binoculars to spot Morrisons, but I think Tesco is visible with the naked eye already from the top of Worlebury hill. Every Little Hurts but they just keep on rolling like Renard, not noticing the pain.

Adam Rosi-Kessel: Adam s Super Simple Guide to mbox->maildir conversion

There are a lot of pages out there explaining how to convert your mail from mbox to maildir. I’m going to add one more, resurrecting the “tips” section of my blog. (All the tips from my blosxom days are grouped together on one page — someday I’ll get around to breaking those up properly.) If nothing else, I’ll never have to write these instructions in an email to someone again, instead I’ll just send them the link to this entry. I hope these steps are specific enough so anyone savvy enough to even have this problem in the first place will be able to follow them. One thing I find consistently concerns people when converting to maildir is how to make sure no mail is lost in the transition. The steps below address that concern. It’s really not hard at all once you understand how maildir works. First, I’m assuming you have mb2md installed and procmail support. Also, if you plan to access your mail through IMAP, your IMAP server needs to know to use ~/Maildir if ~/Mail does not exist. This is often default behavior (at least it is for Dovecot). Finally, I assume that your inbox is in /var/mail/username, and your other mail folders are in ~/mail. So, here goes:
  1. Edit your .procmailrc. The first two lines should read:
    MAILDIR=$HOME/Maildir
    DEFAULT=$MAILDIR/

    This will cause all new mail to be delivered (after you save your .procmailrc) to be stored in maildir format under ~/Maildir. The key for procmail to know to use the maildir format is the trailing slash in the “DEFAULT” line. Note that under the new system, your inbox and all your folders are kept in ~/Maildir, rather than having an inbox in /var/mail and your folders under your home directory. (This is nice because it makes it easier to back up all your mail together, among other things).
  2. If you have any specific procmail rules in your .procmailrc, you’ll also need to change the target folders for that. For example, if you have a spam filtering rule like this:
    :0 H
    * ^X-Spam-Level: *****
    spam
    It needs to be changed to this:

    :0 H
    * ^X-Spam-Level: *****
    .spam/

    The trailing slash, again, tells procmail to use maildir rather mbox format for delivery. The leading dot will make the folder appear properly for your IMAP client (there’s a trick I suggest below for making “dot” folders easy to access with a command line client like mutt).
If you have mail being delivered to a nested mail folder, an additional change is needed because maildir has a flat hierarchy. So if your mail was being delivered to “misc/other/spam” the new target should be “.misc.other.spam/”.
  • Save your .procmailrc. From this point forward, all mail will be delivered to your maildir folders. You can now import all your old mail to the new folders without concern. Since maildir stores each individual message as a separate unique file, you don’t need to worry about any overwriting issues while you are making the transition. New mail will be delivered to newly named files; old mail will be imported to other, unique, newly named files.
  • Import your mail folders:
    mb2md -s ~/mail -R
    The -R just means to import recursively through all your folders; if your mail folder is Mail rather than mail, use that instead. No destination is needed because mb2md uses ~/Maildir by default.
  • Import your inbox:
    mb2md -m
  • Move your old inbox out of the way. Most people won’t actually be able to move or delete files in /var/mail (since they don’t have directory write privileges), so the easiest thing is probably to just open the inbox in your IMAP client or with mutt and save or delete all the messages.
  • Move your old mail folder out of the way:mv ~/mail ,.bak Once you’ve confirmed that everything is okay, you should be able to delete ~/mail.bak (or compress it and move it elsewhere.) If you saved your inbox to mail folder in step 6, that will get moved out of the way here as well.
  • That’s it, you’re done.
  • Okay, so you’re not quite done if you access your mail with mutt rather than an IMAP client. (You could just point your mutt at your local IMAP server, of course). I’ve found the most convenient way to access the “dot” folders with mutt is to create a parallel symlinked folder structure without the dots. Here’s a hacked-together shell script that will do that. This could obviously be rewritten to be much more elegant (probably in perl). But we all have our messy scripts, right?

    #!/bin/bash
  • cd ~/Maildir for x in .*
    do
    y=$ x##.
    if ( echo $y grep -q ‘.’ )
    then
    mkdir -p ~/mymail/$ y%.*
    fi
    ln -s ~/Maildir/$x ~/mymail/ echo $y sed “s/.///g”
    done for x in *
    do
    ln -s ~/Maildir/$x ~/mymail
    done
    Then, just add these lines to your .muttrc file:
    set folder="~/mymail"
    set spoolfile=”~/mymail”
    Any questions?

    18 April 2007

    Jos Parrella: Sobre moderaci n en Planeta Linux

    Desde su concepci n, Planeta Linux ha exhortado a sus participantes a sindicar contenido exclusivamente relacionado con tecnolog a, computaci n, software libre y Linux, en orden incremental de preferencia. Pronto se determin que la exhortaci n no era suficiente y se pas al requerimiento. H ctor Colina y Milton Mazzarri, por nombrar dos venezolanos, estuvieron involucrados en los Lineamientos y las Preguntas Frecuentes de Planeta Linux Venezuela. Como para ese momento ya hab amos hecho un grupo inicial de “venezolanos con blog que hablan de Linux” (b sicamente gente de VELUG, SOLVE, Debian Venezuela y de unplug.org.ve), no tuvimos la oportunidad de requerirles que tuvieran una categor a dedicada a Planeta Linux. A las nuevas personas que se inscrib an por la lista, en ocasiones se les requer a la categor a si su blog conten a, a primera vista, contenido no relacionado con Linux. En todos los casos, se requer a estar de acuerdo con los Lineamientos. En el caso de las personas que me solicitaban a mi directamente (que desde hace no mucho tengo acceso al SVN de Planeta Linux) yo les requer a una categor a particular, a menos de que su software no lo permitiera. En este ltimo caso, muy a pesar de los quejones de oficio, elimin bamos a la persona de PL. Es el caso de Luigino Bracci, quien en alguna ocasi n lleg a llenar todo Planeta Linux con contenido pol tico parcializado, y quien manifest que su sistema de blogs no le permit a agregar categor as. Hay casos en los que una persona que escribe poco o que suele escribir de Linux llega y hace algun desastre al estilo Alberto Capella con su foto a tama o gigante. En esos casos alguien se da cuenta y me avisa (aunque es un error, al final de la p gina hay direcciones de contacto y en Venezuela somos varios que administramos!) pero estoy involucrado en muchas cosas como para dar respuesta inmediata a ese tipo de casos. Y ah viene otro problema. En Planeta Linux NO PODEMOS moderar un post o a una persona. Solo podemos suspenderlo o eliminarlo. No podemos borrar una imagen ni un post ni nada, porque en 15 minutos perdemos los cambios. Espero que eso de algunas luces cuando haya algo de que quejarse en Planeta Linux. El ltimo caso es particular. Jes s Lara hizo varios posts no relacionados con Linux en su blog. Particularmente hubo gente que reclam que hab an recien escrito algo relacionado con Linux y los posts de Jes s “empujaron” los posts relacionados con Linux hacia el final del Planeta. Por lo tanto suspendi la suscripci n de Jes s y lo contact el 9 de Abril. Cre una categor a y me lo comunic . Eso es suficiente para volver a reactivar su suscripci n (en este caso me tard unos d as porque el commit fall y nunca me enter de ello, ni Jes s me lo inform , realmente) Ya hay mucha gente que sindica categor as en PL, y pronto ser n muchos m s. Cont ctenme si quieren hacer el proceso pronto. Por favor, la pr xima vez que encuentren un problema en Planeta Linux:

    Benjamin Mako Hill: Feisty Release Fiesta

    With the Debian 4.0 (etch) release parties out of the way, it's time to devote a little energy to celebrating the forthcoming release of Ubuntu 7.04 (Feisty Fawn). A few of us from the nascent Massachusetts Loco Team in the Boston/Cambridge area have planned a release party -- a Feisty Fiesta if you will -- for Saturday April 21, 2007 19:30 at the Cambridge Brewing Company. For more details, answers to your questions, or to RSVP for the party so we can reserve a big enough table, please visit the party wiki page.

    Biella Coleman: The Importance of Celebration

    Recently a Debian user left a really nice note letting me know “It makes
    me happy and proud to learn that boricuas are Debian developers! (Hopefully you are not the only one). This is for me the best Debian News since Etch released. Proud and happy for you.” Here I have to confess, however that I am neither a DD nor really a true Boriqua. I have studied Debian for many years, but have never officially joined. In terms of PR, none of my family is originally from there as my father is Jewish American and my mom was born in Russian, wandered as war refugee for many years in Europe and eventually landed in Venezuela, where I was born. But I have made my home in PR for many years and do consider it one of my many homes. Speaking of many homes, I also feel, even though I am not a DD, that Debian is an important touchstone in my life. It reminded me of a conversation I had with Manoj recently related to this topic, who almost mistook me for a DD: [biella] who is that DD that wrote an anthro thesis on debian? [08:55]
    [biella] he is brazilian [manoj] I was gonna say that the dd who did an anthro thesis on debian
    was you, then it struck me that you are not a dd, but I still
    think of you as one now, and then it struck me further that
    making you a dd might compromise your postiion as an observer After many years following the project, I have grown quite attached to it, and every year, a few months before Debconf I am reminded of this attachment. I have managed to make Debconf only every other year, and usually when I face this fact, a sense of melancholia and slight sadness sets in, especially when I hear of everyone making plans to go. I always start to question my decision to stay back, then hit all sorts of websites for cheap tickets, and start to wonder if I can perhaps manage to complete some work there, which is the main reason this year I am staying away. I then make myself confront REALITY and remind myself that the whole reason I love attending Debconf is because of its extreme vitality, which after a week, leaves you wrung out and tired, because you put so much of your attention and mind, soul and heart in the events. So even if I go for a week, or longer, you usually need a week ore more to recover. I am not sure I can spare such time this year, especially since less than a month after Debconf, I am packing my bags and moving back to the east coast of the United States. And as I learned last year and the year before and two years before, these sorts of long-distance moves take a lot of your time. My longing reminds me of how important it is to celebrate those things in life you love. And while there is more to Debconf than a celebration, much of it is just that, a chance, a space, a place by which and where you celebrate. And since I sit only in the shadows of Debian, I imagine the pleasure and joy runs deeper and wider for those who sit at its heart. So if you are on the fence on whether to go, this is your friendly public service announcement that it is, indeed, so worth your while.

    Margarita Manterola: Getting a Rhino

    Ever since I stopped doing webpages, I've been missing having my own Rhino (the one I used in the past was not mine), but since I wasn't doing any JavaScript, it didn't make sense to spend U$S 50 on a book I wouldn't use. Now, with the interactive web inteface for Debbugs being accepted as a Google Summer of Code project, I finally decided to buy one for me. I ordered it yesterday from Amazon. I hope it gets here soon.

    17 April 2007

    Gunnar Wolf: Init-related ideas BoF submitted for Debcamp

    Ok, so it just seems like a hot topic - I just submitted a BoF for Debcamp to talk about the init-related ideas we've been discussing. As Debconf's Pentabarf conference management system does not like disclosing talk details before the talks are accepted, I'll reproduce here my short blurb:
    This BoF comes out from several ideas posted in Planet Debian by Erich Schubert, Sven M ller, Joachim Breitner, Mike Homey and myself (so far). It's not to be "chaired" by any of us particularly, but I expect an interesting brainstorming session.
    There are several different init systems present in Debian - However, we are only supporting currently one of them, good ol' sysv-rc - We have close to a thousand packages providing init scripts suitable for it, and close to none for all of the other systems.
    In current systems, full of hot-pluggable devices, changing network configurations and so on, however, I think this situation is quite prone to change - sysv-rc and its runlevels are better suited for stable server-like systems, and is hard to adapt for future needs.
    We will talk about the potential difficulties Debian will face in order to better support more init schemes, and discuss some ideas to solve them.
    This should be a brainstorming session, not much material will be prepared (maybe some sketches by each of us, but nothing formal). If you plan on attending, take a look at the messages linked to in the 'links' section.
    Note that, following Nomeata's suggestion, I'm presenting this for Debcamp - If you are not attending Debcamp and are interested, we will try to set this up via some sort of videoconferencing (or at least the usual video feed + IRC feedback), and I do hope we can have something showable (at least a broken concept) after Debconf.
    In not-so-closely-related topics, I just learnt there is a shadow of doubt regarding my presence in Edinburgh - I will do my best to dispell the threat. I just don't want to miss a Debconf!

    Thijs Kinkhorst: Leuker kunnen we het niet maken

    Today I received a letter from the tax office urging me to pay an amount which they claimed was past due. Looking in my records, I found that I had payed this back in January. To make a bureaucratic story short, it turns out that I was a "too fast payer" (their words): I paid it right the day when I got the invoice, which was too fast for their system to process it. The amount was automatically refunded to me by the system, that just could not understand why I transfered money to them, even though it did manage to send me an invoice the day before. Now I have to file an official appeal to get a whopping 11 euros in costs of late payment refunded. Another life lesson learned: delaying saves trouble.

    Sven Mueller: init script generators

    Gunnar is following up on the init script blog posts by Erich and me. First a note to Gunnar: The idea of the init scrip snippets isn’t exactly my own idea, but rather taken from a comment to one of Erich’s posts (IIRC), I don’t know the original author anymore. Anyway, I really think that some init script generator should work. It should even be possible to fetch variables from /etc/default/<daemon-name> if needed. I’m just doing a braindump of what I have in mind for the start and stop of a daemon. I would expect a configuration file (currently I think one for each operation might be best, but INI-lookalike files might also be OK). So for the start operation, I would expect these options:
    1. simple daemon, uses a default config with a hardcoded path and needs no options or only static options passed:
      [SIMPLE]
      /path/to/daemon
      option 1
      option 2
      option 3
      
      Where I chose to name one option per line so whitespace and controll characters can be part of the options without the need to quote anything.
    2. a bit more complicated, needs a few variables from /etc/default/daemon:
      [TEMPLATED]
      /path/to/daemon
      option 1
      %PARAMETER_FROM_ETC_DEFAULT%
      --parameter=%ANOTHER_ONE_FROM_ETC_DEFAULT%
      
      Where the script generator would have to make sure that the parameters from /etc/default are filled in at runtime. I would expect POSIX-Shell-Scripts in /etc/default for this.
    3. Really complex: A custom script snippet is needed which has to do some specificc tasks, like cleaning possible stable locks which had been left behind.
      [SCRIPT]
      rm /var/lock/daemon.lck
      /path/to/daemon --background --and --other --options
      
      Where the script generator would simply take this script and use it where it would otherwise generate its own code.
    As for stopping, I generally see only three options for the sysv-like background processes: Either a script is needed (see above for how that would look like) or a process needs to be killed according to a PID-file or the process name (with the later being rather bad). So this would result in:
    1. [SCRIPT] like for starting the daemon
    2. killing by PID-file:
      [PIDFILE]
      /path/to/pid-file
      
    3. killing by process name/executable:
      [PROCESS]
      binary
      
      or
      [PROCESS]
      /path/to/binary
      
      where the generator would either only look at the name of the process (first version, no full pathname) or for a process with the given executable (from /proc/ /exec, I would expect).
    Alright, this would leave the cases of running (instead of backgrounding) the server and stopping such a running server (the later should be fairly simple unless the stopping of the server requires additional actions other than simply killing it) as well as the reload/restart/status stuff. But these should also be relatively simple actually. What would be interesting for me:
    Does any init system require information that is not part of the following list? I would plan with supplying information how to: Finally, even with all that information available inside a Debian package, this would still leave one question unanswered: Who triggers init script generation? If a daemon package does so in postinst: How do I switch to a different init system? If the init system does it in postinst: What happens to additional daemons installed later on? If they get regenerated during system start: How much penalty does that cause? Currently I think the route to go is to provide a command to daemon packages’ postinst that (re)generates only the needed scripts for that package and have a command used in an init system’s postinst which regenerates all of them. That should do. Regenerating during boot would most likely take too much time and has other problems, too, like the availability of a writeable filesystem to store the generated scripts.
    Alright, if someone would like to see this post (or rather parts of it) on the Wiki page about an Init HackFest, please transfer it there yourself. I’m currently not able to log in, for whatever reason.

    Next.

    Previous.