LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2016, 01:27 PM   #1
APeacefulRig
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Rep: Reputation: Disabled
Uh, Oh Spaghettios, that was not the USB drive ! :doh:


Distracted, was gonna format a USB drive, didn't select the right drive obviously, clicked, applied, "oh no !" I deleted Sda1, Grub and all the rest gone. Then I thnk I made matters worse by trying to boot it ? So the tutorials I have tried failed. Happens to been a full encrypted mint 17 drive. Rescatux had nothing useful to say, (that I understood), certainly didnt fix it.

What should my next step be ? I made a new ext2 patition at the boot drive. I know the data is still there in my main partitions. How do I re-install grub and my boot drive ?

***As usual and has been the case with this so far. Every tutorial I try fails. The commands are always not recognized, so many flavors, and configs of linux. Such a small % of the linuk help posts and pages seem to work with wtv version I am using. I often dutifully cut and past into my console commands that are not recognized. I have some understanding of the basics, and I am open to try most suggestions. Ubuntu people would probably be best people for me to talk to now. Whoever gets me back into this install will recieve a reward, gift card or something !

Last edited by APeacefulRig; 11-09-2016 at 01:45 PM.
 
Old 11-09-2016, 01:53 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
I presume you doing partitioning when you "applied" your change, right? If that's all you did, testdisk should be able to locate your original partitions, though it will have the wrong size for the encrypted partition. That's because the LUKS header doesn't indicate the size of the container, so testdisk will assume the minimum size -- just big enough for the LUKS header. You will just have to adjust the size of the partition to fill the available space up until whatever follows on the disk. Do not try to use any advanced partitioning tool for this. It will either (a) refuse to resize an encrypted partition, or (b) do things wrong and overwrite part of your data. Use a basic partitioning tool like fdisk.

If you like, just use testdisk to do a quick search and post the resulting log file.

[EDIT] I notice you said you made a new ext2 boot partition. Did you actually format a new filesystem there (gparted would do that)? That's unfortunate, since it wiped out your old boot partition.

Last edited by rknichols; 11-09-2016 at 01:56 PM.
 
Old 11-09-2016, 04:18 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
I've done this too and testdisk figured it out after playing with it for an hour and installing grub again.
 
Old 11-09-2016, 04:34 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I'd be worried that the new /boot is larger than the old - if it was formatted, that might eat the (following) luks header as well. Everything is gone in that case.
Let's see that testdisk log.
 
Old 11-09-2016, 07:21 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Wonder if I get the post exactly. Not sure I get what is going on. (as usual)
 
Old 11-09-2016, 07:22 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I'd just get rid of it and gpart it over and reinstall if you had your OS on it. been there done that. you're not the only one.
 
Old 11-09-2016, 08:11 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by jefro View Post
Wonder if I get the post exactly. Not sure I get what is going on. (as usual)
Re-read post #2.
As an aside, Mint "fully-encrypted" disks aren't - they have a separate unencrypted partition for /boot (and another for /boot/efi if applicable). However everything else is defined on the luks container - root, home, swap, the lot.
 
Old 11-10-2016, 12:52 AM   #8
APeacefulRig
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
I tried rescatux, and boot-repair-disk. I cannot get to a place to ask for testdisk. When I boot from the hdd which I deleted sda1 from from I get >grub rescue. boot-repair-disk has all of my grub details greyed out, and I would have dl'ed testdisk from boot-repair-disk which seems to use ubuntu repositories but It could not find it. Then I tried to mount a USB to at least post the boot-repair-disk info which was a lot, but it would not let me mount a USB to record that to post it. I still believe somehow I can reinstall grub and, it will be fixed. I deleted , and formatted /sda1, if the LUKS info was on there I guess Im f'ed. Yes I have given up some installs due to similar, and it would not be the END, but sure would be nice to recover some of that data, Thanks sinecerely for the help so far.

*Still gonnna try get a grub going again
 
Old 11-13-2016, 12:17 AM   #9
APeacefulRig
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
error file/grub/i386-pc/normal mod not found

Still thinking I can fix this thing, although spiritually ready to move on. I tried some so called fool proof stuff from the grub rescue prompt. Not feeling too sharp of mind these days, and get lost various directories. Missing some fundamentals about boot partitions and stuff I should know about by now, I am a linux nub, although have been enjoying it for years. I was gonna try super grub rescue.iso and the sob wont install on a dvd for some reason. Rescatux just dumps strings of numbers and tells me nothing, I cant tell if it finished, what it was doing or what it can do. For fucks sake I just want to repair or replace my grub2 and repair my MBR. May I find the clarity of mind, and innate intelligence to do this ( and wish the same for others in similar spots). Gparted is one heck of a dangerous tool in careless hands.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Easiest way to clone multi partion USB drive to larger USB drive pogoALARM Linux - Software 10 08-01-2014 04:31 PM
Usb drive, how to locate it, how to move folder from Usb drive to usr directory eeguy02 Linux - Newbie 5 02-28-2010 11:23 PM
The Doh moment. Please remind me. The PIT Debian 2 04-17-2008 02:28 AM
chmod -R username / ? (Doh!) dbc001 Slackware 6 07-13-2006 10:53 PM
DOH!! stupid question yasq Linux - Newbie 4 02-22-2004 11:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration