Hardware :: Scan And Fix Bad Sectors On Hard Disk Without Damaging Data?

Dec 19, 2010

How to scan and fix Bad Sectors on Hard Disk without damaging data?

View 5 Replies


ADVERTISEMENT

Ubuntu :: Code To Access Hard Disk Sectors (LoopBack Device)

Jan 26, 2011

I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it has the following configuration.

Code: $> sudo fdisk -l /dev/loop0
Disk /dev/loop0: 10 MB, 10977280 bytes
255 heads, 63 sectors/track, 1 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/loop0 doesn't contain a valid partition table Now what I want to do is develop a c++ program to read & write files to this loop back device,which I'm using to simulate an actual hard disk,at the blocks & sectors level. So far I've come up with the following code. But I'm still unable to read files from the hard disk one block at a time.

Code: #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char block[512]; int length=0;
cout<<"Implementation of the File Handler Read Method..."<<endl;
FILE *f = fopen("/dev/loop0", "r");
if(f == NULL) {
cout<<"Error In Opening the HardDisk File Retuning Error..."<<endl; return -1; }
//Read One Block of Data to Buffer length = fread(block, 1, sizeof(block), f);
/* Do something with the data */ cout<<"Length : "<<length<<endl;
return 0; }

When I run this Program All what I get is the message for NULL. "Error In Opening the HardDisk File Retuning Error...". So I could open the loopback device as a file an access it at the sectors & block level.

View 1 Replies View Related

General :: Gnome Disk Utility Warned That Hard Drive Had Numerous Bad Sectors / Fix It?

Feb 21, 2010

I recently tried Fedora on my laptop (previously Debian; I was bored one day) and gnome-disk-utility (palimpsest) warned me that my hard drive had numerous bad sectors. I re-installed Debian to find that this software was installed before so why had it not warned me?

When I load the disk utility, it says SMART is not available. I've got smartmontools installed, I can run a self-test with smartctl but I don't think this shows bad sectors. I've tried starting smartd on startup but the disk utility never changes from "SMART is not available". It is possible for it to work with this hardware as it works in Fedora on this laptop; any ideas?

View 3 Replies View Related

Ubuntu :: Fsck Trying To Scan Recently Removed Hard Disk On Boot?

Nov 8, 2010

I have ran into a bit of a problem. my server(10.10) is hosting a website with no problems whatsoever. I decided to install an extra hard drive, and format. i did both, and turned off my server after some more configuration. After a while, I decided that the new hard drive was a little loud for my liking, so I removed it. I had not put any files on it. I rebooted and saw a message that said this:Quote:fsck from util-linux-ng 2.17.2/dev/sda1: clean, 101202/2351104 files, 1516082/9393920 blocksI think that when I turned it off, it was formatting. How do I stop this from halting the boot? I can get by it by pressing the b or a key.

View 2 Replies View Related

Server :: Copy Of IBM Server Hard Disk Data To Another USB External Hard Disk?

Sep 1, 2009

Copy of IBM Server hard disk data to Another USB External Hard disk?

View 2 Replies View Related

Fedora :: Hard Disk Data Form?

Jul 1, 2010

When we copy a sector to a file like using dd command, the data in the file is of which format? and of which type of conversion is nesessary to see the data in read able formate. i have tryed the ASCII conversion in dd command but still the data is in un-readable format. and also tell that if i access hard disk sector's data using c language program and copy data to a file then which type of conversion should i do ?

View 7 Replies View Related

Ubuntu :: Transferring Data From Hard Disk?

May 30, 2011

I was dual booting Ubuntu 8.10 and Windows Vista on a Acer Aspire 5920. My laptop went for service and the company said they will give me a fresh laptop instead of the one I am using now for they cannot set it right.

When I plugged in my hard disk through an external cable onto a windows machine it detected only the data present (which is almost negligible in my case) in the vista partition. I would like to transfer all the data I have from hard disk at least the one in the Ubuntu 8.10 to my new laptop on which I plan to run Ubuntu. Can someone guide me on how to go about doing it? Also is it possible to transfer all the installed softwares so that they start running in the new laptop without any extra effort?

View 9 Replies View Related

General :: Protect Hard Disk Data From A Live Cd?

Aug 9, 2010

Risk to native OS from Live CD?

when booted from linux live cd, all partitions of hard disk become accessible without any restriction. How to block this?

View 2 Replies View Related

General :: Compress And Backup Data In Hard Disk

Apr 30, 2011

My hard disk is failing and I amnot able to boot into the system! Currently I have logged into the system uing Live CD! Any way to compress and back up the data in my hard disk in an efficient way!

View 6 Replies View Related

