Hi All,
The latest Void disk image has a boot and a root partition. I was able to mount the root partition from the disk image and copy it to a new disk image with the following commands:
Code: Select all
tar zxvf void-live-powerpc-20220129.img.tar.gz
Output:
Code: Select all
-rw-r--r-- 1 christian christian 8036285952 29. Jan 2022 void-live-powerpc-20220129.img
Code: Select all
fdisk -lu void-live-powerpc-20220129.img
Output:
Code: Select all
Disk void-live-powerpc-20220129.img: 7,48 GiB, 8036285952 bytes, 15695871 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd0a60bb8
Device Boot Start End Sectors Size Id Type
void-live-powerpc-20220129.img1 2048 473087 471040 230M 6 FAT16
void-live-powerpc-20220129.img2 473088 15693823 15220736 7,3G 83 Linux
Calculate the offset from the start of the image to the partition start
Sector size * Start = (in the case) 512 * 473088 = 242221056
Code: Select all
bc
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
512 * 473088
242221056
quit
Mount it on /dev/loop0 using the offset.
Code: Select all
sudo losetup -o 242221056 /dev/loop0 void-live-powerpc-20220129.img
Output:
Code: Select all
fsck from util-linux 2.38.1
e2fsck 1.46.6-rc1 (12-Sep-2022)
Pass 1: Checking inodes, blocks, and sizes
Inode 30261 extent tree (at level 2) could be narrower. Optimize<y>? yes
Inode 30322 extent tree (at level 2) could be narrower. Optimize<y>? yes
Inode 30660 extent tree (at level 2) could be narrower. Optimize<y>? yes
Inode 30695 extent tree (at level 2) could be narrower. Optimize<y>? yes
Inode 30739 extent tree (at level 2) could be narrower. Optimize<y>? yes
Inode 30785 extent tree (at level 1) could be narrower. Optimize<y>? yes
Inode 30874 extent tree (at level 1) could be narrower. Optimize<y>? yes
Inode 30903 extent tree (at level 1) could be narrower. Optimize<y>? yes
Inode 30907 extent tree (at level 1) could be narrower. Optimize<y>? yes
Inode 30908 extent tree (at level 1) could be narrower. Optimize<y>? yes
Inode 153472 extent tree (at level 1) could be shorter. Optimize<y>? yes
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
void: ***** FILE SYSTEM WAS MODIFIED *****
175735 inodes used (36.94%, out of 475776)
288 non-contiguous files (0.2%)
27 non-contiguous directories (0.0%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 163035/24/5
1476045 blocks used (77.58%, out of 1902592)
0 bad blocks
1 large file
134534 regular files
13777 directories
0 character device files
0 block device files
0 fifos
690 links
27415 symbolic links (12663 fast symbolic links)
0 sockets
------------
176416 files
Output:
Code: Select all
bin boot dev etc home lib lib32 lost+found media mnt opt proc root run sbin sys tmp usr var
Code: Select all
sudo dd if=/dev/loop0 of=void-live-powerpc-20230317.img
Output:
Code: Select all
15222783+0 Datensätze ein
15222783+0 Datensätze aus
7794064896 Bytes (7,8 GB, 7,3 GiB) kopiert, 83,3552 s, 93,5 MB/s
Code: Select all
/sbin/fsck.ext4 void-live-powerpc-20230317.img
Output:
Code: Select all
e2fsck 1.46.6-rc1 (12-Sep-2022)
void: clean, 175735/475776 files, 1476045/1902592 blocks
I increased the Void root disk image:
Code: Select all
qemu-img resize void-live-powerpc-20230317.img +5G
Code: Select all
/sbin/fsck.ext4 -f void-live-powerpc-20230317.img
Output:
Code: Select all
e2fsck 1.46.6-rc1 (12-Sep-2022)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
void: 175735/475776 files (0.2% non-contiguous), 1476045/1902592 blocks
Code: Select all
resize2fs void-live-powerpc-20230317.img
Output:
Code: Select all
resize2fs 1.46.6-rc1 (12-Sep-2022)
Resizing the filesystem on void-live-powerpc-20230317.img to 3213567 (4k) blocks.
The filesystem on void-live-powerpc-20230317.img is now 3213567 (4k) blocks long.
We have copied the root partiton from the Void disk image to a new image and increased it.
Cheers,
Christian