Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: mbertrand on April 16, 2013, 11:46:38 AM
-
When TC regenerates the fstab it sets the sixth column for the e2fsck to zero which disables it. Does that mean it will not run
when system is not shut down properly. For example the rebuilding of what in the journal is done by e2fsck?
-
Hi mbertrand
Yes, you need to make sure the drive is unmounted and run e2fsck manually. This may mean booting from a CD
if the drive in question is your boot drive. If you go to the search page and enter e2fsck you should find other threads
that have discussed this.
-
Well I searched and I can seem the find answer to following question: when does fsck run?
-
TC does not run fsck for you.
-
Sorry for not understanding then who does the Kernel? What is fstab 6th column actually do?
And what about counter and max counter for fsck?
When I run "tune2fs -l /dev/sdb1" I see my counter is greater then my max counter and the last date never changed.
Like it never ran. Do you know what are the condition for it to run?
My messages file has "EXT4-fs (sdb1): warning: maximal mount count reached, running e2fsck is recommended" Should this had not run when I rebooted if my counter reached its max?
-
If you want fsck to run, you must run it manually after making sure the filesystem is not mounted.
Core is not a full blown distribution like Ubuntu.
It is a toolkit. You must learn what tools are available and how to use them.
-
That's ok I just wanted to make sure nothing was wrong.
-
Yes. We are not running sysv init. The init is a shell script: /etc/init.d/tc-config.
-
Yes, you need to make sure the drive is unmounted and run e2fsck manually. This may mean booting from a CD if the drive in question is your boot drive.
Hmm...
This makes me realize that I have never given attention to boot loader access following an unclean shutdown.
Wondering now if there could be a risk.
But the way I remember traditional scatter GNU systems, they would mount "/" read-only at first to be able to run a "fsck -n" at each boot, but then that happens way after the boot loader is done and has handed over to the kernel.
-
Unless you have opt= or home= bootcodes, the disk is only written to during the 'backup' phase of shutdown.
-
That depends on user's habits and on mode.
In mount mode /tce dir must be mounted read-write and is written to not only when downloading extensions but also when using functions of "tce-audit".
Personally I try to run backup frequently, to reduce risk of data loss.
Statistically I have probably accessed mydata.tgz as a literal backup to restore prior versions of selected files more often than running restore at boot.
I happen to hardly ever voluntarily run shutdown (I do use suspend).
In any case, if backup is written to disk at shutdown, then most likely it is not an unclean shutdown which would require a fsck before mounting fs read-write.
-
guys
What about this idea? It looks like e2fsck (for us normal users) is a part of base.
If we had e2fsck.tcz (= e2fsprogs.tcz) and we loaded it then ran
sudo umount /mnt/sdxn
sudo e2fsck /dev/sdxn
eg sdxn = sda1
Would that work?
I hope so as I assume the tcz is in RAM
If so, I could volunteer to have a go at submitting one. I am a dinosaur and use only Linux type partitions so not sure what others might use.
-
Hi aus9
You can't unmount the drive if it's in use. So that means no extensions on that drive loop mounted, and no persistent
/home or /opt. That's why I suggested booting from a CD, possibly with the base boot code so it doesn't try to mount
extensions from a hard drives /tce directory.
-
Rich
Fair enough
Do SCMs get loaded into RAM and not loop mounted?
-
Hi aus9
SCMs are loop mounted. I don't know if there is a copy to RAM option for them.
-
Just boot (or make a boot menu entry) with the codes "base norestore", then you will be able to run e2fsck and reboot normally (or run "sudo tce-setup") once it finishes.
-
What is fstab 6th column actually do?
It is the fstab order, for when you run fsck -A.
The sixth field, (fs_passno), is used by the fsck(8) program to deter-
mine the order in which filesystem checks are done at reboot time. The
root filesystem should be specified with a fs_passno of 1
Those with a lower number are checked first.