Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Feb 2021 15:27:20 -0600
From:      Ron Wills <ron@digitalcombine.ca>
To:        freebsd-questions@freebsd.org
Subject:   Enlarging FreeBSD Memstick Image
Message-ID:  <557a5ae2-9728-6304-4a46-3f895a9cd513@digitalcombine.ca>

next in thread | raw e-mail | index | archive | help
I've taken the FreeBSD memstick image an did a couple little 
modifications to add a persistent partition that I mount as unionfs's 
(/etc /usr /var & /root). So far so good. I can bootstrap pkg and 
install software to the thumb drive and keep wifi configurations and 
such. Now not only can I install FreeBSD it gives me a very usable live 
distro.

Next step is to bootstrap pkg in the image file itself and have the most 
common tools I use already installed. First I need to enlarge the image 
and this is where I'm having problems.

$ truncate -s 2G FreeBSD-12.2-RELEASE-amd64-memstick.img

$ mdconfig -a -t vnode -f FreeBSD-12.2-RELEASE-amd64-memstick.img -u 0

$ gpart recover md0

$ gpart resize -i 2 md0

Now this is where I'm stuck. The second partition is show 2G but I can 
seem to resize the filesystem.

$ gpart show md0
=>      1  4159568  md0  MBR  (2.0G)
         1     1600    1  efi  (800K)
      1601  4157968    2  freebsd  [active]  (2.0G)

$ growfs /dev/md0s2a
growfs: requested size 1.0GB is not larger than the current filesystem 
size 1.0GB

I can't figure out why growfs isn't seeing the new partitions size.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?557a5ae2-9728-6304-4a46-3f895a9cd513>