# 'operational error' message at boot time

## nichocouk

Hi, 

I've recently noticed a message that I get at boot time, here is an extract from my rc.log:

```
rc boot logging started at Fri May 30 09:55:58 2014

 * Setting system clock using the hardware clock [Local Time] ...

 [ ok ]

 * Loading module nvidia ...

 [ ok ]

 * Autoloaded 1 module(s)

 * Checking local filesystems  ...

/dev/sda6: clean, 29414/3932160 files, 9692365/15728640 blocks

/dev/sda9: clean, 334/8192 files, 25931/32768 blocks

/dev/sda7: clean, 84969/655360 files, 220154/2621440 blocks

/dev/sda8 is mounted.

e2fsck: Cannot continue, aborting.

/dev/sda10: clean, 18014/109445120 files, 27327078/437776384 blocks

 * Operational error

 [ !! ]

 * Remounting root filesystem read/write ...

 [ ok ]

 * Remounting filesystems ...

 [ ok ]

 * Skipping mtab update (mtab is a symbolic link)

 * Activating swap devices ...

 [ ok ]

 * Mounting local filesystems ...

 [ ok ]

```

To me it looks like this operational message is related to the fact that sda8 cannot be checked as it's already mounted. 

My fstab is:

```
/dev/sda9      /boot      ext3      noauto,noatime   1 2

/dev/sda6      /      ext3      noatime      0 1

/dev/sda5      none      swap      sw      0 0

/dev/sda7      /var      ext3      noatime      0 2

/dev/sda8      /usr      ext3      noatime      0 2

```

I wonder if this is all related to the fact that my /usr partition is included in my initrd image. From dmesg I get the following related entries:

```

[  +0.039975] EXT3-fs (sda6): recovery required on readonly filesystem

[  +0.000099] EXT3-fs (sda6): write access will be enabled during recovery

...

[  +0.000333] EXT3-fs (sda6): recovery complete

[  +0.000097] EXT3-fs (sda6): mounted filesystem with writeback data mode

[  +0.085690] dracut: Checking ext3: /dev/disk/by-uuid/282779ae-7b42-4a7e-a123-31c3ba7c2be0

[  +0.000358] dracut: issuing e2fsck -a  /dev/disk/by-uuid/282779ae-7b42-4a7e-a123-31c3ba7c2be0

[  +0.283703] dracut: /dev/disk/by-uuid/282779ae-7b42-4a7e-a123-31c3ba7c2be0: clean, 29414/3932160 files, 9692365/15728640 blocks

[  +0.002067] dracut: Mounting /dev/disk/by-uuid/282779ae-7b42-4a7e-a123-31c3ba7c2be0 with -o noatime,ro

...

[  +0.000076] EXT3-fs (sda6): mounted filesystem with writeback data mode

[  +0.054877] dracut: Mounted root filesystem /dev/sda6

[  +0.022638] dracut: Checking ext3: /dev/sda8

[  +0.000302] dracut: issuing e2fsck -a  /dev/sda8

...

[  +0.124024] dracut: /dev/sda8: clean, 546020/3932160 files, 5991850/15728640 blocks

[  +0.001622] dracut: Mounting /usr with -o noatime,ro

...

[  +0.000036] EXT3-fs (sda8): mounted filesystem with writeback data mode

[  +0.084190] dracut: Switching root

...

[  +0.843689] systemd-udevd[554]: starting version 208

...

[  +0.016968] systemd-sysctl[599]: Overwriting earlier assignment of kernel/sysrq in file '/usr/lib64/sysctl.d/60-gentoo.conf'.

...

[  +0.060712] systemd-sysctl[630]: Overwriting earlier assignment of kernel/sysrq in file '/usr/lib64/sysctl.d/60-gentoo.conf'.

...

[  +1.007469] EXT3-fs (sda6): using internal journal

[  +0.076788] EXT3-fs (sda8): using internal journal

[  +0.169182] Adding 16777212k swap on /dev/sda5.  Priority:-1 extents:1 across:16777212k 

...

[  +0.000186] EXT3-fs (sda7): using internal journal

[  +0.000111] EXT3-fs (sda7): mounted filesystem with writeback data mode

...

[  +0.000762] EXT3-fs (sda10): using internal journal

[  +0.000109] EXT3-fs (sda10): mounted filesystem with writeback data mode

...

```

I don't know if this is related, but it seems that my box is booting properly every other time these days. When it doesn't, it stalls and I have to do a hard reboot. I haven't been able to identify the source of this.

I also note the presence of systemd messages in my dmesg. systemd isn't enabled and I stick to OpenRC, so I'm a bit puzzled by this. 

These issues started 5 days ago after I updated to 3.12.20-gentoo.

To summarize, my main issue is to understand this operational error message, which I believe to be related to sda8 check at boot. I've mentioned some other things which bother me in case they are related but I'm not sure of anything!

Thanks for any help.

