You are not logged in.

#1 2005-09-30 09:05:49

Pajaro
Member
Registered: 2004-04-21
Posts: 884

check filesystems on shutdown to avoid waiting at boot time

Hi,

I added this to my rc.shutdown so that when i turn off my computer (not when i reboot) it checks the filesystems. This way i can avoid having to wait for the checking when i boot the system, because i never get 28 mountings without the system being checked.

if [ "$RUNLEVEL" = "0" ]; then
        stat_busy "Checking Filesystems"
        /sbin/fsck -A -T -C -a -- -f
        stat_done
fi

i put the code after:

stat_busy "Remounting Root Filesystem Read-only"
/bin/mount -n -o remount,ro /
stat_done

QUESTIONS:
- Is that the proper place?
- Why can't i stop the checking with Ctrl+C?

Offline

#2 2005-09-30 17:51:55

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: check filesystems on shutdown to avoid waiting at boot time

Pajaro wrote:

- Why can't i stop the checking with Ctrl+C?

Because it's not interactive - by that point you bash session has been killed (on shutdown) or hasn't yet started (on startup)

Offline

#3 2009-02-24 04:09:55

alecmg
Member
Registered: 2008-12-21
Posts: 86

Re: check filesystems on shutdown to avoid waiting at boot time

I remember Ubuntu allowed to cancel fsck on boot time. It would mount the fs and continue booting uninterrupted. How to achieve such behaviour?
I mean, automatic fsck after 33 mounts is really annoying sometimes.


Xyne wrote:
"We've got Pacman. Wacka wacka, bitches!"

Offline

#4 2009-02-24 04:20:38

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: check filesystems on shutdown to avoid waiting at boot time

alecmg wrote:

I remember Ubuntu allowed to cancel fsck on boot time. It would mount the fs and continue booting uninterrupted. How to achieve such behaviour?

man tune2fs wrote:

-c max-mount-counts
              Adjust the number of mounts after which the filesystem  will  be
              checked  by e2fsck(8).  If max-mount-counts is 0 or -1, the num‐
              ber of times the filesystem is mounted will  be  disregarded  by
              e2fsck(8) and the kernel.

Offline

#5 2009-02-24 08:24:07

joephantom
Member
From: Latinoamérica
Registered: 2008-01-09
Posts: 94
Website

Re: check filesystems on shutdown to avoid waiting at boot time

And anybody knows know how Ubuntu allows to cancel fsck on boot time?


By striving to do the impossible, man has always achieved what is possible. Those who have cautiously done no more than they believed possible have never taken a single step forward - Mikhail Bakunin

Offline

#6 2009-02-24 13:34:44

alecmg
Member
Registered: 2008-12-21
Posts: 86

Re: check filesystems on shutdown to avoid waiting at boot time

thanks fukawi2
Ubuntu would still check the fs after set times, but it wouldn't cry and run if you cancel the check. It would simply try to check on next boot
In Arch if you cancel, it will reboot and then try again. But sometimes you need to boot right away, without waiting sad


Xyne wrote:
"We've got Pacman. Wacka wacka, bitches!"

Offline

#7 2009-02-24 21:44:47

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: check filesystems on shutdown to avoid waiting at boot time

alecmg wrote:

Ubuntu would still check the fs after set times, but it wouldn't cry and run if you cancel the check. It would simply try to check on next boot

Ah, I wasn't sure if that was what you meant or if you meant what I posted. In that case, I have no idea, sorry sad

Offline

#8 2009-02-24 23:20:17

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,545

Re: check filesystems on shutdown to avoid waiting at boot time

Yeah, making this interactive would be good (is it just me or was there something on the bug tracker about this?).

Offline

Board footer

Powered by FluxBB