I deleted /home. What should I do?

I do not speak english wery well, so excuse me, if you find mistakes.

WHAT I HAVE DONE?
I deleted disk partition which had /home using Linux Mint Disk manager.

WHAT I WANT?
I want to access qube files of Qubes OS.

ABOUT MY SYSTEM CONFIG
I divided the Qubes OS into four disk partitions:
/ (ext4, 64 GB),
/home (ext4, 128 GB),
/boot (ext4, 512 MB),
/boot/efi (Efi System part, 128 MB).

During using cubes / partition are filling. Initially it was 32 GB. When there is no free space, I started Linux Mint OS and increased / partition to 64 GB with Disk manager (I did not find same program in Qubes OS). Recently / partition became full again and I decided to increase it to 128 GB in the same way.

During using Qubes OS it seems that /home partition is empty and I decided to delete it to free up some space to use it for / partition. I deleted /home partition with Linux Mint Disk manager. I started Qubes OS, entered disk password. Usually after this the user authorization screen would appear, but not this time. When I restarted, nothing changed.

I think I did something stupid. You can laugh.

Note that when I deleted the partition, I did not format it. However, after that I tried to create the same partition with ext4 in place of /home partition. This took a few seconds, so I think /home partition is still not formatted, and the data can be recovered (formatting a 128 GB partition takes more time). Also I think the cube data is on / partition, which I didn’t touch at all.

QUESTIONS
What data are at /home?

I knew that qube data are at /var/lib/qubes Is all the cube data stored there? The address /var/lib/qubes/appvms/qubename stores files with .img format. Do these files store the cube system? Can they be used to launch a VM to access cube files?

Is it possible to reinstall/restore /home partition so that it “attaches” the existing / partition and I continue to use the system? For example, to install /home using USB Qubes OS installer.

If you know how to restore the system and save qube data in my case, please tell me.

Thank you.

If you had a dedicated /home partition, you only have to recreate the home directory of your dom0 user.

install -d -o 1000 -g 1000 /home/$USERNAME

There is nothing interesting in the home directory, except your desktop environment (xfce by default) settings and files you added there by yourself.

1 Like

Where should I run this command? In Linux Mint terminal? In Qubes OS GRUB bash? There is no “install” command in Qubes OS GRUB bash.

I thought you were accessing Qubes OS through a chroot or single user mode. I have to admit I do not really understand the current state of your computer.

The command should be done from Qubes OS if you can boot it into single user mode, add single to boot command option (press e on grub entry selection, press ctrl+e to go the right of the text, type single and press ctrl+x to boot). Make sure the partition is mounted on /home before running install.

If you do it using a chroot, just adapt the path.

I worked with the /home partition from Linux Mint OS, which is on the same disk as Qubes OS.

I figured out how to start single user mode with root rights and I can run the command you suggested.

But I don’t really understand this sentense in the context of your command:

How can I be sure of this?

I have achieved my goal. I’ll describe it in more detail later.

2 Likes