# EFI system & fstab & fsck[SOLVED]

## EasterParade

Mopping up some chaos left over from my extended attempts at 

installing efi gentoo system:

fsck does not check rootfs.

I should really correct this now ( procrastination   :Smile:   ).

My fstab is probably wrong:

```
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda2               /boot/efi       vfat            noauto,noatime  0 0

/dev/sda3               /               ext4            noatime         0 1

#/dev/SWAP              none            swap            sw              0 0

/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

/dev/sdc1               /mnt/BACKUP     ext4            noatime         0 0

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

efivarfs                /sys/firmware/efi/efivars    efivarfs    defaults    0 0

```

Like I said /dev/sda3 never gets checked. This is not serious. The harddrive

is new, or was new when I did this all new installation of Gentoo.

I needed more space and I needed a virgin harddrive to partition it GPT.

But now rootfs needs to be checked.

So any suggestions on the fstab or any idea on why fsck does not kick in?Last edited by EasterParade on Tue Apr 12, 2016 11:39 am; edited 1 time in total

----------

## khayyam

transsib ... what does the following show:

```
dumpe2fs -h /dev/sda3 | grep '[M|m]ount count'
```

The "Maximum mount count" is the frequency number, if negative there will be no check. The parameter can be changed like so:

```
tune2fs -c 30 /dev/sda3
```

That will set fsck to be run after 30 boots. You you can force a check by either 'shutdown -Fr now', 'touch /forcefsck ; reboot', or the kernel parameter 'fsck.mode=force'.

HTH & best ... khay

----------

## EasterParade

Yep:

```
dumpe2fs -h /dev/sda3 | grep '[M|m]ount count'

dumpe2fs 1.42.13 (17-May-2015)

Mount count:              164

Maximum mount count:      -1

```

Done:

```
 tune2fs -c 30 /dev/sda3
```

Thank you, that should do it. 

Anything wrong with the fstab or can I leave it like that?

----------

## khayyam

 *transsib wrote:*   

> Thank you, that should do it. Anything wrong with the fstab or can I leave it like that?

 

transsib ... you're welcome. I'd remove the 'shm' entry, it's not needed as /etc/init.d/devfs is creating this, also I wouldn't mount efivarfs read-write (actually I don't think you need an entry at all ... unless you want to change the default values) ... I'd probably suggest the following:

```
efivarfs /sys/firmware/efi/efivars efivarfs ro,nosuid,nodev,noexec,noatime 0 0
```

You would need to 'mount -o remount,rw' if changing the bootloader/bootmanager, but that would be once in a blue moon, if ever. Otherwise, the fstab is fine.

best ... khay

----------

## EasterParade

khayyam wrote:

 *Quote:*   

> You would need to 'mount -o remount,rw' if changing the bootloader/bootmanager, but that would be once in a blue moon, if ever

 

I am glad I asked you about this. The "blue moon" won't come hopefully      :Laughing: 

I've had a hard time setting this up during the Xmas break. I was almost paranoid about those efivars which is why they're still in there.

I also have some residual stuff on the boot/efi partition I could delete now from failed attempts at getting the new Gentoo system to boot

which I don't dare touch for fear of breaking my hard work. May be I should ask for help here too.

Thanks a lot for your advice; I take it and the above goes into my personal tricks file I have for important system procedures.

Thank you again.

----------

## khayyam

 *transsib wrote:*   

> I was almost paranoid about those efivars which is why they're still in there.

 

transsib ... given the frequency of use I've opted to not use efivarfs at all, which works fine as long as you use =sys-boot/efibootmgr-0.5.4-r1. I see absolutely no point in a tmpfs filesystem that exist simply to expose NVRAM and which I'm likely to need to access once. The whole thing smells of over-engineering, and the fact that efiboomgr-6.x nolonger works with efivars alone (which just seems dumb), doesn't illicit much in the way of confidence.

 *transsib wrote:*   

> I also have some residual stuff on the boot/efi partition I could delete now from failed attempts at getting the new Gentoo system to boot which I don't dare touch for fear of breaking my hard work. May be I should ask for help here too.

 

If you look at the output of 'efibootmgr -v' you will see what paths/executables have an entry, you should be able to work out from this what's needed in /boot/efi. If you happen to also keep efi stub kernels there then obviously these are needed by your bootloader/bootmanager.

 *transsib wrote:*   

> Thanks a lot for your advice; I take it and the above goes into my personal tricks file I have for important system procedures. Thank you again.

 

No problem ... again, you're welcome.

best ... khay

----------

## EasterParade

I had to uncomment the shm line again as it's removal caused unexpected

issues like no more reboot, shutdown ...

```
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0
```

in fstab is important here.

----------

## khayyam

 *transsib wrote:*   

> I had to uncomment the shm line again as it's removal caused unexpected issues like no more reboot, shutdown

 

transsib ... as I said, it shouldn't be needed, devfs is mounting these:

```
start() {

 # Mount required stuff as user may not have then in /etc/fstab

 for x in \

  "mqueue /dev/mqueue 1777 ,nodev mqueue" \

  "devpts /dev/pts 0755 ,gid=5,mode=0620 devpts" \

  "tmpfs /dev/shm 1777 ,nodev shm" \

 ; do

  set -- $x

  grep -Eq "[[:space:]]+$1$" /proc/filesystems || continue

  mountinfo -q $2 && continue

  if [ ! -d $2 ]; then

   mkdir -m $3 -p $2 >/dev/null 2>&1 || \

    ewarn "Could not create $2!"

  fi

  if [ -d $2 ]; then

   ebegin "Mounting $2"

   if ! fstabinfo --mount $2; then

    mount -n -t $1 -o noexec,nosuid$4 $5 $2

   fi

   eend $?

  fi

 done

 return 0

}
```

... in my case I don't have shm in fstab, but shm (and devpts) are mounted via /etc/init.d/mdev ...

```
# grep shm /etc/fstab || echo "no shm"

no shm

# mount | grep shm

shm-tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
```

What do you have in the sysinit runlevel?

best ... khay

----------

## EasterParade

kayyam wrote

 *Quote:*   

> What do you have in the sysinit runlevel? 

 

devfs

sysfs

tmpfiles.dev

udev

----------

## khayyam

 *transsib wrote:*   

>  *khayyam wrote:*   What do you have in the sysinit runlevel?  
> 
> devfs
> 
> sysfs
> ...

 

transsib ... in which case, unless 'devfs' has radically changed since the =sys-apps/openrc-0.12.4 version above then shm should be mounted without an entry in fstab.

I have some vague recollection of a shutdown/reboot issue relating to udev, so perhaps yours is similar, unforunately I can't find the thread on a brief search (and as I don't use {e,}udev I generally skim such posts).

best ... khay

----------

## EasterParade

 *Quote:*   

> I have some vague recollection of a shutdown/reboot issue relating to udev

 

My gut feeling too. Udev version is sys-fs/udev-225 - sys-apps/openrc-0.19.1

For now reboot and shutdown is back.

You know about a thread dealing with it? I can search for it.

I have other issues to content with, like pulseaudio that won't start.

You could say pulseaudio ex but iptv with vlc only works properly

with pulseaudio. 

I postpone the udev issue as it is solved for now.

----------

## khayyam

 *transsib wrote:*   

>  *Quote:*   I have some vague recollection of a shutdown/reboot issue relating to udev 
> 
> My gut feeling too. Udev version is sys-fs/udev-225 - sys-apps/openrc-0.19.1 For now reboot and shutdown is back. You know about a thread dealing with it? I can search for it.

 

transsib ... well, there are scores of such threads, so its difficult to find without crawling through all of them, it could be rc_parallel=YES, or more general issues with openrc's fstab changes.

BTW, as alluded above I'm still using =openrc-0.12.4 for reasons which are probably obvious.

best ... khay

----------

## EasterParade

```
 * Searching for openrc ...

[-P-] [  ] sys-apps/openrc-0.13.11:0

[-P-] [ ~] sys-apps/openrc-0.14:0

[-P-] [ ~] sys-apps/openrc-0.15:0

[-P-] [ ~] sys-apps/openrc-0.15.1:0

[-P-] [ ~] sys-apps/openrc-0.16:0

[-P-] [ ~] sys-apps/openrc-0.16.1:0

[-P-] [ ~] sys-apps/openrc-0.16.2:0

[-P-] [ ~] sys-apps/openrc-0.16.3:0

[-P-] [  ] sys-apps/openrc-0.16.4:0

[-P-] [  ] sys-apps/openrc-0.17:0

[-P-] [ ~] sys-apps/openrc-0.18.3:0

[-P-] [  ] sys-apps/openrc-0.18.4:0

[IP-] [  ] sys-apps/openrc-0.19.1:0

[-P-] [ ~] sys-apps/openrc-0.20.4:0

[-P-] [ ~] sys-apps/openrc-0.20.5:0

[-P-] [ -] sys-apps/openrc-9999:0

```

0.12.4 doesn't exist any more and 0.19.1 is stable. 

I could just wait until the bug works itself out, somehow   :Wink: 

Thanks for the link to the openrc thread. I never waisted a thought

on openrc since this install exists because no problem turned up until

I removed the shm line from fstab.

----------

## khayyam

 *transsib wrote:*   

> 0.12.4 doesn't exist any more and 0.19.1 is stable. I could just wait until the bug works itself out, somehow  :wink: Thanks for the link to the openrc thread. I never waisted a thought on openrc since this install exists because no problem turned up until I removed the shm line from fstab.

 

transsib ... I'm maintaining 0.12.4 in a local overlay (with such things you can always find it in the attic.) As for 'stable', I take stable to mean "has been thoroughly tested, and won't arbitrarily break your install on updating", that is not something that is true of openrc currently ("stable", or otherwise), and I won't allow such developers to break my install willy-nilly (and no amount of argumentation on the direction being taken will convince me otherwise).

best ... khay

----------

## EasterParade

kayyam wrote:

 *Quote:*   

> I take stable to mean "has been thoroughly tested, and won't arbitrarily break your install on updating", that is not something that is true of openrc currently ("stable", or otherwise

 

 :Confused: 

And I actually believed to be a good Gentoo addict to choose openrc over systemd plus keep everything stable

instead of keywording everything and blow my install to high heaven.

regards and thanks again

----------

## EasterParade

Someone cheered too soon:

shutdown and reboot are still disfunctional, at least occasionally.

Looks like I switch to systemd as soon as I have time.

----------

## NeddySeagoon

transsib,

Sounds like a bad move.  I'm staying with openrc-0.17 meanwhile.

0.18 broke stuff for me.  Its not getting another chance for a while.

----------

## Tony0945

 *khayyam wrote:*   

>  As for 'stable', I take stable to mean "has been thoroughly tested, and won't arbitrarily break your install on updating", that is not something that is true of openrc currently ("stable", or otherwise), and I won't allow such developers to break my install willy-nilly (and no amount of argumentation on the direction being taken will convince me otherwise).
> 
> best ... khay

 

If it ain't broke, don't fix it!  Checked equery and found, like NeddySeagoon, I'm staying at 0.17  I believe SteveL stopped even sooner.

----------

## Tony0945

 *khayyam wrote:*   

>  As for 'stable', I take stable to mean "has been thoroughly tested, and won't arbitrarily break your install on updating", that is not something that is true of openrc currently ("stable", or otherwise), and I won't allow such developers to break my install willy-nilly (and no amount of argumentation on the direction being taken will convince me otherwise).
> 
> best ... khay

 

If it ain't broke, don't fix it!  Checked equery and found, like NeddySeagoon, I'm staying at 0.17  I believe SteveL stopped even sooner.

----------

## EasterParade

Hey Neddy, nice to hear from you; hope youŕe fine and

all is good   :Smile: 

 *Quote:*   

> Sounds like a bad move. I'm staying with openrc-0.17 meanwhile. 

 

I see to it that I can downgrade IF possible.

In the meantime please consider this:

isn't it a wee bit hypocritical to label systemd the eval empire

but not get shit done with openrc at the same time?

Well ... for me that doesn't make sense at all. If the openrc 

faction has the moral high ground they shouldn't cause 

peoples' systems to break.

Just my two cents....

----------

## Tony0945

[quote="transsib"

Well ... for me that doesn't make sense at all. If the openrc 

faction has the moral high ground they shouldn't cause 

peoples' systems to break.

Just my two cents....[/quote]

IIRC, the OpenRC dev is a systemd proponent.

----------

