On Tue, Mar 10, 2009 at 01:21:55PM +0700, Steven Demetrius wrote: > On Mon, 2009-03-09 at 21:14 +0800, Star Liu wrote: > > When I boot my debian sid 5 minutes ago, I got this error message: > > ----------------------------------------------------------------------------------------------------------- > > /dev/sda4: unexpected inconsistency; run fsck manually.(i.e., without > > -a or -p options) > > fsck died with exit status 4 > > failed (code 4) > > An automatic file system check(fsck) of the root filesystem failed. A > > manual fsck must be performed. The fsck should be performed in > > maintance mode with the root filesystem mounted in read-only mode. > > failed! > > --------------------------------------------------------------------------------------------------------------- > > > > i have entered the maintance mode, but i don't know how to recover my > > filesystem. anyone can help me? thank you. this is the first time i > > encounter a serious problem with debian. > > > > Sounds like you have a defective HD.
Just because fsck conked out? get real. Of course, the problem on Debian is that "maintenance mode" (i.e. single-user-mode) has already tried to mount all filesystems. Instead, try this: At grub's menu, edit the kernel command line so that you add: init=/bin/sh This way, the kernel will boot, the initrd scripts will run, but insead of normal init running (with the init scripts), you'll end up with the / fs mounte ro and no init scripts having been run. Its like booting a LiveCD without being able to write anything. You'll be able to run any apps in /bin and /sbin. You'll get a sh prompt. Run the following (assuming that your root fs is ext2 or ext3): /sbin/e2fsck -C 0 -f -y /dev/sda4 This will run an fsck on /dev/sda4. -C 0 gives you the progress indicator, -f causes it to run even if it looks clean, and -y answers "yes" to all "fix?" questions. If you want to also check the drive for bad blocks, add: -c -c to the option list. This will take a long time. You may find that e2fsck has to be run a couple of time until no errors are reported. When you want to exit and try rebooting, since you've dillied with the fs, I'd: sync halt Ideally, halt would sync the disks, but the man page says that it can't unless /proc is mounted. When the system is halted, turn the power off, wait 15 seconds and power on. Alternatively, if you don't want to halt and power-cycle, but want to immediatly try booting, do: exec init which will terminate your sh process and run the init process. Good luck. Doug. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org