resize freebsd slice

Polytropon freebsd at
Sat Jun 12 00:37:30 UTC 2010

On Sat, 12 Jun 2010 03:12:57 +0300, Giorgos Tsiapaliokas <terietor at> wrote:
> after the formats how i will restore my system?

With restore. :-)

First of all, after you've created a new slice, and within the
slice partitions as desired (you can easily do this from the
FreeBSD live system CD or DVD, or any other FreeBSD based live
system, e. g. FreeSBIE), you will need one restore operation
per dumped partition.

In this example, I'll assume that ad0s3 is your new FreeBSD
slice, and within it, the partitions ad0s3a (root file system),
ad0s3b (swap) and ad0s3e (home) have been successfully created
(e. g. via sysinstall's functionality, sade, or fdisk + bsdlabel).
If you are in a multiboot environment, pay attention to the
implications (e. g. FreeBSD boot manager).

Then, when in the live system:

	# mkdir /backup
	# mount -o ro /dev/da0 /backup

	# newfs ad0s3a
	# newfs -U ad0s3e

	# mount /dev/newfs ad0s3a /mnt
	# cd /mnt
	# restore -rf /backup/root.dump
	# cd /mnt/home
	# restore -rf /backup/home.dump
	# cd /

	# umount /mnt
	# umount /backup
	# sync
	# reboot

See "man restore" for details. Basically, using restore, you go

	# cd <target>
	# restore -rf <dumpfile>

It's quite easy as soon as you've understood this logic.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list