Weblog entry #8 for Grimnar

How to do a clean reboot?
Posted by Grimnar on Sun 9 Jul 2006 at 13:46
Tags: none.
I have one server under my desktop wich runs 24/7 all year, rarely I need to reboot. But in the event of reboot I use 'reboot' and that works, but when its going up again I need to attach a monitor and a keyboard, just for pressing
ctrl+D .
This is very annoying since I have to make a lot of arrangements for connecting a keyboard and a monitor. Why is this happening?
Is there some system failure causing it? Can it be 'remove' upon start?
All I want a system that goes up, boots the network and THEN gives me the errors, if there are any.

Of course, some would say 'just buy a keyboard/monitor switch and you be set'. That may be the future, but I already have far to may gadgets. Allthough one of those roll-out-rubber-keyboard would be kinda nice to have laying around.

So, what to do?

 

Comments on this Entry

Posted by uroboros (86.49.xx.xx) on Sun 9 Jul 2006 at 14:40
[ Send Message | View Weblogs ]

Change the variable

DELAYLOGIN=yes

to

DELAYLOGIN=no

in the /etc/default/rcS. I guess this could be your problem. But still, if set to "yes", it should still timeout, so perhaps you could have some more problems somewhere...

--
mjf

[ Parent | Reply to this comment ]

Posted by uroboros (86.49.xx.xx) on Sun 9 Jul 2006 at 14:43
[ Send Message | View Weblogs ]

Forget this answer! It is total nonsence, sorry. I just woke up... :(

--
mjf

[ Parent | Reply to this comment ]

Posted by uroboros (86.49.xx.xx) on Sun 9 Jul 2006 at 14:52
[ Send Message | View Weblogs ]
# SULOGIN=yes # change to 'no'
SULOGIN=no

could be the right variable...

--
mjf

[ Parent | Reply to this comment ]

Posted by Anonymous (85.221.xx.xx) on Sun 9 Jul 2006 at 15:03
Its already set to no.

# Time files in /tmp are kept in days.
TMPTIME=0
# Set to yes if you want sulogin to be spawned on bootup
SULOGIN=no
# Set to no if you want to be able to login over telnet/rlogin
# before system startup is complete (as soon as inetd is started)
DELAYLOGIN=yes
# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
UTC=no
# Set VERBOSE to "no" if you would like a more quiet bootup.
VERBOSE=yes
# Set EDITMOTD to "no" if you don't want /etc/motd to be editted automatically
EDITMOTD=yes
# Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
FSCKFIX=no

[ Parent | Reply to this comment ]

Posted by JulienV (86.218.xx.xx) on Sun 9 Jul 2006 at 15:13
[ Send Message | View Weblogs ]

Why do you have to type Ctrl+D each time your system reboots? I mean, the error should be fixed before doing anything else...

Maybe you could simply use a nullmodem cable to attach a new console using minicom. This is a cheap and easy solution, especially if you have a laptop that you can move around your servers.

Cheers,
Julien

[ Parent | Reply to this comment ]

Posted by dkg (216.254.xx.xx) on Sun 9 Jul 2006 at 16:03
[ Send Message | View dkg's Scratchpad | View Weblogs ]
What are "the errors" that come up? i use
shutdown -r now
for all my reboots (which is equivalent to reboot according to man reboot), and (while not impossible), a clean reboot almost never has any need for system recovery during boot. Maybe if you post what errors you're seeing, folks here on d-a can help you figure out how to avoid the errors themselves, which should make your reboot cleaner.

that said, i'll second the recommendation for a serial console to all of your servers. It's useful in all sorts of ways. Once you get one set up and stable, you'll wonder how you did without it.

[ Parent | Reply to this comment ]

Posted by Grimnar (85.221.xx.xx) on Sun 9 Jul 2006 at 16:13
[ Send Message | View Weblogs ]
Of course I dont remember the erros, but I dont think its any thing of importance.
Since, everything is working:D
But I can paste the errors if I can extract them from a log somewhere(?)

The serial console thing is quite interesting, allthough the only laptop I have
is a macbook, and no serial connection availeble.
But I have a desktop computer nearby I could make of use, I guess. But im not completley sure how to connect and stuff;D

[ Parent | Reply to this comment ]

Posted by Anonymous (59.176.xx.xx) on Mon 10 Jul 2006 at 08:30
If it is an unclean disk fs, then FSCKFIX=yes will help it
through. Useful for remote drives that are starting to fail too,
though of course you'd want to have a more permanent fix for that.

Make sure you *are* doing a clean shutdown and you shouldn't have a problem
with unmonitored reboots. If you still have a problem, then you probably have a
malconfigured system or hardware problem.

PJ

[ Parent | Reply to this comment ]

Posted by Anonymous (85.22.xx.xx) on Mon 10 Jul 2006 at 19:11
1. Check /etc/inittab for default runlevel; should not be 1 (Debian default is 2)

2. cat /proc/cmdline: maybe the kernel boots with the "single" option? Adjust your bootloader (GRUB/LILO) if necessary.

[ Parent | Reply to this comment ]

Posted by Grimnar (85.221.xx.xx) on Tue 11 Jul 2006 at 19:37
[ Send Message | View Weblogs ]
Well, hope this is correct.

/etc/inittab
# The default runlevel.
id:2:initdefault:


cat /proc/cmdline
root=/dev/hda1 ro vga=771 


[ Parent | Reply to this comment ]

Posted by yanger (66.84.xx.xx) on Fri 21 Jul 2006 at 15:29
[ Send Message ]
I wonder if you're having the same issue as me:

when I reboot or shutdown my Debian box, it looks like it umounts everything properly, and shutsdown or restarts. When you turn it back on, lo and behold, it says one or more drives not properly unmounted or some sorts and starts up fsck.

I found a bad way to avoid the fscking at boot, but if I read the manual right (for fstab and mount), doing this totally disables error checking...

proc /proc proc defaults 0 0
/dev/hda1 / jfs defaults 0 1
/dev/hda4 none swap defaults 0 0
/dev/hdg3 none swap defaults 0 0
/dev/hda2 /home reiserfs defaults 0 2
/dev/hdc /media/dvdcd iso9660,auto defaults,users,noauto 0 0
/dev/sda1 /mnt/sda1 jfs defaults,users,noauto 0 0
/dev/hdg1 /mnt/hdg1 jfs defaults,users,noauto 0 0
/dev/hdg2 /mnt/hdg2 jfs defaults,users,noauto 0 0
/dev/hda3 /mnt/hda3 reiserfs defaults,users,noauto 0 0

my probem was, was that sda1, and hda3 kept fscking and would fail during bootup - requiring a CTRL-D or a password to run at single user level.

changing the end numbers to 0 0 (originally i had 0 2 - don't remember what that ment...) aburptly stopped the checking of the drives (but that could be disasterous especially during a system crash of some sorts)

I'm thinking there must be a setting that must be wrong or a flag that needs to be disabled or something?

thanks.

[ Parent | Reply to this comment ]

Posted by Anonymous (212.145.xx.xx) on Thu 31 Aug 2006 at 15:58
BIOS
the BIOS checks if a keyboard is connected...
try that...

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search