4

I want my openbsd server to boot, no matter what and dont break with waiting for manual FSCKing. It's easy to do in linux, but in obsd it just doesnt want to be "auto". Last time I set the 6th,7th numbers to 0 0 in fstab, hoping it's gonna do the trick but no.

I also have options:

fsck_y_enable="YES"      # Set to YES to do fsck -y if the initial preen fails.
background_fsck="YES"   # Attempt to run fsck in the background where possible.
background_fsck_delay="60" # Time to wait (seconds) before starting the fsck.

In the global rc.conf seems, no use (it's a freebsd option).

Anybody knows a solution for this?

Thanks

danishd
  • 41
  • 3

1 Answers1

1

I have not seen reference to anything like "nofail" in fstab, I would like to. Any mention of a filesystem in fstab has caused boot delay for me, so in my home combined router and filesharing box I did this:

I made no reference to my massive A/V share in fstab, so that boot would be rapid and only look at the tiny root and network services needed to get my internet connection back. Then, in /etc/rc.local: (it works well enough that I haven't touched it in years.)

echo -n " /avrepo" ;
sd0=$(/usr/sbin/sysctl hw.disknames | /usr/bin/grep -c sd0) ;
if [ "$sd0" -ge 1 ] && [ $(mount | grep -c /avrepo) -le 0 ] ; then 
   mount /dev/sd0i /avrepo ;
   if [ $? -ge 1 ] ; then 
      sleep 30 ; # assume boot and let system settle first before fsck
      fsck -y /dev/sd0i ; 
      sleep 1 ;
      mount /dev/sd0i /avrepo ;
   fi ;
   sleep 1 ;
fi ;

Then I started up serices like samba and ftp from rc.local to ensure proper order of events.

ED Fochler
  • 21
  • 1