Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
/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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.