So I decided to switch from a dualboot setup to running Ubuntu 14.04 64-bit inside of VirtualBox 5.08. My Host OS is Windows 8.1 64-bit. The VM has 2 GB of dedicated memory, from the 8GB on the host.

I first set up the machine to use only a 8 GB VDI, since I just wanted to test it. After deciding to upgrade, I wiped my previous 30 GB Partition and needed to add it to the vdi file. I mostly followed this guide. In the end, I keep on running into a problem with grub and keep recieving a error while trying to boot.

error: attempt to read or write outside of disk 'hd0' .

Here is the step-by-step breakdown of what I have done in my most recent attempt.

First, I used VBoxManage to increase the size of the VDI to 30 Gb.

When I tried to run GParted from a separate VM, it froze while booting, so instead I booted the Ubuntu VM from a ISO, and ran GParted there.

Next, I deleted the swap space partition and the extended partition.

I resized the main partition to be 28 GB.

I rebuilt the extended partition and then the swap partition, with 2 GB.

There was an enormous amount of unallocated space available, around 30 TB (I am using a 128 GB SSD), I believe this was because the VDI file is dynamically allocated, so I ignored the space, but I left it located after every other partition.

I turned off the VM, removed the ISO from the VM, and started it up.

I received an error while booting:

error: attempt to read or write outside of disk 'hd0' .

After searching for a solution, I tried:

grub rescue> ls
grub rescue> ls(hd0,1)/
grub rescue> set root=(hd0,1)
grub rescue> set prefix=(hd0,1)/boot/grub
grub rescue> insmod normal

And received another error

error: attempt to read or write outside of disk 'hd0' .

I had no idea what to do here, so I restarted the VM, booting from the Ubuntu ISO again and ran boot repair. Here is the report.

After starting the VM again I run into the same error that occurred before trying the boot repair software. I tried the same solution and received the same error after grub rescue> insmod normal

This is the point where I have exhausted my knowledge and the possible solutions I could find online.

I realize that in the amount of time I have dedicated to this project I could have created a new VM and reinstalled all of my software, but I am stuck in a whitewhale situation. The solution has become more important to me than the results.

Any ideas?

(It seems I am only allowed to create two links, I will try to add the image links as a comment on the OP.)

  • Here is the link for the GParted Screenshot. And Here is the grub screenshot.
    – Lex
    Oct 23, 2015 at 16:56

1 Answer 1


Your disk uses old format from 80's: https://en.wikipedia.org/wiki/Master_boot_record

The organization of the partition table in the MBR limits the maximum addressable storage space of a disk to 2 TB (2^32 × 512 bytes).

You need to switch to gpt.

  • Well, that ended in tears for me. I simply lack the understanding required to modify the available guides to suit my needs. Thank you for the solution though.
    – Lex
    Oct 23, 2015 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.