LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mounting an external hard drive in Zorin OS (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-an-external-hard-drive-in-zorin-os-4175446099/)

Fada 01-17-2013 08:12 PM

Mounting an external hard drive in Zorin OS
 
I've been using Linux systems for a while, but still call myself a newbie :) Before deciding to post the question here I had spend hours reading other posts and solutions, but still can't fix my problem.
My laptop broke, I got another one, but I want to try and recover the important files from the old hard-drive. I am not sure it is good, but I think it is. I will explain why. I bought an external hard-drive enclosure and when I plug it in (with my old hard-drive inside) it shows it on my computer, but I can not excess it. I get this message:
"Error mounting: mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so"
I tried to connect it to a desktop which has windows on it. I opened the Disk management and it indicates the drive as healthy. That gives me hope. I tried so many things and nothing seem to work. Please if you have any suggestions, let me know. I am willing to try many approaches. The only thing is I want to try to recover them while it is safe enough, so I don't risk to lose my files. Any replies will be appreciated. Thank you!

yancek 01-17-2013 08:30 PM

How did you try to mount it? From a terminal? Exactly what command did you use? What filesystem type was on sdb1? You can get that information with the command: df -T /dev/sdb1

Fada 01-17-2013 08:56 PM

Yes I use the Terminal and tried many commands. Sometimes it says permission denied even if I am signed as a root
When I use df that's what I get
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 296757080 4386784 277295840 2% /
none 1882912 312 1882600 1% /dev
none 1891064 920 1890144 1% /dev/shm
none 1891064 192 1890872 1% /var/run
none 1891064 0 1891064 0% /var/lock
none 1891064 0 1891064 0% /lib/init/rw
To try your command I have to be in root I guess. I will try and let you know. Thanks

Fada 01-17-2013 08:59 PM

That's what I get when I use your command
Filesystem Type 1K-blocks Used Available Use% Mounted on
none devtmpfs 1882912 312 1882600 1% /dev
P.S. The external is attached and was attached even before I started the laptop. I think sda is my laptop drive and sdb is my external drive. I checked the partitions without the external and then with the external.

lleb 01-18-2013 09:00 AM

hello Fada, as root run the following commands and copy/paste the results here. please use the code flags to make life easier to read:

with the external enclosure connected and powered on
Code:

# fdisk -l
do that without mounting the drive. then try to mount the drive. what was the OS on the old laptop? do you know the file system type?

Code:

# mount -t ext2 /dev/path/to/external /mnt/path/to/mount/point
Quote:

"Error mounting: mount: wrong fs type, bad option, bad superblock on /dev/sdb1
this could mean the drive is dead. we will not know until we get more information.

Fada 01-18-2013 09:49 AM

error

Fada 01-18-2013 09:57 AM

Hi Lleb,

Here is the result:

# fdisk -l without the external

Code:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 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: 0x000e6247

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1      37534  301489152  83  Linux
/dev/sda2          37534      38914    11079681    5  Extended
/dev/sda5          37534      38914    11079680  82  Linux swap / Solaris

with external attached

Code:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 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: 0x000e6247

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1      37534  301489152  83  Linux
/dev/sda2          37534      38914    11079681    5  Extended
/dev/sda5          37534      38914    11079680  82  Linux swap / Solaris

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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: 0x00091280

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1  *          1      29700  238557184  83  Linux
/dev/sdb2          29700      30402    5639169    5  Extended
/dev/sdb5          29700      30402    5639168  82  Linux swap / Solaris

Then the next command without the external drive plugged in
Code:

~# mount -t ext2 /dev/path/to/external /mnt/path/to/mount/pointmount: mount point /mnt/path/to/mount/point does not exist
and with it

Code:

~# mount -t ext2 /dev/path/to/external /mnt/path/to/mount/pointmount: mount point /mnt/path/to/mount/point does not exist
Same thing. The old laptop had Zorin OS as well. I am not sure about the file system. Sorry. Thank you for your help!

P.S. I think the fyle system type is ext4 according to this:

Code:

Filesystem    Type  1K-blocks      Used Available Use% Mounted on
/dev/sda1    ext4  296757080  4402780 277279844  2% /
none      devtmpfs    1882912      292  1882620  1% /dev
none        tmpfs    1891064      412  1890652  1% /dev/shm
none        tmpfs    1891064      188  1890876  1% /var/run
none        tmpfs    1891064        0  1891064  0% /var/lock
none        tmpfs    1891064        0  1891064  0% /lib/init/rw


yancek 01-18-2013 10:08 AM

Your output shows sdb1 is a Linux partition but doesn't show the filesystem type, ext3, ext4, etc. I don't need to be root to run this command on my system, doubt you would. It does need to be an uppercase T so this should do it:

Code:

