guy labs guy labs

How to fill a hard disk with zeros

Infrastructure
/by
This short how to shows you how you are able to fill a hard disk with zeros, such that the data can't be restored anymore. For this we use the good old dd command (https://en.wikipedia.org/wiki/Dd_(Unix)). Ok let's start by mounting the hard disk you want to erase. Then execute the following command to see which file system you want to erase: Ok after you have the desired file system (something like /dev/sdb) you need to execute the following command to fill the hard disk with zeros: This will take a while and because you don't get any output on how long it will take you can use the pv command (http://linux.die.net/man/1/pv). This tool will show a progress of the data going through the pipes you define. To use it we need to first install it: And now execute the following command to have a dd command with a progress bar: Replace the placeholder with the size of your hard disk in GB such that pv can calculate the remaining time for the process. Ok that was the short how to about zeroeing out a hard disk. Happy erasing! ...

How to resize a VirtualBox hard drive in Ubuntu 13.04

Linux
/by
Lately at work I needed to install Microsoft SQL Server on my Windows 7 virtual machine, and it was just to big for the free space left on my virtual hard drive. So I searched a way to resize it without spending too much time. You just need to open a terminal, browse to your .vdi virtual drive and then execute the following command: Inside the example command I resize the Windows-7-SP1-64-Bit.vdi virtual drive to a complete size of 30 GB (30'000 MB). Don't forget to format the free space or resize the partition with gparted or any other partitioning tool. I hope this helps someone  :wink: Have a nice...

Create and restore drive image with Clonezilla

Infrastructure
/by
    Today we want to create a drive image with the help of Clonezilla, an open source clone and restore tool. To clone a hard drive is useful if you want to create a backup or some kind of snapshot of the current state of a hard drive. To start we download the live CD from the Clonezilla website at http://clonezilla.org/downloads.php. Next we have several options to create a start up disk or flash drive. These options are described here (in Section 2): http://clonezilla.org/clonezilla-live.php I went with the Tuxboot option and a USB drive. Next I followed the very detailed howto on the Clonezilla website to save a hard drive as an image. I didn't want to copy all the steps in this howto, because there aren't any points which I would change. Here is the link: http://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/01_Save_disk_image If you want to restore a hard drive image you can follow this guide here: http://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/02_Restore_disk_image With this post I just wanted to share a good disk drive cloning tool, which served my needs perfectly. Thanks for...