Lost partition after partition resize
Posted: 03 Apr 2022, 10:52
Hi, everyone.
I have a dual-boot with Ubuntu 20.04 / Windows 10 on a 256 GB SSD.
Yesterday I had to resize their respective partitions (previously being about 150GB to Windows 10, and 50 GB to Ubuntu -- in hindsight, a very silly partition given how much I use Ubuntu, but that's besides the point) to a new size of about 100 GB each (details below).
The resizing for the Windows part ran without issue using Windows' own Disk Management software. The problem happened when I booted up a LiveUSB with Ubuntu to run GParted. I'm also assuming that the LiveUSB installation was corrupted, as I lost all GUI and began having some PCIexpress error messages pop up (not the first time that had happened with this LiveUSB). Either way, I ended up restarting my computer, so the resize was forcefully stopped.
I then re-installed Ubuntu on the LiveUSB, alongside TestDisk, and here's the log from TestDisk's Deeper Search:
I had a lot more info on my original post, such as the specific sectors allocated to each section according to parted, as well as some personal findings (I'm able to see which partitions found by TestDisk correspond to my old ones, which correspond to my new ones, etc).
My biggest question is: is it worth it trying to restore the old partitions in order to try and properly resize the partition? Or should I cut my losses and get a fresh Ubuntu install, given as I did save a backup before doing all of this?
I also had a few more questions, mostly to learn more, but they also have been lost to time. I do remember one of them, though: the MSR partition does not seem to be found by TestDisk. Should I add it manually (again, a priori I know exactly which sectors belong to it) or is that generally a bad idea?
P.S.: smartmontools shows no problems with the SDD, as evidenced by:
I have a dual-boot with Ubuntu 20.04 / Windows 10 on a 256 GB SSD.
Yesterday I had to resize their respective partitions (previously being about 150GB to Windows 10, and 50 GB to Ubuntu -- in hindsight, a very silly partition given how much I use Ubuntu, but that's besides the point) to a new size of about 100 GB each (details below).
The resizing for the Windows part ran without issue using Windows' own Disk Management software. The problem happened when I booted up a LiveUSB with Ubuntu to run GParted. I'm also assuming that the LiveUSB installation was corrupted, as I lost all GUI and began having some PCIexpress error messages pop up (not the first time that had happened with this LiveUSB). Either way, I ended up restarting my computer, so the resize was forcefully stopped.
I then re-installed Ubuntu on the LiveUSB, alongside TestDisk, and here's the log from TestDisk's Deeper Search:
Code: Select all
Results
MS Data 2048 1050623 1048576 [NO NAME]
FAT32, blocksize=4096, 536 MB / 512 MiB
MS Data 2054 1050629 1048576 [NO NAME]
FAT32, blocksize=4096, 536 MB / 512 MiB
MS Data 32768 291868671 291835904 [SSD]
NTFS, blocksize=4096, 149 GB / 139 GiB
MS Data 32768 402460664 402427897 [SSD]
NTFS found using backup sector, blocksize=4096, 206 GB / 191 GiB
MS Data 32775 402460671 402427897
NTFS found using backup sector, blocksize=4096, 206 GB / 191 GiB
MS Data 1266139 1272312 6174
NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
MS Data 1272312 1278485 6174 [Boot]
NTFS, blocksize=512, 3161 KB / 3087 KiB
MS Data 1272331 1278504 6174
NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
MS Data 1278504 1284677 6174 [Boot]
NTFS, blocksize=512, 3161 KB / 3087 KiB
MS Data 1278523 1284696 6174
NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
MS Data 1284696 1290869 6174 [Boot]
NTFS, blocksize=512, 3161 KB / 3087 KiB
MS Data 1284715 1290888 6174
NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
MS Data 1290888 1297061 6174 [Boot]
NTFS, blocksize=512, 3161 KB / 3087 KiB
MS Data 3003419 3009592 6174
NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
MS Data 3009592 3015765 6174 [Boot]
NTFS, blocksize=512, 3161 KB / 3087 KiB
EFI System 48507712 48510591 2880 [EFI System Partition] [EFISECTOR]
FAT12, blocksize=512, 1474 KB / 1440 KiB
EFI System 59506240 59509119 2880 [EFI System Partition] [EFISECTOR]
FAT12, blocksize=512, 1474 KB / 1440 KiB
EFI System 60771232 60774111 2880 [EFI System Partition] [EFISECTOR]
FAT12, blocksize=512, 1474 KB / 1440 KiB
EFI System 61150648 61153527 2880 [EFI System Partition] [EFISECTOR]
FAT12, blocksize=512, 1474 KB / 1440 KiB
EFI System 63012280 63015159 2880 [EFI System Partition] [EFISECTOR]
FAT12, blocksize=512, 1474 KB / 1440 KiB
EFI System 63828032 63830911 2880 [EFI System Partition] [EFISECTOR]
FAT12, blocksize=512, 1474 KB / 1440 KiB
Linux filesys. data 64561009 65932992 1371984 [GW<B9><A4>ث݊<BD><CD>(b<9E>dS<DC>]
cramfs, 702 MB / 669 MiB
Linux filesys. data 64561010 65932993 1371984 [GW<B9><A4>ث݊<BD><CD>(b<9E>dS<DC>]
cramfs, 702 MB / 669 MiB
Mac HFS 287598822 421816551 134217730
HFS found using backup sector!, 68 GB / 64 GiB
Linux filesys. data 291868670 500116917 208248248
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 106 GB / 99 GiB
Linux filesys. data 291868672 500116919 208248248
ext4 blocksize=4096 Large_file Sparse_SB, 106 GB / 99 GiB
Linux Swap 292147192 292147207 16
SWAP2 version 0, pagesize=8192, 8192 B
Linux Swap 292147200 296341487 4194288
SWAP2 version 1, pagesize=4096, 2147 MB / 2047 MiB
Linux filesys. data 402460670 500116917 97656248
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 49 GB / 46 GiB
Linux filesys. data 402460672 500116919 97656248
ext4 blocksize=4096 Large_file Sparse_SB, 49 GB / 46 GiB
Linux Swap 402739192 402739207 16
SWAP2 version 0, pagesize=8192, 8192 B
Linux Swap 402739200 406933487 4194288
SWAP2 version 1, pagesize=4096, 2147 MB / 2047 MiB
MS Data 461564603 461567482 2880 [NO NAME]
FAT12, blocksize=512, 1474 KB / 1440 KiB
MS Data 461564627 461567506 2880 [NO NAME]
FAT12, blocksize=512, 1474 KB / 1440 KiB
MS Data 461565483 461568362 2880 [NO NAME]
FAT12, blocksize=512, 1474 KB / 1440 KiB
My biggest question is: is it worth it trying to restore the old partitions in order to try and properly resize the partition? Or should I cut my losses and get a fresh Ubuntu install, given as I did save a backup before doing all of this?
I also had a few more questions, mostly to learn more, but they also have been lost to time. I do remember one of them, though: the MSR partition does not seem to be found by TestDisk. Should I add it manually (again, a priori I know exactly which sectors belong to it) or is that generally a bad idea?
P.S.: smartmontools shows no problems with the SDD, as evidenced by:
Code: Select all
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.13.0-30-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: LITEON CV3-8D256-HP
Serial Number: 0018152000CD
LU WWN Device Id: 5 002303 1011a1c09
Firmware Version: V381
User Capacity: 256,060,514,304 bytes [256 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: Solid State Device
Form Factor: M.2
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-4, ATA/ATAPI-7 T13/1532D revision 4a
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Apr 3 07:51:22 2022 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x02) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 10) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 10) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 100 050 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 1502
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 1639
171 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
172 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
173 Unknown_Attribute 0x0032 099 099 005 Old_age Always - 33
174 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 81
176 Erase_Fail_Count_Chip 0x0022 100 100 000 Old_age Always - 0
181 Program_Fail_Cnt_Total 0x0022 100 100 000 Old_age Always - 0
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x003b 100 100 097 Pre-fail Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0
194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 64 (Min/Max 28/65)
198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 100 100 000 Old_age Always - 0
241 Total_LBAs_Written 0x0032 100 100 000 Old_age Always - 361702
242 Total_LBAs_Read 0x0032 100 100 000 Old_age Always - 532968
243 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 528832
SMART Error Log Version: 0
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 3 -
SMART Selective self-test log data structure revision number 0
Note: revision number not 1 implies that no selective self-test has ever been run
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Completed [00% left] (0-65535)
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.