NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

NetBSD/amd64 5.0.2 installer scribbled over my 2TB drive :(



I recently bought a 2TB hard drive (Western Digital WD2001FASS, 3,907,029,168 
sectors) to replace an older 250GB drive, and installed Windows 7 64-bit on it, 
leaving about 40GB at the end of the disk unallocated to any partition. The 
Windows installer created a 100MB hidden NTFS partition at the beginning of the 
disk (apparently it contains recovery tools or something) and 1.9+ GB NTFS main 
partition.

I then booted the NetBSD/amd64 5.0.2 CD and started to install NetBSD into the 
40GB at the end. Creating the NetBSD partition seemed to work fine (although I 
did notice that if I changed the unit size to sectors, it displayed negative 
numbers... sticking to megabytes or cylinders was fine though). The 
disklabelling seemed to go well too. I didn't let it install anything to the 
MBR, but did let it install the usual BIOS bootblocks (which I'm pretty sure 
goes in the volume/partition boot record). And it newfsed my new BSD partition 
and extracted the sets with no problems.

Everything seemed to go well until it was time to reboot... since I didn't 
install the bootselector MBR, I expected it to boot into Windows. However, I 
got the NetBSD boot prompt instead, but it wasn't able to actually boot the 
kernel (I forget the error, but I think the idea was that it couldn't find 
netbsd, or maybe it couldn't find the NetBSD partition).

So I booted a live CD and took a look at the drive, and saw that the MBR had 
been replaced with what I think is NetBSD VBR bootblock (i.e., /usr/mdec/boot), 
and the area where the MBR partitions are defined were all zero. I ran TestDisk 
to attempt to reconstruct the MBR partitions, and it found the 1.9+ GB NTFS 
partition. It also found the NetBSD partition, but thought it was an OpenBSD 
partition with some ridiculously-large size (I didn't count the digits, but I 
think it was on the order of 3000TB). It didn't find the 100MB hidden partition 
at the beginning, and neither did I (I looked in the vicinity of sector 63 for 
the NTFS magic number and didn't find anything).

I then booted the Windows 7 DVD and ran the recovery Command Prompt to do a 
CHKDSK of the 1.9GB NTFS partition. While it was mostly intact, it did find 
numerous errors and relinked hundreds of files and directories to the found.000 
directory, so the MBR wasn't the only casualty--I think newfs wrote outside its 
partition too.

Windows still wouldn't boot though, even after letting Windows attempt various 
repairs, so I gave up and reinstalled Windows... it's fairly likely that some 
of my data files were scribbled over too (I didn't actually install NetBSD 
immediately after installing Windows; I had been using Windows for a while 
before getting around to installing NetBSD... I have good backups though, so no 
worries about data loss :)

But the question is why NetBSD wrote outside its partition. I didn't pay too 
much attention to them at the time, but I remember seeing some reports on one 
of the mailing lists of success with large drives (>1TB? >2TB?), but I also 
remember hearing people having problems. Is what I experienced a known problem? 
Perhaps something having to do with the partition starting LBA being >=2^31? If 
so, is it fixed in -current or the netbsd-5 branch?

-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym%azeotrope.org@localhost |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 34 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++



Home | Main Index | Thread Index | Old Index