Hardware :: Recovering Data From A Fried Hard Disk

Jul 16, 2010

I learned a couple of days ago why you should do regular backups. Left my laptop working for the day in hot weather. When I came back it had crashed. On reboot it no longer booted up. I could still access the BIOS and boot from alternative media but not from the hard drive. The laptop tried to access the hard disk for a couple of minutes (hard drive light was blinking) and then failed. I made an ubuntu live usb stick and am currently working from there, trying to access my hard drive so I could image my data on another disk before sending the laptop for repairs. All my data is on that disk including my passwords and the password for this site conveniently so I had to register a new account to post this thread.

The laptop is IBM Thinkpad X41. The hard drive is accessed during when boot options are presented, again when the live cd boots up and determines the hardware available and also when manually probing for hard disks using the script below. The hard disk however does not show up in dev. If I could get so far to get it there, I could use dd_rescue to image it away. My hope lies in that the drive still spins up and is accessed producing error messages, however indicating that the system still knows it exists. Excerpt from dmesg concerning the drive:

[Code].....

View 5 Replies View Related

General :: Mount 2nd Hard Disk Without Erasing Data?

Jan 26, 2010

Is it possible to mount a 2nd hard disk without erasing the data that is already on it? If so, what command must I enter. The system recognizes that the disk is there, I just can't access the data because it hasn't been mounted.

View 5 Replies View Related

General :: Retrieve Windows Data From Hard Disk

Sep 29, 2010

I have 2 hard disks and all together I created 6 partion in it.On primary I installed Windows XP and REST 5 partions were having data.From Second hard disk ,I copied all the first partion data to another partions and installed Red Hat 7.It took only 3 GB all togethr for Linux Distribution.Now I need to fetch my Windows data back.I logged from the Windows XP disk and I could see the second disk through disk managemnt .But it was showing "Unhelathy".But I will not be able to retrive the data.So can Anyone give soln for this.

View 2 Replies View Related

Fedora :: Hard Disk Data Recovery Of Ext2 And Ext3

Jul 1, 2010

I am student of MCS and working on final project. I am the user of windows xp. I am new in Linux. I am working on a project that titles "Hard disk data Recovery of ext2 and ext3 in linux". In windows, including dos.h and bios.h header files in program of c language I can send interrupt to bios and access most of the devices like parallel port, hard disks etc. But problem is that there is no bios.h and dos.h files in gcc. Now how can I access my hard drive using c program. How can I call int13h interrupt in linux or there is any other function in the linux to access the hard disk. In fact I want to access sectors of my hard disk using c language program. How can I do it?

View 2 Replies View Related

Ubuntu Installation :: Partition Second Hard Disk For Use As Backup Data

Sep 29, 2010

My primary drive is 250GB and has the root, home and var (I'd read it's good to put var on a separate partition for MythTV which I'm planning on doing) on separate partitions. I have a second 1TB drive that I'll be using to backup the 250GB drive and also host less critical data. I've created two partitions on this drive, one 250GB and the other covering the rest of the drive. I'd like to move the Videos directory out of Home on the 250GB onto the 1TB drive but can't find a definitive way of doing this. Should I just follow this guide for moving the home folder to a new partition? Next question is when performing a backup of the 250GB drive how do I make sure it's going to the 250GB partition on the 1TB drive? Can the different partitions be mounted separately?

View 2 Replies View Related

Ubuntu Servers :: Hard Disk Filling Up \ Mount /var/log/data To New HDD?

Mar 16, 2011

I have a directory /var/log/data its about 80 GB,It filling up quit rapidly.I don't have much space left in the system them So i will attaching another External HDD.My question is that i need to mount /var/log/data to new HDD.So i have old data and pulse new coming up.I don't want to copy data from /var/log/data then mount new HDD to /var/log/data you know what i am taking about is there a simple way like linking or any other.

View 4 Replies View Related

Red Hat / Fedora :: Retrieve Data From Hard Disk After Installation On The System?

Aug 17, 2009

I have never used Linux before and know nothing about it . But my cousin installed a Fedoro linux CD on my laptop which previously had Lotus symphony . Unfortunately my laptop had single partition and so Linux overrode the old OS ,ie lotus symphony .

I have some critical data on my hard disk but I have no clue how to take backup this data using Linux . I desparately need this data .

Could somebody let me know how I can access this data and take the backup ?

View 4 Replies View Related

General :: Hard Disk Data Transfer Accessing Error

Jun 28, 2010

I am using an embedded platform in which I have connected an external harddisk (/dev/sda). The SCSI driver is present and I am using the SG_IO interface for performing the SMART commands with the Hard Disk. (Unfortunately not all the HDIO ioclts are present. So I opted for the SG_IO ioctl). But the data transfer (reading/write data from/to sector) is not working with the SG_IO ioctls. So I searched for some other options. Later in one of the places, I found that we can actually mount the /dev/sda to some mount point in /mnt and then make a XFS file system (mkfs.xfs) of this.

And then we can create the directories and do file operations on this mounted directory. Here the simple read/write systems calls can be used for this. I was thinking about this implementation. But I am confused how I can map the actual LBA (Logical Block Address) to the device file offset. I mean if I want to write to the sector 5, there will be a LBA for it. So I can do lseek on my device and then write the data there. So how the mapping between LBA and device file offset can be calculated.

View 4 Replies View Related

Fedora :: 13 Windows 7 Dualboot And Hard Disk - Complete Loss Of All My Data

Oct 11, 2010

Last time I installed Ubuntu in a dualboot configuration with Win7 on one of my machines, my entire boot sector and Windows install got corrupted, resulting in a complete loss of all my data and requiring a fresh install of Windows.

I looked into this a bit after the fact, and it seemed to me it was due to conflicting hard disk geometry between Linux and Windows.

My question is, how likely is this to happen with Fedora? Is this because of Ubuntu? A bad install? Is there someway I can avoid this from happening when I install Fedora if it will happen?

View 1 Replies View Related

OpenSUSE Install :: Ubuntu In Dualboot Without Losing Any Data On Hard Disk?

Jul 2, 2010

How to install openSUSE with Ubuntu in dualboot? I have Ubuntu 10.04 and i want to install openSUSE 11.2 without losing any data on hard disk.

View 4 Replies View Related

Ubuntu :: 10GB Of Data Overwritten In NTFS Partition - Hard Disk Safe

Jul 22, 2011

So the first 10Gb of a 450GB NTFS partition have just accidently been written over with an Ext4 filesystem that spans the entire partition instead. all foolishness asside, what can be repaired. Now I know Ext4 likes to jot bits of meta-data down (inodes blocks) along the way, and this can be about 5% of drive capacity, that said, there's alot of small text files and stuff, coe files so forth that can surely be recovered

I've looked into magicrescue and testdisk, but they fall into the only two groups to exist:
1) Filesystem independent, that is search almost like a patern - well exactly like a pattern match, to find the header and footer of files.
2) Filesystem recovery tools, like, damaged bootsector, so forth

I need one, that will be able to extract files, Iunderstand this will be a hard task, but.... text files; surely that'll be easy, anyway. This is my backup drive, they''re both WD you see, anyway. This is important, given the coding is ASCII surely.

View 4 Replies View Related

Hardware :: Disk Has Many Bad Sectors (110)

Sep 7, 2010

I have some errors on my drive and I fear it may be faulty. However there are a few things I would like to try before replacing it through the manufacture or buying a new drive of my own seeing as this is a brand new computer.

Here is my computer and drive:
Acer 5251-1513 Laptop
Toshiba MK2565GSX
Running Fedora 13...now

Here is what is going on. Tried several version of Ubuntu 10.4 (studio, 64bit, 32 bit) and was having many errors during startup and having to press F to fix. Then I lost something with Gnome and the GUI would not function, and I did not know how to replace it. Tried a few other distros but could not get them to work (mostly on my part I am sure.) Then after some forum talk, thought it might just be Ubuntu unable to handle my drive. Now on Fedora 13 and a warning comes up every time I startup. "Disk has many bad sectors"

In the disk utility under the SMART Data it has 2 of the following warnings:
5- Reallocated Sector count..with a value of 72 sectors
197 Current Pending Sector count...with a value of 35 sectors
Total Bad Sectors 108.
The next day that went up to 110

I have used Fsck several times through a live CD, but the problem persists. Trying to understand bad blocks and how to write them to a file?

View 3 Replies View Related

CentOS 5 Hardware :: Hard Disk Crash / Data Recovery In RAID1 Webhosting Server

Feb 1, 2011

We have had a hardisk crash in our RAID1 webhosting server running CentOS5 and Plesk. We first realized something was wrong when our main site didn't load but showed MySQL errors. We then found out that the system was in read-only state. Something that also happened the day before yesterday, but we could fix with a FSCK. Then the system worked well til around 18 hours later when it crashed with the same sympoms. So, we rebooted the server and wanted to do a filesystem check again. But the HDD wouldnt even load. It was gone. Unfortunatelly it was not realized that the second disk in the system was also not working any more for some time now. Fortunatelly we had our main site backed up externally though. So we could re-install a fresh box and mounted the two drives to the system. We checked the harddisk. One is practically empty (the older one), the other has almost only files in 'lost + found' but these are all "numbered", no real filenames or so.

