-
Notifications
You must be signed in to change notification settings - Fork 0
/
016.pmd
232 lines (164 loc) · 5.29 KB
/
016.pmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
---
title: "UTM MacOS Silicon: Adding A 32 GB VirtualDisk"
description:
UTM MacOS Silicon: Adding A 32 GB VirtualDisk
tagline: UTM MacOS Silicon, VirtualDisk
---
[ℼ](#idxXXX)<br id="idx000">
## Table of Content
* [UTM MacOS Silicon: Adding A 32 GB VirtualDisk](#idx010)
* [DISK SIZE (/dev/vdb): 32GB](#idx011)
* [Crosscheck /dev/vdb](#idx013)
* [Partitioning 32GB](#idx014)
* [Crosscheck Again /dev/vdb1 and /dev/vdb2](#idx015)
* [VirtualDisk Format /dev/vdb1](#idx016)
* [VirtualDisk Format /dev/vdb2](#idx017)
* [Mounting /mnt/cbkadal](#idx018)
* [Mounting /mnt/lfs](#idx019)
* [Add to /etc/fstab](#idx020)
* [UUID](#idx021)
[ℼ](#)<br id="idx010">
## UTM MacOS Silicon: Adding A 32 GB VirtualDisk
<img src="{{ site.baseurl }}/assets/images/do23-010.jpg" style="width:960px;"><br><br>
[ℼ](#)<br id="idx011">
## DISK SIZE (/dev/vdb): 32 GB
<img src="{{ site.baseurl }}/assets/images/do23-011.jpg" style="width:960px;"><br><br>
[ℼ](#)<br id="idx012">
<img src="{{ site.baseurl }}/assets/images/do23-012.jpg" style="width:960px;"><br><br>
[ℼ](#)<br id="idx013">
## Crosscheck /dev/vdb
First, start (boot) your system, and next, login.
* Account: <span style="color:red; font-weight:bold; font-size:larger;">root</span>
* 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
<span style="color:red; font-weight:bold; font-size:larger;">/dev/vdb</span>
[ℼ](#)<br id="idx014">
## Partitioning 32GB
* Account: <span style="color:red; font-weight:bold; font-size:larger;">root</span>
* Remember: <span style="color:red; font-weight:bold; font-size:larger;">you are not cbkadal!</span>
Replace "cbkadal" with your account.
* Run:
| DEVICE | TYPE | SIZE |
| --------- | ---- | -------- |
| /dev/vdb1 | ext4 | 10 MB |
| /dev/vdb2 | ext4 | the rest |
```
{% raw %}
(> assets/scripts/016-sfdisk <)
{% endraw %}
```
[ℼ](#)<br id="idx015">
## Crosscheck Again /dev/vdb1 and /dev/vdb2
* Account: <span style="color:red; font-weight:bold; font-size:larger;">root</span>
* 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:~#
```
[ℼ](#)<br id="idx016">
## VirtualDisk Format /dev/vdb1
* Account: <span style="color:red; font-weight:bold; font-size:larger;">root</span>
* 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:~#
```
[ℼ](#)<br id="idx017">
## VirtualDisk Format /dev/vdb2
* Account: <span style="color:red; font-weight:bold; font-size:larger;">root</span>
* Run:
```
mkfs -v -t ext4 /dev/vdb2
```
[ℼ](#)<br id="idx018">
## Mounting /mnt/cbkadal
* Account: <span style="color:red; font-weight:bold; font-size:larger;">root</span>
* Remember: <span style="color:red; font-weight:bold; font-size:larger;">you are not cbkadal!</span>
Replace "cbkadal" with your account.
* Run:
```
mkdir -pv /mnt/cbkadal/
mount -v /dev/vdb1 /mnt/cbkadal/
df /dev/vdb1
```
[ℼ](#)<br id="idx019">
## Mounting /mnt/lfs
* Account: <span style="color:red; font-weight:bold; font-size:larger;">root</span>
* Run:
```
mkdir -pv /mnt/lfs/
mount -v /dev/vdb2 /mnt/lfs/
df /dev/vdb2
```
[ℼ](#)<br id="idx020">
## Add to file /etc/fstab
* Account: <span style="color:red; font-weight:bold; font-size:larger;">root</span>
* Edit file "/etc/fstab" with your favorite editor, and add:
* Remember: <span style="color:red; font-weight:bold; font-size:larger;">you are not cbkadal!</span>
Replace "cbkadal" with your account.
```
/dev/vdb1 /mnt/cbkadal ext4 defaults 0 2
/dev/vdb2 /mnt/lfs ext4 defaults 0 3
```
[ℼ](#)<br id="idx021">
## 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:
<br>
<img src="{{ site.baseurl }}/assets/images/do23-019X.jpg" style="width:960px;"><br><br>
[ℼ](#)<br id="idxXXX"><br>