I think I've minced my Home Directory

drrummer

Member
Joined
Aug 19, 2021
Messages
32
Reaction score
3
Credits
261
Okay - here's a rundown on what has happened so far.

1. I wanted to clear up disk space. So I searched for ways to purge old linux packages and software. I didn't want to blindly delete stuff that I felt I didn't need.
2. The last time I deleted stuff, and moved things between partitions, Windows stopped working. Added to that, I have since had to load Linux by entering the following code:
Code:
set root=(hd0,4)
linux /boot/vmlinuz-x-xx-.x-xx-generic /root=/dev/nvmexxxx
initrd /boot/initird.img-x.xx.x-xx-generic
boot
3. A couple of weeks back I tried some commands, which I found on some reputable forums. As far as I can recall I used:
  • Code:
    sudo apt-get autoremove
  • I manually uninstalled packages using the Software Manager.

  • Code:
    sudo apt-get autoclean
  • Code:
    sudo apt-get clean
  • Code:
    jounrnalctl --disk-usage
    -(possibly).
  • Code:
    sudo apt-get purge "flatpak"
    -(i think, although I thought it was snap, not flatpak).

4. I executed photorec. Recovered quite a lot of files, many encrypted. Although a lot are website and app elements.
5. I ran Boot Repair in an attempt to regain access to my media.
6. At this point, I believe that my Home folder is a new home folder and not the original one.
6. In an attempt to free up some space for recovery, I move this file: 'crtmpserver', to a memory stick. I put it in a folder called 'RETURN TO media mint 510adab1-194c-4502-80e3-a0a468ca2366 var log', so that I knew where to put it back.
7. At some point I think I renamed the UUID of one of the partitions, so the partition listed above no longer exists.
8. I've tried moving boot files to the first partition.
CONCLUSION
Now I have two issues.
  1. Linux won't boot, no matter what I do.
  2. I can access the encrypted folders but it:
(a) just gives me access to the new home folder.
(b) when it mounts the encrypted folder at /tmp/xxxxxx, the folder is empty.
Any help and advice would be graciously received.
 


I wanted to clear up disk space.
Why?

If you are that short on disk space, buy a bigger drive

When you have reinstalled Linux ?? (which one?) make yourself familiar with Timeshift.

Just as a side note, do you really need encrypted folders etc?
 
Renaming the UUID to any partition isn't a good practice all around because it changes the configuration in the /etc/fstab file.
Depending on which partition you renamed Grub can't find the /boot or the Linux image which will cause the system to not boot.

To fix this you would have to meticulously pick out each partition with root privileges using the 'blkid' command for how ever many partitions you have and for how many drives you have.
Information about uuid's and hard drives are in /dev/disk/by-uuid.

I wrote a article on how I fixed a start job from running. It may help you to understand.


If your not sure performing a fresh install may be the best thing if you don't have a backup with Timeshift.
 
There are some safe ways to create Disk space...
https://www.linux.org/threads/do-you-really-need-to-clean-mint.43752/

Your best option at this stage is a clean install and never do this again.
m09001.gif
 
Your best option at this stage is a clean install and never do this again.
m09001.gif
Heh. Aye, it probably is. It's called "learning Linux", and you'll possibly do this a few more times until you feel knowledgeable enough, and are settled-down and completely happy with your set-up.

It's also totally "par for the course", so don't feel you're unique. We all go though this stage, trust me!


Mike. :p
 
It's also totally "par for the course", so don't feel you're unique. We all go though this stage, trust me!
Yep..spot on, the best way I found to Learn Linux was to install, play, break, repair or reinstall, you soon learn to check before entering any command
 
Why?

If you are that short on disk space, buy a bigger drive

When you have reinstalled Linux ?? (which one?) make yourself familiar with Timeshift.

Just as a side note, do you really need encrypted folders etc?
Because a lot of the stuff on the disk was unneeded. Why would I buy a new disk instead of clearing space ?

I didn't reinstall, I just cleared old packages. I have some Timeshift backups. but I don't want to use them before I recover whatever media I can.

Yes, I do really need encrypted folders.
 
Renaming the UUID to any partition isn't a good practice all around because it changes the configuration in the /etc/fstab file.
Depending on which partition you renamed Grub can't find the /boot or the Linux image which will cause the system to not boot.

