1

I'm trying to remove partitions from an old drive but no matter what I do, they seem to remain. When applying the changes after removing the partitions, gParted gives errors, then shows the full unallocated area but afterward when it finishes its scan, the partitions have returned. Using KDE Partition Manager, anything I try gives errors. I even tried resizing and/or moving the partitions by a tiny amount just to see if it would force a rewrite to the partition table into something accessible but no luck.

From terminal, I ran sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1 which gave no errors, yet the partitions remained. This was the output:

[sudo] password for admin: 
1+0 records in
1+0 records out
512 bytes copied, 7.40531 s, 0.1 kB/s

I also ran sudo dd if=/dev/urandom of=/dev/sdb bs=4096 which, after running for a long time, give this which implies that it was able to write something to it:

dd: error writing '/dev/sdb': No space left on device
14651281+0 records in
14651280+0 records out
60011642880 bytes (60 GB, 56 GiB) copied, 80017.3 s, 750 kB/s

Ideas? Here's a gParted capture showing the drive structure.

gParted screen capture

Model: IC25N060 ATMR04-0 (scsi)
Disk /dev/sdb: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      32.3kB  57.9GB  57.9GB  primary   fat32
 2      57.9GB  60.0GB  2106MB  extended
 5      57.9GB  60.0GB  2106MB  logical   linux-swap(v1)

. . . and some output of the drive using sudo dd if=//dev/sdb bs=512 count=63 | hexdump -C > test.txt

00000000  33 c0 8e d0 bc 00 7c fb  50 07 50 1f fc be 1b 7c  |3.....|.P.P....||
00000010  bf 1b 06 50 57 b9 e5 01  f3 a4 cb bd be 07 b1 04  |...PW...........|
00000020  38 6e 00 7c 09 75 13 83  c5 10 e2 f4 cd 18 8b f5  |8n.|.u..........|
00000030  83 c6 10 49 74 19 38 2c  74 f6 a0 b5 07 b4 07 8b  |...It.8,t.......|
00000040  f0 ac 3c 00 74 fc bb 07  00 b4 0e cd 10 eb f2 88  |..<.t...........|
00000050  4e 10 e8 46 00 73 2a fe  46 10 80 7e 04 0b 74 0b  |N..F.s*.F..~..t.|
00000060  80 7e 04 0c 74 05 a0 b6  07 75 d2 80 46 02 06 83  |.~..t....u..F...|
00000070  46 08 06 83 56 0a 00 e8  21 00 73 05 a0 b6 07 eb  |F...V...!.s.....|
00000080  bc 81 3e fe 7d 55 aa 74  0b 80 7e 10 00 74 c8 a0  |..>.}U.t..~..t..|
00000090  b7 07 eb a9 8b fc 1e 57  8b f5 cb bf 05 00 8a 56  |.......W.......V|
000000a0  00 b4 08 cd 13 72 23 8a  c1 24 3f 98 8a de 8a fc  |.....r#..$?.....|
000000b0  43 f7 e3 8b d1 86 d6 b1  06 d2 ee 42 f7 e2 39 56  |C..........B..9V|
000000c0  0a 77 23 72 05 39 46 08  73 1c b8 01 02 bb 00 7c  |.w#r.9F.s......||
000000d0  8b 4e 02 8b 56 00 cd 13  73 51 4f 74 4e 32 e4 8a  |.N..V...sQOtN2..|
000000e0  56 00 cd 13 eb e4 8a 56  00 60 bb aa 55 b4 41 cd  |V......V.`..U.A.|
000000f0  13 72 36 81 fb 55 aa 75  30 f6 c1 01 74 2b 61 60  |.r6..U.u0...t+a`|
00000100  6a 00 6a 00 ff 76 0a ff  76 08 6a 00 68 00 7c 6a  |j.j..v..v.j.h.|j|
00000110  01 6a 10 b4 42 8b f4 cd  13 61 61 73 0e 4f 74 0b  |.j..B....aas.Ot.|
00000120  32 e4 8a 56 00 cd 13 eb  d6 61 f9 c3 49 6e 76 61  |2..V.....a..Inva|
00000130  6c 69 64 20 70 61 72 74  69 74 69 6f 6e 20 74 61  |dblid partition ta|
00000140  62 6c 65 00 45 72 72 6f  72 20 6c 6f 61 64 69 6e  |ble.Error loadin|
00000150  67 20 6f 70 65 72 61 74  69 6e 67 20 73 79 73 74  |g operating syst|
00000160  65 6d 00 4d 69 73 73 69  6e 67 20 6f 70 65 72 61  |em.Missing opera|
00000170  74 69 6e 67 20 73 79 73  74 65 6d 00 00 00 00 00  |ting system.....|
00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
11
  • 2
    Did you click on the checkmark on the row of Power Buttons above the map of partitions? Gparted accepts a list of things to do, but does not do them until you tell it to proceed with that checkmark. – K7AAY Sep 30 '19 at 21:26
  • 1
    Note: The Disks utility app, unlike Gparted, makes changes as soon as you tell it to do something. Gparted is safer. – K7AAY Sep 30 '19 at 21:35
  • In gparted, just lay down a fresh MBR/GPT partition table, and the drive is effectively wiped. Hackers might still get to partition data if they try hard enough. Only writing data patterns to the entire disk would make that more difficult. – heynnema Oct 1 '19 at 16:01
  • Does the smartmontools package smartctl -s /dev/sdax show any problems? Are any partitions mounted (does mount show anything mounted on that disk?) or in use (like swap, which may get used automatically, unless you explicitly turn it off, swapoff... ). Cehck/swap Cables, ports, machines, ...etc. – ubfan1 Nov 10 '19 at 2:15
  • This is in an external toaster-type USB device so no cables to switch and as nothing can possibly boot to it, it is not otherwise in use. It mounts automatically when it is connected but I've been demounting it whenever trying to remove the partitions. I've tried it on two different machines and three different operating system (one PC is dual boot) but it was originally in a Linux laptop so I'm focusing in that OS. I haven't tried smartctl -s /dev/sdax but will do so once the current process has ended. – DonP Nov 10 '19 at 2:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.