[Gllug] headless server and fsck
Rich Walker
rw at shadow.org.uk
Tue Aug 9 13:06:55 UTC 2005
Matthew King <matthew.king at monnsta.net> writes:
> Tom Schutzer-Weissmann <trmsw at yahoo.co.uk> writes:
>
>> We run a headless server which got turned off by mistake. It restarted
>> without any problems, but I was wondering if there was a way of checking
>> the root filesystem without attaching a monitor and keyboard
>
> You don't need to. If it booted up then it will have successfully
> checked the filesystem on its own. It's possible that a logfile
> somewhere has fsck's output but it's unlikely.
You may find that the boot scripts[1] on the machine look for /forcefsck in
the root and will do a full check of all filesystems if it is there.
Hence, do:
sudo touch /forcefsck
sudo shutdown -r now
and when it comes back up, you should be well checked.
>
>> Given that I believe it's unwise to run fsck on a mounted filesystem,
>
> Generally, yes.
Although you can remount the filesystem read-only, and then do fsck -n
(assuming it's not reiserfs) which will tell you if there are problems.
>
>> the only thing I can think of is to reboot the server with a live CD
>> that will start up sshd so I can go in and check out the hard disks.
>
> That will work but there are security concerns (ie. keys) to worry
> about. I take it you don't have a serial console on it.
>
> But as mentioned above it's almost certainly unnecessary.
You might also create a small (128MB) extra bootable partition on the
machine, and put Damn Small Linux on it. Use grub as the bootloader, and
you then always have a rescue partition handy.
cheers, Rich.
>
> Matthew
>
> --
> I must take issue with the term "a mere child," for it has been my
> invariable experience that the company of a mere child is infinitely
> preferable to that of a mere adult.
> -- Fran Lebowitz
>
>
> --
> Gllug mailing list - Gllug at gllug.org.uk
> http://lists.gllug.org.uk/mailman/listinfo/gllug
Footnotes:
[1] On Debian, /etc/init.d/checkfs.sh and /etc/init.d/checkroot.sh both
look for this.
--
rich walker | Shadow Robot Company | rw at shadow.org.uk
technical director 251 Liverpool Road |
need a Hand? London N1 1LX | +UK 20 7700 2487
www.shadow.org.uk/products/newhand.shtml
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list