To fix this you would have to meticulously pick out each partition with root privileges using the 'blkid' command for how ever many partitions you have and for how many drives you have.
Information about uuid's and hard drives are in /dev/disk/by-uuid.

I wrote a article on how I fixed a start job from running. It may help you to understand.


If your not sure performing a fresh install may be the best thing if you don't have a backup with Timeshift.
Hi Alexzee.

Thanks for the contribution.

Yes, I get that renaming the UUID was not the best decision. At this point I think re-writing the fstab is the way to go.

When I try to reboot, I get something to the effect of "can't execute /sbin/init...". Further investigation shows that the the fstab doesn't contain the right information. Also, the very fist line that appears on startup is "...can't find boot...". Even though boot is there.

Yes, Timeshift should be my go to. However, I found Timeshift filled up the disk quickly.
 
@Alexzee - I had a look at your tutorial. It is helpful if the contents of my fstab didn't look like this:

Code:
overlay / overlay rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0

Any idea how to re-write it ? --- I think this will do it.

QUESTION: Is there anything here that will prevent me further amending the system ? I don't want to lose access to the machine.

device mount point filesystem type options backup operation file system check order
Code:
xxx-xxx-xxx     /boot           efi system          fat         0                   1

xxx-xxx-xxx     /               microsoft reserved  ntfs        0                   0
 
xxx-xxx-xxx     /mnt            basic data          ntfs        0                   1 

xxx-xxx-xxx     /mnt            efi system          ext4        0                   1

xxx-xxx-xxx     /swap           linux swap          defaults    0                   0

xxx-xxx-xxx /mnt linux filesystem ext4 0 1
 
Last edited:
Heh. Aye, it probably is. It's called "learning Linux", and you'll possibly do this a few more times until you feel knowledgeable enough, and are settled-down and completely happy with your set-up.

Ayuh. I call it "learning by breaking" and encourage new users to explore and try new things - and to learn the value of a proper backup solution.
 
There are some safe ways to create Disk space...
https://www.linux.org/threads/do-you-really-need-to-clean-mint.43752/

Your best option at this stage is a clean install and never do this again.
m09001.gif
I agree with this. rebuild and learn your lessons like most of the rest of us have. Also if you are not using a laptop but rather a desktop/tower then add a 2nd hard drive and install linux on one, windows on the other and that way they will play nice together. I have posted this many times and you should purchase one of the parts below to handle the dual boot. (does not work for laptops). This method isolates the OS's and ensures that neither one will harm the other with updates and changes. If you set the linux drive in the BIOS as the first boot device you will be able to access the windows drive from linux.




All you need it select the right one for your system and choose which OS to boot or access by selecting the correct drive before power up on the back of system. I run a triple boot this way... Fedora,Win 7, Win 10
 
You said somewhere back there that Timeshift takes up too much space.

Timeshift is designed to be stored on an external drive....not your main drive. This will free up a great deal of space.

A backup would be a grand idea.....again...on a separate drive, not on your main drive.

You certainly have given yourself some work to do !!....especially if you hope to fix this as opposed to reinstalling.

Think.....before you proceed If the data you speak of is that important to you......do something to protect it before you start playing around
 
Timeshift is designed to be stored on an external drive....not your main drive. This will free up a great deal of space.

Not only that, if your main drive gets hosed, not only do you lose your current data, you lose your backup too.
 
Hi Alexzee.

Thanks for the contribution.

Yes, I get that renaming the UUID was not the best decision. At this point I think re-writing the fstab is the way to go.

When I try to reboot, I get something to the effect of "can't execute /sbin/init...". Further investigation shows that the the fstab doesn't contain the right information. Also, the very fist line that appears on startup is "...can't find boot...". Even though boot is there.

Yes, Timeshift should be my go to. However, I found Timeshift filled up the disk quickly.
You will have to be well versed in this and pick apart every partition on your machine and compare the output of "blkid" to the output of the /etc/fstab file. Editing the fstab file IS NOT recommended: unless you know what you are doing.
I don't ever edit the /etc/fstab file. The safest way to fix the problem is to use a Live version of G-parted.

