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 01-19-2015, 06:06 AM   #1
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Rep: Reputation: Disabled
partition using fdisk gone wrong.


Code:
Disk /dev/sda (Sun disk label): 255 heads, 63 sectors, 60801 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Flag    Start       End    Blocks   Id  System
/dev/sda1             0     60795 488335837+  83  Linux native
/dev/sda2  u      60795     60801     48195   82  Linux swap
/dev/sda3             0     60801 488384032+   5  Whole disk
Actually i created 100 mb lvm partition using fdisk but after checking in fdisk, i am getting this. I don't know next time my system will boot or not.

What should i do in this situation to recover from this situation?

I am using centos6 x64.
 
Old 01-19-2015, 06:37 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
the information you gave is not enough to tell you the correct answer. But probably you only need to set the first partition bootable (and remove /dev/sda3).
 
Old 01-19-2015, 06:55 AM   #3
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 216

Rep: Reputation: 38
How did you create the partitions, e.g. playing with the expert settings of fdisk?
Please let us know which actual steps you took.
Was this a brand new HDD?

My guess would be that sda1 was your system, sda2 your swap and you tried to add another (sda3) partition to a disk without free space left, which usually would fail.
 
Old 01-19-2015, 06:56 AM   #4
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
the information you gave is not enough to tell you the correct answer. But probably you only need to set the first partition bootable (and remove /dev/sda3).
Actually before creating /dev/sda8 it was like
Code:
[root@GAIDL-5015 ~]# cat /proc/partitions 
major minor  #blocks  name

   8        0  488386584 sda
   8        1     512000 sda1
   8        2  102400000 sda2
   8        3  102400000 sda3
   8        4          1 sda4
   8        5   51200000 sda5
   8        6    8192000 sda6
   8        7  104859165 sda7
As i created sda8 i am getting this. In case, if i will remove sda3, i will loose all my data.
 
Old 01-19-2015, 07:56 AM   #5
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dt64 View Post
How did you create the partitions, e.g. playing with the expert settings of fdisk?
Please let us know which actual steps you took.
Was this a brand new HDD?

My guess would be that sda1 was your system, sda2 your swap and you tried to add another (sda3) partition to a disk without free space left, which usually would fail.
Nope, i created sda8 but i don't know, how all of my partitions have gone. what is the mean of "+" sign at the end of partition size.

Last edited by sachin.davra; 01-19-2015 at 07:57 AM.
 
Old 01-19-2015, 08:26 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
looks like you need to convert that info back to a valid partition table. sda4 is an extended partition, containing sda5, sda6 and sda7. But I have no idea about the filesystem types.
 
Old 01-19-2015, 08:30 AM   #7
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
looks like you need to convert that info back to a valid partition table. sda4 is an extended partition, containing sda5, sda6 and sda7. But I have no idea about the filesystem types.
You are going on absolute right path. I am using ext4 file system. sorry for not telling about file system type.
 
Old 01-19-2015, 08:43 AM   #8
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
based on this "example" you can easily construct the partition table, I think. The blocks field contains the same values (the only exception is the extended partition).

Last edited by pan64; 01-19-2015 at 08:51 AM. Reason: missing link
 
  


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
[SOLVED] fdisk shows wrong partition type BlackTornado Linux - Newbie 3 03-06-2013 03:39 AM
If i deleted a partition using fdisk , will that delete the data on this partition? wmasry Linux - Newbie 8 12-15-2009 07:41 AM
Fdisk..removed wrong partition...help please air4time Slackware 10 06-18-2006 07:28 PM
Fdisk..removed wrong partition...help please air4time Linux - Newbie 11 06-17-2006 10:53 PM
fdisk partition blackzone Linux - Newbie 6 08-22-2004 08:47 AM


All times are GMT -5. The time now is 03:45 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