Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Boot process does not fsck...

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
northfrisia
Tux's lil' helper
Tux's lil' helper
Posts: 83
Joined: Mon Feb 01, 2021 4:55 am

Boot process does not fsck...

  • Quote

Post by northfrisia » Thu Feb 04, 2021 5:48 am

Hi,

I am on the way to GENTOO-i-fy my Raspberry Pi4. Booting works and I can connect via sshd and ethernet.

As "harddisk" I am using an usb attached SSD. There is no SDcard inserted or in use otherwise.

While trying things, it may happen to not to get a connection at all so a "hard reset" (read: Power cycle) needs
to be done....leaving the filesystem of / and /home in a "floating" <cough> state.

fstab shows as follows:

Code: Select all

# <device>		<dir>			<type>	<options>							<dump>	<fsck>
#---------------------------------------------------------------------------------------------------------------------------------------
LABEL=ROOT		/		    	ext4	defaults,noatime,nodiratime,commit=600,errors=remount-ro	0	1
LABEL=BOOT		/boot			vfat	defaults							0	2
LABEL=HOME		/home			ext4	defaults							0	2
tmpfs		        /tmp			tmpfs	defaults,nosuid							0	0
LABEL=SWAP		none			swap	defaults							0	0


With

Code: Select all

tune2fs -l /dev/sda<b>
I can see the following parameters for sda2 (ROOT):

Code: Select all

ilesystem created:       Tue Feb  2 11:47:26 2021
Last mount time:          Thu Jan  1 01:00:22 1970
Last write time:          Thu Jan  1 01:00:11 1970
Mount count:              1
Maximum mount count:      1
Last checked:             Tue Feb  2 11:55:41 2021
Check interval:           0 (<none>)
For /dev/sda3 (HOME) it looks like this:

Code: Select all

Filesystem created:       Tue Feb  2 11:55:40 2021
Last mount time:          Thu Jan  1 01:00:23 1970
Last write time:          Thu Jan  1 01:00:23 1970
Mount count:              1
Maximum mount count:      1
Last checked:             Tue Feb  2 11:55:40 2021
Check interval:           0 (<none>)
These parameters are shown after I did a

Code: Select all

tune2fs -c 1 /dev/sda<n>
to both partitions and reboot.

I followed these instructions:
https://linuxconfig.org/how-to-force-fs ... t-on-linux

According to these instructions, there had to be a fsck right after boot...but according to the parameters above it did not happen.

Before I forget...it is the 4.2.2021 while I am writing this...

I know of the touch-trick for ROOT...but it does not help for HOME and I would like to have one working method (tune2fs) instead of two different,
if one is not working ... at least for me.

What did I wrong here?

Cheers,
N.Frisia
Top
grumblebear
Apprentice
Apprentice
Posts: 206
Joined: Tue Feb 26, 2008 12:35 am

  • Quote

Post by grumblebear » Thu Feb 04, 2021 9:57 am

Did you read the comments in the article you have linked, especially the notes about systemd?
Top
northfrisia
Tux's lil' helper
Tux's lil' helper
Posts: 83
Joined: Mon Feb 01, 2021 4:55 am

  • Quote

Post by northfrisia » Thu Feb 04, 2021 11:24 am

Hi,

searching for "systemd" gives 0 hits of 0.

The "Comments and Diskussion" field is empty here:

(...and if I could, I would attach a screenshot...but this seems to be unpossible...)

....using ungoogled chromium...

But I found a way around this: I activated "rc.log" and saw, that a fsck is done. So everything is fine...
...beside the fact, tune2fs reports are not quite right...

(and if it is important in this context...I choosed GENTOO to get rid of systemd/udev/pulseaudio...)

Cheers!
N.Frisia
Top
nick_gentoo
Tux's lil' helper
Tux's lil' helper
Posts: 140
Joined: Mon Jan 07, 2019 7:42 pm

  • Quote

Post by nick_gentoo » Thu Feb 04, 2021 11:28 am

(without knowing details about the setup on a Raspberry Pi)

northfrisia, with OpenRC there is a fsck service that should be doing that, based on the contents of /etc/fstab.
You can see with rc-update if it is enabled for any of the runlevels.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56072
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Feb 04, 2021 11:34 am

northfrisia,

With ext4, unless you turn off journaling, you don't get a fsck.
The mount operation does a journal replay to get the filesystem into a self consistent state. fsck is not required.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
northfrisia
Tux's lil' helper
Tux's lil' helper
Posts: 83
Joined: Mon Feb 01, 2021 4:55 am

  • Quote

Post by northfrisia » Thu Feb 04, 2021 12:38 pm

Hi NeddySeagoon.

under normal circumstances I totally agree :)

Just to get shure...I this also true, if I had to power cycle my Raspi because
I screwed up something ?

Cheers!
N.Frisia
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56072
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Feb 04, 2021 12:47 pm

northfrisia,

Yes.
When you do a clean shutdown, everything is flushed to disc, the journal is empty and the dirty bit is cleared.
When there is a crash, for whatever reason, the dirty bit is set and transactions in progress remain in the journal.

There are two ways to make the filesystem self consistent.
1. replay the journal.
2. run fsck.

Note that self consistent does not say anything about user data. It only means that the filesystem metadata agrees with itself.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy