Restoring root from dd image

Discussions related to using VirtualBox on Linux hosts.
Post Reply
gdseas
Posts: 16
Joined: 3. Dec 2012, 21:23
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu, Kali, Mint, Windows

Restoring root from dd image

Post by gdseas »

Hello,
I have inherited a VBox Ubuntu instance with a very small root partition. I would like to make the partition larger so I thought of:

1. Getting dd images of each partition
2. Creating a new VBox Ubnutu instance with the right partition sizes
3. Restoring the dd images into the partitions

I now realize that I would somehow need to restore the dd image while the / and /home partitions are mounted. Is there a way to somehow boot the new instance, umount the partitions and do a dd restore?

Thank you!
Greg

PS: Alternatively, is there a simple or more clever method for me to somehow resize the partitions (not LVM) or create a new VM and clone the old system?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Restoring root from dd image

Post by Perryg »

If it is a standard partition ( not LVM ) just resize with these instructions.
viewtopic.php?f=24&t=50661
If it is LVM then you increase the drive size as above and use the LVM to adjust the partitions.
Post Reply