Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] Trouble with backup harddisks Wols Lists <antlists@××××××××××××.uk>