Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I cloned and enlarged an existing virtual CentOS-6 disk by the following steps:

  1. Create 15GB virtual disk and mount the old and the new disks in GParted.
  2. In GParted copy boot, swap and ext3 partitions from the old disk to the new one.
  3. Mark the new boot partition with boot flag.
  4. Resize the new ext3 to bigger size.

I disconnected the old disk and connected the new one. Now I cannot boot the VirtualBox. I get a black screen. What seems to be the problem here?


share|improve this question

The problem is that you did not install a boot loader ( grub2 ) on the new disk. Also, why bother copying? Just make the existing virtual disk size larger instead of copying to a new one.

share|improve this answer
Doesn't copying all partitions also copy the boot loader? If I resize the ext3 partition how do I fix the file system or will it adapt automatically to the new size? – Jack Feb 7 '12 at 18:16
@Jack no, on a typical msdos partitioned bios booting pc, the boot loader lives outside of any partition. After enlarging the virtual disk image, you need to expand the partition to use the new space. You can do this with gparted from a livecd ( so the partition isn't mounted ). – psusi Feb 7 '12 at 23:12
@Jack Copying all partitions copies most of the bootloader, but not one critical bit, which is in the bootsector. You need to create a working boot sector, e.g. grub-install. – Gilles Feb 7 '12 at 23:56
@Gilles, it also doesn't get the core image for grub2, or the stage1.5 for grub-legacy. – psusi Feb 8 '12 at 2:16

As someone said, the GParted doesn't copy the boot sector. To solve this problem, you need to boot with a LiveCD and then run the following commands:

sudo mount /dev/sda3 /mnt  
sudo grub-install --root-directory=/mnt /dev/sda

Considering that sda3 is your new partition.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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