Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: <skoehler@up...> - 2005-01-13 03:26:23
|
hi, it seems that the rootfs (a reiserfs) is damanged. I thought that i just have to create the file /forcefsck so that /etc/init.d/checkroot will run fsck on the filesystem, but the command that is executed is "fsck -C -a -f", but that command doesn't check the filesystem if it is a reiserfs. fsck.reiserfs skipps all checks as it seems, since the filesystem has been marked as cleanly unmounted. The problem is, that i cannot remount the rootfs read-only after the system has been booted completly. So i have the following questions: - how can i tell gentoo to do a real complete check of the rootfs at startup (where the rootfs should be read-only mounted) - how can i do that via ssh on a running system - which paramters can i pass when booting gentoo, so that it boots into maintainance mode where the rootfs is still mounted read-only? Thx Sven |
From: <skoehler@up...> - 2005-01-13 03:33:48
|
whoops, that mail was ment for the gentoo user mailinglist. |
From: Blaisorblade <blaisorblade@ya...> - 2005-01-13 03:39:46
|
On Thursday 13 January 2005 04:28, Sven K=F6hler wrote: > hi, > > it seems that the rootfs (a reiserfs) is damanged. I thought that i just > have to create the file /forcefsck so that /etc/init.d/checkroot will > run fsck on the filesystem, but the command that is executed is "fsck -C > -a -f", but that command doesn't check the filesystem if it is a > reiserfs. fsck.reiserfs skipps all checks as it seems, since the > filesystem has been marked as cleanly unmounted. > > The problem is, that i cannot remount the rootfs read-only after the > system has been booted completly. So i have the following questions: > > - how can i tell gentoo to do a real complete check of the rootfs at > startup (where the rootfs should be read-only mounted) > - how can i do that via ssh on a running system > - which paramters can i pass when booting gentoo, so that it boots into > maintainance mode where the rootfs is still mounted read-only? Adding "1" to the command line makes it boot in single-user mode (I think I= 've=20 tested it), like for any distro (the kernel does not handle it, so it passe= s=20 it to init, which uses it, since it's a number, as runlevel selection). And= =20 in single-user mode you *can* remount the root_fs as read-only (in some=20 distros it's kept read-only, IIRC). And "telinit 1" as root *turns* the system to single user mode (where ssh=20 *does* not run). Btw, why don't you do the check on the host? Real probleems or will to do i= t=20 properly? =2D-=20 Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade |
From: <skoehler@up...> - 2005-01-13 03:49:03
|
> Btw, why don't you do the check on the host? Real probleems or will to do it > properly? Thx for the answer, but i just klicked the wrong "newsgroup" in my mozilla. The mail was ment to go to gentoo-user mailinglist. I was talking about a real system without UML, and the problem is, that even with "mount -f -o remount,ro /" fsck.reiserfs still think that the rootfs is mounted writable. I don't know why. mount shows "ro", but that might not mean that much. I would do the fsck.reiserfs remotely via ssh if i could, but obviously i'm to stupid, or it just won't work. It seems that i should jump into my car tomorrow, and check the fs while i'm sitting in front of the computer. |
From: Blaisorblade <blaisorblade@ya...> - 2005-01-13 04:29:50
|
On Thursday 13 January 2005 04:50, Sven K=F6hler wrote: > > Btw, why don't you do the check on the host? Real probleems or will to = do > > it properly? > > Thx for the answer, but i just klicked the wrong "newsgroup" in my > mozilla. The mail was ment to go to gentoo-user mailinglist. About /forcefsck, maybe it ignores it if /halt or something like that is=20 absent.... > I was talking about a real system without UML, and the problem is, that > even with "mount -f -o remount,ro /" fsck.reiserfs still think that the > rootfs is mounted writable. I don't know why. mount shows "ro", but that > might not mean that much. Check inside /proc/mounts, it's reliable (rootfs is always rw, you care to = the=20 reiserfs mount) - mount cannot update /etc/mtab since it would require=20 writing to the rootfs. Or maybe /etc/mtab still says it's rw... Seriously - have you checked the "check" field in /etc/fstab to make sure i= t's=20 "1"? I have played with that flag sometimes.... Also, what you say about fsck.reiserfs is strange... while for ext3, if the= fs=20 is clean, no checking at all is done, for reiserfs a light check (replaying= =20 the journal and walking the tree) is always done on newer versions, (Mandra= ke=20 9.1 didn't do it, 10.0 does the check, which is annoying). > I would do the fsck.reiserfs remotely via ssh if i could, but obviously > i'm to stupid, or it just won't work. ssh won't like a read-only root fs, I think... at least, normally it record= s=20 the login, his logs... (Maybe it can be made to behave, I can't exclude it). > It seems that i should jump into=20 > my car tomorrow, and check the fs while i'm sitting in front of the > computer. =2D-=20 Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade |
From: <skoehler@up...> - 2005-01-13 05:11:42
|
>>I was talking about a real system without UML, and the problem is, that >>even with "mount -f -o remount,ro /" fsck.reiserfs still think that the >>rootfs is mounted writable. I don't know why. mount shows "ro", but that >>might not mean that much. > > Check inside /proc/mounts, it's reliable (rootfs is always rw, you care to the > reiserfs mount) - mount cannot update /etc/mtab since it would require > writing to the rootfs. Or maybe /etc/mtab still says it's rw... Problem solved: i stopped all running services, and suddenly a normal "mount -o remount,ro /" worked, and fsck.reiserfs is working too now. I tried the same thing yesterday, and it didn't work - strange. > ssh won't like a read-only root fs, I think... at least, normally it records > the login, his logs... (Maybe it can be made to behave, I can't exclude it). i still can login. i guess all the information is logged to the console now, since the syslog daemon is stopped. |
From: <skoehler@up...> - 2005-01-13 07:16:04
|
>>>Btw, why don't you do the check on the host? Real probleems or will to do >>>it properly? >> >>Thx for the answer, but i just klicked the wrong "newsgroup" in my >>mozilla. The mail was ment to go to gentoo-user mailinglist. > > About /forcefsck, maybe it ignores it if /halt or something like that is > absent.... No, it isn't ignored. Gentoo prints a warning on the screen, that a check has been forced, so the file is still present when Gentoo boots. >>I was talking about a real system without UML, and the problem is, that >>even with "mount -f -o remount,ro /" fsck.reiserfs still think that the >>rootfs is mounted writable. I don't know why. mount shows "ro", but that >>might not mean that much. > > Check inside /proc/mounts, it's reliable (rootfs is always rw, you care to the > reiserfs mount) - mount cannot update /etc/mtab since it would require > writing to the rootfs. Or maybe /etc/mtab still says it's rw... all possible. i will check that. > Seriously - have you checked the "check" field in /etc/fstab to make sure it's > "1"? I have played with that flag sometimes.... yes, it's "1", but the "check" field is ignored by /etc/init.d/checkroot anyway. > Also, what you say about fsck.reiserfs is strange... while for ext3, if the fs > is clean, no checking at all is done, for reiserfs a light check (replaying > the journal and walking the tree) is always done on newer versions, (Mandrake > 9.1 didn't do it, 10.0 does the check, which is annoying). fsck.reiserfs always performs that light check, but i'd like to force a full check on the next boot, and there doesn't seem to a proper way to do that. Gentoo's /etc/init.d/checkroot does a "fsck -C -a -f /" if the file /forcefsck is present, but fsck.reiserfs still does its light check. I guess fsck.ext2/ext3 would do a full check. >>I would do the fsck.reiserfs remotely via ssh if i could, but obviously >>i'm to stupid, or it just won't work. > > ssh won't like a read-only root fs, I think... at least, normally it records > the login, his logs... (Maybe it can be made to behave, I can't exclude it). good point, so a check on the next boot would be my choice, but how? |