When the boot partition can't be found (even if it is in place) it's misconfigured. When the boot partition along with the configuration file and the vmlinuz-(version- of- kernel)-generic (image of the kernel) is changed <OR> misconfigured the boot loader can't perform it's functionality to boot the kernel.

*The fstab file doesn't have the correct information because you compromised that when you renamed the uuid of the partition that you edited. *

A Few Questions:

  • Did you try booting your pc with a Live USB of Linux and try to recover that way?
  • What version of Linux did you install?
*Is Linux and Windows on the same HDD?
 
@Alexzee - I had a look at your tutorial. It is helpful if the contents of my fstab didn't look like this:

Code:
overlay / overlay rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0

Any idea how to re-write it ? --- I think this will do it.

QUESTION: Is there anything here that will prevent me further amending the system ? I don't want to lose access to the machine.

device mount point filesystem type options backup operation file system check order
Code:
xxx-xxx-xxx     /boot           efi system          fat         0                   1

xxx-xxx-xxx     /               microsoft reserved  ntfs        0                   0
 
xxx-xxx-xxx     /mnt            basic data          ntfs        0                   1

xxx-xxx-xxx     /mnt            efi system          ext4        0                   1

xxx-xxx-xxx     /swap           linux swap          defaults    0                   0

xxx-xxx-xxx /mnt linux filesystem ext4 0 1
Yes:-

As you mentioned earlier on, Windows stopped booting.

In order to effectively run Linux alongside a Windows system Windows first has to boot from the Windows boot manager flawlessly. And, Windows has to be installed first.
Also; If the drive that Windows is installed on is the only drive on the machine the partition will have to be resized first before the Linux installation can be initiated.
 
You said somewhere back there that Timeshift takes up too much space.

Timeshift is designed to be stored on an external drive....not your main drive. This will free up a great deal of space.

A backup would be a grand idea.....again...on a separate drive, not on your main drive.

You certainly have given yourself some work to do !!....especially if you hope to fix this as opposed to reinstalling.

Think.....before you proceed If the data you speak of is that important to you......do something to protect it before you start playing around
Agreed, lot's of work to do and that's provided that he is well versed in knowing 'with certainty' each partition on that machine.
Hosing the Windows Recovery would be a fatal mistake as I'm sure you'll agree.

Since Windows isn't booting (as he said it stopped working) a fresh install is the only real way to fix this.
 
A backup would be a grand idea.....again...on a separate drive, not on your main drive.

Yup. I'm a big fan of backups. I'd migrated an SSD from device to device and it finally failed on me just yesterday.

I lost exactly nothing of value. Well, some time in doing a new install - but that's a trivial matter as I have a fully prepared /home to migrate to the new install.

I'll toss this into the mix:


One of the most important steps one learns when moving to Linux is to create and maintain proper backups of data that is important to the user. Of course, in those steps is learning what data really is important and what data is easily recreated.

If I was a new Linux user, I'd make regular disk images - whole disk images. That way, when you break your operating system you can simply write that image back to the drive and keep going as though nothing has happened. Odds are also good that you can easily use those images on other devices. This is Linux. In my SSD failure mentioned above, all I had to do was swap the drive and Linux ran just fine without needing a fresh installation.

(Try THAT with Windows!)
 
My dentist used to have a sign in his waiting room that read...

"You don't have to brush all your teeth, Just the ones you want to keep"

The same is true for your data and backups. No media is perfect and no data will last on any particular media forever.
I like to use something call "ReDo" which is a linux boot up that allows you to image any drive and OS. Saved windows disasters a few times with it and it backs up my linux server installs.
 
My dentist used to have a sign in his waiting room that read...

"You don't have to brush all your teeth, Just the ones you want to keep"

The same is true for your data and backups.
LOL....I just love the analogy ! So true.
 
You said somewhere back there that Timeshift takes up too much space.

Timeshift is designed to be stored on an external drive....not your main drive. This will free up a great deal of space.

A backup would be a grand idea.....again...on a separate drive, not on your main drive.

You certainly have given yourself some work to do !!....especially if you hope to fix this as opposed to reinstalling.

Think.....before you proceed If the data you speak of is that important to you......do something to protect it before you start playing around
I wasn't playing around.
 


Top