Date: Sun, 28 Feb 2021 18:58:02 -0600 From: Ron Wills <ron@digitalcombine.ca> To: "Herbert J. Skuhra" <herbert@gojira.at>, freebsd-questions@freebsd.org Subject: Re: Enlarging FreeBSD Memstick Image Message-ID: <9f7aa95e-6c8b-21c4-f589-e8b145e3ae97@digitalcombine.ca> In-Reply-To: <YDw33HbiarvnzA7r@mail.bsd4all.net> References: <557a5ae2-9728-6304-4a46-3f895a9cd513@digitalcombine.ca> <YDw33HbiarvnzA7r@mail.bsd4all.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2/28/21 6:39 PM, Herbert J. Skuhra wrote: > On Sun, Feb 28, 2021 at 03:27:20PM -0600, Ron Wills wrote: >> 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. > # gpart show md0s2 > # gpart resize -i 1 md0s2 > # growfs /dev/md0s2a > Perfect, that worked. I guess ufs works a bit differently than I expected. I have some reading to do. Thanks!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9f7aa95e-6c8b-21c4-f589-e8b145e3ae97>
