Default
UTM MacOS Silicon: Adding A 32 GB VirtualDisk
C. BinKadal --- Sendirian, Berhad


Table of Content


UTM MacOS Silicon: Adding A 32 GB VirtualDisk




DISK SIZE (/dev/vdb): 32 GB







Crosscheck /dev/vdb

First, start (boot) your system, and next, login.

  • Account: root
  • Run:
lsblk

root:~# lsblk

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0     11:0    1 1024M  0 rom  
vda    254:0    0   24G  0 disk 
|-vda1 254:1    0  512M  0 part /boot/efi
|-vda2 254:2    0 22.5G  0 part /
`-vda3 254:3    0  976M  0 part [SWAP]
vdb    254:16   0   32G  0 disk 

root:~# 

In this case, the next disk is /dev/vdb


Partitioning 32GB

  • Account: root
    • Remember: you are not cbkadal! Replace “cbkadal” with your account.
  • Run:
DEVICE TYPE SIZE
/dev/vdb1 ext4 10 MB
/dev/vdb2 ext4 the rest

# REV01: Sun 17 Sep 2023 21:30
# START: Thu 29 Jun 2023 09:00
sync
# CLEAN OLD DISK
dd if=/dev/zero of=/dev/vdb bs=1M count=1
sync
# SFDISK is a script-oriented tool for partitioning.
sfdisk /dev/vdb <<< "
label: dos
device: /dev/vdb
unit: sectors
sector-size: 512
/dev/vdb1: type=83, start= 2048, size=20480
/dev/vdb2: type=83, start=22528
"


Crosscheck Again /dev/vdb1 and /dev/vdb2

  • Account: root
  • Run:
lsblk

root:~# lsblk

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0     11:0    1 1024M  0 rom  
vda    254:0    0   24G  0 disk 
|-vda1 254:1    0  512M  0 part /boot/efi
|-vda2 254:2    0 22.5G  0 part /
`-vda3 254:3    0  976M  0 part [SWAP]
vdb    254:16   0   32G  0 disk 
|-vdb1 254:17   0   10M  0 part
`-vdb2 254:18   0   31G  0 part

root:~# 


VirtualDisk Format /dev/vdb1

  • Account: root
  • Run:
mkfs -v -t ext4 /dev/vdb1

root:~# mkfs -v -t ext4 /dev/vdb1

mke2fs 1.46.2 (28-Feb-2021)
fs_types for mke2fs.conf resolution: 'ext4'
Discarding device blocks: done                            
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
2097152 inodes, 8388608 blocks
419430 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2155872256
256 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Filesystem UUID: 8e998d63-f3b1-4c1f-b75e-a0f25febc128
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done   

root:~# 


VirtualDisk Format /dev/vdb2

  • Account: root
  • Run:
mkfs -v -t ext4 /dev/vdb2


Mounting /mnt/cbkadal

  • Account: root
    • Remember: you are not cbkadal! Replace “cbkadal” with your account.
  • Run:
mkdir -pv /mnt/cbkadal/

mount -v  /dev/vdb1 /mnt/cbkadal/

df /dev/vdb1


Mounting /mnt/lfs

  • Account: root
  • Run:
mkdir -pv /mnt/lfs/

mount -v  /dev/vdb2 /mnt/lfs/

df /dev/vdb2


Add to file /etc/fstab

  • Account: root
  • Edit file “/etc/fstab” with your favorite editor, and add:
    • Remember: you are not cbkadal! Replace “cbkadal” with your account.
/dev/vdb1  /mnt/cbkadal ext4   defaults   0  2
/dev/vdb2  /mnt/lfs     ext4   defaults   0  3


UUID

In file “/etc/fstab”; replace “/dev/vdb1” and “/dev/vdb2” with its UUID. To find out UUID, run (root):

blkid

After replacement, file “/etc/fstab” should look like:







© 2021-2024 --- C. BinKadal --- About --- Revision: Tue 26 Nov 2024 18:00.