You are not logged in.

#1 2016-05-10 06:30:56

mibadt
Member
Registered: 2009-09-25
Posts: 396

Dual boot BIOS sys: Lost fake partition table on GPT disk

HI,
I've a, BIOS based, dual-boot desktop, runnung both (fully updated as of yesterday) Arch-64/Windows 10 (originally Win7).
The PC has 3 drives: sda (optical), sdb (2.7 TB GPT based HD, originally containg 8 GPT partitions), and sdc (1.5 TB, MBR based HD).
The sdc contains GRUB and Windows.
The sdb contains 8 Linux and data GPT partitions.
Yesterday, while shutting down Windows, the system hung for a moment than shut down.
Eversince, I can only boot into Windows as Arch won't find linux root..

I would appreciate a detailed  help regaining full acsess  to all my sb partition (especially a 2.6 TB ntfs partition containg many many photos...).
Thanks up front!

I've booted with SystemRescue CD and got the following: (I'm especially worried about the 64b overlap-see below).
GParted reported thar sdb has no valid fake msdos partition table, but in view of the above overlap, I'm afraid to try to restore.

% lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238.5G  0 disk 
└─sda1   8:1    0 238.5G  0 part 
sdb      8:16   0   2.7T  0 disk 
├─sdb1   8:17   0   734M  0 part 
└─sdb2   8:18   0    40M  0 part 
sdc      8:32   0   1.4T  0 disk 
├─sdc1   8:33   0  89.9G  0 part 
├─sdc2   8:34   0   149M  0 part 
├─sdc3   8:35   0   1.1T  0 part 
└─sdc4   8:36   0 208.4G  0 part 
sr0     11:0    1 460.2M  0 rom  /livemnt/boot
loop0    7:0    0 338.5M  1 loop /livemnt/squashfs
root@sysresccd /root % gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: present

