↓ Skip to main content
Linux

VirtualBox: Increasing size of the virtual disk.

I am using Virtual Box 6.1 and will use it to expand the disk space for one my VBox Ubuntu image which was almost full.

VirtualBox 6.1.18 About dialog

Click on File > Virtual Media Manager

VirtualBox Virtual Media Manager listing the linux_mint, Ubuntu.vdi and Ubuntu.vhd disks

You can see the linux mint vdi this is the disk which I increased size for using simple steps.

Step-1 : Clone the disk
#

It is always recommended to ensure you have a copy that you can maintain in case of any irrecoverable failures.

  • Click on Copy
  • Follow the steps in the wizard
VirtualBox copy-disk wizard: choosing VDI as the disk image file type

Step - 2 Modify the attributes
#

Select the copy of the disk you just created and

Disk attributes for Ubuntu.vdi showing a size of 30 GB
Disk type dropdown: Normal, Immutable, Writethrough, Shareable, Multi-attach

I will increase by 2 GB

Disk size increased to 32 GB

Step 3: Resize
#

Boot up the machine and you can see some free space which you can adjust using any disk tool of you choice

GNOME Disks showing the 34 GB virtual disk with a 32 GB ext4 partition and 2.1 GB of free space

You can click the gear for selected filesystem and increase the size.

GNOME Disks Resize Volume dialog to grow the partition into the free space
Author
Samarthya
Engineer, learner, tinkerer. This is my trophy shelf of everyday work and leisure.

Related

GoLang: Hash

·2 mins
Previously I talked about files, encoding in golang. In this LTD (learn to do) I will talk about hash package in general. https://blog.samarthya.me/wps/2021/01/30/golang-encoding/ Help # https://golang.org/pkg/hash/#Hash https://golang.org/pkg/crypto/#Hash.New https://golang.org/src/crypto/crypto.go?s=364:378#L6 https://golang.org/pkg/crypto/#pkg-subdirectories Package crypto collects common cryptographic constants. — Official golang documentation const ( MD4 Hash = 1 + iota // import golang.org/x/crypto/md4 MD5 // import crypto/md5 SHA1 // import crypto/sha1 SHA224 // import crypto/sha256 SHA256 // import crypto/sha256 SHA384 // import crypto/sha512 SHA512 // import crypto/sha512 MD5SHA1 // no implementation; MD5+SHA1 used for TLS RSA RIPEMD160 // import golang.org/x/crypto/ripemd160 SHA3_224 // import golang.org/x/crypto/sha3 SHA3_256 // import golang.org/x/crypto/sha3 SHA3_384 // import golang.org/x/crypto/sha3 SHA3_512 // import golang.org/x/crypto/sha3 SHA512_224 // import crypto/sha512 SHA512_256 // import crypto/sha512 BLAKE2s_256 // import golang.org/x/crypto/blake2s BLAKE2b_256 // import golang.org/x/crypto/blake2b BLAKE2b_384 // import golang.org/x/crypto/blake2b BLAKE2b_512 // import golang.org/x/crypto/blake2b ) Let’s try out a simple MD5 hasher.

GoLang: encoding

Package encoding provide capabilities to convert data to and from byte-level and textual representations. encoding/gob encoding/json, and encoding/xml The gob is Go’s format for serializing and deserializing. The gob was tailored for communicating between two servers written in Go. Only exported fields are encoded; zero values are not taken into account Package gob manages streams of gobs – binary values exchanged between an Encoder (transmitter) and a Decoder (receiver). Format GoB # Let’s create a simple Type Blog and we will encode and decode it using the gob format.

GoLang: Hex Output

·3 mins
In last few blogs I have written about reading commandline parameters reading files and using the os package. In this blog, I will combine some these items to read a file byte by byte using the bufio package func’s.