----------

## NeddySeagoon

nichocouk,

There are several solutions

Check /dev/sda8 in the initrd before its mounted and set the noauto option for /usr in /etc/fstab.

As you say, its already mounted, so not trying to mount it again is OK.

In the initrd mount /usr as read only. A read only filesystem can be cnecked, then mounted read write, as happens with root.

Both ways work.

----------

## nichocouk

Thanks  NeddySeagoon,

I will try the first option -- it is simpler, and I don't know how to do the second one    :Wink: 

I'll report once I've had a chance to get back to that box.

Best wishes.

----------

## nichocouk

After having added the noauto option in fstab, I find exactly the same error message in my rc.log.

dmesg confirms that sda8 (/usr) was mounted with -noauto.

```

[    1.233513] dracut: dracut-037-r2

[    1.325148] systemd-udevd[207]: starting version 208

[    2.650601] dracut: Checking ext3: /dev/disk/by-uuid/282779ae-7b42-4a7e-a123-31c3ba7c2be0

[    2.650953] dracut: issuing e2fsck -a  /dev/disk/by-uuid/282779ae-7b42-4a7e-a123-31c3ba7c2be0

[    2.807964] dracut: /dev/disk/by-uuid/282779ae-7b42-4a7e-a123-31c3ba7c2be0: clean, 29414/3932160 files, 9692365/15728640 blocks (check in 5 mounts)

[    2.810094] dracut: Mounting /dev/disk/by-uuid/282779ae-7b42-4a7e-a123-31c3ba7c2be0 with -o noatime,ro

[    2.864989] dracut: Mounted root filesystem /dev/sda6

[    2.887052] dracut: Checking ext3: /dev/sda8

[    2.887357] dracut: issuing e2fsck -a  /dev/sda8

[    3.067735] dracut: /dev/sda8: clean, 546020/3932160 files, 5991850/15728640 blocks

[    3.068387] dracut: Mounting /usr with -o noauto,noatime,ro

[    3.239955] dracut: Switching root

[    4.680038] systemd-udevd[565]: starting version 208

[    5.365950] systemd-sysctl[609]: Overwriting earlier assignment of kernel/sysrq in file '/usr/lib64/sysctl.d/60-gentoo.conf'.

[    5.620824] systemd-sysctl[640]: Overwriting earlier assignment of kernel/sysrq in file '/usr/lib64/sysctl.d/60-gentoo.conf'.

```

It makes sense: if dracut mounts sda8 (with or without -noauto), then e2fsck running on it at boot time afterwards (in the "Checking local filesystems" part) will face the same issue: sda8 is already mounted.

The issue is that /usr should be first mounted read-only, then checked, then mounted read-write. This is your second solution, but I don't know how to do it...

----------

## NeddySeagoon

nichocouk,

From my /etc/fstab I have

```
UUID=0f7610bd-67c9-40c6-8a16-70d617ef09d3  /var                    ext4  noatime,noauto,discard    1 0

UUID=3e82328c-e85f-435e-8836-5c63b38df620  /usr                    ext4  noatime,noauto,discard    1 0
```

and my initrd init script

```
# ... we want to find in /etc/fstab ...

ln -s /mnt/root/etc/fstab /etc/fstab

# ... to check filesystems and mount our devices.

for m in $mountpoints ; do

#echo $m

    check_filesystem $m

    echo "Mounting $m"

    # mount the device and ...

    mount $m || rescue_shell "Error while mounting $m"

    # ... move the tree to its final location

    mount --move $m "/mnt/root"$m || rescue_shell "Error while moving $m"

done
```

but the

```
     # using our own fsck, not the builtin one from busybox

    /sbin/fsck -p $fsck_opts $1

```

contains 

```
8)      echo "Operational error"; return 0;;
```

in the return value processor.

I guess you have something missing from your initrd so fsck can't run..

----------

## nichocouk

Again, I must admit complete ignorance with respect to initrd. I don't even know where the initrd init script is located.

I use dracut to create the initrd image. I see in the dracut.conf file:

```

# mount / and /usr read-only by default

#ro_mnt="no"

```

I guess I could change this to yes.   :Question: 

Thanks.

----------

## nichocouk

So, I have just done that, ie activated 

```
ro_mnt="yes"
```

 in my /etc/dracut.conf and built a new initrd image. However, I get exactly the same messages at boot time.

I will revert to the default option for that one, but test later with this other option:

```

# inhibit installation of any fsck tools

nofscks="yes"

```

and let OpenRC deal with fsck.

Or does that sound stupid?

----------

## nichocouk

I have now done something I don't like too much, which is compiling the kernel with genkernel all, and this removes the need for dracut.

However, the 'Operational error' is still present in  my rc,log. So at least I can say that the problem is not linked with dracut.

I am willing to look at the initrd script, but I don't know where it is and how to configure initrd...

 :Confused: 

Can you help?

Thanks

----------

