Sunday, January 26, 2014

Addding Harddisk to VirtualBox

  1. Select your vbox image that you want to add additional harddisk. Left click -> Settings -> Storage -> Add Hard Disk -> Create new disk -> VDI -> Dynamically allocated -> Select location and size
  2. Launch your virtualbox system
  3. ls /dev/sd* (the one without numbers is the new disk)
  4. su -
  5. fdisk /dev/sdb (depending on where your hdd is mounted)
  6. Enter c then u.
  7. Enter p
  8. Select your partition number
  9. Enter the sectors needed
  10. Enter w to write the changes
  11. ls /dev/sd* ( Your new harddisk will show up with number, i.e. sda1, sdb1, etc
  12. mkdir /backup
  13. mkfs.ext4 -L /backup /dev/sdb1
  14. mount /dev/sdb1 /backup
  15. mount ( look for your new drive)
  16. Add LABEL=/backup /backup ext4 defaults 1 2 to your /etc/fstab
  17. Reboot
  18. cd / (You should notice backup folder is created. Your new hard disk is mounted to it.
  19. You can start using the new drive.

No comments:

Post a Comment