Haven't seen a fsck happen for quite some time on my ext3 and FAT HDD's and I was toying with the idea of running fsck after logging into a terminal (CTRL-ALT-F2) whilst X is running but not signed on in F7. Reading the man page got me to thinking I should run the command: fsck -As to check through all the fs, but I see later ton that if nothing is specified fsck will walk through the fstab file anyway. As I want the root fs checked as well I didn't want to use the -R option either. Great, I thought, and logged into a terminal as root....... Ran: ~ # fsck and immediately stopped it, by answering n to the question about fscking mounted drives. How can I issue a single command to unmount all the entries in fstab and perform the fsck on them whilst needing the fsck binary from ~/ ? Can the fsck binary still be reached if the filesystem is still mounted? I would assume not as you can't access a floppy disk unless the drive has been mounted. What would happen if I unmounted all but the root filesystem, so that I still had access tho the binary, and then told fsck to run fsck over the mounted root directory? Below is a copy of my /etc/fstab as I would like to edit it so that fsck are performed whenever I restart the machine. With my little experience of ext3 I should not have to wait too long before the login is available. Will the commented out(#) partitions also get fscked? /dev/hdb1 / ext3 defaults 1 1 /dev/hdb9 /boot ext3 defaults 1 2 #/dev/hdc2 /data1 auto noauto,user 0 0 #/dev/hdc7 /data2 auto noauto,user 0 0 #/dev/hdc9 /data3 auto noauto,user 0 0 /dev/hdd1 /data4 auto noauto,user 0 0 /dev/hdb8 /home ext3 defaults 1 2 /dev/hdb10 /opt ext3 defaults 1 2 /dev/hdb6 /usr ext3 defaults 1 2 /dev/hdb7 /var ext3 defaults 1 2 /dev/hdc1 /windows/C vfat defaults 0 0 /dev/hdc5 /windows/D vfat defaults 0 0 /dev/hdc6 /windows/E vfat defaults 0 0 /dev/hdb5 swap swap pri=42 0 0 #/dev/hdc8 swap swap pri=42 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0 proc /proc proc defaults 0 0 usbdevfs /proc/bus/usb usbdevfs noauto 0 0 /dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0 /dev/fd0 /media/floppy auto noauto,user,sync 0 0 TIA -- The Little Helper needing some help ======================================================================== Hylton Conacher - Licenced ex-Windows user (apart from Quicken) Registered Linux user # 229959 at http://counter.li.org Currently using SuSE 9.0 Professional with KDE 3.1 ========================================================================
On Fri, 20 Feb 2004 15:54:14 +0200
"Hylton Conacher (ZR1HPC)"
What would happen if I unmounted all but the root filesystem, so that I still had access tho the binary, and then told fsck to run fsck over the mounted root directory?
Nver run fsck on a mounted file system. Boot from a rescue disk, such as the SuSE rescue system, and run fsck from there.
Below is a copy of my /etc/fstab as I would like to edit it so that fsck are performed whenever I restart the machine. With my little experience of ext3 I should not have to wait too long before the login is available. Will the commented out(#) partitions also get fscked?
Set max_mount_count of the partitions to 1 with tune2fs. I don't know why you want to do this, but have fun waiting. Charles -- Linux: Because a PC is a terrible thing to waste. (By komarimf@craft.camp.clarkson.edu, Mark Komarinski)
On Fri, 20 Feb 2004 14:22:05 -0500
Charles Philip Chan
Set max_mount_count of the partitions to 1 with tune2fs. I don't know why you want to do this, but have fun waiting.
Forgot to mention, this is ext2/3 specific. Charles -- "All language designers are arrogant. Goes with the territory..." (By Larry Wall)
The Friday 2004-02-20 at 15:54 +0200, Hylton Conacher (ZR1HPC) wrote:
How can I issue a single command to unmount all the entries in fstab and perform the fsck on them whilst needing the fsck binary from ~/ ?
You can do two things: a) Force fsck to run on next reboot, by doing: "touch /forcefsck" b) Reboot to CD, and fsck from it. The partitions can be checked while the root filesystem is mounted read only. This is done by the "/etc/init.d/boot.localfs" script. -- Cheers, Carlos Robinson
On Sat, 21 Feb 2004 00:32:31 +0100 (CET)
"Carlos E. R."
The partitions can be checked while the root filesystem is mounted read only. This is done by the "/etc/init.d/boot.localfs" script.
Yes, you can do that, but it will only check it, but not modify it. Charles -- "If a machine couldn't run a free operating system, we got rid of it." -- Richard Stallman (Open Sources, 1999 O'Reilly and Associates)
participants (3)
-
Carlos E. R.
-
Charles Philip Chan
-
Hylton Conacher (ZR1HPC)