Re: MBR apparently overwritten!

2006-04-09 Thread talon
[EMAIL PROTECTED] wrote:

> Phew, gpart saved me! thanks guys A LOT. its working now. but the mistery
> is how did it get overwritten at first place?
> 
> Ok, ive got a Hurd related question for you. How do i get grub to boot
> Debian/Hurd? I installed it out of curiosity but havent had time to figure
> out how to get it to boot from grub.

http://www.debian.org/ports/hurd/hurd-install.fr.html

Taking as example first disk first partition coantains hurd:
grub> find /boot/gnumach.gz
   (hd0,0)
grub> kernel (hd0,0)/boot/gnumach.gz root=device:hd2s1 -s
   [Multiboot-elf, ...]
grub> module (hd0,0)/hurd/ext2fs.static
--multiboot-command-line=${kernel-command-line}
--host-priv-port=${host-port} --device-master-port=${device-port}
--exec-server-task=${exec-task} -T typed ${root} $(task-create)
$(task-resume)
[Multiboot-module  0x1c4000, 0x2cfe6a bytes]
  grub> module (hd0,0)/lib/ld.so.1 /hurd/exec $(exec-task=task-create)
[Multiboot-module  0x494000, 0x27afe bytes]
grub> boot

-- 
Michel Talon


Re: MBR apparently overwritten!

2006-04-09 Thread elekktretterr
Phew, gpart saved me! thanks guys A LOT. its working now. but the mistery
is how did it get overwritten at first place?

Ok, ive got a Hurd related question for you. How do i get grub to boot
Debian/Hurd? I installed it out of curiosity but havent had time to figure
out how to get it to boot from grub.

Thanks

> Am Sonntag, 9. April 2006 08:13 schrieben Sie:
>> Hey,
>>
>> Something freaky has happened. My 3rd disk's partitions are gone. I had
>> a
>> 1) HURD 2) Windows 3) DragonFly. Now wanting to play some games i went
>> to
>> boot WIndows and i found out the DragonFly partition is now covering the
>> whole disk. Does MBR have a modification timestamp? If yes, how to
>> retrieve
>> it? If no, what can i do?
>
> Oh, another Hurd fan ;-)
>
> I've Hurd on my machine, too (Debian distri).
>
> Thomas
>





Re: MBR apparently overwritten!

2006-04-08 Thread Dmitri Nikulin
On 4/9/06, Petr Janda <[EMAIL PROTECTED]> wrote:
> Hey,
>
> Something freaky has happened. My 3rd disk's partitions are gone. I had a 1)
> HURD 2) Windows 3) DragonFly. Now wanting to play some games i went to boot
> WIndows and i found out the DragonFly partition is now covering the whole
> disk. Does MBR have a modification timestamp? If yes, how to retrieve it? If
> no, what can i do?

This is your punishment for gaming instead of coding :)

However, it's recoverable. If the partitions themselves are not
destroyed, all you need to do is re-create them with their EXACT
offsets (and, to be safe, sizes) that they had before. Type codes,
etc. help but are not fundamentally necessary, depending on how you'll
be using them.

I'm not sure how DragonFly booted if it thought its partition started
at the beginning of the disk, but was actually later. This should not
work... are you absolutely CERTAIN that the boot option list is
correct for that hard disk? In particular, are you looking at the
partition list for the 1st disk for booting, but the 3rd disk when
identifying this problem?

Booting off a livecd and dumping the fdisk and disklabel output for
all your drives might help the rest of us determine the problem. You
may even identify the real problem yourself just by looking through
the outputs.

  -- Dmitri Nikulin



Re: MBR apparently overwritten!

2006-04-08 Thread David Cuthbert

Petr Janda wrote:
Something freaky has happened. My 3rd disk's partitions are gone. I had a 1) 
HURD 2) Windows 3) DragonFly. Now wanting to play some games i went to boot 
WIndows and i found out the DragonFly partition is now covering the whole 
disk. Does MBR have a modification timestamp? If yes, how to retrieve it? If 
no, what can i do?


I'm not aware of a way to recover the MBR -- it's not copied to any 
backup space when overwritten (intentionally, accidentally, or via 
software bug).


You may be interested in gpart, which will attempt to guess the 
partition boundaries:

http://www.stud.uni-hannover.de/user/76201/gpart/

You probably know this already, but don't write to that disk!  The more 
you write to it now, the less likely that partition recovery will succeed.


Re: MBR apparently overwritten!

2006-04-08 Thread Ben Cadieux
Hi Petr,

Rebuilding a partition table is relatively trivial - err...compared to
some other data recovery tasks anyway.  You should first check to see
if the MBR is actually ruined (see what fdisk "sees" as the partitions
on the disk).  Chances are something else is wrong, not your MBR.

Oh, before you try messing around on the disk - you might want to
google around for backed up MBRs.  I know that windows detects changes
to your MBR, not sure if any OSes keep a real backup.  You might also
consider waiting to see if anyone else has a better suggestion than
re-writing it.

Anyway, if it's borked, you should re-write value boot code (using
fdisk or fbsd's sysinstall or something) and then start locating the
boot sector for each partition with a disk editor.  The first one will
probably be at sector 64.  Valid bootsectors end with the bytes 55AAh.

The next step is to find out how big that partition is.  I've never
seen a boot sector that didn't contain the # of sectors for that
partition somewhere in its data.  If you google for boot sector
information for the particular file system it belongs to, there should
be info about the offset to this value.  Write it down.

Once you have the sector # to the bootsector and the number of sectors
for the partition you can go back to the MBR and type it back in to
the appropriate locations.  If you need a disk editor, look for
wde_v30b.zip - I coded in a bootsector search function.  It'll take
awhile but it should find your windows boot sector.  I think norton's
diskedit makes editing these fields easy, but I can't recall if it
supported editing the mbr and entire disk or just fat partitions.

Best Regards,
Ben Cadieux



MBR apparently overwritten!

2006-04-08 Thread Petr Janda
Hey,

Something freaky has happened. My 3rd disk's partitions are gone. I had a 1) 
HURD 2) Windows 3) DragonFly. Now wanting to play some games i went to boot 
WIndows and i found out the DragonFly partition is now covering the whole 
disk. Does MBR have a modification timestamp? If yes, how to retrieve it? If 
no, what can i do?