Originally posted by oshunluvr
View Post
You're saying along the lines of what I've been thinking. But this is unfamiliar territory for me. Could you be a little more graphic about how to repair it, since I'm just learning this?
Here's what gdisk says right now:
Code:
Number Start (sector) End (sector) Size Code Name 1 34 2047 1007.0 KiB EF02 BIOS boot partition 2 2048 209922047 100.1 GiB 8300 3 209922048 4075401215 1.8 TiB 8300 Linux filesystem 4 [B]5403539456 5860532223[/B] [B]217.9 GiB[/B] 8300 Linux filesystem
Code:
Device Start End Sectors Size Type /dev/sda1 34 2047 2014 1007K BIOS boot /dev/sda2 2048 209922047 209920000 100.1G Linux filesystem /dev/sda3 209922048 4075401215 3865479168 1.8T Linux filesystem /dev/sda4 [B]5403539456 5860532223[/B] 456992768 [B]217.9G[/B] Linux filesystem
I know that 4075401216 to 5403539455 actually is unused space, not formatted. The 217.9G /usr/local partition used to be in there, following immediately behind the /home partition, but yesterday I moved it with KDE part tool to the end of the drive where it is now. Therefore 5403539456 to 5860532223 ought to still be the old /usr/local (the size is right), but KDE part tool shows it as having btrfs when it should be ext4, and it's labeled as / instead of /usr/local. I can mount it, but it looks blank because of the wrong label for the filesystem. (No, I refuse to write anything to it because I think it can be recovered.)
That's what changed - the labels for that partition.
So I think what has to be done is to change the btrfs back to say ext4 again, and change the / back to say /usr/local and that should recover that partition.
Let's try that first. I have installed testdisk, and parted is already installed. I have never used either before, and I don't want to guess, so I'm going to defer to your judgment on how to proceed oshunluvr.
My plans after recovering the partition:
1) Once that partition is recovered I'll want to find out what caused this problem in the first place and fix that too.
2) Then I can safely install a small system on the sda2 and boot into that, so I can stop using this USB drive for the rest of the work. (I think using the external drive may work faster when using a regular install instead of a USB stick.)
3) Next, I have to find a way to quickly move as much data as possible from sda3 to the external drive. That way I can make a new temporary partition in the unused space only big enough to move the remaining files from sda3 to the new partition, and then delete the empty sda3. That will free up space so I can grow sda2 to fill the available space, and move files from the old ext4 partitions into their new home in sda2.
4) After all files are moved from the ext4 partitions they'll be empty, so I can delete them and then grow the sda2 to fill the entire drive.
This is what I love about Linux: There's always more than one way to accomplish any task!
Comment