RE: Help with lost MBR on USB HDD
Hi fbsd_user, Happy to help! The tools I used were: dd (pre-installed in FreeBSD) chexedit (available under /usr/ports/editors/chexedit) In terms of literature I read a great deal, all of which was helpful. Perhaps the most helpful links though were: o http://www.ata-atapi.com/hiwchs.htm o http://support.microsoft.com/kb/q140418/ o http://www.ranish.com/part/primer.htm o http://cnlart.web.cern.ch/cnlart/236/disk_partition.html o http://www.faqs.org/docs/Linux-HOWTO/Large-Disk-HOWTO.html#s6 o http://mirror.href.com/thestarman/asm/mbr/DiskTerms.htm o http://home.att.net/~rayknights/pc_boot/w95b_mbr.htm o http://www.linuxjournal.com/article/8661 o http://www.digit-life.com/articles/bootman/index.html o http://www.uneraser.com/mbr-damaged.htm o http://www.storagereview.com/guide2000/ref/hdd/file/part.html o http://linux.com.hk/penguin/man/8/gpart.html You might also like to look into the tool gpart, the last link in the list above. I didn't need anything that sophisticated fortunately. Good luck!! Regards, Jarrod. -Original Message- From: fbsd_user [mailto:[EMAIL PROTECTED] Sent: Saturday, March 11, 2006 2:41 AM To: Jarrod O'Flaherty Subject: RE: Help with lost MBR on USB HDD I am having problem with my mbr. Interested in knowing what tool you used to manipulate the mbr. Also would like to receive your bookmarks on this subject. Any other tips or things you learned would be helpful. Thanks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Help with lost MBR on USB HDD
[Apologies. Posting again with thread header.] For those who might be interested... Message: 26 Date: Sun, 05 Mar 2006 13:46:30 -0500 From: Gerard Seibert [EMAIL PROTECTED] Subject: Re: Help with lost MBR on USB HDD To: freebsd-questions@freebsd.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=UTF-8 Jarrod O'Flaherty wrote: And last but not least, I really hope someone can tell me how I can salvage my MBR other 3 partitions. If that is not possible, then perhaps you can point me in the direction of a tool which will salvage the files on the lost slices? There's not heaps of data there, only around 20 GB or so across all three. But if I can, I'd really like to get it back. I'm hoping NTFS is robust enough to allow salvaging like this? Any and all help GREATLY appreciated!! Thankyou, Jarrod. I know you do not want to hear this, but why on earth did you attempt to mess with the HD without a full backup in place first? I am not sure if you can recover the lost data. If not, this would be a good time to wipe the disk clean and partition it to your liking. I believe that you will have to install Windows before installing FreeBSD. Good Luck! -- Gerard I've done a lot of reading the last couple of days into the MBR and the like. Have to say it's a tad tough going, but quite a bit of fun at the same time. ;) Gerard, yes, this would be a good opportunity to wipe it and start again. If only it wasn't for those MP3s. ;) For those who couldn't read my last email because it was rather a bit too long, the short of it is that FDISK fried my USB HDD's MBR when I asked it to change a partition type's from NTFS to FreeBSD. Why did this happen? Does anyone have a large (blank!) USB HDD that they could experiment with? It would be great to see if this problem is replicable on FreeBSD. If so, I would suggest that a PR needs to be raised against FDISK. For anyone in the distant future who perhaps has trouble with their MBR and/or partitions I've found a stack of great literature on the web I'd be more than happy to post up. Also, tools that you might be interested in in order to investigate things are: - dskprobe.exe (WinNT / XP Support Tool for hex viewing disk) - dd (Data [File] dumping tool in Linux / BSD) - hd (Pretty print tool -- used with dd it apparently gets similar results to Dskprobe.exe) - gpart (Partition search and retrieval tool -- not yet tried myself) - part.exe (Ranish Partition Manager tool -- runs under DOS) They would be the main ones thus far. Anyone know of anything else I should be checking out? As it is, now that I am armed to the teeth, I hope to find out how much damage my USB HDD suffered, and then hopefully patch up the MBR and/or Logical Drives I lost. Keep you all posted. Cheers, Jarrod. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Help with lost MBR on USB HDD
Message: 26 Date: Sun, 05 Mar 2006 13:46:30 -0500 From: Gerard Seibert [EMAIL PROTECTED] Subject: Re: Help with lost MBR on USB HDD To: freebsd-questions@freebsd.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=UTF-8 I know you do not want to hear this, but why on earth did you attempt to mess with the HD without a full backup in place first? I am not sure if you can recover the lost data. If not, this would be a good time to wipe the disk clean and partition it to your liking. I believe that you will have to install Windows before installing FreeBSD. Good Luck! -- Gerard I accidentally posted a reply to this which didn't appear in the thread. Check it out on Mar 07 in freebsd-questions. (How do I ensure my replies get threaded btw?) Please see that one for a few details on what I did to find a solution to the problem. You'll all be happy to know ;) that everything turned out ok in the end! I got my disks back and my MP3s. It turned out that it was just a single partition entry in the MBR that had been erased. Once I calculated what it should have been and restored it things were good to go. The handy tools were: - dd - chexedit (available in /port/editors/chexedit ) Plus I read a ton of stuff on the internet, the bookmarks for which I will be happy to share with anyone who needs them. Cheers, Jarrod. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Help with lost MBR on USB HDD
For anyone who might be interested... Jarrod O'Flaherty wrote: And last but not least, I really hope someone can tell me how I can salvage my MBR other 3 partitions. If that is not possible, then perhaps you can point me in the direction of a tool which will salvage the files on the lost slices? There's not heaps of data there, only around 20 GB or so across all three. But if I can, I'd really like to get it back. I'm hoping NTFS is robust enough to allow salvaging like this? Any and all help GREATLY appreciated!! Thankyou, Jarrod. I know you do not want to hear this, but why on earth did you attempt to mess with the HD without a full backup in place first? I am not sure if you can recover the lost data. If not, this would be a good time to wipe the disk clean and partition it to your liking. I believe that you will have to install Windows before installing FreeBSD. Good Luck! -- Gerard I've done a lot of reading the last couple of days into the MBR and the like. Have to say it's a tad tough going, but quite a bit of fun at the same time. ;) Gerard, yes, this would be a good opportunity to wipe it and start again. If only it wasn't for those MP3s. ;) For those who couldn't read my last email because it was rather a bit too long, the short of it is that FDISK fried my USB HDD's MBR when I asked it to change a partition type's from NTFS to FreeBSD. Why did this happen? Does anyone have a large (blank!) USB HDD that they could experiment with? It would be great to see if this problem is replicable on FreeBSD. If so, I would suggest that a PR needs to be raised against FDISK. For anyone in the distant future who perhaps has trouble with their MBR and/or partitions I've found a stack of great literature on the web I'd be more than happy to post up. Also, tools that you might be interested in in order to investigate things are: - dskprobe.exe (WinNT / XP Support Tool for hex viewing disk) - dd (Data [File] dumping tool in Linux / BSD) - hd (Pretty print tool -- used with dd it apparently gets similar results to Dskprobe.exe) - gpart (Partition search and retrieval tool -- not yet tried myself) - part.exe (Ranish Partition Manager tool -- runs under DOS) They would be the main ones thus far. Anyone know of anything else I should be checking out? As it is, now that I am armed to the teeth, I hope to find out how much damage my USB HDD suffered, and then hopefully patch up the MBR and/or Logical Drives I lost. Keep you all posted. Cheers, Jarrod. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Help with lost MBR on USB HDD
Hi All, I have a dual boot system going with WinXP and FreeBSD on my laptop. Just before I installed FreeBSD I bought a USB HDD to plug in so I could transfer some files off my laptop's internal HDD and make space for it. Alas, even with doing that I could only get a measly 7 GB free, which I used up pretty quickly building the JRE for OpenOffice. When I got my USB HDD I split it into 4 x 60GB slices (partitions), changing one of them from the default NTFS to FAT32, so I could share it with FreeBSD. While the sharing was ok, unfortunately FAT32 doesn't support symlinks and this led to errors when I tried to use that slice for building stuff in ports. I decided I needed a native UFS2 slice instead of a FAT32 one and set to work. Firstly, I have Acronis PartitionExpert Personal and according to that, all the slices apparently existed (past tense!) in a single logical partition. I used the program to change my *THIRD* slice (between 120GB and 180GB) from existing in the logical partition to being a physical partition in its own right. Was this a bad move, not being at the end of the disk? Acronis never complained and it all seemed to work ok. I then proceeded to try to change its type from 7 (NTFS) to 165 (FreeBSD). Acronis said it needed to reboot to do this, you know that odd, special WinXP (safe?) mode? When it did so though it said my drive was not present. Was this because the USB drivers aren't loaded in that odd WinXP pseudo-DOS blocky character mode? Or was this because I had my USB drive on auto power-off and it took too long to windup? Anyway, whichever it may be, PartitionExpert said that it couldn't find the drive so it couldn't change the type. I then thought well surely if I can't do it under XP then I can do this under FreeBSD. I looked at the MBR under fdisk and it had 2 entries, one for the logical partition and one for the new physical partition I had setup with PartExp. I must admit I was more comfortable with the fdisk in sysinstall, since I had used that when installing FreeBSD, so I changed to that one. The display seemed a little odd because it had about 8 entries, my four 60 GB slices, plus four other very small slices between each 60GB slice. A couple were 63 in size, but the one just above the partition I wanted to change (da0s2) was 7 in size. I wrote down the lines around the partition I wanted to change, but didn't write the whole table out as it was rather long winded. Aerrr, bummer! Anyway, I changed the Type from 7 to 165. And that's ALL I did. I then Wrote the table out and exited. I went into the labelling tool (also in sysinstall) and set the slice as one big FreeBSD partition. The labelling tool automatically newfs'ed it for me, and things were good to go. Next I exited sysinstall and mounted my partition under FreeBSD. Everything was great. Past tense. When I next booted into WinXP a few minutes later, all my NTFS drives were gone. A quick look under Acronis told me only my FreeBSD slice remained. Ummm, so what had gone wrong? Any ideas? I went back into FreeBSD and had a look at the MBR under fdisk (the command line version this time) and now there was no entry 1, just an entry 2, pointing to the FreeBSD slice. So I had lost my 3 other slices, from 0 - 60 GB (NTFS), 60 - 120 GB (NTFS), and 180 GB - end_of_disk (FAT32). Can anyone please tell me what happened when I ran sysinstall's fdisk? Can anyone also perhaps tell me where the slice (partition) info is kept for a logical partition? Since the MBR only had 1 entry for the other 3 partitions their info is obviously not stored there. Where and how is it stored? And last but not least, I really hope someone can tell me how I can salvage my MBR other 3 partitions. If that is not possible, then perhaps you can point me in the direction of a tool which will salvage the files on the lost slices? There's not heaps of data there, only around 20 GB or so across all three. But if I can, I'd really like to get it back. I'm hoping NTFS is robust enough to allow salvaging like this? Any and all help GREATLY appreciated!! Thankyou, Jarrod. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]