[Linux-Anyway] Re: Can't mount drive

  • From: Horror Vacui <horrorvacui@xxxxxxx>
  • To: Linux-Anyway@xxxxxxxxxxxxx
  • Date: Thu, 29 Apr 2004 20:15:15 +0200

On Thu, 29 Apr 2004 10:30:56 -0700 (PDT)
Meph wrote:

>   Horror,
> 
> > > >   Any idea how I can just get the data off -- with or
> > > > without mounting the partition?
> 
> > >   Just a thought on this, as Scott & I were discussing using
> > > dd to get an iso file to copy from a cd to a hard drive as an
> > > iso instead of the files & direcoties in the iso, maybe dd
> > > would get the data off of hdd2...?
> 
> > Might be, because dd copies media bitwise, and doesn't need it
> > to be mounted in order to do so. Although, I'm afraid that
> > you'll make yourself just another copy that you can't mount.
> > It's worth a shot, probably, in case it's some kind of hardware
> > problem (and in case it won't make dd fail too).
> 
>   Hadn't thought of that.  Damn.  ~How~ am I to get the data...?

Well, the $coppers and the $gestapo of all countries seem to be able to
extract data even from bent platters of a HD run over by a steam roller,
so there certainly are means. If the data means your or the livelihood
of your brother's, I'm certain that there are organisations that'll
extract it for a $fee (so you can pay up and kick yourself for not
having backed up ;o) ). Otherwise, I'd do a google on something like
"linux data recovery rescue" (without the quotes, of course). There are
tools for this, you only need to find them.

> 
> > If the HD is still in the state it was when you took it out,
> > I'd suggest you snatch your bro's machine, put the disk back
> > in, boot the thing up, mount and copy the data to another
> > machine over the network or to a disk you put in his machine
> > for the purpose.
> 
>   The drive itself is, but I'd already partitioned his hda for
> Windows.  It seems his cdrom has died, so next day off he has, I
> plan to bring him one of the old spares I have here, & see if we
> can get the thing installed with an OS.

Bring along a Knoppix CD and see if you can mount the drive in his
machine. If it works, you can copy the data to his hda. Remember,
Knoppix mounts drives readonly, so to gain write access to the hda, you
have to do:

mount /dev/hdax /mnt/hdax -o remount,rw

> 
>   On a related note, I'm also trying to get an iso off a cd
> transferred to the hard drive as an iso.  Both Windows & Linux
> read it & ls or dir return the files & directories in the iso.
> How would I transfer that to the hard drive?

There's an instruction on this in Godwin's CD-Burning Howto. In a
nutshell:
1) Mount the drive and do a df to get the size of the CD
2) Divide the size of the CD by 2
3) Unmount the CD (rather important, I'd say)
4) Use the size/2 value as a count argument to dd like this:
dd if=/dev/hdx of=~/image.iso bs=2048 count=xxxxxx

if being of course the device file of your cdrom, and of the path to
where you want to have the image stored.

> 
> > which is a pity - I'm quite interested in it, and I wonder if
> > for example one could use it to copy an entire HD to another
> > one and boot with it. Just on the morning of the day I quit my
> > last job I was about to try it out (with an OpenBSD machine),
> > but the boss was quicker.
> 
>   Hey, I like the sound of this.  Curious, if one made an
> install, configured it, etc; then did this dd to a drive which is
> only a little larger than the data on the installed disk, would
> there be any problems if the install went wonky, & one partition
> & formatted the disk & dd'd the data fromt he small, back-up
> drive to the install drive...?  I'm thinking that something to do
> with drive sizes & sectors, etc might get screwy, but then it's
> only a ghost of what was on the larger drive....

I think that dd is smart enough to deal with this (or that the drives
are smart enough). As far as I understand it, it would copy everything
including MBR and partition tables over, so any formatting on the target
disc would just go away. If I prepared a disc to be ghosted in this way,
I'd limit the number of partitions so that I could add a
partition/partitions extending over the rest of the bigger disc.

> Ah, of all
> things 'puter, I think hard drive physics confuse me most.

Same here. I believe it's intended to be transparent, but
inconsistencies in the implementation make it necessary to deal with. So
a certain level of expertise seems to come in very handy. Well, I don't
have it.

Cheers

-- 
Horror Vacui

Registered Linux user #257714

Go get yourself... counted: http://counter.li.org/
- and keep following the GNU.
To unsubcribe send e-mail with the word unsubscribe in the body to:   
Linux-Anyway-Request@xxxxxxxxxxxxx?body=unsubscribe

Other related posts: