View previous topic :: View next topic |
Author |
Message |
Paapaa l33t
Joined: 14 Aug 2005 Posts: 955 Location: Finland
|
Posted: Thu Aug 30, 2007 12:45 pm Post subject: How to interrupt filesystem check? |
|
|
I'd like to be able to interrupt and postpone the filesystem check during boot. Is this possible? (Yes, I know how to configure the check intervals but this functionality would be great when you need the computer online very fast.)
CTRL-C interrupts it but also interrupts the whole init and asks for root password or reboots. _________________ Paludis, the way packages are meant to be managed. |
|
Back to top |
|
|
sLumpia Tux's lil' helper
Joined: 10 Jul 2006 Posts: 120 Location: troller land
|
Posted: Thu Aug 30, 2007 12:53 pm Post subject: |
|
|
what filesystem did you use?
if you use ext2/ext3 filesystem, you can use tune2fs
# tune2fs -c 0 -i 0 /dev/hda1
man tune2fs for details _________________ I love it |
|
Back to top |
|
|
Paapaa l33t
Joined: 14 Aug 2005 Posts: 955 Location: Finland
|
Posted: Thu Aug 30, 2007 1:15 pm Post subject: |
|
|
lun4 wrote: | what filesystem did you use?
if you use ext2/ext3 filesystem, you can use tune2fs
# tune2fs -c 0 -i 0 /dev/hda1
|
No no, like I said: "Yes, I know how to configure the check intervals". I indeed want to check the file system every 2 weeks. BUT:
I really want to be able to interrupt the checking process during INIT if needed. And yes, this is with ext2/3. _________________ Paludis, the way packages are meant to be managed. |
|
Back to top |
|
|
sLumpia Tux's lil' helper
Joined: 10 Jul 2006 Posts: 120 Location: troller land
|
Posted: Thu Aug 30, 2007 2:27 pm Post subject: |
|
|
my bad _________________ I love it |
|
Back to top |
|
|
kjetil n00b
Joined: 28 Jul 2006 Posts: 16
|
Posted: Sat Nov 17, 2007 1:36 pm Post subject: |
|
|
I finally took the time to investigate this. This problem is a seriuos flaw in my opinion, and the solution is pasted below.
I wonder about one thing though. How can we make this change permanent? I mean, how can we make sure the change below is not overwritten by a system upgrade?
kjetil@ttleush /etc/init.d $ diff -u checkroot~ checkroot
--- checkroot~ 2007-01-18 17:08:41.000000000 +0100
+++ checkroot 2005-08-04 15:39:49.000000000 +0200
@@ -42,10 +42,13 @@
if [[ ${retval} -eq 0 ]] ; then
eend 0
+ elif [[ ${retval} -eq 32 ]] ; then
+ echo "Userquit, ending."
+ eend 0
kjetil@ttleush /etc/init.d $ diff -u checkfs~ checkfs
--- checkfs~ 2007-01-18 17:08:41.000000000 +0100
+++ checkfs 2005-08-04 15:25:43.000000000 +0200
@@ -42,10 +42,13 @@
if [[ ${retval} -eq 0 ]] ; then
eend 0
+ elif [[ ${retval} -eq 32 ]] ; then
+ echo "Userquit, ending."
+ eend 0 |
|
Back to top |
|
|
Habbit Apprentice
Joined: 01 Sep 2007 Posts: 237 Location: 3.7137 W, 40.3873 N
|
Posted: Sat Nov 17, 2007 2:40 pm Post subject: |
|
|
The question is: do you _really_ want your system to run on an unchecked root FS? That's just plainly playing with fire. The olde good ext3 _should_ not have too much problems, at least nothing a regular, full fsck isn't able to handle, but if you do that to a reiserfs system, it will go down in flames at the third hard reboot. _________________
Code: | ~ $ objdump -d ./habbit_mind
90 xchg %rax, %rax
EB FD jmp $-3 |
|
|
Back to top |
|
|
kjetil n00b
Joined: 28 Jul 2006 Posts: 16
|
Posted: Sat Nov 17, 2007 3:00 pm Post subject: |
|
|
Habbit wrote: | The question is: do you _really_ want your system to run on an unchecked root FS? That's just plainly playing with fire. The olde good ext3 _should_ not have too much problems, at least nothing a regular, full fsck isn't able to handle, but if you do that to a reiserfs system, it will go down in flames at the third hard reboot. |
You have missed the point. The answer to your question is: Of course not! And no one ever even claimed it was.
Let me argue the same way you do: Do you _really_ want your audience to wait 20 minutes for fsck to finish before you can start your presentation? |
|
Back to top |
|
|
Habbit Apprentice
Joined: 01 Sep 2007 Posts: 237 Location: 3.7137 W, 40.3873 N
|
Posted: Sat Nov 17, 2007 3:12 pm Post subject: |
|
|
kjetil wrote: | Habbit wrote: | The question is: do you _really_ want your system to run on an unchecked root FS? That's just plainly playing with fire. The olde good ext3 _should_ not have too much problems, at least nothing a regular, full fsck isn't able to handle, but if you do that to a reiserfs system, it will go down in flames at the third hard reboot. |
You have missed the point. The answer to your question is: Of course not! And no one ever even claimed it was.
Let me argue the same way you do: Do you _really_ want your audience to wait 20 minutes for fsck to finish before you can start your presentation? |
Well, you are absolutely free to do whatever you want, but I think I'd prefer to power up my laptop earlier / entertain my audience during the fsck instead of taking the risk of suffering a random failure during an important presentation. Remember the USB scanner @ the Win98 showcasing? - a BSOD on a huge screen for everyone to see. They are even uglier in Linux with the "Oops (long CPU dump) kernel panic - not syncing" _________________
Code: | ~ $ objdump -d ./habbit_mind
90 xchg %rax, %rax
EB FD jmp $-3 |
|
|
Back to top |
|
|
kjetil n00b
Joined: 28 Jul 2006 Posts: 16
|
Posted: Sat Nov 17, 2007 3:17 pm Post subject: |
|
|
Habbit wrote: | kjetil wrote: | Habbit wrote: | The question is: do you _really_ want your system to run on an unchecked root FS? That's just plainly playing with fire. The olde good ext3 _should_ not have too much problems, at least nothing a regular, full fsck isn't able to handle, but if you do that to a reiserfs system, it will go down in flames at the third hard reboot. |
You have missed the point. The answer to your question is: Of course not! And no one ever even claimed it was.
Let me argue the same way you do: Do you _really_ want your audience to wait 20 minutes for fsck to finish before you can start your presentation? |
Well, you are absolutely free to do whatever you want, but I think I'd prefer to power up my laptop earlier / entertain my audience during the fsck instead of taking the risk of suffering a random failure during an important presentation. Remember the USB scanner @ the Win98 showcasing? - a BSOD on a huge screen for everyone to see. They are even uglier in Linux with the "Oops (long CPU dump) kernel panic - not syncing" |
Shut up, idiot. You are the kind of people that should not be allowed to develop computer software which interacts with humans. Stupidiness like this is why many people rightfully stay away from using linux. |
|
Back to top |
|
|
Habbit Apprentice
Joined: 01 Sep 2007 Posts: 237 Location: 3.7137 W, 40.3873 N
|
Posted: Sat Nov 17, 2007 3:34 pm Post subject: |
|
|
Well, I indeed take offense for that absolutely rude comment, so I am going to politely give you the chance to edit your post before reporting it. Let me point, by the way, that I _do_ develop software that interacts with humans.
About the decade-old "your $WHATEVER is _the_ reason people don't use linux" argument, I just told you what _I_ prefer. If you want to run your system on an unchecked root, then you are free to do so. Upon reaching this point, I usually use a windows/osx example to show how they restrict your freedom, but in this case windows is "better" (for you) than the default linux setup: when it has to check its partitions, it allows you a 10-second delay in which you can interrupt it before starting. However, as I said, even when the default setup in most distros is to force checking the root partition on hard reboots, you are free to change this behaviour (as you have already done, judging from the diff you posted).
About stopping portage from overwriting the files you changed: the "strict" and/or "stricter" portage FEATURES flags might do the trick, but if the files you modified are marked as belonging to a certain package, they will be overwritten. However, as they are under /etc, portage will not smash them right away, but ask you through "etc-update". Then you can tell it not to overwrite those files.
I'm leaving right now and will be back in a few hours. I expect to see your rude words removed, either by you (I hope) or an admin . Have a nice day and maybe the third paragraph in this post be of any help _________________
Code: | ~ $ objdump -d ./habbit_mind
90 xchg %rax, %rax
EB FD jmp $-3 |
|
|
Back to top |
|
|
kjetil n00b
Joined: 28 Jul 2006 Posts: 16
|
Posted: Sat Nov 17, 2007 3:59 pm Post subject: |
|
|
Habbit wrote: | Well, I indeed take offense for that absolutely rude comment, so I am going to politely give you the chance to edit your post before reporting it. Let me point, by the way, that I _do_ develop software that interacts with humans.
About the decade-old "your $WHATEVER is _the_ reason people don't use linux" argument, I just told you what _I_ prefer. If you want to run your system on an unchecked root, then you are free to do so. Upon reaching this point, I usually use a windows/osx example to show how they restrict your freedom, but in this case windows is "better" (for you) than the default linux setup: when it has to check its partitions, it allows you a 10-second delay in which you can interrupt it before starting. However, as I said, even when the default setup in most distros is to force checking the root partition on hard reboots, you are free to change this behaviour (as you have already done, judging from the diff you posted).
About stopping portage from overwriting the files you changed: the "strict" and/or "stricter" portage FEATURES flags might do the trick, but if the files you modified are marked as belonging to a certain package, they will be overwritten. However, as they are under /etc, portage will not smash them right away, but ask you through "etc-update". Then you can tell it not to overwrite those files.
I'm leaving right now and will be back in a few hours. I expect to see your rude words removed, either by you (I hope) or an admin . Have a nice day and maybe the third paragraph in this post be of any help |
1. The most common situation where the machine is stalled during boot, is because its been previously rebooted ca. 30 times without running fsck.
2. There are an infinite number of possible situations where you really don't or can't wait ca. 20 minutes for linux to boot because linux is checking the harddisk because its been rebooted ca. 30 times without running fsck.
3. In most of those infinite number of possibilities, you would prefer to run fsck at next boot instead.
Please shut up now.
PS. Thanks for the info about overwriting files. I had forgotten about files in /etc/ not being directly overwritten. That calmed me down. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|