You are not logged in.
I had a kernel crash during the last shutdown which causes a force-fsck on boot-time. Unfortunately that doesn't work because fsck complains about /dev/sda2 already being mounted (/dev/sda2 is my root partition) and asks me to abort the fsck.
How can I get the file system back into a sane state? Already tried `shutdown -f` but that didn't suppress the fsck try.
Thanks!
Offline
Normally when there is a forced fsck it will give you the option to login and tell you what to run to fix it.
Anyway - at the grub menu, hit e, then highlight the kernel line, hit e again, edit it so that init=/bin/sh, then escape, and b to boot. Then you can run your fsck.
Offline
Anyway - at the grub menu, hit e, then highlight the kernel line, hit e again, edit it so that init=/bin/sh, then escape, and b to boot. Then you can run your fsck.
Cool I like Linux because I learn something new all the time.
At the risk of hijacking the thread, how should one leave this shell? 'exit' generates a kernel panic for trying to kill init. Should it have been a 'reboot'?
Come to think of it, it really isn't a hijack as it does relate to the answer to the OP.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I don't know if there's a clean way to exit, but it does demonstrate the importance of physical security. Anyone who has physical access can do this, mount your disks, change your root password, etc. So if you ever forget your root password you can recover it. The other physical threats are allowing booting from CD/USB.
Then _you're_ hijacked.
Offline
To OP: Curious if you just upgraded 2.6.38.3-1?
I just did, and the part in rc.local that remounts / as read-only failed, therefore I now get a warning about fsck'ing a mounted filesystem...
If so, I believe it's a bug with either the latest kernel or udev (the only two things I've just upgraded).
Offline
@pezz
You are right coz I have this problem since updated my kernel and I couldnt figure out yet how can I solve this problem.
Offline
fphillips, thanks! pezz: Yep, exactly that.
Offline
So what is the permanent solution? wait for next update? This problem has come out today after update. Boot process warns me about maximal mount count reached.
[Ext3-fs] warning: maximal mount count reached, running e2fsck is recommended
after then, mounting root read-only failed.
Mounting Root Read-only [FAIL] /dev/sda2 is mounted
Checking Filesystem
warning: The filesystem is mounted if you continue you will cause severe filesystem damage
Do you really want to continue (y/n)?
I choose "no" and boot process goes on as expected. Following I didnt see any problem when loading Gnome. Everything is ok on desktop environment but this problem annoys me.
Last edited by hoobastank (2011-04-20 11:59:50)
Offline
Nice to read I did not mess up myself. I had the same problem just now for the first time. I thought it was related to me messing with udisks-glue yesterday.
If I use the init=/bin/sh trick, I also get the message my filesystem is mounted, when trying to run fsck.
Last edited by FreeTheBee (2011-04-20 16:33:09)
Offline
I didnt understand anything why mounting root read-only was failed. I tried to downgrade kernel, looked at /etc/fstab, /lib/initcpio/init_function but couldnt realize any error. nevertheless os is still working as expected. It's really annoying.
Offline
I think there is something wrong with the latest version of udev, I downgraded it, then the "mounting root read-only failed" issue is gone.
Offline
Same here. After reading your post I downgraded to udev 166-2 and the problem is gone.
Offline
@lowie82ph
Yes, you are absolutely right. Problem is caused bye udev.
Offline
I guess the last kernel package (2.6.38.3-1) fixes this.
I was getting this error too and after upgrading it stopped, and I maintain udev 167-1.
Offline
Not fixed in kernel26-lts i had to downgrade udev.
Offline
Same problem, it's reported on the tracker @ https://bugs.archlinux.org/task/23845 - hopefully will be sorted soon.
Last edited by Meyithi (2011-04-22 16:08:14)
Offline
I have the same problem with kernel26 2.6.38.6-2
Offline