04-9-2012, 08:49 PM | #21 |
FFR Veteran
|
Re: Hard drive crashed -- need advice
I'm not sure there is an easy way to do that. If you knew exactly what sector it was, in theory you could also use dd to zero just that individual sector. The problem is how do you find exactly which sector you need to zero?
It still wouldn't fix your Windows problem though (but may allow that bad sector to be remapped successfully, since it'd count as a write operation). If you knew what sector you'd do something like (after becoming superuser, assuming sda is your drive, and assuming 512 bytes per sector) dd if=/dev/zero of=/dev/sda seek=<numberofsectorstoskip> bs=512 count=1 Replace <numberofsectorstoskip> with some actual appropriate number (that's where finding the exact sector number comes in play which I don't know off the top of my head how you'd do that)
__________________
[SIGPIC][/SIGPIC] Last edited by UserNameGoesHere; 04-9-2012 at 09:03 PM.. |
04-9-2012, 08:56 PM | #22 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
Times I wish I were a Linux nerd
|
04-9-2012, 09:01 PM | #23 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
Tried sudo fsck /dev/sda
"Bad magic number in super-block while trying to open /dev/sda The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running an e2fsck with an alternate superblock: e2fsck -b 8193 <device>" To which I try sudo e2fsck -b 8193 /dev/sda and get the exact same message again. |
04-9-2012, 09:12 PM | #24 |
FFR Veteran
|
Re: Hard drive crashed -- need advice
Try running fsck.ntfs or fsck.ntfs-3g (which fido123 had you install) on /dev/sda1 /dev/sda2 and /dev/sda3 as appropriate.
Because it's apparently trying to check it as if it's an Ext2 filesystem which it's not -- it's NTFS. But also you're running it with /dev/sda (your hard drive) as the argument when you want /dev/sda1 /dev/sda2 or /dev/sda3 (the partitions, which are NTFS) as the argument. Hope it helps. And the e2fsck stuff is for Ext2 and Ext3 (and Ext4) filesystems only. Windows uses FAT, NTFS, exFAT filesystems (but typically is installed in NTFS). Ext2 and company are typically Linux filesystems. So for example sudo fsck.ntfs /dev/sda1 sudo fsck.ntfs /dev/sda2 sudo fsck.ntfs /dev/sda3
__________________
[SIGPIC][/SIGPIC] Last edited by UserNameGoesHere; 04-9-2012 at 09:15 PM.. |
04-9-2012, 09:16 PM | #25 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
Tried using MagicParted or whatever it's called from an Ultimate Boot CD I just burned and attempted to use TestDisk to repair the boot/MFT of the partitions. Looks like it's partition 2 that's being a bitch (the boot partition) -- it throws a tantrum when I try to Repair MFT on that partition.
EDIT: OK, I'll try that out next. Should I do it from the liveCD or the native Wubi installation? |
04-9-2012, 09:19 PM | #26 |
FFR Veteran
|
Re: Hard drive crashed -- need advice
From the LiveCD definitely
-edit- Also Linux isn't 100% compatible with NTFS .. which is why this kind of area is really gray/iffy. It can read it fine but manipulating it isn't exactly 100%. You may be able to get by with just overwriting the Windows 7 boot partition with zeros, then boot off the Windows 7 DVD, and repair the boot partition from there. Make backups first though! because yeah. Might lose stuff if this doesn't work.
__________________
[SIGPIC][/SIGPIC] Last edited by UserNameGoesHere; 04-9-2012 at 09:23 PM.. |
04-9-2012, 09:27 PM | #27 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
For whatever reason it now won't let me use fsck.ntfs since I am on the liveCD... jesus christ
|
04-9-2012, 09:32 PM | #28 | |
FFR Veteran
|
Re: Hard drive crashed -- need advice
Quote:
Again, this probably won't fix it??? Go ahead and back up any important data you can still access NOW. Seriously. Zero just the boot partition. Try the Windows 7 DVD. Try to repair the installation from there. It just may work. (Then again it may not)
__________________
[SIGPIC][/SIGPIC] Last edited by UserNameGoesHere; 04-9-2012 at 09:33 PM.. Reason: spelling derps lol |
|
04-9-2012, 09:43 PM | #29 | |
Private Messages, please.
|
Re: Hard drive crashed -- need advice
Suicide.
-o24
__________________
Quote:
|
|
04-9-2012, 09:50 PM | #30 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
The windows 7 CD is useless unless I can fix this thing externally -- it literally doesn't even load the W7 CD into any menus I can use. It just hangs.
There isn't anything massively important on this laptop but I'd prefer to not have to redownload all my shit again |
04-9-2012, 10:02 PM | #31 |
FFR Veteran
|
Re: Hard drive crashed -- need advice
Your other option:
Buy a new internal hard drive and an external hard drive. Save the data you want to save onto the external hard drive -- you can access it from within Linux to save it. Remove your internal hard drive and replace with newer, better one. Install Windows 7 on that. Copy over data from external hard drive back to your new Windows 7 installation. Programs need to be reinstalled but data files can be reused. Have fun with hammer and bad hard drive. |
04-9-2012, 10:12 PM | #32 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
Now the boot manager is borked. Windows is such shit, but so is Ubuntu
|
04-9-2012, 10:14 PM | #33 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
**** it I will just buy another laptop. This is ridiculous.
|
04-9-2012, 10:30 PM | #34 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
I love how every single site online tells me that everything is solvable with the Windows 7 CD... and that doesn't even boot for me. Not even safe mode... nothing. Seriously stupid.
|
04-9-2012, 10:33 PM | #35 |
FFR Player
Join Date: Sep 2005
Age: 32
Posts: 4,245
|
Re: Hard drive crashed -- need advice
Go on the live cd and run:
Code:
sudo -i apt-get install ntfsfix ln -s /usr/bin/ntfsfix /usr/sbin/fsck.ntfs ln -s /usr/bin/ntfsfix /usr/sbin/fsck.ntfs-3g fsck.ntfs /dev/sda1 && echo "SDA1" && fsck.ntfs /dev/sda2 && echo "SDA2" && sck.ntfs /dev/sda3 && echo "DONE" EDIT: You could probably just repartition your disk with fdisk to easily avoid the bad sector if you know exactly which one it is. That dd command UserNameGoesHere posted could quite probably be overwriting critical system data, although my solution requires a whole reinstall unless you have an external hardrive we could image your partition onto. Last edited by fido123; 04-9-2012 at 10:39 PM.. |
04-9-2012, 10:36 PM | #36 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
It *should* be 100% fixable but... for whatever reason, everything I'm doing isn't fixing it.
I'll try your suggestion and edit this post shortly. |
04-9-2012, 10:40 PM | #37 |
FFR Player
Join Date: Sep 2005
Age: 32
Posts: 4,245
|
Re: Hard drive crashed -- need advice
Found an even better solution: http://ubuntuforums.org/showthread.php?t=1244058
If a command isn't working at first cause it's not found or something always try 'sudo apt-get install <package name>'. I have a good feeling you'll have to run: Code:
sudo apt-get install ntfsresize EDIT: Also in that thread the OP is already root. To obtain this use 'sudo -i' as mentioned before. EDIT2: It seem's he's using a bootable CD called part-magic. It probably doesn't matter at all if you just install anything it's using. All it is, is a liveCD that has a bunch of 'apt-get's ran on it already to put it simply. EDIT3: Also replace 'hda' with 'sda' from that guide. hda = PATA/IDE drives while sda = SATA. Last edited by fido123; 04-9-2012 at 10:47 PM.. |
04-9-2012, 10:41 PM | #38 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
It's not letting me install ntfsfix... "Unable to locate package ntfsfix" after doing "apt-get install ntfsfix"
|
04-9-2012, 10:42 PM | #39 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
That page doesn't apply to me because the OP is able to run CHKDSK whereas I can't do shit
|
04-9-2012, 10:43 PM | #40 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Hard drive crashed -- need advice
I don't know where the bad sector is either or how to find it
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|