How do I mount my external USB drive from the LiveCD so I can get files off of my laptop?

5,595

Edit:Forcing a mount is not too dangerous, as long as you use read-only. We'll begin by(assuming your hard disk partition is /dev/sdb1, run

sudo blockdev --setro /dev/sdb

and

sudo blockdev --setro /dev/sdb1

(At least one should succeed). Then, without rebooting, we shall run

sudo mkdir /media/mountrecovery

followed by

sudo mount -t ntfs-3g /dev/sdb1 /media/mountrecovery -o force

This will mount your filesystem as read only at /media/mountrecovery

Old answer:

You may have corrupted something very important for the filesystem to work. Try opening My Computer under Windows XP, right-clicking your failed hard disk and clicking on Properties>Tools tab>Check Now. Run the check. If it wants to reschedule after a reboot, let it do that and reboot with the hard disk connected. Then, it should work.(The damage doesn't look too bad) If not, you'll need to salvage your files. You can try getting DiskDigger(Too bad not FOSS), and running it under Windows XP on the hard disk that held the data you lost. You can then restore these files to an external hard disk.(Use quick mode and if it fails, use the long, thorough mode. If it's fragmented, you may only find bits and pieces.

Share:
5,595

Related videos on Youtube

Rob Hayes
Author by

Rob Hayes

Updated on September 18, 2022

Comments

  • Rob Hayes
    Rob Hayes over 1 year

    my laptop running ubuntu 11.10 was updated to 12.04 but failed halfway through update. i had no option but to turn the laptop off as it had frozen and back on again to find the laptop non functioning. i then made a ubuntu 12.04 boot cd to boot the laptop to save my files from the internal laptop hard drive to the external hard drive off my pc running windows xp via usb no problems there but then i proceeded in a very tired state to install ubuntu 12.04 from the cd i choose the partition method the first option of 3 to keep files and folders i started the install and a few seconds in noticed it was writing to my external usb drive got scared and pulled the usb lead then proceeded to do a normal install of ubuntu 12.04 on my laptop but now ubuntu will not open my external 250 gb hdd but does recognise it as such in disk utility. instead of mounting it gives this message.

    Error mounting: mount exited with exit code 13: $MFTMirr does not match $MFT (record 0).
    Failed to mount '/dev/sdb1': Input/output error
    NTFS is either inconsistent, or there is a hardware fault, or it's a
    SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
    then reboot into Windows twice. The usage of the /f parameter is very
    important! If the device is a SoftRAID/FakeRAID then first activate
    it and mount a different device under the /dev/mapper/ directory, (e.g.
    /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
    for more details.
    

    windows does not recognise it as anything neither does easus. please help i desperatly need all my files back i feel such an idiot.


    Ok getting there I just managed to copy all my files from the external to the laptop using test disk and then suddenly the laptop cut out and rebooted itself into low graphics mode I get 4 options nothing works it keeps looping betwean this and a grub mode and will no longer accept my password in the black screen mode man this is cruel please can anyone help

    • taneli
      taneli almost 12 years
      You could try photorec: sudo apt-get install testdisk from command line in 12.04. It is also available for Windows cgsecurity.org/wiki/PhotoRec . I have no experience using it, so I didn't put this as an answer, but some people swear by it, apparently having experienced something similar to your situation. (Despite the name, it can recover more than photos.)
    • taneli
      taneli almost 12 years
      @ObsessiveFOSS I actually have no clue what it does and if there is even a slight chance that it will write to the disk, I'd strongly advice against that. At this point, one should limit to read-only tools. PhotoRec at least claims to not touch the device at all, instead recovering files (if possible) and saving them on another device, which sounds perfectly safe.
    • nanofarad
      nanofarad almost 12 years
      @taneli Point made. Am now working on getting OP mounted read-only without risk of failure...
  • Rob Hayes
    Rob Hayes almost 12 years
    thanks ill try that, please keep suggestions coming i dont wanna rush this and seek to learn as much as i can to make informed decisions. many thanks rob
  • Rob Hayes
    Rob Hayes almost 12 years
    i just had a look at that there is not check now option. how dangerous is it to force mount in ubuntu. i guess it may just force mount the 12mb is there any intelligent software that can see everything on the disk beyond the boot and partition
  • nanofarad
    nanofarad almost 12 years
    Forcing a mount is not too dangerous, as long as you use read-only. We'll begin by(assuming your hard disk partition is /dev/sdb1, run sudo blockdev --setro /dev/sdb and sudo blockdev --setro /dev/sdb1(At least one should succeed). Then, without rebooting, we shall run sudo mkdir /media/mountrecovery followed by sudo mount -t ntfs-3g /dev/sdb1 /media/mymounteddrive -o force
  • nanofarad
    nanofarad almost 12 years
    Actually, line breaks will confuse you in my prev. comment, so see edits to my answer.
  • Rob Hayes
    Rob Hayes almost 12 years
    cool so following all those sudo commands highlighted is exact commands and will not do any damage
  • Rob Hayes
    Rob Hayes almost 12 years
    also will force mount only force the one partition for example my worst nightmare forcing the 12mb partition and ignoring the rest or will it force mount the whole lot and let me see everything on the hard drive.
  • nanofarad
    nanofarad almost 12 years
    @robertHayes Then, you can change the /dev/sdb1 to the correct partition in order to mount the correct one.
  • Rob Hayes
    Rob Hayes almost 12 years
    which is the edit please. and any more info from anyone out there
  • Rob Hayes
    Rob Hayes almost 12 years
    what is /dev/sdb1 and how will i know which is the correct partition will doing this make it mount normally next time.
  • nanofarad
    nanofarad almost 12 years
    It is /dev/sdb1 as it is the one referenced in the error message.
  • Rob Hayes
    Rob Hayes almost 12 years
    ok still not tried it yet as i want to know if force mount will, write anything to the drive, force mounting is it safe will it do damage what exactly does it do. my hard drive contained files and folders before ubuntu attempted to start a partition, as much detail as pos please i really cant tell you how much i appreciate this help
  • nanofarad
    nanofarad almost 12 years
    @roberthayes My sudo blockdev command makes it very sure that the filesystem will be monuted read-only, as it disallows ANY applications(even the kernel) to write to the drive(until you reboot)
  • nanofarad
    nanofarad almost 12 years
    If you want another layer of protection, you can change the last command to sudo mount -t ntfs-3g /dev/sdb1 /media/mountrecovery -r -o force
  • nanofarad
    nanofarad almost 12 years
    If you have solved your problem, be sure to mark this answer as fixed, if not, I'll help you until the problem is fully fixed. :-)