[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: script makes kernel panic - thanks



Am Dienstag, 10. Juni 2008 22:42:45 schrieb Cameron Hutchison:
> Dexter Filmore <Dexter.Filmore@gmx.de> writes:
> >Got a laptop here (Samsung X22), WinXP Pro and data partition in
> > /dev/sda[23]. Wrote this script to backup both partitions 1:1 to an
> > external USB disk. Teh script itself works absolutely as intended.
> >
> >BUT: I added an entry to GRUB's menu.lst like that:
> >
> >title           Windows XP Backup
> >root            (hd0,4)
> >kernel          /boot/vmlinuz-2.6.18-6-686 root=/dev/sda5 rw
> > init=/sbin/windows_backup initrd          /boot/initrd.img-2.6.18-6-686
> >savedefault
> >
> >When I select that entry, kernel comes up, script is executed alright,
> >but after the script called "halt" it just sits there and eventually
> >throws a kernel panic - and I have no clue why.
>
> By default, halt calls shutdown(8), which signals init(8) to shutdown
> the system. Since you are not running a standard init, that signal is
> never received by anything, so halt effectively does nothing. When your
> script exits, since it is running as process 1 (init) you get a kernel
> panic when it exits. Init should never exit.
>
Interesting. 

> Try using "halt -f". Check the man page for halt to see if there are any
> other options you want to use.

Will try that on a tinkerbox.
For now I resorted to calling the script from rc3.d and boot to RL3. Now rc 
complains it gets an exit where it shouldn't but for the moment will do.
Thanks for the info.

Dex


-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d--(+)@ s-:+ a- C++++ UL++ P+>++ L+++>++++ E-- W++ N o? K-
w--(---) !O M+ V- PS+ PE Y++ PGP t++(---)@ 5 X+(++) R+(++) tv--(+)@ 
b++(+++) DI+++ D- G++ e* h>++ r* y?
------END GEEK CODE BLOCK------

http://www.vorratsdatenspeicherung.de


Reply to: