LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-26-2015, 09:46 PM   #1
frostysh
LQ Newbie
 
Registered: Jul 2015
Posts: 4

Rep: Reputation: Disabled
Gnome-Disks deleted almost all of my partition


Hello
I am newbie in the OpenSource, and in PC generaly . I was use gnome-disks GUI pprogram for deleting my SWAP (i just want separate it into two parts) filesystem , but after i confirmed the procedure , all of my partition has been lost (in gnome-disks they marked as free space) :*( . gpart can see all of my partition , but i think after reboot gnome-disks will delete my data. So, what i can to do that undo this crazy missunderstood . I don`t wonna lose my data !

P.S. Sorry fo my English level..
 
Old 07-26-2015, 10:21 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,333
Blog Entries: 12

Rep: Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729
This is out of my experience, but I have some thoughts:

Do not shutdown or reboot the computer until folks have a chance to respond to your query.

Please provide more information:

Were you doing this under Windows (your user agent icon says "Win7") or under a Linux distro; if a Linux distro, which distro/version?

Did you post your message from the problem computer or from a different one? On the problem computer, what is the output of

Code:
fdisk -l      <---You will likely need to run this as root
Take a look at Photorec. If worse comes to worst, it could be your last resort.
 
1 members found this post helpful.
Old 07-26-2015, 10:39 PM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,959

Rep: Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267
For cases of a damaged or erased partition table, testdisk is the tool of choice. Photorec is for recovering files from broken filesystems. That is not what you have. There is no reason, at this point, to believe that anything more than the partition table has been affected.

You do need to proceed carefully. You can safely allow testdisk to analyze the disk and see what it finds, but you should report those results here before allowing testdisk to write anything to the disk. If recovery does not seem to be very simple, you should make a backup image of the whole disk to another device before proceeding.

You can run testdisk from your installed system without rebooting.

Last edited by rknichols; 07-26-2015 at 10:42 PM.
 
1 members found this post helpful.
Old 07-27-2015, 12:20 AM   #4
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,371
Blog Entries: 6

Rep: Reputation: Disabled
Hi: & Welcome to Linux Questions.

Did you burn CD/DVD's of your Windows 7 Recovery?
If not you could call the manufacturer of your machine to get the Windows 7 recovery disc's.

From this page click on Windows and it will start your download: testdisk-7.0.win.zip
http://www.cgsecurity.org/wiki/TestDisk_Download

Quote:
gpart can see all of my partition , but i think after reboot gnome-disks will delete my data.
What distribution is on that gnome disk? Where did this gnome-disk come from?

-::-Unless you highlighted a partition, selected it, pressed Enter and clicked delete you may not have deleted those partitions.-::-
 
1 members found this post helpful.
Old 07-27-2015, 04:54 PM   #5
frostysh
LQ Newbie
 
Registered: Jul 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
This is out of my experience, but I have some thoughts:

Do not shutdown or reboot the computer until folks have a chance to respond to your query.

Please provide more information:

Were you doing this under Windows (your user agent icon says "Win7") or under a Linux distro; if a Linux distro, which distro/version?

Did you post your message from the problem computer or from a different one? On the problem computer, what is the output of

Code:
fdisk -l      <---You will likely need to run this as root
Take a look at Photorec. If worse comes to worst, it could be your last resort.
Sorry , i was not to able login in the forum , half of the day, be`coz I am using Tor_bundle_net, so sometimes, when I try to join LinuxQuestions I am getting an error :*( .
Code:
fdisk -l
showed that all of the my partitions is ready , exept the Swap , that i was trying to delete with gnome-disks utility . And yes it is, one of the my PC is powered on , at least 3 days in a row... ;S Be`coz i dont know , what if that gnome-disks will destroy my partition table after reebot :S .
And thanx 4 answer.
 
Old 07-27-2015, 05:24 PM   #6
frostysh
LQ Newbie
 
Registered: Jul 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
this is logfile that I got from
Code:
fdisk -l
Code:
Device         Size Id Type
***
/dev/sda2         443,7G  f W95 Ext'd (LBA)
/dev/sda5         22,1G  7 HPFS/NTFS/exFAT
/dev/sda6            30G  7 HPFS/NTFS/exFAT
/dev/sda7           25G  b W95 FAT32
/dev/sda8           25G  b W95 FAT32
/dev/sda9        9,8G  7 HPFS/NTFS/exFAT
/dev/sda10        45,7G  7 HPFS/NTFS/exFAT
/dev/sda11        40G  7 HPFS/NTFS/exFAT
/dev/sda12        50,6G 83 Linux
***
So all of the my partitions , is in normal stage and exist!.
And that is the what i got from gnome-disks, after deleting Swap-partition
Attachment
My OS , is a Debian or something like that, jessie as I know.

And yeah , it is a nice forum place , as I see.
Attached Thumbnails
Click image for larger version

Name:	Bad_things_1.jpg
Views:	13
Size:	42.8 KB
ID:	19025  

Last edited by frostysh; 07-27-2015 at 05:30 PM.
 
Old 07-27-2015, 08:46 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,333
Blog Entries: 12

Rep: Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729
In this case, I must defer to rknichols. As I said, I've never had to deal with this sort of situation.

Have you run testdisk and what were the results?
 
Old 07-27-2015, 08:58 PM   #8
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Debian Sid. Arch. In the process of converting to and learning FreeBSD
Posts: 1,023
Blog Entries: 6

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by frostysh View Post
And yes it is, one of the my PC is powered on , at least 3 days in a row... ;S Be`coz i dont know , what if that gnome-disks will destroy my partition table after reebot :S .
And thanx 4 answer.
You've told gnome-disks to write the partition table, and you have existed gnome-disks?

The good news is that it's done what it's done. It's written the partition table as you told it. If gparted shows your other partitions, they are still there.

I am not familiar with any Linux partition editor that will make changes on reboot. They make changes right then and there, or not at all, depending on what you've told it to do.

If you haven't quit gnome-disks yet, it hasn't written your partition table yet. It may not at all. AFAIK it would have made changes immediately. What you're seeing may well possibly be a bug (judging from nothing at all displayed in the "free space" blocks, I'm thinking maybe a display bug?).

Make a backup of your partition table (from your info, it looks as if you're using MBR), replacing (user) below with your username:

Code:
sudo dd if=/dev/sda of=/home/(user)/mbr.img bs=512 count=1
Quit gnome-disks.

Rescan, to be safe:

Code:
sudo partprobe
Check again using fdisk -l. If your partitions are still there, you're done. Don't do anything else. If they're gone, follow below.

If necessary based on fdisk output, restore the MBR backup.

Code:
sudo dd if=/home/(user)/mbr.img of=/dev/sda bs=512 count=1
Lesson learned: you say you're new to PCs, don't monkey with partitions.

Last edited by goumba; 07-27-2015 at 09:17 PM.
 
1 members found this post helpful.
Old 07-28-2015, 09:24 AM   #9
frostysh
LQ Newbie
 
Registered: Jul 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanx to all of u , it`s SOLVED!

I used (by root)
Code:
sfdisk -d /dev/sda > ~/Documents/partition_table_backup_file_dev_sda
then , I rebooted the machine, and some sad thing happened :*( - my WinOS stops when it loading (after had been choosed in the GRUB boot-menu) , and black_screen appeared ... My /dev/sda had been transformed to /dev/sdb in Linux OS ! O_O
But it`s Amazing! After I just Installed new Linux OS to the someone partition on my /dev/sdb, i was not install a new GRUB-LOADER , and I just typed on my old Linux OS
Code:
grub-update
by root, in the terminal , so and - WinOS cans load itself after this procedure, like that`s was before! O_o

With gnome-disks, i think that was a really "bug" , be`coze it shows the empty space even when I typed
Code:
partprobe
etc.

Now i am happy to play on my favorite PC-games at the WinOS , and also enjoying the Linux enviroment ! Thanx to all , again . ^_^
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Corrupt Partition / MBR Virus / Windows deleted Linux partition? irish_confetti Linux - Laptop and Netbook 2 03-21-2013 12:51 AM
Accidently deleted the linux partition(root partition) how to recover it? sanues Linux - Newbie 7 11-30-2009 02:55 PM
How can I restore a deleted /etc directory from installation disks? mikecoates Linux - Software 4 03-28-2006 05:31 AM
Deleted ntfs partition - added linux partition in its place - corrupt! eklhad Linux From Scratch 2 06-28-2005 02:31 AM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 05:53 PM


All times are GMT -5. The time now is 12:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration