On Sat, Jan 09, 1999 at 01:32:02PM +0000, Christian Lavoie wrote:
> What is the best way to defrag/scan disks?
> 
> Mounted disks can't be defragged, and you can't umount the root
> partition, can you?

I don't know how to defrag a disk (you rarely need to anyway), but the
following would work, for checking as well.

Either boot up the system in `single' or `emergency' mode
(at the LILO prompt, "linux single" or "linux emergency"). emergency
in particular will mount the root read-only and enter single user mode.

(I think single will mount all file systems read-write, and still enter
single user mode.)

Or you can shutdown the running system to single user mode;
"shutdown -h now" will get you to single user mode. Then unmount partitions,
and remount the root read only with

mount -o remount,ro -n /

To get the system back to multiuser, you can either reboot, or remount 
everything read/write and exit the single user shell. (I think the system
goes back to multiuser in this situation). If you forget to remount as read
write, it'll enter multiuser mode with the disk read/only, and you won't
like that.


Hamish
-- 
Hamish Moffatt VK3TYD              [EMAIL PROTECTED], [EMAIL PROTECTED]
Latest Debian packages at ftp://ftp.rising.com.au/pub/hamish. PGP#EFA6B9D5
CCs of replies from mailing lists are welcome.   http://hamish.home.ml.org

Reply via email to