OS Week 03 Assignment #3: Add/Create An Extra Virtual Disk
Before proceeding, make OVA (or UTM) backups on your flash disk. There is a chance you might mess with your disks. Although you might be able to fix it, it would be easier to reload from your backup!
Shutdown the Guest
- Add/create an extra disk with your Hypervisor (VirtualBox or UTM)
VirtualBox
- Visit https://doit.vlsm.org/015.html
- Crosscheck /dev/sdb (root mode)
- VirtualDisk Format (root mode)
- Mounting /mnt/lfs (root mode)
- Add to /etc/fstab (root mode)
UTM MacOs Silicon
- Visit https://doit.vlsm.org/016.html
- Crosscheck /dev/vdb (root mode)
- VirtualDisk Format (root mode)
- Mounting /mnt/lfs (root mode)
- Add to /etc/fstab (root mode)
Is $LFS == /mnt/lfs ?
- Make sure that LFS is
/mnt/lfs
- Execute (root mode):
# CHECKING LFS:
[[ "$LFS/" == "/mnt/lfs/" ]] && echo "ALIAS OK" || echo "XXXXX ALIAS NOT OK XXXXX"
[ -d $LFS/ ] && echo "DIR OK" || echo "XXXXX DIR NOT OK XXXXX"
# #############
STOP/RETURN: if "ALIAS OR DIR IS NOT OK"
Create A New Directory (root mode)
- Directory Name: GitHub-Account (e.g. "cbkadal").
- Change directory owner/group to your account.
- You are not cbkadal! Replace cbkadal with your GitHub Account.
IAM="cbkadal"
NEWDISK="/mnt/$IAM/"
if [ -d $NEWDISK ] ; then
chown -vR $IAM:$IAM $NEWDISK
ls -al $NEWDISK
else
echo "NO $NEWDISK"
fi
(root mode)
df $LFS/ /mnt/$IAM/ ; echo""; ls -al /mnt/
NOTE
For UTM MacOs Silicon, replace each device such as /dev/sda
with device /dev/vda
, etc.