[lfs-support] LFS 7.0 - No Devices in /dev on boot up - Kernel then shuts off PC

Baho Utot baho-utot at columbus.rr.com
Wed Jan 11 05:24:12 PST 2012



On Wednesday 11 January 2012 05:04:31 am Simon Geard wrote:
> On Tue, 2012-01-10 at 02:20 -0700, jasonpsage at jegas.com wrote:
> > Well, I opend the "previous untouchable" RC file and tossed readline all
> > over it ... and when I booted .. GUESS WHAT? I was able to step through
> > the actual boot process one command at a time... and I saw the offending
> > error for the first time... and bot this is embarrassing....
> >
> > /etc/rc.f/rcS.d/S10udev Line 78 /sbin/udevd - No Such File
> >
> > I looked in my scripts that build LFS, and realized I forgot to UNTAR
> > UDEV!!!!!
>
> Next lesson - when doing scripted builds, error handling is important.
> You want the entire build to stop immediately when something goes wrong,
> instead of trying to continue, making the original error hard to find.
>
> Personally, my preferred means of dealing with that is to simply add
> "set -e" near the top of my scripts. The has the effect that if any
> command run by the script exits with a non-zero status (i.e fails), the
> script aborts immediately.
>
> Simon.

I use the following:

#!/bin/bash -e
shopt -s -o pipefail


the shopt makes sure that the error makes it through a pipe. so if you 
redirect to a log (which I do) it will stop on the error.




More information about the lfs-support mailing list