Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i want to start a linux kernel over pxe boot, load a very small initram, do some jobs there and reboot the machine.

so my init script looks like this:

#!/bin/sh -e
# used for initramfs
export PATH
. /lib/debian-installer/init-debug
debugshell "just booted"

mount /proc
mount /sys
/lib/debian-installer/start-udev

udhcpc

tftp -l - -r /srv/tftp/welcome_test -g 10.10.10.1
sleep 10

reboot

basicily i copied the debian netinstaller script and changed a bit.

the problem is now, if i want to reboot i get this kernel panic:

Kernel Panic - not syncing: Attemted to kill init!

so how can i just reboot after i did my work on the machine? or do i need to start a seperate script via init?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

okay i just oversaw a fact that i did not spawned any init process yet so i was just running in kernel mode all the time... strange things happen there :D

so i i adjust the script with a

exec busybox init

and create a /etc/inittab rule like

::sysinit:/bin/bash /bin/reinstall.sh

it works really fine!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.