I just reformatted a drive partition into ext4 and now everything's broken! [SOLVED]

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

I just reformatted a drive partition into ext4 and now everything's broken! [SOLVED]

Post by MathMachine4 »

I just reformatted a drive partition, which was previously in ntfs, into ext4. Now everything about that drive is completely broken.

I keep restarting my computer, and it mounts into /media/chris. Then I try remounting it into /mnt/Big_Drive via sudo mount -t auto /dev/sda3 /mnt/Big_Drive. Then it disappears from the list of other drives I can use on file explorer. I try opening it by going directly into /mnt/Big_Drive, only to reach a folder where I can't create or remove anything without root privelages.

If anyone could please help me out, that'd be greatly appreciated. This was a really expensive drive, and I don't want it to go to waste.
Last edited by LockBot on Fri Jan 06, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
msseufert
Level 2
Level 2
Posts: 82
Joined: Fri Nov 22, 2019 11:28 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by msseufert »

List the block IDs:
sudo blkid /dev/sda3

Add to /etc/fstab:
UUID=results-from-blkid-command /mnt/Big_Drive ext4 defaults 0 0

Mount it now:
sudo mount -a


Real world example:

Code: Select all

scott@wolf359:~$ sudo blkid /dev/sda1
[sudo] password for scott:          
/dev/sda1: UUID="8206b6e3-aed2-4733-a8ff-7a1ebf03cc91" TYPE="ext4" PARTUUID="cf06fb20-01"
My /etc/fstab:

Code: Select all

[...]
# /srv
UUID=8206b6e3-aed2-4733-a8ff-7a1ebf03cc91       /srv    ext4    defaults        0 0
After sudo mount -a:

Code: Select all

scott@wolf359:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             32G     0   32G   0% /dev
tmpfs           6.3G  1.9M  6.3G   1% /run
/dev/nvme0n1p2  916G   78G  791G   9% /
tmpfs            32G   46M   32G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            32G     0   32G   0% /sys/fs/cgroup
/dev/sda1       458G   15G  421G   4% /srv
/dev/nvme0n1p1  511M  5.3M  506M   2% /boot/efi
tmpfs           6.3G   24K  6.3G   1% /run/user/1000
Linux Mint 20.3 Cinnamon Edge.
Intel i9 10th Gen deca-core, 64GB RAM
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by MathMachine4 »

What is srv? And also, just to confirm, I should add a new line to the fstab and put it there?
msseufert
Level 2
Level 2
Posts: 82
Joined: Fri Nov 22, 2019 11:28 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by msseufert »

/srv is a directory that is in every Linux distro that is for server data. You don't have to mount on /srv, you can in fact mount to any empty folder on the system.

Yes, if you want to automount the drive it needs to go in /etc/fstab.
Linux Mint 20.3 Cinnamon Edge.
Intel i9 10th Gen deca-core, 64GB RAM
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by MathMachine4 »

So why would I be using srv? I'm not hosting a server.

Also, the place I'd like my drive to be mounted is in /mnt/Big_Drive. It's an internal hard drive. Should I use that folder instead of /srv?
msseufert
Level 2
Level 2
Posts: 82
Joined: Fri Nov 22, 2019 11:28 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by msseufert »

I try opening it by going directly into /mnt/Big_Drive, only to reach a folder where I can't create or remove anything without root privelages.
Somehow I missed this part of your post. yes, that is correct, you will need root privileges or you can create a folder on the drive after it's mounted and give yourself ownership

An example of that is:
sudo mkdir /mnt/Big_Drive/user-name
sudo chown user-name:user-name /mnt/Big_Drive/username


The user-name:user-name is user:group. Sot example scott:scott in my case. then the user you specify can have full read/write access to the /mnt/Big_Drive/user-name directory.
Linux Mint 20.3 Cinnamon Edge.
Intel i9 10th Gen deca-core, 64GB RAM
msseufert
Level 2
Level 2
Posts: 82
Joined: Fri Nov 22, 2019 11:28 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by msseufert »

