1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access disk, BY ANY MEANS???

Discussion in 'Linux and Unix' started by TRS-80 vet, Nov 12, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. TRS-80 vet

    TRS-80 vet Account Closed Thread Starter

    Joined:
    Jun 17, 2005
    Messages:
    3,148
    It's a external USB HDD. Can it be mounted/accessed, in any manner?

    None have solved the riddle so far.
     
  2. Elvandil

    Elvandil

    Joined:
    Aug 1, 2003
    Messages:
    51,988
    What is on it as far as partitions and file systems? That makes all the difference.
     
  3. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    When you plug it into a USB port and issue the mount command:
    $ mount
    what device name is listed and what is the mount point? For example, if you see something similar to the following from the output of the mount command at the end of the output:
    /dev/sde1 on /media/disk type vfat (rw,nosuid,nodev,shortname=mixed,uid=999,utf8,umask=077)
    This would mean that you can give the following commands to access the USB:
    $ cd /media/disk
    $ ls
    and possibly see the following:
    Documents LaunchU3.exe System
    or
    $ ls -lt
    drwx------ 6 ubuntu root 32768 2007-06-13 14:56 Documents
    drwx------ 3 ubuntu root 32768 2007-06-13 14:55 System
    -r-x------ 1 ubuntu root 1110016 2007-02-12 13:33 LaunchU3.exe
    (Naturally, I am on an Ubuntu system while looking at my USB)

    And while you are at it, we presume you are not just asking a rhetorical question about the so-called "riddle" because it is a "mystery" to you? Is that correct?

    -- Tom
     
  4. saikee

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,888
    One day I probably would write a thread saying mounting a device in Linux has to be one of the most enjoyable experience.

    How can we connect a hardware device like an external hard disk and then instruct the Linux to read the information we want? It is almost like magic!

    For any hard disk or pen drive I always type this terminal command in root console to check the devices seen by Linux
    Code:
    [B][COLOR="Sienna"]fdisk -l[/COLOR][/B]
    I shall use my PC as an example. Here is the output I copied from the terminal screen, indicating I have 3 hard disks sda, sdb and sdc. In the following text the commands I typed are marked brown. or other colors.

    Code:
    [email protected]:/home/saikee# [B][COLOR="Sienna"]fdisk -l[/COLOR][/B]
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xbe153241
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1       12158    97659103+  17  Hidden HPFS/NTFS
    /dev/sda2   *       12159       24316    97659135    7  HPFS/NTFS
    /dev/sda3           24317       36598    98655165    5  Extended
    /dev/sda4           36599       60801   194410597+  83  Linux
    /dev/sda5           24317       24438      979933+  82  Linux swap / Solaris
    /dev/sda6           24439       25654     9767488+  83  Linux
    /dev/sda7           25655       26870     9767488+  83  Linux
    /dev/sda8           26871       28086     9767488+  83  Linux
    /dev/sda9           28087       29302     9767488+  83  Linux
    /dev/sda10          29303       30518     9767488+  83  Linux
    /dev/sda11          30519       31734     9767488+  83  Linux
    /dev/sda12          31735       32950     9767488+  83  Linux
    /dev/sda13          32951       34166     9767488+  83  Linux
    /dev/sda14          34167       35382     9767488+  83  Linux
    /dev/sda15          35383       36598     9767488+  83  Linux
    
    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x38c16d97
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1       15808   126977728+  15  Unknown
    /dev/sdb2           15809       29184   107442720   15  Unknown
    /dev/sdb3           29185       42560   107442720    5  Extended
    /dev/sdb4           42561       60801   146520832+  15  Unknown
    /dev/sdb5           29185       30400     9767488+  83  Linux
    /dev/sdb6           30401       31616     9767488+  a9  NetBSD
    /dev/sdb7           31617       32832     9767488+  83  Linux
    /dev/sdb8           32833       34048     9767488+  83  Linux
    /dev/sdb9           34049       35264     9767488+  83  Linux
    /dev/sdb10  *       35265       36480     9767488+  83  Linux
    /dev/sdb11          36481       37696     9767488+  83  Linux
    /dev/sdb12          37697       38912     9767488+  83  Linux
    /dev/sdb13          38913       40128     9767488+  83  Linux
    /dev/sdb14          40129       41344     9767488+  83  Linux
    /dev/sdb15          41345       42560     9767488+  83  Linux
    
    Disk /dev/sdc: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x8f800200
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1   *           1        3039    24410736   bf  Solaris
    /dev/sdc2            3040        6078    24410704+  b5  Unknown
    Partition 2 does not end on cylinder boundary.
    /dev/sdc3            6078        8578    20081313   af  Unknown
    /dev/sdc4            8579       11765    25599577+  b5  Unknown
    [email protected]:/home/saikee# 
    I then plugged in an external hard disk with one ntfs partition of 500Gb inside. I repeated the command 10 seconds after I added the external hard disk and got this

    Code:
    [email protected]:/home/saikee# [B][COLOR="Sienna"]fdisk -l[/COLOR][/B]
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xbe153241
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1       12158    97659103+  17  Hidden HPFS/NTFS
    /dev/sda2   *       12159       24316    97659135    7  HPFS/NTFS
    /dev/sda3           24317       36598    98655165    5  Extended
    /dev/sda4           36599       60801   194410597+  83  Linux
    /dev/sda5           24317       24438      979933+  82  Linux swap / Solaris
    /dev/sda6           24439       25654     9767488+  83  Linux
    /dev/sda7           25655       26870     9767488+  83  Linux
    /dev/sda8           26871       28086     9767488+  83  Linux
    /dev/sda9           28087       29302     9767488+  83  Linux
    /dev/sda10          29303       30518     9767488+  83  Linux
    /dev/sda11          30519       31734     9767488+  83  Linux
    /dev/sda12          31735       32950     9767488+  83  Linux
    /dev/sda13          32951       34166     9767488+  83  Linux
    /dev/sda14          34167       35382     9767488+  83  Linux
    /dev/sda15          35383       36598     9767488+  83  Linux
    
    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x38c16d97
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1       15808   126977728+  15  Unknown
    /dev/sdb2           15809       29184   107442720   15  Unknown
    /dev/sdb3           29185       42560   107442720    5  Extended
    /dev/sdb4           42561       60801   146520832+  15  Unknown
    /dev/sdb5           29185       30400     9767488+  83  Linux
    /dev/sdb6           30401       31616     9767488+  a9  NetBSD
    /dev/sdb7           31617       32832     9767488+  83  Linux
    /dev/sdb8           32833       34048     9767488+  83  Linux
    /dev/sdb9           34049       35264     9767488+  83  Linux
    /dev/sdb10  *       35265       36480     9767488+  83  Linux
    /dev/sdb11          36481       37696     9767488+  83  Linux
    /dev/sdb12          37697       38912     9767488+  83  Linux
    /dev/sdb13          38913       40128     9767488+  83  Linux
    /dev/sdb14          40129       41344     9767488+  83  Linux
    /dev/sdb15          41345       42560     9767488+  83  Linux
    
    Disk /dev/sdc: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x8f800200
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1   *           1        3039    24410736   bf  Solaris
    /dev/sdc2            3040        6078    24410704+  b5  Unknown
    Partition 2 does not end on cylinder boundary.
    /dev/sdc3            6078        8578    20081313   af  Unknown
    /dev/sdc4            8579       11765    25599577+  b5  Unknown
    
    [COLOR="Red"]Disk /dev/sdd: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x414f986c
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdd1   *           1       60674   487363873+   7  HPFS/NTFS[/COLOR]
    
    [email protected]:/home/saikee# [B][COLOR="Blue"]mkdir /mnt/mount_here[/COLOR][/B]
    [email protected]:/home/saikee# [B][COLOR="Blue"]mount /dev/sdd1 /mnt/mount_here/[/COLOR][/B]
    [email protected]:/home/saikee# [B][COLOR="DarkOrchid"]ls /mnt/mount_here/[/COLOR][/B]
    Done      Linux            RECYCLER                   Temp
    Download  New for install  System Volume Information
    [email protected]:/home/saikee#
    The red bit is extra information showing a 500Gb hard disk detected with only one partition sdd1 in Type 7 or ntfs filing system.

    I then made a mounting point in /mnt/mount_here, shown in blue. I didn't even specify what filing type because modern Linux can find it out.

    Lastly to show the hard disk has been mounted succeesfully as expected I listed its content(command in purple).

    The Linux directory is the one I store various distros so when I listed its content it showed
    Code:
    [email protected]:/home/saikee# [B][COLOR="Sienna"]ls /mnt/mount_here/Linux/[/COLOR][/B]
    64Studio       Geexbox               MorphixKDE             Slackware
    absolute       Gentoo                Musix                  Slampp
    Adios          GeoLivre              MusixGNU+Linux026.iso  Slax
    Agnula_demudi  gnoppix               Mutagenix              Slo-Tech
    aida32         Gobinx                nepalinux              Slynux
    aLinux         gparted               NetBSD                 smeserver
    Alx            Grafpup               Netwosix               smgl
    Arabian        grml                  Nexenta                Solaris
    Arch           Grub menu             nonux                  SourceMage
    Arklinux       Guada                 Nvidia Linux drivers   Specifix
    Asianux        Haansoft              OneBase                Squiggle
    Aurox 9.4      hedlinux              OPenBSD                StartCom
    B2D            Helix                 OpenDesktop            StressLinux
    Backtrack      K12LTSP-4.1.0         Open Wall              Stux
    Bayanihan      Kalango               Overclock              STX
    Beatrix        Kanotix               paipix                 Sun Java Desktop
    Belenix        Kate                  Pardus                 Suse
    BeOS           Kate.zip              Parsix                 Symphony
    Berry          Kernel                Parted Magic           Sysyem Rescue CD
    BigLinux       Klax                  PCBsd                  T2
    Blag           Knoppix               pcLinuxos              Tao Linux
    BlueWall       Kororaa               Peanut                 tinysofa server 2.0
    Buffalo        Kubuntu               Pentoo                 Topologlinux
    CentOS         kurumin               phaeronix              Trinity (Live)
    ClarkConnect   LFS                   Pingwinek              Troppix
    CollegeLinux   LG3D                  Pioneer                Trustix
    Connectiva     Libranet-2.8.1-trial  Pocket Linux           TurboLinux 7
    crux-2.0       Linare                PrarllelKnoppix        Ubuntu
    DamnSmall      LindowsLive           Progeny                Ufficiozero
    Darwin         LinEpsa               Pud                    UHU
    Debian         Linspire              Puppy                  Ultimalinux
    DesktopBSD     Linux bookself        Qcad                   Underground
    Deveil Linux   Linux + Live          Qilinux                Ututo
    DLxfce         LinuxTLE              Quantian               Vector
    DragonflyBSD   Loadlin16             Reacto                 videoLinux
    DreamLinux     Loma                  Red Flag               Vine
    dyne           Lunar                 Red Hat 9              VLos
    Edubuntu       Lycoris               Redwall                VMware
    Ehad           MagicLinux            rPath                  Whax
    Elive          Mandows 1.6           RR4                    Windows Vista
    Elx            Mandrake 10           Rubix                  Wolvix
    Engarde        Mandriva              runt-5.0.zip           Xandro
    Feather        MD5summer             Sabayon                xen
    Fedora         MedianLinux           Sam                    xfld
    Foresight      Mepis                 Santa Fe               xubuntu
    Fox            Mint                  Schillix               Yoper
    FreeBSD        MirOS                 Scientific Linux       Zenwalk
    Freespire      Molinux               Sidux
    Fugalware      Monoppix              Skolelinux
    
    [email protected]:/home/saikee# [B][COLOR="Sienna"]ls /mnt/mount_here/Linux/Mint[/COLOR][/B]
    LinuxMint-2.1-BETA-023.iso  LinuxMint-3.0-XFCE-BETA-003.iso
    [email protected]:/home/saikee#   
    So I would summarize.

    Use the root console because you can do everything like cutting butter with a hot wire, as you have no permission issue and have root privileges to do everything.

    If you want to see and operate the mounted files as a normal user in the desktop you need to make sure (or to change) the file ownership matching the user. In root console you do everything the same and it is a lot faster and more flexible, especially if you know how to use the direction keys to type half and let Linux to complete the other half for you.

    ---------------------------------------------------------------------------------------------
    To unmount the sdd1 just use the command "umount" (not unmount)
    Code:
    [B][COLOR="Sienna"]umount /dev/sdd1[/COLOR][/B]
    or
    Code:
    [B][COLOR="Sienna"]umount /mnt/mount_here[/COLOR][/B]
    You will find the directory /mnt/mount_here empty if you type "ls /mnt/mount_here" again
     
  5. RobLinux

    RobLinux

    Joined:
    Nov 7, 2007
    Messages:
    417
    After you plug it in, if no paritions are shown following last posts, it'll be worth checking if the device is seen by udev (in response to kernel event), logfile /var/log/udev and may be "dmesg | tail" will tell you something interesting.
     
  6. TRS-80 vet

    TRS-80 vet Account Closed Thread Starter

    Joined:
    Jun 17, 2005
    Messages:
    3,148
    I entered 'd', to delete partitions.

    Return said 'no partition defined'.

    Does that mean I have defined no partition to delete? Or does that mean none exists to delete?

    I wrote out (write and exit), and return was 'failure; kernel still in use'. Permission problem.

    Will zero'ing out MBR fix this wagon?

    Exactly what is that command /dev/sdb1
     
  7. Elvandil

    Elvandil

    Joined:
    Aug 1, 2003
    Messages:
    51,988
    Where did you use a "d" command? Were you in a shell?
     
  8. TRS-80 vet

    TRS-80 vet Account Closed Thread Starter

    Joined:
    Jun 17, 2005
    Messages:
    3,148
    Don't know the answer to that question there, Elvandil.

    From terminal, I entered fdisk /dev/sdb1. Is that a shell -level command?
     
  9. Elvandil

    Elvandil

    Joined:
    Aug 1, 2003
    Messages:
    51,988
    Just wondering where you were. I didn't even know if you had gotten into Ubuntu. I'm oriented now.

    Why would you delete partitions if you were trying to access the drive? Isn't there something on the drive you were trying to recover?
     
  10. TRS-80 vet

    TRS-80 vet Account Closed Thread Starter

    Joined:
    Jun 17, 2005
    Messages:
    3,148
    Never had write access to the drive; originally a linux commercial load. Wiped all contents to free up space, but freed space didn't show up for writing to...

    Then tried NTFS formatting from a vista platform, but still no write access in ubuntu. Then tried ext2 file system formatting, but still no write access, nor partition deletion...
     
  11. Elvandil

    Elvandil

    Joined:
    Aug 1, 2003
    Messages:
    51,988
    OK. Not data recovery--actual drive recovery for use. Doesn't look good.
     
  12. TRS-80 vet

    TRS-80 vet Account Closed Thread Starter

    Joined:
    Jun 17, 2005
    Messages:
    3,148
    Can I zero out the mbr?
     
  13. Elvandil

    Elvandil

    Joined:
    Aug 1, 2003
    Messages:
    51,988
    LOL. Do you think you actually have any access to that drive right now? I am not even convinced that it is spinning :D.
     
  14. TRS-80 vet

    TRS-80 vet Account Closed Thread Starter

    Joined:
    Jun 17, 2005
    Messages:
    3,148
    Windows has mapped it, and it mounted at first in ubuntu.

    Isn't this...
    dd if=/dev/zero of=/dev/sdb bs=446 count=1
    sufficient to wipe the MBR?
     
  15. TRS-80 vet

    TRS-80 vet Account Closed Thread Starter

    Joined:
    Jun 17, 2005
    Messages:
    3,148
    Supposedly it will; I need only to know this line won't target the local Ubuntu drive.
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/651008

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice