Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 185063 - checkroot doesn't check root fs when the line in fstab end with a comment
Summary: checkroot doesn't check root fs when the line in fstab end with a comment
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 213082 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-12 12:31 UTC by Dirk Heinrichs
Modified: 2008-03-12 16:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Heinrichs 2007-07-12 12:31:01 UTC
Yesterday, a user reported on gentoo-user-de, that his root fs wasn't checked upon reboot. He got the message:

"Skipping root filesystem check (fstab's passno == 0)"

although the passno was not 0. It turned out he had a comment at the end of the respective line in /etc/fstab. This led to the following awk contruct

awk '($1 ~ /^(\/|UUID|LABEL)/ && $2 == "/" && NF == 6 && $6 != 0) {print }' /etc/fstab

in checkroot return nothing (I'd say because of "NF == 6").

Reproducible: Always

Steps to Reproduce:
1. Put a comment at the end of the line for root fs in /etc/fstab
2. Run: awk '($1 ~ /^(\/|UUID|LABEL)/ && $2 == "/" && NF == 6 && $6 != 0) \
{print }' /etc/fstab
3. Gives no result, while without the comment returns the line for the root fs

Actual Results:  
root fs is not checked.

Expected Results:  
root fs should be checked.

This "awk" construct is also present on my system with baselayout 1.12.10-r4.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-07-12 13:45:32 UTC
We already have this fixed in baselayout-2 where we now use the libc functions to read fstab correctly.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-03-12 15:53:39 UTC
*** Bug 213082 has been marked as a duplicate of this bug. ***
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2008-03-12 16:29:08 UTC
His fstab entry is also not valid per the file format descriptions of fstab.