I'm running Ubuntu LTS 10.4 on Virtualbox. Out of nowhere, I'm unable to boot into my VM and I get stuck in initramfs.
I have another Ubuntu VM that I can mount the virtual HD to. I just want to copy over my files so I do not lose them.
I attached my virtual HD to /dev/sdb1 and did:
sudo mount /dev/sdb1 /mnt
Yet when I ls /mnt, my home directory is nowhere to be found. How can I get access to the original file system?
Best Answer
Probably your home directory is in another partition of the disk ( or even on another disk ). Try first with
fdisk -l
. That should return something similar to:Then try mounting every device on the list one by one and check the files on that filesystem until you find your home partition:
Are the files from your home directory?. If not continue:
Repeat until bingo.
In case of LVM the approach is different.
sudo mount /dev/sdb3 /mnt/var
, ... ).sudo chroot /mnt; mount /proc;mount /sys
and begin working with your mounted image. ( Play with lvm as usual ). Mount your home filesystem ( it should be visible as an lvm volume ), and copy the useful data to the /mnt directory.exit
and you'll be back to your server.