Skip to content

Instantly share code, notes, and snippets.

@bokutin
Created February 22, 2014 21:57
Show Gist options
  • Save bokutin/9163058 to your computer and use it in GitHub Desktop.
Save bokutin/9163058 to your computer and use it in GitHub Desktop.
FreeBSD shrinkfs がわりに・・・
VMWare Fusion内のFreeBSDを縮めたいのだが、できないので、小さい仮想ディスクを足して、そっちにコピー。
# gpart create -s GPT da1
# gpart add -s 128 -t freebsd-boot da1
# gpart add -s 1G -t freebsd-swap da1
# gpart add -t freebsd-ufs da1
# gpart bootcode -b /boot/pmbr da1
# gpart bootcode -p /boot/gptboot -i 1 da1
# newfs -j /dev/da1p3
# mount /dev/da1p3 /mnt2
# cpdup / /mnt2
# vim /mnt2/etc/fstab
cpdup で exclude をごりごりやらなきゃだめだろうと思ってたけど、指定しなくても上手くいっちゃった。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment