Gentoo Archives: gentoo-user

From: Wols Lists <antlists@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Trouble with backup harddisks
Date: Thu, 30 Apr 2020 09:56:04
Message-Id: 5EAAA0AB.3050505@youngman.org.uk
In Reply to: [gentoo-user] Trouble with backup harddisks by tuxic@posteo.de
1 On 30/04/20 10:32, tuxic@××××××.de wrote:
2 > Hi,
3 >
4 > recently I switched from the old MBR-scheme to GPT on
5 > my new PC.
6 >
7 > I have two external USB-harddisk, which were partioned/formatted with
8 > a MBR-scheme/MSDOS partition (but were never used to boot from. They are pure
9 > data containers).
10 >
11 > When I connect these to my new PC, only the device is shown:
12 > /dev/sdb, /dev/sdc.
13 >
14 > The kernel is configured (beside other things) as follows:
15 >
16 > #
17 > # Partition Types
18 > #
19 > CONFIG_PARTITION_ADVANCED=y
20 > # CONFIG_ACORN_PARTITION is not set
21 > # CONFIG_AIX_PARTITION is not set
22 > # CONFIG_OSF_PARTITION is not set
23 > # CONFIG_AMIGA_PARTITION is not set
24 > # CONFIG_ATARI_PARTITION is not set
25 > # CONFIG_MAC_PARTITION is not set
26 > CONFIG_MSDOS_PARTITION=y
27 > # CONFIG_BSD_DISKLABEL is not set
28 > # CONFIG_MINIX_SUBPARTITION is not set
29 > # CONFIG_SOLARIS_X86_PARTITION is not set
30 > # CONFIG_UNIXWARE_DISKLABEL is not set
31 > # CONFIG_LDM_PARTITION is not set
32 > # CONFIG_SGI_PARTITION is not set
33 > # CONFIG_ULTRIX_PARTITION is not set
34 > # CONFIG_SUN_PARTITION is not set
35 > # CONFIG_KARMA_PARTITION is not set
36 > CONFIG_EFI_PARTITION=y
37 > # CONFIG_SYSV68_PARTITION is not set
38 > # CONFIG_CMDLINE_PARTITION is not set
39 > # end of Partition Types
40 >
41 > CONFIG_BLOCK_COMPAT=y
42 > CONFIG_BLK_MQ_PCI=y
43 > CONFIG_BLK_MQ_VIRTIO=y
44 > CONFIG_BLK_PM=y
45 >
46 > dmesg shows this:
47 > [14617.672363] usb 2-2: New USB device found, idVendor=1058, idProduct=25a2, bcdDevice=10.21
48 > [14617.672364] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
49 > [14617.672364] usb 2-2: Product: Elements 25A2
50 > [14617.672365] usb 2-2: Manufacturer: Western Digital
51 > [14617.672366] usb 2-2: SerialNumber: 575844314132383959393934
52 > [14617.681660] usb-storage 2-2:1.0: USB Mass Storage device detected
53 > [14617.681737] scsi host10: usb-storage 2-2:1.0
54 > [14618.725450] scsi 10:0:0:0: Direct-Access WD Elements 25A2 1021 PQ: 0 ANSI: 6
55 > [14618.725594] sd 10:0:0:0: Attached scsi generic sg1 type 0
56 > [14618.728090] sd 10:0:0:0: [sdb] Spinning up disk...
57 > [14619.748918] ...ready
58 >
59 > I tried different USB ports in a desperate hope of success...
60 > ...no, same problem.
61 >
62 > Interestingly fdisk shows the following:
63 >
64 > host> sudo fdisk -l /dev/sdb
65 > Disk /dev/sdb: 931.49 GiB, 1000170586112 bytes, 1953458176 sectors
66 > Disk model: Elements 25A2
67 > Units: sectors of 1 * 512 = 512 bytes
68 > Sector size (logical/physical): 512 bytes / 512 bytes
69 > I/O size (minimum/optimal): 512 bytes / 512 bytes
70
71 This could be the key. Sector sizes have been changing from 512 to 4096
72 over many years. If your kernel has been updated to expect/use 4096 byte
73 sectors, it might not be able to read the disk properly.
74
75 > Disklabel type: dos
76 > Disk identifier: 0x16f2a91f
77 >
78 > Device Boot Start End Sectors Size Id Type
79 > /dev/sdb1 1 1953458175 1953458175 931.5G ee GPT
80 >
81 > The type is shown as GPT...but the drive has a MSDOS partition table.
82 >
83 > Reading my (old) internal harddrive with an external USB docking
84 > station is possible without any problems, though.
85 >
86 > Unfortunatelu I have no space for 1T image of that drive -- otherwise
87 > I would have made an image copy and experiment with that.
88 >
89 > So better ask, than sorry.... ;)
90 >
91 > Is this fixable or did I lost my backups?
92 >
93 Do you have access to an old kernel?
94
95 The other thing is try using gdisk (or that could be fdisk under another
96 name :-( But some partitioning schemes can write a GPT with protective
97 MBR - if you can find something that will take the MBR and write it as a
98 GPT that might help, too.
99
100 Cheers,
101 Wol

Replies

Subject Author
Re: [gentoo-user] Trouble with backup harddisks tuxic@××××××.de
Re: [gentoo-user] Trouble with backup harddisks Andrea Conti <alyf@××××.net>