On Tuesday 08 June 2004 09:06 pm, Alvin Oga wrote: > > if ! (fsck -n /dev/hdb2); then > > - i've never seen the -n option for fdisk ..
That's 'cuz it's fsck, not fdisk. :P Ah. Actually, you could be onto something there. I call fsck in the script, relying on it to pass on control to e2fsck, but I read man e2fsck to come up with that option: -n Open the filesystem read-only, and assume an answer of `no' to all questions. Allows e2fsck to be used non-interactively. (Note: if the -c, -l, or -L options are specified in addition to the -n option, then the filesystem will be opened read-write, to permit the bad-blocks list to be updated. However, no other changes will be made to the filesystem.) So I should swap fsck for e2fsck for starters. > fsck 2.35 seems awfully old ... i use v2.12 and even 4yr old boxes > are runing fsck-2.9 or fsck-2.1 > ( something seems whacky with the versions ) Must be. I'm up to date as of a couple days ago. Sarge. ->/sbin/fsck --version fsck 1.35 (28-Feb-2004) ->dpkg -l|grep e2fsprogs ii e2fsprogs 1.35-6 The EXT2 file system utilities and libraries ->apt-cache showpkg e2fsprogs Package: e2fsprogs Versions: 1.35-6 (/var/lib/apt/lists/ftp.belnet.be_debian_dists_testing_main_binary-i386_Packages) (/var/lib/dpkg/status) > - if it's a mounted system ... fdisk should always fail .. > fsck'ing a mounted partition is a bad thing It isn't mounted normally. It isn't mounted before fscking it. > - if you umounted it before fdisk'ing than > you should be able to fdisk it and > you should NOT get that mesage about auto-fscking it > after 42 mounts No, I shouldn't. Especially since all 42 reports are completely uneventful runs. The "-n" option is supposed to keep it from doing anything without asking me, and presumably if there ever *is* a problem, I'll see it the next morning and can intervene manually. > my guess is your script was not doing anything?? Maybe not. Maybe the -n option keeps it from showing that it has been fscked. Must be some filesystem flag or something to show that, and in non-interactive mode it writes nothing. I guess that means it writes *nothing*. -- Michael McIntyre ---- Silvan <[EMAIL PROTECTED]> Linux fanatic, and certified Geek; registered Linux user #243621 http://www.geocities.com/Paris/Rue/5407/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]