Debian lh_build Errors

I’ve recently been playing with Linux LiveCD’s for a project I have. I was originally using Morphix, but it seems that is so out dated that no resource is ‘complete’. The morphtools kind of worked, but it was incredibly difficult to specify temporary directories to the point where I would have to hack the scripts up directly.

Anyway long story short I did a survey of what else was out there to build Linux LiveCD’s and specifically Debian LiveCD’s. I found that Debian have an official project for this. It’s not as user-friendly as some of the other LiveCD tools perhaps, but I know it will last the test of time because that’s what Debian is good at.

So I’ve been playing around with the live-helper applications, and I stumbled upon an error. Since Google didn’t help me, I thought I’d post it.

If you perform an lh_build in a particular directory, it creates a .stage directory. Because this is a dot (.) file, it doesn’t show up in the listing. There are a variety of files in this directory that store the current status of the build. If something happens in the build, the status may not be cleared properly, and it ‘locks’ the build. This means if you try to perform the build again, you get something like this happening:

$ sudo lh_build
P: Begin caching bootstrap stage…
P: Begin bootstrapping system…
W: skipping bootstrap
P: Begin caching bootstrap stage…
W: skipping bootstrap_cache.save
P: Begin caching chroot stage…
P: Begin mounting /dev/pts…
E: system locked

Note that it says the system is locked. The solution is to delete the .stage directory. I didn’t bother examining the contents of the directory because all I was interested in was keeping the cache. Now Google will have something on this error if anyone else has the problem though.

2 Responses to “Debian lh_build Errors”

  1. endeavormac Says:

    helpful, thanks. it was .lock for me.

  2. mike Says:

    Got the same error and my first instinct said “Google!” Which led me here, but a simple ‘ls -A’ would have revealed the .lock file as endeavormac pointed out.

    Thanks anyway!

Leave a Reply