Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
To sum it up, my old hard drive crashed and I'd been trying to recover the data using Knoppix. My computer had some problems booting it with my old hard drive for various reasons, but that doesn't matter now. I decided I'd have to to buy a USB Hard Drive enclosure to put my old drive in and try it that way.
Today I received my USB Hard Drive Enclosure. I tried it and it detected the disk, yet when mounting it came up with this:
Quote:
"WARNING: Dirty volume mount was forced by the "force" mount option"
I clicked ok and started looking around my hard drive and everything was there. I copied some files from my old hard drive to my new one, and they transferred fine. They work perfectly too, they're not corrupted. So I've got hope that my disk isn't really broken, it's just.. a little messed up haha.
My main problem is how erratic it is. If I try transferring a folder with a lot of files in, it comes up with "Stalled". I got the same "Stalled" message when I tried entering a folder that had around 400 folders and about 40gb of data in. After this stalling happens it's very hard to get the drive to come up again. I usually click it and then have to wait a couple of minutes for it to come up. Often when it does come up it won't let me transfer files at all. I usually have to restart to get it working again, which is really annoying.
I ran a process that I can't remember, maybe Testdisk? And this came up:
Quote:
The number of cylinders for this disk is set to 4462 (Note that this isn't my amount of cylinders, I copied the error off of Google, as I forgot it and didn't write it down initially).
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
I thought it might be significant.
That's the jist of the problems, can anyone offer any advice?
I'd say copy all the data you can before starting to play with partition structures. More than 1024 cylinders will not necessarily cause you a problem and I doubt it is responsible for your current issues.
You may have more luck with cli rather than gui (if you have been using a gui) ... you should be able to
Code:
ls
the root of the the hard drive and then
Code:
cp -a
each folder one at a time. Run
Code:
man cp
and make sure you don't get source and destination folders mixed up!
Once you have data copied to another drive then you can play with partition structures etc. We have not seen the output of
Code:
fdisk -l
yet so we don't know partition structure ... but backup data then fix the problem is usually a good plan
If you need further help on cp after you read the man page ... post the output of
OK ... first run fdisk -l to check what partitions are on each drive ... example output ...
Code:
bash-3.2# fdisk -l
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x199c199b
Device Boot Start End Blocks Id System
/dev/sda1 * 1 894 7181023+ 27 Unknown
/dev/sda2 895 2807 15366172+ 7 HPFS/NTFS
/dev/sda3 4031 14593 84847297+ 5 Extended
/dev/sda4 2808 4030 9823747+ 83 Linux
/dev/sda5 4031 4158 1028128+ 82 Linux swap / Solaris
/dev/sda6 4159 6078 15422368+ 83 Linux
/dev/sda7 6079 7353 10241406 83 Linux
/dev/sda8 7354 8182 6658911 83 Linux
/dev/sda9 8183 9712 12289693+ 83 Linux
/dev/sda10 9713 11244 12305758+ 83 Linux
/dev/sda11 11245 12006 6120733+ 83 Linux
/dev/sda12 12007 14593 20780046 83 Linux
Partition table entries are not in disk order
bash-3.2#
Then run mount to check where the partitions are mounted to ... example output ...
Code:
bash-3.2# mount
/dev/sda10 on / type ext3 (rw)
none on /dev type ramfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw,busgid=108,busmode=0775,devgid=108,devmode=0664)
bash-3.2#
Lets say I want to mount sda6 to /fred-will-do, first create folder /fred-will-do using
Code:
mkdir /fred-will-do
next mount sda6 to fred-will-do using
Code:
mount /dev/sda6 /fred-will-do
now if I run mount again I get
Code:
bash-3.2# mount
/dev/sda10 on / type ext3 (rw)
none on /dev type ramfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw,busgid=108,busmode=0775,devgid=108,devmode=0664)
/dev/sda6 on /fred-will-do type ext3 (rw)
bash-3.2#
I can copy info from /testfolder1 on sda10 to sda6 using
Code:
cp -a /testfolder1 /fred-will-do
then list contents in fred-will-do gives ...
Code:
bash-3.2# ls /fred-will-do
bin etc lost+found opt sbin sys usr
boot home media proc srv testfolder1 var
dev lib mnt root success tmp windows
bash-3.2#
Hopefully you get the idea from this ...
If your still unsure post fdisk -l and mount outputs.
Disk /dev/sda1: 320.0 GB, 320062063104 bytes
255 heads, 63 sectors/track, 38911 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
This doesn't look like a partition table
Probably you selected the wrong device.
Device Boot Start End Blocks Id System
/dev/sda1p1 ? 13578 119522 850995205 72 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda1p2 ? 45382 79243 271987362 74 Unknown
Partition 2 does not end on cylinder boundary.
/dev/sda1p3 ? 10499 10499 0 65 Novell Netware 386
Partition 3 does not end on cylinder boundary.
/dev/sda1p4 167628 167631 25817+ 0 Empty
Partition 4 does not end on cylinder boundary.
Partition table entries are not in disk order
Then I ran mount:
Quote:
mount /dev/sda1
Failed to mount '/dev/sda1': Operation not supported
Mount is denied because NTFS is unclean. Choose one of these actio ns:
Boot Windows and shutdown it cleanly, or if you have a removabl e
device then click the 'Safely Remove Hardware' icon in the Wind ows
taskbar notification area before disconnecting it.
Or
Run 'ntfsfix' on Linux unless you have Vista, then mount NTFS w ith
the 'force' option read-write, or with the 'ro' option read-onl y.
Or
Mount the NTFS volume with the 'ro' option in read-only mode.
So I tried doing the read only option and it said:
Quote:
mount ro /dev/sda1
mount: only root can do that
Same with the force option:
Quote:
mount force /dev/sda1
mount: only root can do that
You should not be adding /dev/sda1 to the commands ... just do
Code:
fdisk -l
mount
and post the output. The first will list partition structure for all disks and the second will show if any partitions are mounted how they are mounted (read/write or read only etc) and where they are mounted to (/media/sda1 or /media/disk1 etc).
knoppix@Knoppix:~$ fdisk -l
knoppix@Knoppix:~$ mount
/dev/root on / type ext2 (rw)
/ramdisk on /ramdisk type tmpfs (rw,size=1659152k,mode=755)
/UNIONFS on /UNIONFS type aufs (rw,br:/ramdisk:/KNOPPIX)
/dev/hde on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/proc/bus/usb on /proc/bus/usb type usbfs (rw,devmode=0666)
/dev/pts on /dev/pts type devpts (rw)
/dev/hda1 on /media/hda1 type fuseblk (ro,nosuid,nodev,noatime,allow_other,blksize=4096)
/dev/sda1 on /media/sda1 type fuseblk (ro,nosuid,nodev,noatime,allow_other,blksize=4096) p
fdisk -l on it's own didn't seem to do anything. And mount looks wrong too?
fdisk -l on it's own didn't seem to do anything. And mount looks wrong too?
You need root rights ... try
Code:
sudo fdisk -l
From the output of mount ...
Code:
/dev/hda1 on /media/hda1 type fuseblk (ro,nosuid,nodev,noatime,allow_other,blksize=4096)
/dev/sda1 on /media/sda1 type fuseblk (ro,nosuid,nodev,noatime,allow_other,blksize=4096)
You have sda1 mounted to /media/sda1 and hda1 mounted to /media/hda1. You can list the contents using ls ...
Code:
ls /media/sda1
ls /media/hda1
Both partitions are mounted read only ... indicated by the ro in the mount output.
Disk /dev/hda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 121600 976751968+ 7 HPFS/NTFS
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 38912 312560608+ 7 HPFS/NTFS
After that I tried doing what you mentioned a couple of posts above:
Quote:
knoppix@Knoppix:~$ sudo mkdir /files2
knoppix@Knoppix:~$ sudo mount /dev/hda1 /files2
knoppix@Knoppix:~$ sudo mount
/dev/root on / type ext2 (rw)
/ramdisk on /ramdisk type tmpfs (rw,size=1659152k,mode=755)
/UNIONFS on /UNIONFS type aufs (rw,br:/ramdisk:/KNOPPIX)
/dev/hde on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/proc/bus/usb on /proc/bus/usb type usbfs (rw,devmode=0666)
/dev/pts on /dev/pts type devpts (rw)
/dev/sda1 on /media/sda1 type fuseblk (ro,nosuid,nodev,noatime,allow_other,blksize=4096)
/dev/hda1 on /media/hda1 type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
/dev/hda1 on /files2 type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
It worked, but when I tried the next part I'm not sure what it did:
Quote:
knoppix@Knoppix:~$ cp -a /media/sda1/Albums /files2
ls /files2
blah
what
Then after a little while it whirred into life and the knoppix@Knoppix thing came back:
Quote:
knoppix@Knoppix:~$ ls /files2
^ That command just listed the contents of my hda1 drive. I guess I'm still doing something wrong, but I'm nearly there.
Looks like your nearly there, just a few comments that should help ...
1. sudo gains root rights for the command you are executing ... you need this for fdisk, mounting file systems and you may also need it when using cp ... but try it without first. More info on sudo given here.
2. You have ntfs partitions you want to write to so you need to make sure you are using the ntfs-3g driver for that rather than using mount (which may use kernel ntfs feature). Example mount for ntfs-3g
Code:
sudo ntfs-3g /dev/hda1 /files2
3. If you find using cp and ls do not work as a regular user then use sudo at the beginning of each command ... but be very carful what you type. If you can check what you are trying to do as a regular user first in the user home area. I quite often just type the command I want ... hit return and check I put things in the way I want then use the up arrow key to bring back the command and add sudo at the beginning
4. I usually unmount the partition before remounting so in your case this means
5. Example I want to copy information from /home/arch32/jonathan-user/Desktop to a folder I have made /home/arch32/jonathan-user/Desktop-copy1. To do this I create the folder
Code:
mkdir Desktop-copy1
then copy the information
Code:
cp -a /home/arch32/jonathan-user/Desktop /home/arch32/jonathan-user/Desktop-copy1
and list the folder contents after
Code:
[jonathan-user@desktop-pc ~]$ ls -R Desktop-copy1
Desktop-copy1:
Desktop
Desktop-copy1/Desktop:
Archive to DVD - read-only.desktop dosbox instructions.desktop
Home.desktop firefox.desktop
Jonathan's stuff.desktop hplip.desktop
KMail.desktop kscd.desktop
System admin notes - Arch linux~.desktop mplayer.desktop
System.desktop trash.desktop
Thunar.desktop
[jonathan-user@desktop-pc ~]$
The cp -a is required to copy the folder and contents and ls -R is required to list the folder and sub folder contents ... hope this helps
Open Source Security Myths Dispelled Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization subscribe
InformationWeek InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology. subscribe