View 2 Replies View Related

Ubuntu :: How To Fix A Hard Drive With Bad Sectors

Jan 20, 2010

I recently got a bad virus that wouldnt let me reinstall Windows so I figured I would install Ubuntu and give it a go, but now it says my hard drive has "many bad sectors" a quick Google search shows many ways to fix this in Windows, but how do I do it in Ubuntu?Easily since Im just getting the hang of things.

View 8 Replies View Related

Fedora Hardware :: Added Second Disk - Bad Sectors?

Jun 19, 2010

I've just added a second disk to one of my computers. It is a 500GB SATA. It is the second drive according to the BIOS. Fedora calls it /dev/sdb. So far so good. This box is running Fedora 13 final. Never any problems until the addition of the new disk. Palimpsest says that this disk has a LOT of bad sectors. This disk is a storage drive. I want to address the problem but don't know what to do first. My thought is to rsync all the data to my external 250GB disk bedore I do anything else but I'm mot sure if I should just yet. Maybe I should run some diagnostics on the drive? If so, what? How about the tools Disk Utility offers? Should I use the Smart Utilities? What other Linux tools are available and are they reliable? Maybe I should install XP on the main disk and use Windows' disk tools? If I should lose all data it wouldn't be the end of the world but I'm not sure how "in sync" the 2 storage drives actually are.

View 10 Replies View Related

Software :: Determine USB Hard Drive Capacity In Sectors?

Mar 24, 2011

How would one determine the capacity in sectors or LBAs of a USB Hard Drive? If I know the USB device number, like from 'lsusb', is there someplace on the system to get other information about the drive? What I want to do is have a program go out and get this information just for the number of LBAs on the drive itself. Partition info doesn't matter for what I am doing.

View 2 Replies View Related

Ubuntu :: Hard Drive Sectors Lead To A Really Sluggish System?

Jul 26, 2011

My sister's laptop (toshiba satellite l550 running lucid) often runs really, really slow, even after a fresh install. Going through the gnome main menu, everything just lags by several seconds. Closing applications often takes a while, etc. I've run top and iostat to determine what the problem is and it seems to be IO-related. User processes and system processes don't take up more than a few percent, but the average load is usually over 2 even when I'm barely doing anything. Top shows that, whenever everything slows down, the 'wait' criterion is pretty high.

Now, I've also tried installing lucid to an external USB hard drive and that works fine. I'm currently running the S.M.A.R.T. diagnostic and so far I've got the attached screenshot to show. Only the criterion shown and the 'current pending sector count' are showing warnings.Any thoughts? Could the performance issue be related to the hard drive warning? I'm not planning to replace the hard drive just yet, because this laptop still has a two-year warranty.

View 8 Replies View Related

CentOS 5 Hardware :: Partitioning Hard Drives With 4K Sectors (WD20EARS)?

Jun 10, 2010

would anyone here happen have gotten one of these successfully up, running &, aligned on 5.5? i only want two partitions. one 2gig for swap and the rest mounted @ /. i've googled myself into complete and utter confusion.[Moderator edit: changed the title to something more informative

View 4 Replies View Related

General :: Cloning With The Dd Command - Source Being Copied Onto Bad Sectors On The Destination Disk?

Apr 17, 2011

To make a full backup I run a live Knoppix DVD and clone the computer's HDD to an external HDD using the dd command. Is there a possible problem with the source being copied onto bad sectors on the destination disk? If so is there a way to prevent this from happening? A typical dd command I use looks like: dd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror. Is this the recommended command for cloning to a disk of equal size?

View 1 Replies View Related

Hardware :: Master Hard Disk Error After Installing Ubuntu 8.10 / Hard Disk Died

Apr 8, 2009

after installing Ubuntu on one WD 500 GB hard disk and after making mistake and pasting wrong code into Terminal:my OTHER WD 500 GB hard disk that was also in the system (I guess it was "hd1") - died.The problem must be, I guess, I typed wrong code: "hd1,1" instead of "hd0,0".)500 GB (NTFS) of data was on that other (non-Ubuntu) hard disk, and now I can not access it anymore. While booting, system gives "Hard Disk Error" warning and stops.One again: I installed Ubuntu od one hard disk and at the end of instalation I pasted wrong code for GRUB, giving address of another hard disk. Now that other hard disk has error and will not work

View 3 Replies View Related

Ubuntu Installation :: Copy Hard Disk Have 10.04 And Ext4 To 1000 Hard Disk?

Sep 23, 2010

I want to copy hard disk have ubuntu 10.04 and ext4 to 1000 hard disk for new 1000

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved