linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mbr dd'd
@ 2004-12-13 13:30 kaushal
  2004-12-13 14:31 ` chuck gelm
  2004-12-13 15:59 ` Jim C. Brown
  0 siblings, 2 replies; 3+ messages in thread
From: kaushal @ 2004-12-13 13:30 UTC (permalink / raw)
  To: admin

hi,
   My friends' system is in a critical situation.
	Hdd. is /dev/hdc.
	CD-WR is /dev/hdd.
created a bootable linux iso img.
	MISTAKE part:
dd if=iso.img of=/dev/hdc.Instead of hdd.

To retrive it back we tried the following:

1.)lilo:
1st sector of the device doesn't has valid boot signature.

2.)grub-install /dev/hdc
the device doesn't has BIOS recognition.

though multiboot,tried out this :
3.)dd if=/boot/vmlinuz of=/dev/hdc  
grub-install /dev/hdc
the device doesn't has BIOS recognition.

4.)backed up the /boot/grub
copied the grub of another sys in the network,
replaced the /boot/grub.conf with the backedup grub.conf(i.e old one)
again grub-install failed with the same reason.


Net connectivity is available.Is there anyway he can recover the mbr
?Other os is windows 2000.He did backup the entire data and the system
is working fine now.

Desperately   waiting for a solution.

Thanks a lot in advance.

kaushal.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mbr dd'd
  2004-12-13 13:30 mbr dd'd kaushal
@ 2004-12-13 14:31 ` chuck gelm
  2004-12-13 15:59 ` Jim C. Brown
  1 sibling, 0 replies; 3+ messages in thread
From: chuck gelm @ 2004-12-13 14:31 UTC (permalink / raw)
  To: kaushal; +Cc: admin

[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]

kaushal wrote:
> hi,
>    My friends' system is in a critical situation.
> 	Hdd. is /dev/hdc.
> 	CD-WR is /dev/hdd.
> created a bootable linux iso img.
> 	MISTAKE part:
> dd if=iso.img of=/dev/hdc.Instead of hdd.
> 
> To retrive it back we tried the following:
> 
> 1.)lilo:
> 1st sector of the device doesn't has valid boot signature.
> 
> 2.)grub-install /dev/hdc
> the device doesn't has BIOS recognition.
> 
> though multiboot,tried out this :
> 3.)dd if=/boot/vmlinuz of=/dev/hdc  
> grub-install /dev/hdc
> the device doesn't has BIOS recognition.
> 
> 4.)backed up the /boot/grub
> copied the grub of another sys in the network,
> replaced the /boot/grub.conf with the backedup grub.conf(i.e old one)
> again grub-install failed with the same reason.
> 
> 
> Net connectivity is available.Is there anyway he can recover the mbr
> ?Other os is windows 2000.He did backup the entire data and the system
> is working fine now.
> 
> Desperately   waiting for a solution.
> 
> Thanks a lot in advance.
> 
> kaushal.

  Dear kaushal:

  I do not create a CD-ROM diskette from an .iso image using 'dd'.
I "burn" .iso images to CD-ROM using 'cdrecord'.
See attachment for an example bash script that copies
  an .iso image to CD-ROM diskette.

HTH, Chuck

[-- Attachment #2: burncd.sh --]
[-- Type: text/plain, Size: 509 bytes --]

#!/bin/bash
#
# /usr/local/bin/burncd.sh
#

cat /usr/local/bin/burncd.sh

echo ""
echo " First argument is <$1>."
echo "Second argument is <$2>."
echo ""

eject -t

if [ -n $1 ] ; then
 if [ -n $2 ] ; then
  cdrecord -v dev=0,0,0 fs=64M speed=$2 driveropts=burnproof $1
 else
  echo "Second argument is burn speed [1 - 52] and must not be null."
 fi
else
 echo ""
 echo "First argument is filename.ext and must not be null."
 echo ""
fi
mount /mnt/cdrom && ls -l /mnt/cdrom && umount /mnt/cdrom
echo $1
eject

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mbr dd'd
  2004-12-13 13:30 mbr dd'd kaushal
  2004-12-13 14:31 ` chuck gelm
@ 2004-12-13 15:59 ` Jim C. Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Jim C. Brown @ 2004-12-13 15:59 UTC (permalink / raw)
  To: linux-admin

On Mon, Dec 13, 2004 at 07:00:02PM +0530, kaushal wrote:
> hi,
>    My friends' system is in a critical situation.
> 	Hdd. is /dev/hdc.
> 	CD-WR is /dev/hdd.
> created a bootable linux iso img.
> 	MISTAKE part:
> dd if=iso.img of=/dev/hdc.Instead of hdd.
> 

I did that once.

> Net connectivity is available.Is there anyway he can recover the mbr
> ?Other os is windows 2000.He did backup the entire data and the system
> is working fine now.

He backuped all the data and the system is working fine now?
If that is the case, then why do you need to recover the mbr?

You can't recover the mbr, no matter what you do. Unless you actually made a
backup copy with dd prior to the accident, it doesn't exist anymore.

However, if you have hackup copies, you can use fdisk to repartition the disk
(and make a new mbr in the process). And then you can restore data from backup.
The reason grub and lilo failed may have been because the hard disk no longer
looked like a valid hard disk. fdisk will fix that.

If you have no backups (I'm assuming he only backuped the Windows part), you
can try guessing the location of the partition by playing with partition table
numbers, or you can try to use a program like Partition Magic to restore it ..
but this is likely to fail if the file system was overwritten.

There is also the possibility that, for some reason not clear in your email,
the hard disk is not recongized by the BIOS at all ... if that is the case
then you'll need to enter CMOS configuration and tell it about the hard disk
again.

> 
> Desperately   waiting for a solution.
> 
> Thanks a lot in advance.
> 
> kaushal.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-13 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-13 13:30 mbr dd'd kaushal
2004-12-13 14:31 ` chuck gelm
2004-12-13 15:59 ` Jim C. Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).