MathMachine4 wrote: Tue Jul 05, 2022 11:19 pm So why would I be using srv? I'm not hosting a server.
I'm using /srv on my system. Again, it's just an example.
Also, the place I'd like my drive to be mounted is in /mnt/Big_Drive. It's an internal hard drive. Should I use that folder instead of /srv?
Yes if that is where you want the drive mounted. Again, you can mount it on any empty directory.
Linux Mint 20.3 Cinnamon Edge.
Intel i9 10th Gen deca-core, 64GB RAM
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by MathMachine4 »

Thank you.

So I just did all that. Now what?

The drive no longer appears to be root only to edit. However, it's also still not appearing on the left under "Devices". Is there any way I can change that? Or if not, at the very least is there any way I can bookmark this folder?

Furthermore, just to double check, if I restart my computer, the drive shouldn't reset?
msseufert
Level 2
Level 2
Posts: 82
Joined: Fri Nov 22, 2019 11:28 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by msseufert »

MathMachine4 wrote: Tue Jul 05, 2022 11:27 pm Thank you.

So I just did all that. Now what?
Did you do: sudo mount -a ? If so, does it appear in: df -h ?
Linux Mint 20.3 Cinnamon Edge.
Intel i9 10th Gen deca-core, 64GB RAM
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by MathMachine4 »

I just typed in both commands, and yes, it shows up.

Also, I changed my previous reply to improve clarity.
msseufert
Level 2
Level 2
Posts: 82
Joined: Fri Nov 22, 2019 11:28 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by msseufert »

Is there any way I can change that? Or if not, at the very least is there any way I can bookmark this folder?
Yes, you can navigate to the folder in Nemo and highlight it, then click bookmarks - > add to bookmarks.
Linux Mint 20.3 Cinnamon Edge.
Intel i9 10th Gen deca-core, 64GB RAM
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by MathMachine4 »

nemo.png
nemo.png (104.46 KiB) Viewed 407 times
msseufert
Level 2
Level 2
Posts: 82
Joined: Fri Nov 22, 2019 11:28 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by msseufert »

LOL!

If you have no other questions, please remember to add the [SOLVED] tag to the original title.
Linux Mint 20.3 Cinnamon Edge.
Intel i9 10th Gen deca-core, 64GB RAM
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by MathMachine4 »

I don't know what nemo is
msseufert
Level 2
Level 2
Posts: 82
Joined: Fri Nov 22, 2019 11:28 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by msseufert »

MathMachine4 wrote: Tue Jul 05, 2022 11:45 pm I don't know what nemo is
Default file manager in Cinnamon.
Linux Mint 20.3 Cinnamon Edge.
Intel i9 10th Gen deca-core, 64GB RAM
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by MathMachine4 »

oh, ok. I ended up just clicking and dragging the folder to the bookmarks.

I'm guessing now that this is ext4, it no longer goes under "Devices", is that correct?
msseufert
Level 2
Level 2
Posts: 82
Joined: Fri Nov 22, 2019 11:28 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by msseufert »

MathMachine4 wrote: Tue Jul 05, 2022 11:52 pm oh, ok. I ended up just clicking and dragging the folder to the bookmarks.

I'm guessing now that this is ext4, it no longer goes under "Devices", is that correct?
I don't know. I don't have a "Devices" section in my file manager.
Linux Mint 20.3 Cinnamon Edge.
Intel i9 10th Gen deca-core, 64GB RAM
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by MathMachine4 »

Fair enough
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken!

Post by MathMachine4 »

Just restarted, all seems good! Thank you so much for all the help!
MathMachine4
Level 3
Level 3
Posts: 115
Joined: Thu Jan 06, 2022 8:10 pm

Re: I just reformatted a drive partition into ext4 and now everything's broken! [SOLVED]

Post by MathMachine4 »

Ok, I have one more problem, as it would seem.

How do I make it so my "Big_Drive" shows up on the Disk Usage Analyzer? There's a section for the home folder (which doesn't seem to include things from /mnt/Big_Drive). There's a section on chris-HP-Laptop-gw0xxx, which says there are 41.6 GB available out of 125.2 GB total. There's a section for the 54 GB of the 1TB drive which I partitioned to be NTFS (so my Windows boot could use it), and there's a section on my Windows boot (the last two are currently unmounted).

There's nothing here on my 883.1 GB Big_Drive partition. I'm pretty sure there was back when it was NTFS, but not anymore now that it's EXT4. Any idea how to fix this?
Locked

Return to “Software & Applications”