df -T /dev/sdb1
The above command changed to /dev/sda5 on my computer shows the output below, note the 'ext4' under the Type column.

Code:

Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda5    ext4    19G  8.8G  9.3G  49% /mnt/ubuntu

You took the post by lleb above too literally. What you need to do first is create a mount point on your currently running Linux for sdb1. The simplest thing to do is create the directory:
Code:

sudo mkdir /mnt/sdb1
After doing that and getting the filesystem type from the df -T command, run the mount command:
Code:

sudo mount -t ext4 /dev/sdb1 /mnt/sdb1
The mount command above assumes 'ext4' as Type, so if you get something else you will obviously need to change that part of your command. If you get no error, open your filemanager and go to the /mnt/sdb1 directory to view files.

If you get an error, post the exact error.

Fada 01-18-2013 10:55 AM

Hi Yancek,
I do take everything literally :)

Earlier I used this command:
~$ mount
Code:

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/fada/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=fada)

Now after reading you I used this command:
Code:

~$ df -T /dev/sdb1
df: `/dev/sdb1': Permission denied
df: no file systems processed

Another one gave me an error:
Code:

~$ sudo mkdir /mnt/sdb1
~$ sudo mount -t ext4 /dev/sdb1 /mnt/sdb1
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

Thank you!

yancek 01-18-2013 09:03 PM

Quote:

~$ df -T /dev/sdb1
df: `/dev/sdb1': Permission denied
df: no file systems processed
Looks like you do need root permissions so just do: sudo df -T /dev/sdb1

Try the mount command with sudo: sudo mount

Your earlier output from mount only shows one partition: sda1?

Fada 01-18-2013 09:37 PM

Here it is :
Code:

Filesystem    Type  1K-blocks      Used Available Use% Mounted on
none      devtmpfs    1882912      312  1882600  1% /dev

~$ sudo mount
Code:

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/fada/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=fada)

And yes in my previous output from mount there was only sda1.
Anything else I could try?
Thanks a lot for your time!

Fada 01-19-2013 01:32 AM

I managed to get the File system type at last:
Code:

Filesystem    Type  1K-blocks      Used Available Use% Mounted on
/dev/sdb1    tmpfs    1891064        0  1891064  0% /mnt/sdb1

I don't know if it will be of any help.
I am still playing around, trying not to lose hope

~$ mount
Code:

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/fada/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=fada)
/dev/sdb1 on /mnt/sdb1 type tmpfs (rw)
/dev/sdb1 on /mnt/sdb1 type tmpfs (rw)
/dev/sdb1 on /media type tmpfs (rw)
/dev/sdb1 on /media type tmpfs (rw)


Fada 01-19-2013 09:33 PM

Please help
 
I need HELP! Please someone. I think I completely screwed up the whole system. Now the sdb1 took the place of sda


~$ mount
Code:

/dev/sdb1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/fada/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=)

/dev/sdb1 on /mnt type ext4 (rw)

suicidaleggroll 01-19-2013 10:55 PM

yancek - you can not run df in the way you keep instructing on an unmounted partition.
Code:

# df -T /dev/sdc1
Filesystem    Type    1K-blocks  Used Available Use% Mounted on
devtmpfs      devtmpfs  4083560    44  4083516  1% /dev
# mount /dev/sdc1
# df -T /dev/sdc1
Filesystem    Type  1K-blocks      Used  Available Use% Mounted on
/dev/sdc1      ext4 3845700616 2222337152 1623283464  58% /media/backups

The df output on an unmounted partition is of no use to the OP. This link has some information about getting the fileystem type of an umounted partition:
http://serverfault.com/questions/190...mounted-drives
cfdisk may be able to do it as well, however it shouldn't be necessary for the OP. I have been using Linux for many years, and I can't recall a single time I've had to specify the filesystem type on the mount command. In my experience, if mount can't autodetect the filesystem type, then it's not going to be able to mount it anyway.



OP - What have you been doing? Please post EXACTLY the commands you've been running to get where you are now. You appear to have been doing some dangerous operations on your system.

Fada 01-20-2013 12:14 AM

Suicidaleggroll thank you very much for taking your time to check my problem.
Unfortunately I wouldn't be able to say now what exactly I've been doing. I tried all the commands the 2 members here suggested. Then since I didn't have any reply for some time and I was desperate to try to recover my files or just give it up (it had taken so much of my time already) I tried many other ways. Used any advice I thought had anything to do with my situation on this and other websites. I feel I went too far.
Is there any way to check what went wrong or at least what is going on on my system? I am not worried about my laptop system since I have nothing on it I need. I can reinstall the system any time. I worry about the files on the external drive. I am ready to bury them though :(

Thanks again!


All times are GMT -5. The time now is 10:47 PM.