[Nix-dev] trying NixOS, boot error

Marc Weber marco-oweber at gmx.de
Wed Jul 9 00:21:00 CEST 2008


On Tue, Jul 08, 2008 at 05:15:36PM -0400, Isaac Dupree wrote:
>  I installed nixos-0.1pre12198-i686-linux using qemu with -hda /dev/sda5 to 
>  make sure it wouldn't try overwriting my MBR, because installers have a 
>  habit of doing that if one doesn't know the incantation necessary to stop 
>  them for certain.  As far as I could tell, the only effect that had was 
>  preventing the installation of GRUB; my "/" filesystem is label = "nixos1".  
>  Anyway, the error I get when booting (I extracted linux, arguments, initrd 
>  info from /nix/store/*-system/) is, soon after <<NixOS Stage 2>> or 
>  something like that,
> 
>  ...
>  creating user nixbld10...
>  /nix/store/691zbxamfi710b84wzp8c1q8ji3iw3a-boot-stage-2-init.sh: line 127: 
>  /var/run/current-system/upstart/sbin/init: No such file or directory
>  /nix/store/691zbxamfi710b84wzp8c1q8ji3iw3a-boot-stage-2-init.sh: line 127: 
>  execute: /var/run/current-system/upstart/sbin/init: No such file or 
>  directory
>  Kernel panic - not syncing: Attempted to kill init!

Anyaway. There is not much missing, you already have stage-2 which is
started after the initial ram disk (initrd)
What is happening?
The init process is the very first process of the system. If it halts
the system halts as well (with the message you've seen)
The last line 127
exec /var/run/current-system/upstart/sbin/init
should hand over control to upstart. But it's not there. Why?
Are you sure installation has finished without errors?
This result might happen as well if you start the system with a readonly
disk. I've had this problem today.
You can get a rescue shell by appending
|| @shell@
to the last line. (@shell@ must be replaced by sh of course)


Looking at the stage-2 script there is


# Process the kernel command line.
for o in $(cat /proc/cmdline); do
    case $o in
        debugtrace)
            # Show each command.
            set -x
            ;;
        debug2)
            echo "Debug shell called from @out@"
            exec @shell@
            ;;
        S|s|single)
            # !!! argh, can't pass a startup event to Upstart yet.
            exec @shell@
            ;;
        safemode)
            safeMode=1
            ;;
        systemConfig=*)
            set -- $(IFS==; echo $o)
            systemConfig=$2
            ;;
        resume=*)
            set -- $(IFS==; echo $o)
            resumeDevice=$2
            ;;
    esac
done

so adding debug2 to your kernel commandline will give you a rescue shell
as well to explore what has gone wrong

Marc



More information about the nix-dev mailing list