| 1. |
Solve : will not boot - stumped? |
|
Answer» i can not boot from my hard disk. Witherspoon source codeMy metaphor has caused confusion. Witherspoon stars in the move 'Source Code.' Sorry, did not want this to become a movie review. Great movie. If you like far out. Has a cleaver ending. What I meant was that it is hard to know what a windows program really does unless you are really deep into it with extreme tools. Some, eave all, BIOS calls can be intercepted by the OS. To workaround this, software engineers have things that hackers only dream about. Don't be surprised that things do not work as you might expect down at the very low machine level code that could potentially alter the OS. However, you now have the OS working normally? yes, after i ran fixboot, it came right back. Quote from: alexlauf on October 31, 2011, 07:13:23 PM yes, after i ran fixboot, it came right back.Do you mean fixbnoot worked and later you did a reboot and windows 2000 did not come up? Did you get a specific error message or just a black screen? Have you used the WD HDD diagnostic program? http://support.wdc.com/product/download.asp?groupid=606 Quote from: alexlauf on October 31, 2011, 02:29:40 PM i was stalled out because i want scrolling, as 32 bit scrollbars and 64 bit sized hard disks don't mix. instead of setting the scrollbar min/max and value properties directly to the hard disk size, use a scaled value, so that it fits within the scroll bar range. Also, regarding your writing to the boot sector, remember that while reads from a physical device work in a buffered manner, usually you'll need to use FILE_FLAG_NO_BUFFERING in the call to CreateFile() in order to be able to properly write the sector data to disk. Also, when you are doing direct disk I/O, you have to seek, read, and write in multiples of the sector size of the device, and on sector boundaries. you'll need to be using DeviceIoControl() with IOCTL_DISK_GET_DRIVE_GEOMETRY to get the bytes per sector, sectors per track, number of sectors, etc. so you can compute the size of the buffer you need to use. i thought it was clear from the various postings, but, here it is the full sequence. 1. was working with my home brew program to edit hard disks. i used it on my boot sector. it seemed ok. 2. later when i re-booted ( quite a while, this thing runs for days sometimes ), it would not come up. got to the verifying dmi pool message, and it stopped there. no extra beeps or messages. 3. tried to figure out problem, including things like swapping disks, changing bios settings. one thing i tried was i modified the boot to display a message if it loaded, not realizing the disk editor was probably the cause of the problem ( i had forgotten using it before the crash ). 4. no message resulted from above so i concluded it was not loading the boot sector. at this point i was stumped. did not see any point in trying to fix the boot sector, since the data itself was ok. i then tried this forum for help. 5. was told to try recovery console fixmbr and fixboot. 6. my initial thought was phooey! since the data was ok, what was the point of trying to fix it ? but i got desperate enough to try it. 7. i ran fixboot. then i rebooted. 8. that fixed the machine. it booted after that. 9. my conclusion is i had done it to myself, and my program does something to the sector / disk that i have not currently figured out. about the program itself; 1. "instead of setting the scrollbar min/max ... use a scaled value" - i thought of that, but i do want it to be 1-1, 1 byte to 1 click. otherwise, just mapping 1 scroll unit to 1 sector, 512 / sector, i could get to either 1 or 2 TB sizes ( i forget if scrollbars are signed or unsigned right now ). that would probably be enough, if that was what i wanted. 2. as for seek, multiples of sector size, boundrys, , devicei/o, etc, i did all that, with the exception of the "FILE_FLAG_NO_BUFFERING" flag. i assumed it flushed everything on closing. other than the central mystery involving the boot sector, it seems to do ok. might not be a bad idea to put it in, if i keep using this method. but unless i figure out what is going on with writing the boot sector, i might have to find another way to do it.WOW! You are a BRAVE soul! You have already verified and tested hour code on other drives? Specifically, have you tried much smaller, much oder drives with more 'conventional' drive geometry? Part of the problem is the definition of hard drive sector location is still haunted by the legacy definitions that go back to IBM's old ideas about how you find a lotion on the hard drive. I think I used to know what that was, but strains my brain trying to remember how it goes. EDIT: The link below is just none of many, many references to the headache of sector translation. The problem never went away. Likely you are aware of it. http://www.dewassoc.com/kbase/hard_drives/resolving_drive_barriers.htm The 512 byte sector no longer exists. Not on large hard drives. http://en.wikipedia.org/wiki/Disk_sectorit has been tried on 3 drives so far, an 80 GB ( the one i crashed ), a 500 GB, and a 340 GB that i am trying to diagnose a file system problem with. i have no plans for anyone else to use it, so i don't need to be really rigorous with the testing. basically it works, until it fails, then i fix it. if i stay with sector boundrys and sector sizes ( the one reported to me by DeviceIoControl ) it seems to work ok, other than that #$#%^ boot sector. i suspect that it would work on any drive the OS can handle. i just seek to ( sector size ) * ( assumed sector number ), and it finds it. none of that stuff with no sector 0, which track is it, or any of that. using createfile and treating it like just another file, a lot of that sector location junk gets handled by the OS. it really doesn't matter what real sector i am in, as long as the same call to seek can put it on the same spot consistantly. the drive might translate sectors around, but if it is transparent to the OS, i don't really care what it is doing either. after all, the whole point of an OS is to make it easier to work with the thing, not to send our money to microsoft. let windows do all the dirty work. i'll worry about cases where windows can't deal with it, when it happens. earlier on, i wanted absolute control over which sector, track, head i was at, but the point of this thing is drive exploration at the level the OS sees, so i went with the easiest course. later, if i get into any deep drive work, where it matters exactly what track, sector, head i am at, i might tackle that again. i have heard 512 no longer exists, but if the OS is happy thinking it is still 512, i can work with it. i go with whatever it thinks it is using. i'm not so much brave, as old. i used to write low level format assembly programs for my trash-80. and in those days low level was LOW LEVEL. if i could overcome my AADD long enough to learn write a kernal mode program, i'd be working with the drive controler for this stuff, instead of having windows do the work. . of course, if i could do that, i'd get myself up to date, and get a good computer job somewhere too. by the way, how does this forum assign levels ? i could have sworn i picked something higher than noobie ? my knowledge may be scattered and piecemeal, but i've been around the track a few times. or was that reflecting experience with this forum ? |
|