Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4909

Raspberry Pi OS • Re: Installing new software directly to an image in a chroot (Botspot)

$
0
0
It looks like it boils down to 3 steps:

1) Use truncate(1) to increase the file size (by 5 gigs):

$ truncate -s +5G foo.img

2) Use fdisk to delete and re-create the partition:

$ fdisk foo.img
(interactively, delete and re-create the second partition)

3) Use resize2fs to enlarge the filesystem. First, use losetup to map a loop device to the partition:

$ loopdev=$(losetup -fP --show foo.img)
$ resize2fs ${loopdev}p2
$ losetup -d $loopdev


That all look OK?

Statistics: Posted by BigRedMailbox — Thu Dec 19, 2024 1:36 am



Viewing all articles
Browse latest Browse all 4909

Trending Articles