Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Need help mounting slave hard drive in Xubuntu

  • 18-11-2010 1:21pm
    #1
    Registered Users, Registered Users 2 Posts: 3,683 ✭✭✭


    My Windows XP machine packed up the last couple of days giving the following error message:
    A disk read error occurred. Press Ctrl + Alt + Delete to restart
    Googling tells me that there are various causes of this error but unless the hard drive is banjaxed I should be able to install it as a slave into another PC which I've done with my Xubuntu PC.

    The second hard drive is recognised by the BIOS and fdisk -l reports the following:
    me@me-desktop:~$ sudo fdisk -l
    
    Disk /dev/sda: 60.0 GB, 60022480896 bytes
    255 heads, 63 sectors/track, 7297 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: 0x00010b30
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        7207    57884672   83  Linux
    /dev/sda2            7207        7298      728065    5  Extended
    /dev/sda5            7207        7298      728064   82  Linux swap / Solaris
    
    Disk /dev/sdb: 80.0 GB, 80000000000 bytes
    255 heads, 63 sectors/track, 9726 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: 0xd0f4738c
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           6        9726    78083932+   7  HPFS/NTFS
    

    Googling and some Ubuntu forum threads lead me to believe I should make some changes to /etc/fstab to recognise the second hard drive and this is where my linux knowledge falls short. :o
    My current fstab looks like this:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    # / was on /dev/sda1 during installation
    UUID=84d3b7cc-8945-48e9-9b20-f854228ce952 /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda5 during installation
    UUID=8e833655-c890-4d67-91bd-71afd869f85e none            swap    sw              0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
    

    I'd appreciate some help in making whatever changes I need to make so that the second drive is readable. I don't want to format it (yet) as there are some files on it that I wish to recover first.
    Any assistance would be greatly appreciated. :)


Comments

  • Registered Users, Registered Users 2 Posts: 2,370 ✭✭✭Knasher


    If you just want to mount it temporally to grab files off it then you don't need to edit fstab at all.

    Just open up a terminal and enter these commands.

    Firstly you need to install the ntfs driver (I'm assuming its formatted with NTFS btw.
    sudo apt-get install ntfs-3g
    

    Next you need to make a mount point. Doesn't really matter where, so I'll just go with your home directory.
    mkdir ~/mount
    

    Finally you need to do the actual mounting
    sudo mount -t ntfs /dev/sdb1 ~/mount
    

    When you are done you can unmount the directory and delete the mount point
    cd ~
    sudo umount /dev/sdb1 
    rmdir mount
    

    If you want a more perminant mount then you do need to edit your fstab. Its best to use UUID's as much as possible so first you need to get the right one for your drive. Run
    ls -l /dev/disk/by-uuid
    
    And look for the one that points towards sdb1. Next add the following line to your fstab:
    UUID=(put UUID here)	(full path to your mount point)	ntfs	auto,users,uid=1000,gid=100,dmask=027,fmask=137,utf8	0	0
    
    You don't really need all those options if you don't wan them. Its a matter of personal preference as ntfs has a different security model than linux.

    Hope this helped.


  • Registered Users, Registered Users 2 Posts: 3,683 ✭✭✭DeepBlue


    Knasher wrote: »
    Hope this helped.
    Thanks, that was a great help.

    The mount command gives the following error:
    me@me-desktop:~$ sudo mount -t ntfs /dev/sdb1 ~/mount
    ntfs_mst_post_read_fixup: magic: 0x00000001 size: 1024 usa_ofs: 459 usa_count: 65535: Invalid argument
    Record 0 has no FILE magic (0x1)
    Failed to load $MFT: Input/output error
    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.
    me@me-desktop:~$

    When the drive originally failed in the XP machine I tried booting it from the Windows XP CD but I just got a blank screen.
    I then tried a KNOPPIX disk and got the following error when I tried to access the hard drive:
    Could not mount device.
    The reported error was:
    $MFT has invalid magic.
    Failed to load $MFT; Input/output error
    Failed to startup volume: Input/output error
    Failed to mount 'dev/hda1': Input/output error
    NTFS is inconsistent. Run chkdsk/f on Windows then reboot it TWICE.
    The usage of the /f parameter is very IMPORTANT.
    No modification was made to NTFS by this software.
    

    The KNOPPIX error message tallies with the Xubuntu error message and would lead me to believe that the hard drive itself is toast. :(
    I wonder if there is anything else I can try?


  • Moderators, Arts Moderators Posts: 35,738 Mod ✭✭✭✭pickarooney


    Assuming you've unsuccessfully tried running chkdsk /f and rebooting Windows twice you can try force the drive to mount with
    ntfs-3g /dev/sdb1 ~/mount -o force
    


  • Registered Users, Registered Users 2 Posts: 3,683 ✭✭✭DeepBlue


    ^^ Tried that.
    Unfortunately it gives the exact same error message as the normal mount command above. :(


Advertisement