You are not logged in.

#1 2016-07-22 15:06:51

balast
Member
Registered: 2016-04-14
Posts: 2

Surprise shutdown while shrinking ext4 partition

TL;DR: I'm an idiot and tried to shrink a partition on battery, it failed and I don't know what to do.

I was shrinking my /home (420 GB, ext4) partition and battery in my laptop failed during that (yes, I'm idiot for messing with partitions on battery).

I replaced it and than (obviously) found the partition corrupted. I ran (now on AC) fsck but that failed on low memory.

I have most of the data backed up but I did this after 3 weeks without Internet connection (again, I'm an idiot). So I would lost work from those three weeks.

I dd'ed the partition to an external drive so I can start fresh if I fuck up (again) during recovery.

What should I do in order to recover as much data as possible (or any data at all…)?

Thanks in advance.

Offline

#2 2016-07-22 18:51:54

Awebb
Member
Registered: 2010-05-06
Posts: 6,291

Re: Surprise shutdown while shrinking ext4 partition

I faintly remember an -S switch of mkfs.ext4.

Offline

#3 2016-07-22 20:36:39

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Surprise shutdown while shrinking ext4 partition

I would recommend that you make an image of that disk before you proceed.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2016-07-22 23:22:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,796

Re: Surprise shutdown while shrinking ext4 partition

R00KIE wrote:

I would recommend that you make an image of that disk before you proceed.

I think they said they did


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2016-07-23 00:31:32

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Surprise shutdown while shrinking ext4 partition

ewaller wrote:

I think they said they did

You are right smile I guess my brain stopped after:

balast wrote:

I have most of the data backed up but I did this after 3 weeks without Internet connection

@balast
If the -S switch of mkfs.ext4 doesn't help you could try using testdisk and try to recover some of your files.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB