Skip to main content

Add hard drive into Linux Mint 21.1 Vera/Ubuntu/Debian

Add hard drive into Linux Mint 21.1 Vera/Ubuntu/Debian

This is a condensed version on how to add hard disk into Linux Mint/Ubuntu/Debian. First check hard drives in the system, like so:
$: sudo lshw -C disk
It should show (partial data only) like this:
*-disk:1
   description: ATA Disk
   product: WDC WD3200AAKX-0
   vendor: Western Digital
   physical id: 1
   bus info: scsi@1:0.0.0
   logical name: /dev/sdb
   version: 1H15
   serial: WD-WMC2E0871450
   size: 298GiB (320GB)
   capabilities: partitioned partitioned:dos
   configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=e32ff1f9
Using parted, let's now configure the harddisk/partition
$: sudo parted /dev/sdb
In parted prompt, create a new GPT partition table
(parted) mklabel gpt
Change the default unit to GB
(parted) unit GB
Create one partition occupying all the space on the drive
(parted) mkpart primary ext4 0 100%
Check to verify the layout
(parted) print
It should show something like below:
Model: ATA WDC WD3200AAKX-0 (scsi)
Disk /dev/sdb: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End    Size   File system  Name     Flags
 1      0.00GB  320GB  320GB  ext4         primary
Save and quit parted
(parted) quit
Format the partition using ext4
$: sudo mkfs -t ext4 /dev/sdb1
Formatting process should show something like below:
mke2fs 1.46.5 (30-Dec-2021)
/dev/sdb1 contains a ext4 file system labelled 'VMs'
        last mounted on /mnt/b41faa95-6135-47f6-a24e-ed1909d6fc18 on Sun Dec 25 19:06:43 2022
Proceed anyway? (y,N) y
Creating filesystem with 78142464 4k blocks and 19537920 inodes
Filesystem UUID: 1b7f46da-9aa6-4c30-afec-d983f35a19d5
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks):
done
Writing superblocks and filesystem accounting information: done
Now let us create a mount point
$: sudo mkdir /mnt/vmdisk
Add an entry in fstab to automount the new partition
$: sudo vim /etc/fstab
Add a line entry in fstab like below
/dev/sdb1    /mnt/vmdisk   ext4    defaults     0        0
We should be able to use the partition without rebooting, so mount it manually for now.
$: sudo mount /mnt/vmdisk
Add directory to be writable by user
$: sudo mkdir /mnt/vmdisk/vms
Make the user named timus owner of the new folder
$: sudo chown -R timus:timus /mnt/vmdisk/vms
Refs:
https://help.ubuntu.com/community/InstallingANewHardDrive

Comments

Popular posts from this blog

Error! Could not locate dkms.conf file install VirtualBox 4.1.8 on Ubuntu 11.10

Tried to update my Ubuntu host today and it did pickup that new version of VirtualBox is available (4.1.8). All other packages installed properly except that VirtualBox installation was complaining about missing dkms.conf file, see error message below. $: sudo /etc/init.d/vboxdrv setup * Stopping VirtualBox kernel modules [ OK ] * Uninstalling old VirtualBox DKMS kernel modules Error! Could not locate dkms.conf file. File: does not exist. [ OK ] * Trying to register the VirtualBox kernel modules using DKMS [ OK ] * Starting VirtualBox kernel modules [ OK ] Though it looks like installation was fine but I am concerned about its effects to VirtualBox functionality. To fix this, do: $: cd /var/lib/dkms/vboxhost $: sudo rm -r 4.1.4 $: sudo /etc/init.d/vboxdrv setup Of course you have to re

The following add-ins could not be started MonoDevelop.GnomePlatform

Installing MonoDevelop in OpenSUSE 12.2 from its repository was very easy. When running it for the first time though I got the message: The following add-ins could not be started: The root of the trace shows MonoDevelop.GnomePlatform,2.8 A quick search shows that MonoDevelop depends on libgnomeui . This should have been part of dependencies when installing the application but well.... Below is the screen shot of the error message. References: http://software.1713.n2.nabble.com/MonoDevelop-and-openSUSE-12-1-td7462957.html [2013/04/09] - Same issue observed in OpenSUSE 12.3 and also the same fix. [2014/11/02] - Same issue observed in OpenSUSE 13.3, mondevelop 3.0.6 and the same fix.