# continuing the boot process even if all disk can't be mounted



## Dante (Dec 15, 2008)

Hi,

In my configuration, I have my root in a zpool mirror. So I have 2 disks which both have a /boot on it.

I would like to boot my server without intervention even if one of the disk is not available.

The problem is that freebsd try to mount each entry of the fstab and purpose a shell if it can't. I would to know how to say "continue even if you can't mount that". putting the options "no auto" doesn't really work.

Thank you.


----------



## Dante (Dec 19, 2008)

Finally, I removed all this entry from the fstab and I created a rc.d script which mount and swapon them.

It's solution, but it's not very clean, any other idea ?


----------



## sugar (Dec 19, 2008)

I am also interested on how to do that, please don't forget to post if found a solution.


----------



## aragon (Dec 20, 2008)

Dante's solution is the solution.  No part of the builtin RC scripts support the operation he needs (to my knowledge at least), so one has to extend them by writing your own RC script to do it - one of the powers of open source.


----------



## Dante (Dec 22, 2008)

My solution :
- erase concerned lines of your /etc/fstab file.
- create a rc.d script
- add it in you /etc/rc.conf file

Here is mine :
/etc/rc.d/my_mountfs

```
#!/bin/sh

. /etc/rc.subr

name="my_mountfs"
start_cmd="${name}_start"
stop_cmd="${name}_stop"

my_mountfs_start()
{
swapon /dev/ad1s1b
swapon /dev/ad0s1b
mount /dev/ad0s1a /bootdir0
mount /dev/ad1s1a /bootdir1
}

my_mountfs_stop()
{
swapoff /dev/ad1s1b
swapoff /dev/ad0s1b
umount /dev/ad0s1a
umount /dev/ad1s1a
}

load_rc_config $name
run_rc_command "$1"
```

And you had _my_mountfs_enable="YES"_ to your /etc/rc.conf


----------

