Re: Oops - copied iso image to wrong device

2013-10-15 Thread mark ryan
On Sun, Oct 13, 2013 at 10:00 AM, Brian  wrote:

> On Sun 13 Oct 2013 at 00:54:44 +, mark ryan wrote:
>
> > I was creating a bootable USB stick from an installer image on another
> > external hard drive. I did a cat debian-7.1.0-i386-netinst.iso > /dev/sdb
> > when I meant /dev/sdc. sdb was my external drive with the iso on it, and
> > other files. I am now unable to mount that drive. What, if anything, can
> I
> > do to recover that drive?
>
> The data on the drive are gone. Do
>
>dd if=/dev/zero of=/dev/sdb count=1
>
> to remove all traces of the iso you put on it and start from scratch.
>
>
Thanks Brian, but I can just fdisk and mkfs this one. It is an external
drive that is only used for file storage. I may try scapel, but I'll
probably just reformat and restore when I get home.


Re: Oops - copied iso image to wrong device

2013-10-15 Thread mark ryan
On Sun, Oct 13, 2013 at 1:55 AM, Ralf Mardorf wrote:

>
> The problem is that you didn't delete it, but you've overwritten the
> data, OTOH the ISO is very small, so not very much is overwritten. First
> you need to try to recover the partition table. Assumed this should
> work, then mount the drive read only and use a tool to undelete files
> for the original used file system.
>

Hi Ralf, and apologies for the delay. I am on the road due to a family
emergency and obviously that has to come first. I was going to try to set
up another family member on a dual boot, the reason I was trying to create
the install stick.

The drive I overwrote the partition table on is an older Wester Digital
external 320 GB drive that I put an ext4 FS on right out of the box. In
trying to recover the partition table gpart only reports finding the
original (I think) NTFS partition table with one primary that covers the
full disk, and three primaries of zero size. So it looks like I am unable
to recover the partition table because there should be a single ext4
partition.

At this point the time required to recover what I wanted off of here for
this trip is probably not going to be worth the effort. I may try to
recover files if I get a chance, but I'm probably going to have to put off
setting up my sister's dual boot until the next trip.

Thanks to you and other responses.


Re: Oops - copied iso image to wrong device

2013-10-14 Thread Jonathan Dowland
On Sun, Oct 13, 2013 at 10:52:33PM +0100, Brian wrote:
> The dd command was recommended on the off-chance GRUB might be put on 
> the drive now or in the future; it will refuse to install.

I see, I didn't know that, thank you. Apparently grub-setup is the
bit that complains, and it can be made to disregard the check with
the '-s' flag; however it seems non-trivial to pass -s through to
grub-setup from install-grub, and if you were using something like
d-i or another installer perhaps impossible. So, using dd is a
sensible, pragmatic suggestion.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131014083115.GA5923@debian



Re: Oops - copied iso image to wrong device

2013-10-13 Thread Brian
On Sun 13 Oct 2013 at 21:49:40 +0100, Jonathan Dowland wrote:

> On Sun, Oct 13, 2013 at 11:00:50AM +0100, Brian wrote:
> > The data on the drive are gone. Do
> > 
> >dd if=/dev/zero of=/dev/sdb count=1
> > 
> > to remove all traces of the iso you put on it and start from scratch.
> 
> …why? As things currently stand, the user could possibly reconstruct
> the partition table and recover most of their data, or, use forensic
> recovery tools that don't rely on the FS being intact to identify and
> recover bits past the ISO-length offset into the drive.
> 
> If they do as you suggest, they rule out any of the above recovery
> options. What do they gain?

Time to enjoy the finer things in life? The OP would have to weigh up
the benefits of possibly being able to recover data etc as against
definitely being able to restore from a backup.

> If they are to write off the drive, they could plop a new partition
> table on top of things as they stand, mkfs on the partitions, and start
> over, without  having to wait for the dd to complete.

The dd command was recommended on the off-chance GRUB might be put on 
the drive now or in the future; it will refuse to install.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131013215233.gb22...@copernicus.demon.co.uk



Re: Oops - copied iso image to wrong device

2013-10-13 Thread Jonathan Dowland
On Sun, Oct 13, 2013 at 11:00:50AM +0100, Brian wrote:
> The data on the drive are gone. Do
> 
>dd if=/dev/zero of=/dev/sdb count=1
> 
> to remove all traces of the iso you put on it and start from scratch.

…why? As things currently stand, the user could possibly reconstruct
the partition table and recover most of their data, or, use forensic
recovery tools that don't rely on the FS being intact to identify and
recover bits past the ISO-length offset into the drive.

If they do as you suggest, they rule out any of the above recovery
options. What do they gain?

If they are to write off the drive, they could plop a new partition
table on top of things as they stand, mkfs on the partitions, and start
over, without  having to wait for the dd to complete.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131013204940.GB1529@debian



Re: Oops - copied iso image to wrong device

2013-10-13 Thread Hans
Am Sonntag, 13. Oktober 2013, 11:00:50 schrieb Brian:
> On Sun 13 Oct 2013 at 00:54:44 +, mark ryan wrote:
> > I was creating a bootable USB stick from an installer image on another
> > external hard drive. I did a cat debian-7.1.0-i386-netinst.iso > /dev/sdb
> > when I meant /dev/sdc. sdb was my external drive with the iso on it, and
> > other files. I am now unable to mount that drive. What, if anything, can I
> > do to recover that drive?

If some sectors are3 not overwritten, you might eb able to rescue some files 
(pictures, textfiles or similar) by using foremost or scalpel.

Checkout a forensic livefile system. I suggest DEFT-7.2 (32-bit) or DEFT-8.0 
(only 64-bit).

It has got some nioce tools on it, so it might be not everything is lost.

Good luck!

Hans 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/2212492.bBjRUiarkX@protheus2



Re: Oops - copied iso image to wrong device

2013-10-13 Thread Brian
On Sun 13 Oct 2013 at 00:54:44 +, mark ryan wrote:

> I was creating a bootable USB stick from an installer image on another
> external hard drive. I did a cat debian-7.1.0-i386-netinst.iso > /dev/sdb
> when I meant /dev/sdc. sdb was my external drive with the iso on it, and
> other files. I am now unable to mount that drive. What, if anything, can I
> do to recover that drive?

The data on the drive are gone. Do

   dd if=/dev/zero of=/dev/sdb count=1

to remove all traces of the iso you put on it and start from scratch.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/13102013105700.822ab27dc...@desktop.copernicus.demon.co.uk



Re: Oops - copied iso image to wrong device

2013-10-12 Thread Ralf Mardorf

The problem is that you didn't delete it, but you've overwritten the
data, OTOH the ISO is very small, so not very much is overwritten. First
you need to try to recover the partition table. Assumed this should
work, then mount the drive read only and use a tool to undelete files
for the original used file system.



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1381629359.765.92.camel@archlinux