1

I have a Mac with a Ubuntu 14.04 installed in VirtualBox.

During an update I lost my login window. Someone suggested I should uninstall and reinstall guest additions but that sounds like too much hassle. I just want to log in and move the files I want to my shared folder and then delete the whole thing and start over.

When I hold down the shift button I get the the GRUB menu and I can choose recovery mode. Now I'm in a shell "root@ virtualbox" but I can't get anywhere.

ls command does nothing. I don't even know where I am.

How do I find my user's home folder and move the files?

I also tried to mount the vdi image but its not working:

http://bluepilltech.blogspot.com/2010/03/how-to-mount-virtualbox-vdi-image-under.html https://unfinishedbitness.info/2017/02/06/mac-os-x-native-vdi-image-mounts/

Installing a new ubuntu in the VBox has worked great. Thank you! I can look at the old vdi just fine but the home folder is still encrypted. So I am wondering if I change the root password in the encrypted machine will it use the newly made pw to encrypt and therefore I can see the contents of the home folder again?

prism
  • 11
  • 3
    Boot the VM from the installation ISO and in the live session mount your virtual hard disk somewhere, the manipulate the files using the normal tools. – AlexP Nov 28 '17 at 19:54
  • sorry wrong thread – prism Nov 28 '17 at 21:04
  • thank you sounds good. You have a link on how to do this? – prism Nov 28 '17 at 21:11
  • Your edit is completely understandable but it is confusing anyway in its current context because you are asking a different question in the last paragraph while everything from the original revision still remains there in the question. – karel Dec 01 '17 at 06:42

1 Answers1

1

When you get to the prompt do:

 cd /home
 ls

what do you see? Also:

 lsblk

and

 fdisk -l

This should give you similar listings of available block devices and their partitions. Does any of those partitions look like your /home partition?

The ones that are interesting are listed as "Type Linux" or similar in the fdisk listing. F.ex., let's assume there is a /dev/sda1. Now what you can do is to mount that partition somewhere:

 mkdir test_dir
 mount /dev/sda1 test_dir
 ls test_dir

do not forget to unmount test_dir after you've rescued whatever you need to rescue:

 umount test_dir
  • thank you! I found my home folder but when I go inside and do "ls" I get: access-your-private-data.desktop README.txt – prism Nov 28 '17 at 20:59
  • What did you expect to be in your /home folder? Is it maybe encrypted? What's in the README.txt? cat README.txt – Tomáš Pospíšek Nov 28 '17 at 21:05
  • yes it looks like it. Inside the file it says: This directory has been unmounted to protect your data. FROm the command line run: ecryptfs-mount-private and I get: ERROR: encrypted private directory is not setup properly – prism Nov 28 '17 at 21:10
  • So next is the task to google how to decrypt that directory manually :-) – Tomáš Pospíšek Nov 28 '17 at 21:15
  • 'encrypt-unwrap-passphrase home' is asking me for passphrase which I don't remember...I guess Ill try mounting with a live cd.. – prism Nov 29 '17 at 18:49
  • mounting with a live cd will not help you remember the pass phrase. You will need that pass phrase in any case I guess. – Tomáš Pospíšek Nov 29 '17 at 20:43
  • guess I'm up shit's creek without a paddle..I don't remember setting up a passphrase and my users password don't work. I kinda remember just using my users password for that. How about reinstalling guest additions, will that get me where I want to go? – prism Nov 30 '17 at 17:59
  • tried running recovery graphical interface but it won't mount either: /sbin/mount.vboxsf: mounting failed with the error: no such device mountain: mount /media/mountspa (482) terminated with status 1 – prism Nov 30 '17 at 18:13
  • thank you very much. Just saw this link up there. https://askubuntu.com/questions/895334/recover-user-account-in-virtual-machine-after-trying-to-extend-memory seems like the way to go. Working on it right now. – prism Dec 01 '17 at 03:41