When reading/writing a disk image using Linux tool ‘dd’ launch as follows:
dd if=/dev/sdb of=filename.img & pid=$!
this will run ‘dd’ in the background.
To see the progress:
kill -USR1 $pid
Notes:
- If you are doing it as a non-root user you’ll need to prefix those commands with sudo
- If you do that do ’sudo ls’ first, otherwise the ’sudo dd’ will fail waiting on the password which it’ll never get as its backgrounded.
Thanks to Cian.
Shutdown and remove the hard disk, then connect to a separate PC with VirtualBox (virtualbox-ose) installed.
- Take a ‘dd’ copy of the hard disk, eg: dd if=/dev/sdb of=filename.img
(warning this may take a while and requires enough free disk space to hold a copy of the entire hard disk being cloned)
- After the image has been successfully created, convert it to an image suitable for VMWare or VirtualBox using the command:
vboxmanage convertfromraw filename.img -format VMDK filename.vmdk
- This can be imported into VirtualBox by creating a new (Linux/Other Linux) Virtual Machine and “Use existing hard drive”. Click the browse button to go to the Virtual Media Manager, click ‘Add’ and select the VMDK file created in the previous step.
The virtual machine should now be ready to run in VirtualBox.
To import into VMWare, create a new virtual machine and virtual hard disk. Overwrite the new Virtual Hard disk by copying the VMDK file created earlier, into its place.
Thanks to Rory McCann for pointing this one out.
It is possible to convert (resize, rotate etc) an image without creating a new file. mogrify takes the same options as convert but operates on the existing image. Both are tools included in imagemagick.
On my previous laptop I suffered with repeated over-heating problems whenever CPU load went high for a prolonged period. After several emergency shutdowns (performed by ACPI) I discovered the problem:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
returned the result: “performance”
Inserting the following line before the ‘exit’ line in /etc/rc.local:
echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
resolved the problem.
For all available scaling governors:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
A problem I found when using the Linux client for Skype is that it will try to perform file locking, which is a problem if your home partition is an NFS drive.
To overcome this limitation, create a directory on the local hard disk:
- sudo mkdir /usr/local/skype
- sudo chown tom.tom /usr/local/skype
Delete the configuration that Skype attempted to install, and symlink to the directory on the local harddisk:
- rm -rf /home/tom/.Skype
- ln -s /usr/local/skype /home/tom/.Skype
After this Skype worked as normal.