Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107812 - checkfs and checkroot with RC_FORCE_AUTO set to yes result in a call to e2fsck with an invalid command line
Summary: checkfs and checkroot with RC_FORCE_AUTO set to yes result in a call to e2fsc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-01 12:49 UTC by chris morgan
Modified: 2005-10-01 21:24 UTC (History)
0 users

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 chris morgan 2005-10-01 12:49:02 UTC
If RC_FORCE_AUTO is set to yes in conf.d/rc checkfs and checkroot both ask fsck to force a repair to a 
filesystem without errors that cannot automatically be corrected. Otherwise sulogin would called.

To force the repair the following calls are made:

checkfs calls:
fsck -C -T -R -A -a -y

checkroot calls :
fsck -y -C -T -a /

On an ext2 filesystem these commands fail with the following error message:

e2fsck: Only one the options -p/-a, -n or -y may be specified.

Removing the -a flag fixes the problem.

Reproducible: Always
Steps to Reproduce:
1. Set RC_FORCE_AUTO="yes" in conf.d/rc
2. boot a system with an ext2 filesystem containing errors


Actual Results:  
init stop after running checroot/checkfs asking for root password or control-d to continue (sulogin has 
been called)

Expected Results:  
forced a repair on the filesystem and completed booting without the need for user intervention
Comment 1 chris morgan 2005-10-01 12:51:25 UTC
till init.d # mount -n -o remount,ro /var
till init.d # mount -n -o remount,ro /usr
till init.d # nano -w checkfs
till init.d # fsck -C -N -T -a -y /var
[/sbin/fsck.ext2 (1) -- /var] fsck.ext2 -a -y -C0 /dev/sda2 
till init.d # fsck -C -T -a -y /var
e2fsck: Only one the options -p/-a, -n or -y may be specified.
till init.d # fsck -C -T -a  /var
/dev/sda2 is mounted.  

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? yes

/dev/sda2: clean, 34631/108416 files, 70399/216576 blocks
till init.d # fsck -C -T -a  /usr
/dev/sda1 is mounted.  

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? yes

/dev/sda1 contains a file system with errors, check forced.
/dev/sda1:                                                                      Unconnected directory inode 24888 (/share/
fonts/???)


/dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
till init.d # fsck -C -T -y  /usr
e2fsck 1.38 (30-Jun-2005)
/dev/sda1 is mounted.  

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? yes

/dev/sda1 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure                                           
Pass 3: Checking directory connectivity                                        
Unconnected directory inode 24888 (/share/fonts/???)
Connect to /lost+found? yes

Unconnected directory inode 24914 (/share/fonts/???)
Connect to /lost+found? yes

Unconnected directory inode 38209 (/share/fonts/???)
Connect to /lost+found? yes

Unconnected directory inode 38236 (/share/fonts/???)
Connect to /lost+found? yes

Unconnected directory inode 38251 (/share/fonts/???)
Connect to /lost+found? yes

Unconnected directory inode 54580 (/share/fonts/???)                           
Connect to /lost+found? yes

Unconnected directory inode 54653 (/share/fonts/???)
Connect to /lost+found? yes

Unconnected directory inode 54660 (/share/fonts/???)
Connect to /lost+found? yes

Pass 4: Checking reference counts
Inode 24888 ref count is 3, should be 2.  Fix? yes

Inode 24914 ref count is 3, should be 2.  Fix? yes

Inode 38209 ref count is 3, should be 2.  Fix? yes

Inode 38236 ref count is 3, should be 2.  Fix? yes

Inode 38251 ref count is 3, should be 2.  Fix? yes

Inode 54580 ref count is 3, should be 2.  Fix? yes

Inode 54653 ref count is 3, should be 2.  Fix? yes

Inode 54660 ref count is 3, should be 2.  Fix? yes

Pass 5: Checking group summary information
                                                                               
/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda1: 41406/146592 files (0.1% non-contiguous), 172654/293116 blocks
till init.d # mount -n -o remount,rw /usr
till init.d # mount -n -o remount,rw /var
Comment 2 SpanKY gentoo-dev 2005-10-01 21:24:40 UTC
fixed in svn by dropping the -a