LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   dd if=/dev/zero of=/dev/sda count=1 && reboot -f (https://www.linuxquestions.org/questions/linux-server-73/dd-if%3D-dev-zero-of%3D-dev-sda-count%3D1-and-and-reboot-f-4175477745/)

karthikeyan111192 09-19-2013 10:10 AM

dd if=/dev/zero of=/dev/sda count=1 && reboot -f
 
Hi frnds,
I have given the below command in my linux box
dd if=/dev/zero of=/dev/sda count=1 && reboot -f
do anyone know how to recover from this ??

Thanks in advance..

TenTenths 09-19-2013 10:19 AM

http://www.linuxquestions.org/questi...h-noes-642006/

NGIB 09-19-2013 10:21 AM

I'm not an expert by any means but that command overwrites /dev/sda with /dev/zero so what was on /dev/sda could now be gone. The blacksize was not specified and I don't know what the default blocksize is...

TenTenths 09-19-2013 10:23 AM

Quote:

Originally Posted by NGIB (Post 5030770)
I'm not an expert by any means but that command overwrites /dev/sda with /dev/zero so what was on /dev/sda is now gone...

The use of "count=1" would indicate that only 1 block has been over-written, the MBR, rather than the whole disk.

syg00 09-19-2013 05:14 PM

Strictly speaking it over-wrote the MBR (i.e. the boot record) and the partition table. This would make it seem that the disk had been "deleted".

testdisk is the usual best answer to recover the partition table (and hence access to data), so that the bootloader can then be re-installed.

Habitual 09-19-2013 05:32 PM

Quote:

Originally Posted by karthikeyan111192 (Post 5030758)
Hi frnds

Use whole words please.

karthikeyan111192 09-20-2013 12:31 AM

I booted using live cd but unable to mount the disk.. :(

it says disk no disk found...

syg00 09-20-2013 02:36 AM

You never (normally) mount disks - you mount partitions/LVs/images that contain filesystems.
You need a liveCD that has testdisk installed - use testdisk on the (unmounted) disk to recover your partitions. Then you can mount them. There are hundreds of threads here on using testdisk. Then re-install your bootloader.

John VV 09-20-2013 02:36 AM

the data is GONE , and gone for good

now
you might be able to recover the date using a "scanning tunneling electron microscope "
for about $50,000 USD yes 50 GEES

reinstall the operating system

you "zeroed out " the drive , it is now a blank unformatted disk
it can not be mounted , there is NOTHING to mount

use the live cd " Gparted" and format the drive

syg00 09-20-2013 03:11 AM

Quote:

Originally Posted by John VV (Post 5031207)
the data is GONE , and gone for good

Rubbish. Stop making uninformed, inflammatory posts.

Read the entire thread.

Firerat 09-20-2013 03:14 AM

count=1
so only the first 512 bytes have been zeroed

testdisk should be able to recover this

I have an old drive somewhere, I can replicate this situation and 'test'


All times are GMT -5. The time now is 08:47 AM.