problem with dd and usb drive

Kahn Seidl mkseidl at hotmail.com
Fri Nov 18 21:06:34 UTC 2005


well, anyways, i think it might be small enough to work...

but, i did the command of=/dev/sda1/file...   and it says its not a 
directory, and doesnt work?


martin


>From: Craig White <craigwhite at azapple.com>
>Reply-To: For users of Fedora Core releases <fedora-list at redhat.com>
>To: For users of Fedora Core releases <fedora-list at redhat.com>
>Subject: Re: problem with dd and usb drive
>Date: Fri, 18 Nov 2005 14:01:53 -0700
>
>On Fri, 2005-11-18 at 20:40 +0000, Kahn Seidl wrote:
>
> > >From: Craig White <craigwhite at azapple.com>
> > >Reply-To: For users of Fedora Core releases <fedora-list at redhat.com>
> > >To: fedora-list at redhat.com
> > >Subject: Re: problem with dd and usb drive
> > >Date: Fri, 18 Nov 2005 12:07:42 -0700
> > >
> > >On Fri, 2005-11-18 at 18:55 +0000, Kahn Seidl wrote:
> > > > I have a problem, i have a fat32 usb drive, which im using to back 
>up a
> > >dns
> > > > server.
> > > >
> > > > i first started to use cp -r * /mnt/usbdrive
> > > >
> > > > then i stopped, and wanted to do it a better way
> > > >
> > > > so i did a dd if=/dev/hda1 of=/dev/sda1 bs=1024k
> > > >
> > > > it finishes too quickly and says 47+1 in    47+1 out
> > > >
> > > > and now when i ls the /mnt/usbdrive
> > > >
> > > > I get all sorts of garbage, lots of ?s and such.  and numbers.  when 
>i
> > >try
> > > > to delete it, it says its a read only drive.
> > > >
> > > > also to note, that at first, fdisk said there was one partition as
> > >fat32.
> > > > nwo there are several and i have no idea how they got there.
> > > >
> > > > the last thing is this - i can now not umount the /dev/sda1  it says 
>the
> > > > device is busy, eject doesnt work either.  I turned it off, and i 
>still
> > >cant
> > > > unmount it, what should I do?  i really dont want to reboot it, it 
>is
> > >our
> > > > dns server.  so?
> > > >
> > >----
> > >I hope that there wasn't anything on the dos partition that you wanted
> > >to keep since it is now toast.
> > >
> > >running dd like that did what you told it to do...over writing
> > >the /dev/sda1 partition with a copy of whatever was on /dev/hda1
> > >
> > >I suppose issuing the 'mount' command would tell you what was
> > >on /dev/hda1
> > >
> > >You probably have no choice but to clean up the usb drive with fdisk...
> > >
> > >fdisk /dev/sda
> > >as at least the first partition has been clobbered.
> > >
> > >h # help
> > >p # print (though this might be phony since it will read the
> > >            partition table and the contents may not match)
> > >
> > >Craig
> > >
> > >PS...You might have had an easier time of it if you had just done...
> > >
> > >dd if=/dev/hda1 of=/dev/sda1/backup_device_hda1.dd-file
> > >
>----
> > the thing is, that I did use fdisk, and no matter what I did,
> > the partition
> > table wouldnt stay.  i then plugged it into a windows machine, and, 
>explorer
> > crashed, and wouldnt read anything everytime i plugged it in.  it found 
>a
> > new harddrive.
> >
> > i would add it to just one file but, ...  it is fat32 , so no files 
>above 4~
> > gb
> >
> > but, it may just work anyway.  is there way I can break it up into 2 
>files?
>----
>I haven't a clue why you would want the partition to be fat32 - but if
>you want to keep the partition at fat32, the only thing you can do is
>write files to existing partition. Otherwise, you are overwriting the
>entire partition and then the partition tables aren't going to be
>working.
>
>fdisk has a 'w' option to write the partition tables.
>
>You would then have to make a file system on the newly created
>partition, either with Windows or Linux (linux uses mkfs).
>
>You could probably split the files but for what purpose? dd has a
>'count' option along with 'bs' option, you could make it split the 'out
>file [of]' into pieces. Either way, restoring is going to be a bear the
>way you are going.
>
>Craig
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>
>--
>fedora-list mailing list
>fedora-list at redhat.com
>To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list





More information about the fedora-list mailing list