From owner-freebsd-hackers Tue Jan 2 20:56:35 2001 From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 2 20:56:31 2001 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from smtp5.mail.yahoo.com (smtp5.mail.yahoo.com [128.11.69.102]) by hub.freebsd.org (Postfix) with SMTP id E1A2E37B400 for ; Tue, 2 Jan 2001 20:56:31 -0800 (PST) Received: from tmp1-70fe.rochester.rr.com (HELO halstead007) (24.161.70.254) by smtp.mail.vip.suc.yahoo.com with SMTP; 3 Jan 2001 04:56:31 -0000 X-Apparently-From: Message-ID: <019101c07541$6a573cc0$0601a8c0@halstead007> From: "James Halstead" To: Subject: Re: Boot process robustness Date: Tue, 2 Jan 2001 23:55:35 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ----- Original Message ----- From: "James Halstead" To: "Poul-Henning Kamp" Sent: Tuesday, January 02, 2001 11:30 PM Subject: Re: Boot process robustness > > ----- Original Message ----- > From: "Poul-Henning Kamp" > To: "Walter W. Hop" > Cc: "FreeBSD hackers" > Sent: Thursday, December 28, 2000 9:31 AM > Subject: Re: Boot process robustness > > > > In message , "Walter > W. Ho > > p" writes: > > >Hi all, > > > > > >I was wondering how to increase the robustness of the booting process, > > >so that a box would be able to keep itself on its feet without > > >intervention of the console. I think this would be of great value to the > > >many people who administer colocated boxes. > > > > > >I'm not much of a coder so all I can do is mailing this (at the risk of > > >wasting your time with total useless crap ofcourse, in which case I > > >apologize.) > > > > > >1. Old kernel recovery > > > When 'make install'ing a new kernel, a flag is raised (say, > > > 'revert_on_fail') which is only cleared after a successful system > > > initialisation. When the new kernel boots, a panic in this state or > > > an unexpected reboot (reset after a system hang) would cause > > > /kernel.old to be loaded on the next boot instead (maybe the same > > > could work for /etc/rc.conf.old) > > > > This is actually more a question of where to store the flag than > > anything else. > > > > Couldn't you just modify the shutdown command to have an option for revert > on fail, which would create > a file on the root filesystem with a timestamp of when the reboot started. > Then at boot time, if that timstamp > is still there, and has been around for too long, boot the kernel.old > instead of kernel. Then the question is > what amount of time is reasonable for the wait period. This may have the > machine boot the new kernel > and panic a few times, but at least you can be assured that it would after x > minutes boot the old kernel > instead. Once a boot was successful the times stamp file could be removed. > > Just a thought. > > ~James > > > Julian made a rather hackish thing for Whistle, but I think we lost > > that with the advent of the new bootblocks. > > > > >2. Automatic file system checks > > > In case of a powercycle or crash, it could be that a filesystem needs > > > fixing. Now I don't know much about fs internals, but I guess that in > > > most cases just answering 'Y' to fsck's questions will fix things. I > > > would appreciate an option where an inconsistency would start up fsck > > > in an "automatic" repair mode, with all actions logged and "undo" > > > data being saved (in case manual review is needed). > > > > Alternatively it might be worth considering adding a "remote-single-user" > > capability: > > > > If an fsck fails, ifconfig the interfaces and start an sshd so people > > can get in remotely and fsck... > > > > -- > > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > > phk@FreeBSD.ORG | TCP/IP since RFC 956 > > FreeBSD committer | BSD since 4.3-tahoe > > Never attribute to malice what can adequately be explained by > incompetence. > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-hackers" in the body of the message > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message