Create & Mount Disk
Create VHD
Use any hypervisor to create a virtual hard disk, then attach to virtual\ machine via SCSI Controller.
Create disk partition
Refer to List OS Disks.
- Partition disk
fdisk /dev/sdb
p
to list available partitions
n
create new partition
e
set as extended partition
#
set number of partitions (1)
sector
set default values for start and end sectors
t
set system type (83 Linux)
- Write changes from memory
w
write partition table
mkfs -t ext2 /dev/sdb
write file system
fsck /dev/sdb -f -y
check partition
Restart system to commit changes.
- Mount disk
- Create directory to map disk to
mkdir /mnt/<dirname>
- Mount disk to directory
mount -t ext2 /dev/sdb /mnt/<dirname>