Date: Wed, 4 Jul 2018 09:18:03 -0700 From: bob prohaska <fbsd@www.zefox.net> To: "Herbert J. Skuhra" <herbert@gojira.at> Cc: freebsd-arm@freebsd.org, bob prohaska <fbsd@www.zefox.net> Subject: Re: gpart trouble Message-ID: <20180704161802.GA64982@www.zefox.net> In-Reply-To: <20180704094539.GA70815@mail.bsd4all.net> References: <20180704041559.GA63030@www.zefox.net> <20180704094539.GA70815@mail.bsd4all.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 04, 2018 at 11:45:39AM +0200, Herbert J. Skuhra wrote: > On Tue, Jul 03, 2018 at 09:16:39PM -0700, bob prohaska wrote: > > > > I want to add some swap partitions to the June 28th RPI3 snapshot image on microSD. > > Growfs was suppressed, so the card has 12 GB of free space: > > > > Enter full pathname of shell or RETURN for /bin/sh: > > Cannot read termcap database; > > using dumb terminal settings. > > # mount -o rw / > > # gpart show mmcsd0 > > => 63 31116225 mmcsd0 MBR (15G) > > 63 2016 - free - (1.0M) > > 2079 102312 1 fat32lba [active] (50M) > > 104391 5138469 2 freebsd (2.5G) > > 5242860 25873428 - free - (12G) > > > > # gpart add -t freebsd-swap -s 1G mmcsd0 > > gpart: Invalid argument > > # gpart add -t freebsd-swap -s 1G /dev/mmcsd0 > > gpart: Invalid argument > > # gpart add -t freebsd-swap -s 1GB -l swap mmcsd0 > > gpart: Invalid argument > > Try: > > # gpart show mmcsd0s2 > # gpart resize -i 2 mmcsd0 > # gpart add -t freebsd-swap -s 1GB mmcsd0s2 > That worked exactly as desired. I ran afoul of the distinction between partitions and slices, thinking resize would enlarge both, like growfs. How would one go about suggesting that an example similar to this be added to the gpart man page? There's nothing obviously like it now. As microSD-booted devices become more common increasing numbers of people will encounter the same puzzle. Thank you very much!! bob prohaska
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180704161802.GA64982>