Found valid MBR and GPT. Which do you want to use?
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer: 2
Using GPT and creating fresh protective MBR.
Warning! Main partition table overlaps the first partition by 64 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): p
Disk /dev/sdb: 5860524911 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): CC8A67FE-F174-45C4-9EFD-A6402499F11E
Partition table holds up to 248 entries
First usable sector is 64, last usable sector is 1503168
Partitions will be aligned on 8-sector boundaries
Total free space is 1 sectors (512 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   2             172           82091   40.0 MiB    0700  ISOHybrid1

Best regards,
Michael Badt

Offline

#2 2016-05-10 07:06:59

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Dual boot BIOS sys: Lost fake partition table on GPT disk

Please post the output of:

# parted -l /dev/sdb
# gdisk -l /dev/sdb

Have you tried mounting the entire device?

# mount /dev/sdb /mnt

Jin, Jîyan, Azadî

Offline

#3 2016-05-10 08:23:59

mibadt
Member
Registered: 2009-09-25
Posts: 396

Re: Dual boot BIOS sys: Lost fake partition table on GPT disk

Thanks,
Here is the requested information and in addition the structure of the mounted /dev/sdb.
All help will be appreciated;

Thanks!

 % lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238.5G  0 disk 
└─sda1   8:1    0 238.5G  0 part 
sdb      8:16   0   2.7T  0 disk 
├─sdb1   8:17   0   734M  0 part 
└─sdb2   8:18   0    40M  0 part 
sdc      8:32   0   1.4T  0 disk 
├─sdc1   8:33   0  89.9G  0 part 
├─sdc2   8:34   0   149M  0 part 
├─sdc3   8:35   0   1.1T  0 part 
└─sdc4   8:36   0 208.4G  0 part 
sr0     11:0    1 460.2M  0 rom  /livemnt/boot
loop0    7:0    0 338.5M  1 loop /livemnt/squashfs
root@sysresccd /root % parted -l /dev/sdb
Model: ATA TS256GSSD370S (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  256GB  256GB  primary  ntfs


Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      88.1kB  42.0MB  41.9MB  primary  fat16        esp


Model: ATA ST31500341AS (scsi)
Disk /dev/sdc: 1500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  96.5GB  96.5GB  primary  ntfs         boot
 2      96.5GB  96.6GB  156MB   primary  ext4
 4      96.6GB  320GB   224GB   primary  ntfs
 3      320GB   1500GB  1180GB  primary  ext4


Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label
Model: HL-DT-ST DVDRAM GH22LS50 (scsi)                                    
Disk /dev/sr0: 483MB
Sector size (logical/physical): 2048B/2048B
Partition Table: unknown
Disk Flags: 
root@sysresccd /root % gdisk -l /dev/sdb
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: present

Found valid MBR and GPT. Which do you want to use?
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer: q
Using GPT and creating fresh protective MBR.
Warning! Main partition table overlaps the first partition by 64 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/sdb: 5860524911 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): CC8A67FE-F174-45C4-9EFD-A6402499F11E
Partition table holds up to 248 entries
First usable sector is 64, last usable sector is 1503168
Partitions will be aligned on 8-sector boundaries
Total free space is 1 sectors (512 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   2             172           82091   40.0 MiB    0700  ISOHybrid1
root@sysresccd /root % mount /dev/sdb /mnt
mount: /dev/sdb is write-protected, mounting read-only
root@sysresccd /root % ls -al /mnt
total 10
drwxr-xr-x  1 root root 2048 May  1 04:47 .
drwxrwxrwt 31 root root  260 May 10 08:09 ..
drwxr-xr-x  1 root root 2048 May  1 04:47 arch
drwxr-xr-x  1 root root 2048 May  1 04:47 EFI
drwxr-xr-x  1 root root 2048 May  1 04:47 isolinux
drwxr-xr-x  1 root root 2048 May  1 04:47 loader
root@sysresccd /root % tree /mnt
/mnt
├── arch
│   ├── boot
│   │   ├── i686
│   │   │   ├── archiso.img
│   │   │   └── vmlinuz
│   │   ├── intel_ucode.img
│   │   ├── intel_ucode.LICENSE
│   │   ├── memtest
│   │   ├── memtest.COPYING
│   │   ├── syslinux
│   │   │   ├── archiso.cfg
│   │   │   ├── archiso_head.cfg
│   │   │   ├── archiso_pxe32.cfg
│   │   │   ├── archiso_pxe_32_inc.cfg
│   │   │   ├── archiso_pxe64.cfg
│   │   │   ├── archiso_pxe_both_inc.cfg
│   │   │   ├── archiso_pxe_choose.cfg
│   │   │   ├── archiso_sys32.cfg
│   │   │   ├── archiso_sys_32_inc.cfg
│   │   │   ├── archiso_sys64.cfg
│   │   │   ├── archiso_sys_both_inc.cfg
│   │   │   ├── archiso_sys_choose.cfg
│   │   │   ├── archiso_tail.cfg
│   │   │   ├── cat.c32
│   │   │   ├── chain.c32
│   │   │   ├── cmd.c32
│   │   │   ├── cmenu.c32
│   │   │   ├── config.c32
│   │   │   ├── cptime.c32
│   │   │   ├── cpu.c32
│   │   │   ├── cpuid.c32
│   │   │   ├── cpuidtest.c32
│   │   │   ├── debug.c32
│   │   │   ├── dhcp.c32
│   │   │   ├── disk.c32
│   │   │   ├── dmi.c32
│   │   │   ├── dmitest.c32
│   │   │   ├── elf.c32
│   │   │   ├── ethersel.c32
│   │   │   ├── gfxboot.c32
│   │   │   ├── gpxecmd.c32
│   │   │   ├── hdt
│   │   │   │   ├── modalias.gz
│   │   │   │   └── pciids.gz
│   │   │   ├── hdt.c32
│   │   │   ├── hexdump.c32
│   │   │   ├── host.c32
│   │   │   ├── ifcpu64.c32
│   │   │   ├── ifcpu.c32
│   │   │   ├── ifmemdsk.c32
│   │   │   ├── ifplop.c32
│   │   │   ├── kbdmap.c32
│   │   │   ├── kontron_wdt.c32
│   │   │   ├── ldlinux.c32
│   │   │   ├── lfs.c32
│   │   │   ├── libcom32.c32
│   │   │   ├── libgpl.c32
│   │   │   ├── liblua.c32
│   │   │   ├── libmenu.c32
│   │   │   ├── libutil.c32
│   │   │   ├── linux.c32
│   │   │   ├── lpxelinux.0
│   │   │   ├── ls.c32
│   │   │   ├── lua.c32
│   │   │   ├── mboot.c32
│   │   │   ├── memdisk
│   │   │   ├── meminfo.c32
│   │   │   ├── menu.c32
│   │   │   ├── pci.c32
│   │   │   ├── pcitest.c32
│   │   │   ├── pmload.c32
│   │   │   ├── poweroff.c32
│   │   │   ├── prdhcp.c32
│   │   │   ├── pwd.c32
│   │   │   ├── pxechn.c32
│   │   │   ├── reboot.c32
│   │   │   ├── rosh.c32
│   │   │   ├── sanboot.c32
│   │   │   ├── sdi.c32
│   │   │   ├── splash.png
│   │   │   ├── sysdump.c32
│   │   │   ├── syslinux.c32
│   │   │   ├── syslinux.cfg
│   │   │   ├── vesa.c32
│   │   │   ├── vesainfo.c32
│   │   │   ├── vesamenu.c32
│   │   │   ├── vpdtest.c32
│   │   │   ├── whichsys.c32
│   │   │   └── zzjson.c32
│   │   └── x86_64
│   │       ├── archiso.img
│   │       └── vmlinuz
│   ├── i686
│   │   ├── airootfs.md5
│   │   ├── airootfs.sfs
│   │   └── airootfs.sfs.sig
│   ├── pkglist.i686.txt
│   ├── pkglist.x86_64.txt
│   └── x86_64
│       ├── airootfs.md5
│       ├── airootfs.sfs
│       └── airootfs.sfs.sig
├── EFI
│   ├── archiso
│   │   └── efiboot.img
│   ├── boot
│   │   ├── bootx64.efi
│   │   ├── HashTool.efi
│   │   └── loader.efi
│   ├── shellx64_v1.efi
│   └── shellx64_v2.efi
├── isolinux
│   ├── boot.cat
│   ├── isohdpfx.bin
│   ├── isolinux.bin
│   ├── isolinux.cfg
│   └── ldlinux.c32
└── loader
    ├── entries
    │   ├── archiso-x86_64.conf
    │   ├── uefi-shell-v1-x86_64.conf
    │   └── uefi-shell-v2-x86_64.conf
    └── loader.conf

14 directories, 109 files

Best regards,
Michael Badt

Offline

#4 2016-05-10 20:49:21

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Dual boot BIOS sys: Lost fake partition table on GPT disk

So you can only access the ESP directly then and the command output doesn't add any further information hmm

You may be able to regain the data by reconstructing the original partition table but you would have to know the exact sector boundaries.

I really have no ideas here, hopefully somebody else will.


Jin, Jîyan, Azadî

Offline

#5 2016-05-11 07:17:28

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Dual boot BIOS sys: Lost fake partition table on GPT disk

I had an idea! yikes

Try mounting the drive with a byte offset equal to the end sector of the "visible" partition on sdb:

# mount -o offset=42030592 /dev/sdb /mnt

Can you see any different files under /mnt now?


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB