LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-11-2019, 08:41 AM   #1
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 182

Rep: Reputation: Disabled
mounting hard drive issue


Dear All,

I have clean old hard drive at /dev/sdb,
instead of mounting it through GUI, i wanted to mount it through bash,
and something simple failed - let me explain.

Now situation looks like:

Code:
Failed to mount "My Drive"
No object for D-Bus interface.
That is in GUI, if i want to mount the drive.


how did i got there?
I wanted to try powers and mount it through bash,

first ive created a folder in /media

Code:
sudo mkdir disk
Then ive tried to mount the drive through

Code:
  539  sudo mount -t NTFS /dev/sdb /media/mq/disk
i've got the message

Code:
mount: unknown filesystem type 'NTFS'
So obviously i didnt know, what should be proper TYPE.

So ive tried different types (DOS, no type)

other commands that ive used (from history)
Code:
 526  cd /dev/sdb1
  527  mount | grep sda
  528  mount | grep sdb
  529  mount /dev/sdb
  530  mount /dev/sdb1
  531  mount /dev/sdb1 NTFS /dev/sdb1 /media/disk
  532  mount -t NTFS /dev/sdb1 /media/disk
  533  sudo mount -t NTFS /dev/sdb1 /media/disk
  534  sudo mount -t NTFS /dev/sdb1 /media/mq/disk
  535  fdisk
  536  history
  537  fdisk -l
  538  sudo fdisk -l
  540  sudo mount -t dos /dev/sdb /media/mq/disk
  541  sudo mount -t  /dev/sdb /media/mq/disk
  542  sudo mount -t vfat /dev/sdb /media/mq/disk
  543  sudo mount -t ntfs /dev/sdb /media/mq/disk
  544  history
so as you see nothing really bad (i suppose) went to my bash
but somehow connection is broken,

which is great on the other hand,
because there is a space to dig.

On the other, i cannot proceed with things i wanted to do AFTER mounting
Thank you for help.
 
Old 04-11-2019, 08:45 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Quote:
I have clean old hard drive at /dev/sdb,
Define clean. It it a USB or internal hard drive? Is it partitioned and formatted with a filesystem?

Post the output of the command lsblk
 
Old 04-11-2019, 09:00 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
/dev/sdb it needs to be /dev/sdbx the partition number you want to mount, not the device itself.
x= partition number.

Code:
mount /dev/sdb1 NTFS /dev/sdb1 /media/disk
should be
mount -t ntfs  /dev/sdb1 /media/disk
or
mount -t auto /dev/sdb1 /media/disk
or
mount /dev/sdb1 /media/disk

Last edited by BW-userx; 04-11-2019 at 09:04 AM.
 
1 members found this post helpful.
Old 04-11-2019, 09:02 AM   #4
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 182

Original Poster
Rep: Reputation: Disabled
OK,

How can we 100% be positive about disks TYPE? (check 'man mount' > mount -t type device dir)


This is Western Digital HDD SATA 2.5,
it is empty
i've recovered data with photorec,
than I've made partition with

Code:
sudo fdisk /dev/sdb
as a type I've chosen Hex code 86 or 87 - both are descripted as 'NTFS volume set'

Code:
$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   1.8T  0 disk 
├─sda1   8:1    0   100M  0 part 
sdb      8:16   0 298.1G  0 disk 
└─sdb1   8:17   0 298.1G  0 part

Quote:
BW-userx
thats true, it seems it get stopped more on the TYPE than '1' from /dev/sdb1

Last edited by hkjz; 04-11-2019 at 09:12 AM.
 
Old 04-11-2019, 09:16 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by hkjz View Post
OK,

How can we 100% be positive about disks TYPE? (check 'man mount' > mount -t type device dir)


This is Western Digital HDD SATA 2.5,
it is empty
i've recovered data with photorec,
than I've made partition with

Code:
sudo fdisk /dev/sdb
as a type I've chosen Hex code 86 or 87 - both are descripted as 'NTFS volume set'

Code:
$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   1.8T  0 disk 
├─sda1   8:1    0   100M  0 part 
sdb      8:16   0 298.1G  0 disk 
└─sdb1   8:17   0 298.1G  0 part



thats true, it seems it get stopped more on the TYPE than '1' from /dev/sdb1
take a closer look at the command you used. From your first post, these are all different
Code:
  531  mount /dev/sdb1 NTFS /dev/sdb1 /media/disk
  532  mount -t NTFS /dev/sdb1 /media/disk
  533  sudo mount -t NTFS /dev/sdb1 /media/disk
  534  sudo mount -t NTFS /dev/sdb1 /media/mq/disk
Code:
to get the actual path to the mount point (dir) you want to mount to. You have two different paths and the wrong format for your command.
ls /media
say it is 
/media/mq/disk
then letting the system figure out what format it is.
mount /dev/sda1 /media/mq/disk
or telling it. lower case
mount -t ntfs /dev/sda1 /media/mq/disk
pay attention to detail.
 
1 members found this post helpful.
Old 04-11-2019, 09:16 AM   #6
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 182

Original Poster
Rep: Reputation: Disabled
OK BW-userx,
details are important, history showing trail and error path

it was
Code:
sudo mount -t ntfs  /dev/sdb1 /media/mq/disk
it works now, thank you

for future, let me repeat one question
How can we 100% be positive about disks TYPE? (check 'man mount' > mount -t type device dir)

thank you

Last edited by hkjz; 04-11-2019 at 09:23 AM.
 
Old 04-11-2019, 09:24 AM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I just let the system figure it out whenever I mount.
try removing the -t ntfs from your mount command.
Code:
sudo mount /dev/sdb1 /media/mq/disk
It should still mount it properly. It does on mine.

7 Ways to Determine the File System Type in Linux

Quote:
$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/root ext4 39G 15G 22G 41% /
devtmpfs devtmpfs 3.6G 0 3.6G 0% /dev
tmpfs tmpfs 32M 1.5M 31M 5% /run
tmpfs tmpfs 3.6G 49M 3.6G 2% /dev/shm
cgroup_root tmpfs 8.0M 0 8.0M 0% /sys/fs/cgroup
/dev/sdb6 ext4 87G 1.9G 81G 3% /home
/dev/sda2 fuseblk 202G 189G 13G 94% /media/ntfs1
/dev/sda1 ext4 260G 168G 79G 68% /media/data1
tmpfs tmpfs 3.6G 142M 3.5G 4% /tmp
/dev/sdc1 ext4 917G 699G 172G 81% /run/media/userx/1TB
/dev/mmcblk0p1 ext4 6.4G 202M 5.9G 4% /run/media/userx/sdCard
/dev/sdd1 ext4 1.8T 1.2T 552G 69% /run/media/userx/2TBInternal
/dev/sde1 ext4 3.6T 3.4T 16G 100% /run/media/userx/4TB_esaystore
fast and easy. You could pipe it to awk too, just to get the parts you need.

Last edited by BW-userx; 04-11-2019 at 09:27 AM.
 
1 members found this post helpful.
Old 04-11-2019, 09:51 AM   #8
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 182

Original Poster
Rep: Reputation: Disabled
Ok,

Code:
df -Th
is good, but show just mounted devices,

it seems like
Code:
 lsblk -f
showing just all info which are necessary for proper mounting HDD,

your link is great,
 
Old 04-11-2019, 12:34 PM   #9
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 182

Original Poster
Rep: Reputation: Disabled
my i somehow delete my message?
I wanted to post new topic,
sorry for inconvenience

Last edited by hkjz; 04-11-2019 at 12:36 PM.
 
Old 04-12-2019, 04:42 AM   #10
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,479

Rep: Reputation: Disabled
To see how a drive is formatted, you can use
Code:
fdisk -l /dev/sd?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard drive issue or kernel issue grob115 Linux - Server 2 04-22-2012 03:34 AM
I want to copy my hard drive to a larger hard drive and boot from the new drive. lpmorgan1 Ubuntu 8 09-07-2009 11:26 PM
Help on mounting Hard Disk Drive and CD-ROM drive in Dapper. ussr_1991 Ubuntu 2 08-18-2007 11:33 PM
STUCK--Trying to copy old Hard Drive to new Hard Drive. Please Help tsw Linux - Newbie 8 05-26-2004 02:47 AM
Mirroring (Hard Drive to Hard Drive) unikevin Linux - Hardware 2 01-19-2004 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration