Re: recovering a partition table
On Fri, 2018-09-07 at 14:25 -0700, Jimmy Johnson wrote: > On 09/07/2018 02:06 PM, Dominic Knight wrote: > > On Fri, 2018-09-07 at 13:02 -0700, Jimmy Johnson wrote: > > > On 09/07/2018 12:19 PM, Eike Lantzsch wrote: > > > > On Friday, September 7, 2018 5:34:00 PM -04 Dominic Knight > > > > wrote: > > > > > Whilst trying to create one partition out of two (using > > > > > disks) I > > > > > appear to have accidentally deleted the partition table of > > > > > (almost) the whole drive. > > > > > > > > Then diverse methods for partition table recovery are open to > > > > you. > > > > All the best > > > > E.L. > > > > > > > > > What the Doctor ordered: > > > How to Recover a Disk Partition with TestDisk and GParted Live > > > > > > > > > > https://ubuverse.com/recover-a-disk-partition-with-testdisk-and-gparted-live/ > > > > > > > It seems the problem was that it wasn't really deleted at all, just > > 'disks' (the software program) being a bit useless and saying it > > was. I > > had wondered what I had done to cause it as I was fairly certain I > > had > > double checked what I was doing. I had deleted one partition ready > > to > > expand another into it when 'disks' decided to play a trick on me. > > > > Slightly worrying when it tells you there is one big empty drive, > > and then gpart reporting this > > > > Warning: more than 4 primary partitions: 6. > > Partition(Linux swap or Solaris/x86): primary > > Partition(Linux ext2 filesystem): primary > > Partition(Linux ext2 filesystem): primary > > Partition(Linux ext2 filesystem): primary > > Partition(Linux ext2 filesystem): invalid primary > > Partition(Linux ext2 filesystem): invalid primary > > Ok. > > > > is a bug in that piece of software? > > > > There is actually one primary and one extended all are ext4. > > > > gparted reports all is good. > > Risked a reboot and everything is just fine. > > > > Thanks > > Dom. > > > It looks like the logical partition has been removed, I don't think > I've > seen that before. And rebooting brought it back, lucky you. :) It hadn't actually been removed, 'disks' was reporting incorrectly. I was very careful not to reboot until after I was 95% certain it was there and gparted confirmed it. I combined the two partitions I wanted to so, primary is swap and extended is still all the rest however gpart still says: root@goodoldmusic:~# gpart /dev/sdb Begin scan... Possible partition(Linux swap), size(9536mb), offset(1mb) Possible partition(Linux ext2), size(953673mb), offset(9538mb) Possible partition(Linux ext2), size(476836mb), offset(963212mb) Possible partition(Linux ext2), size(47683mb), offset(1440049mb) Possible partition(Linux ext2), size(419996mb), offset(1487733mb) End scan. Checking partitions... * Warning: more than 4 primary partitions: 5. Partition(Linux swap or Solaris/x86): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): invalid primary Ok. So I would say still a misreport from gpart and 'disks' (in Buster) is just somehow broken and risky to use.
Re: recovering a partition table
On 09/07/2018 02:06 PM, Dominic Knight wrote: On Fri, 2018-09-07 at 13:02 -0700, Jimmy Johnson wrote: On 09/07/2018 12:19 PM, Eike Lantzsch wrote: On Friday, September 7, 2018 5:34:00 PM -04 Dominic Knight wrote: Whilst trying to create one partition out of two (using disks) I appear to have accidentally deleted the partition table of (almost) the whole drive. Then diverse methods for partition table recovery are open to you. All the best E.L. What the Doctor ordered: How to Recover a Disk Partition with TestDisk and GParted Live https://ubuverse.com/recover-a-disk-partition-with-testdisk-and-gparted-live/ It seems the problem was that it wasn't really deleted at all, just 'disks' (the software program) being a bit useless and saying it was. I had wondered what I had done to cause it as I was fairly certain I had double checked what I was doing. I had deleted one partition ready to expand another into it when 'disks' decided to play a trick on me. Slightly worrying when it tells you there is one big empty drive, and then gpart reporting this Warning: more than 4 primary partitions: 6. Partition(Linux swap or Solaris/x86): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): invalid primary Partition(Linux ext2 filesystem): invalid primary Ok. is a bug in that piece of software? There is actually one primary and one extended all are ext4. gparted reports all is good. Risked a reboot and everything is just fine. Thanks Dom. It looks like the logical partition has been removed, I don't think I've seen that before. And rebooting brought it back, lucky you. :) -- Jimmy Johnson Devuan Jessie - KDE 4.14.2 - AMD A8-7600 - EXT4 at sda2 Registered Linux User #380263
Re: recovering a partition table
On Fri, 2018-09-07 at 13:02 -0700, Jimmy Johnson wrote: > On 09/07/2018 12:19 PM, Eike Lantzsch wrote: > > On Friday, September 7, 2018 5:34:00 PM -04 Dominic Knight wrote: > > > Whilst trying to create one partition out of two (using disks) I > > > appear to have accidentally deleted the partition table of > > > (almost) the whole drive. > > Then diverse methods for partition table recovery are open to you. > > All the best > > E.L. > > > What the Doctor ordered: > How to Recover a Disk Partition with TestDisk and GParted Live > > https://ubuverse.com/recover-a-disk-partition-with-testdisk-and-gparted-live/ > It seems the problem was that it wasn't really deleted at all, just 'disks' (the software program) being a bit useless and saying it was. I had wondered what I had done to cause it as I was fairly certain I had double checked what I was doing. I had deleted one partition ready to expand another into it when 'disks' decided to play a trick on me. Slightly worrying when it tells you there is one big empty drive, and then gpart reporting this Warning: more than 4 primary partitions: 6. Partition(Linux swap or Solaris/x86): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): invalid primary Partition(Linux ext2 filesystem): invalid primary Ok. is a bug in that piece of software? There is actually one primary and one extended all are ext4. gparted reports all is good. Risked a reboot and everything is just fine. Thanks Dom.
Re: recovering a partition table
On 09/07/2018 12:19 PM, Eike Lantzsch wrote: On Friday, September 7, 2018 5:34:00 PM -04 Dominic Knight wrote: Whilst trying to create one partition out of two (using disks) I appear to have accidentally deleted the partition table of (almost) the whole drive. It still has the swap partition and an unknown partition of zero size apparently with 2tb of freespace. It was 10gb swap, 1tb, 50 gb, and two at roughly 500gb each at the end. How do I recover the original partition table? testdisk and gparted come to mind. A Google search turns up many HOWTOs for Linux. Before you do anything else first of all make an image of the disk by means of clonezilla-live. Then diverse methods for partition table recovery are open to you. All the best E.L. What the Doctor ordered: How to Recover a Disk Partition with TestDisk and GParted Live https://ubuverse.com/recover-a-disk-partition-with-testdisk-and-gparted-live/ -- Jimmy Johnson Devuan Jessie - KDE 4.14.2 - AMD A8-7600 - EXT4 at sda2 Registered Linux User #380263
Re: recovering a partition table
On Friday, September 7, 2018 5:34:00 PM -04 Dominic Knight wrote: > Whilst trying to create one partition out of two (using disks) I > appear to have accidentally deleted the partition table of (almost) the > whole drive. It still has the swap partition and an unknown partition > of zero size apparently with 2tb of freespace. It was 10gb swap, 1tb, > 50 gb, and two at roughly 500gb each at the end. > > How do I recover the original partition table? testdisk and gparted come to mind. A Google search turns up many HOWTOs for Linux. Before you do anything else first of all make an image of the disk by means of clonezilla-live. Then diverse methods for partition table recovery are open to you. All the best E.L.
recovering a partition table
Whilst trying to create one partition out of two (using disks) I appear to have accidentally deleted the partition table of (almost) the whole drive. It still has the swap partition and an unknown partition of zero size apparently with 2tb of freespace. It was 10gb swap, 1tb, 50 gb, and two at roughly 500gb each at the end. How do I recover the original partition table? This is what gpart says but the partitions were ext4 so would like to know if writing this will be OK and indeed how to write it considering the reported errors further below. It seems to not understand the extended partitions they sat in. root@goodoldmusic:~# gpart /dev/sdb Begin scan... Possible partition(Linux swap), size(9536mb), offset(1mb) Possible partition(Linux ext2), size(953673mb), offset(9538mb) Possible partition(Linux ext2), size(476836mb), offset(963212mb) Possible partition(Linux ext2), size(47683mb), offset(1440049mb) Possible partition(Linux ext2), size(190733mb), offset(1487733mb) Possible partition(Linux ext2), size(229261mb), offset(1678468mb) End scan. Checking partitions... * Warning: more than 4 primary partitions: 6. Partition(Linux swap or Solaris/x86): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): primary Partition(Linux ext2 filesystem): invalid primary Partition(Linux ext2 filesystem): invalid primary Ok. Guessed primary partition table: Primary partition(1) type: 130(0x82)(Linux swap or Solaris/x86) size: 9536mb #s(19529728) s(2048-19531775) chs: (0/32/33)-(1023/254/63)d (0/32/33)-(1215/203/12)r Primary partition(2) type: 131(0x83)(Linux ext2 filesystem) size: 953673mb #s(1953122304) s(19533824-1972656127) chs: (1023/254/63)-(1023/254/63)d (1215/235/45)-(122792/42/2)r Primary partition(3) type: 131(0x83)(Linux ext2 filesystem) size: 476836mb #s(976560128) s(1972658176-2949218303) chs: (1023/254/63)-(1023/254/63)d (122792/74/35)-(183580/88/60)r Primary partition(4) type: 131(0x83)(Linux ext2 filesystem) size: 47683mb #s(97654784) s(2949220352-3046875135) chs: (1023/254/63)-(1023/254/63)d (183580/121/30)-(189659/52/25)r