# Need help to run growfs and fsck at startup



## tangi (Mar 14, 2013)

Hi,

Is there a way to run growfs root filesystem / on boot? I'm using FreeBSD 8 right now.

May be it can be started at the same time as fsck? In this case what file should I edit?

Thanks.


----------



## SirDice (Mar 14, 2013)

Boot to single user mode and do it there.

What version of FreeBSD?


----------



## tangi (Mar 14, 2013)

Actually I used the dd command to restore *.img on a large partition and it automatically goes to single user mode when booting because the filesystem has been altered. I get prompted with this message:

```
When prompted Enter full pathname of shell or RETURN for /bin/sh:
```

How to automate growfs and fsck? I started using *BSD this month.

... version 8.0-RELEASE-p2

Thanks.


----------



## SirDice (Mar 14, 2013)

tangi said:
			
		

> ... version 8.0-RELEASE-p2


FreeBSD 8.0 has been end-of-life since November 2010 and isn't supported anymore.

http://www.freebsd.org/security/#unsup


----------



## tangi (Mar 14, 2013)

Adding entries to /etc/rc.d/fsck, that does the trick.


----------



## SirDice (Mar 14, 2013)

Good, now is the time to update to at least 8.3.


----------



## wblock@ (Mar 14, 2013)

tangi said:
			
		

> Adding entries to /etc/rc.d/fsck, that does the trick.



growfs(8) is a one-time use.  That fsck(8) should also only be needed the first time.  These can be done manually.

These repairs are only needed because dd(1) is really not the right tool for copying filesystems.  See Backup Options For FreeBSD.


----------

