You are not logged in.

#1 2008-06-25 07:08:56

rotemtamir
Member
Registered: 2008-06-25
Posts: 13

Please HELP! Kernel panic!

Hello all,

I'm new to linux and to archlinux and have been spending the past days playing around with it.

I saw somewhere on the net a sh script to start vncserver on init, so I put it in rc.d/vnc. 

Then I added to rc.conf

su fileserver -c "/etc/rc.d/vnc"

forgetting to add the "start" parameter to the line.

Next I reboot and the init script freezes for a long time, filesystem failes and i get this line:

/etc/rc.conf: line 97: 902 (or other number) killed                             /etc/rc.d/vnc

and the line

usage: /etc/rc.d/vnc {start|stop|restart}

many many times..

what to do???

I can't log in to archlinux to nano the rc.conf file.. I tried mounting the harddrive from the liveCD but i the /etc/ directory didn't have my OWN files (only the origiinals..)

I'm clueless. Please help.

Rotem Tamir

Offline

#2 2008-06-25 07:55:08

shining_grin
Member
From: a little town near Milan
Registered: 2008-05-02
Posts: 23

Re: Please HELP! Kernel panic!

Are you sure that when mounting your root partition for example with

sudo mount /dev/<your partition> /mnt
cd /mnt/etc

you're not finding your own files?
Let us know..

Offline

#3 2008-06-25 07:58:09

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Please HELP! Kernel panic!

custom srcipt:
use rc.local

daemon:
just add the daemon name in your daemons array in /etc/rc.conf to start it at boot.

I can't log in to archlinux to nano the rc.conf file.. I tried mounting the harddrive from the liveCD but i the /etc/ directory didn't have my OWN files (only the origiinals..)

there's an option to boot into your _existing_ system.

Offline

#4 2008-06-25 15:15:55

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: Please HELP! Kernel panic!

You can chroot into your system following the instructions here:  http://wiki.archlinux.org/index.php/Kernel_Panics

Last edited by tigrmesh (2008-06-25 15:16:15)

Offline

#5 2008-06-25 23:03:21

rotemtamir
Member
Registered: 2008-06-25
Posts: 13

Re: Please HELP! Kernel panic!

okay thanks to you all for the very quick replies.

I managed to mount the proper partition and edit rc.conf to delete that line..

But now my question is.. where do I run my command?

I would like my system to run my script located in /etc/rc.d/vnc as "fileserver" user on boottime..

thanks in advance

Offline

#6 2008-06-25 23:39:45

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: Please HELP! Kernel panic!

"I saw somewhere on the net a sh script to start vncserver on init, so I put it in rc.d/vnc.  "

Can you post the script.  If its just a random script from the internet then there's a good chance that it won't work without some modification.

Offline

#7 2008-06-26 07:05:13

rotemtamir
Member
Registered: 2008-06-25
Posts: 13

Re: Please HELP! Kernel panic!

#!/bin/bash

# general config
. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting vncserver"
      su fileserver -c "/usr/bin/vncserver"
    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon vnc
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping vncserver"
    killall Xvnc
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon vnc
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 3
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}" 
esac

Offline

#8 2008-06-26 07:29:14

Purch
Member
From: Finland
Registered: 2006-02-23
Posts: 229

Re: Please HELP! Kernel panic!

Are you running vnc or Xvnc?
I have vnc running in display :5 with this daemon

#!/bin/bash

# general config
. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting vncserver for vncuser"
      /bin/su -l vncuser -c "source /etc/profile && source /home/vncuser/.bashrc && /usr/bin/vncserver :5 > /dev/null 2>&1"
    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon vncserver_script
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping vncserver for vncuser"
    /bin/su -l vncuser -c "/usr/bin/vncserver -kill :5 > /dev/null 2>&1"
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon vncserver_script
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 3
    $0 start
    ;;      
  *)
    echo "usage: $0 {start|stop|restart}"
esac

Last edited by Purch (2008-06-26 07:31:40)

Offline

#9 2008-06-26 08:40:36

rotemtamir
Member
Registered: 2008-06-25
Posts: 13

Re: Please HELP! Kernel panic!

I an running vnc.

My question - is from where do i need to call this sh script?

Offline

#10 2008-06-26 10:15:15

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Please HELP! Kernel panic!

Just add the name of the script to the DAEMONS array in /etc/rc.conf.

The script will start vnc as user filesystem


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#11 2008-06-26 11:37:03

rotemtamir
Member
Registered: 2008-06-25
Posts: 13

Re: Please HELP! Kernel panic!

thanks, worked like a charm. cool

Offline

Board footer

Powered by FluxBB