You are not logged in.

#1 2016-07-18 16:31:28

anazli
Member
Registered: 2016-07-18
Posts: 2

how to restore hard disk after dd command.

Few weeks ago i tried to create a bootable usb and i did "dd bs=4M if=debian-testing.iso of=/dev/sdb1" instead of "sdb". After that the data on hard disk were deleted. I have installed arch and now the output of tune2fs is :

tune2fs: Bad magic number in super-block while trying to open /dev/sda
/dev/sda contains a iso9660 file system labelled 'Debian testing amd64 1'

the output of wipefs is:


offset               type
----------------------------------------------------------------
0x1fe                dos   [partition table]

0x8001               iso9660   [filesystem]
                     LABEL: Debian testing amd64 1
                     UUID:  2016-06-13-07-01-05-00


and the output of fdisk -l is:


Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd58f1ad9

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 247130111 247128064 117.9G 83 Linux
/dev/sda2       247130112 471990271 224860160 107.2G 83 Linux
/dev/sda3       471990272 480192511   8202240   3.9G 82 Linux swap / Solaris
/dev/sda4       480192512 488396799   8204288   3.9G 82 Linux swap / Solaris

what should i do to remove the label and the iso filesystem?

Offline

#2 2016-07-18 16:35:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: how to restore hard disk after dd command.

Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-07-18 16:39:34

frostschutz
Member
Registered: 2013-11-15
Posts: 1,418

Re: how to restore hard disk after dd command.

anazli wrote:

i did "dd bs=4M if=debian-testing.iso of=/dev/sdb1" instead of "sdb".

Either command would have brought about the same result...

what should i do to remove the label and the iso filesystem?

wipefs -o 0x8001 ?

Offline

#4 2016-07-18 17:05:29

anazli
Member
Registered: 2016-07-18
Posts: 2

Re: how to restore hard disk after dd command.

thank you!

Offline

Board footer

Powered by FluxBB