LinuxQuestions.org
Help answer threads with 0 replies.
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 05-05-2020, 08:55 AM   #106
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895

As root post the output of the command

file -s /dev/sdb

I know we've asked the same question numerous but what happens when you try to mount the filesystem from the command line using a file type.

mount -t ext4 /dev/sdb /home/nick/Music/music
 
Old 05-05-2020, 09:05 AM   #107
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
As root post the output of the command

file -s /dev/sdb
Output from file -s /dev/sdb

Quote:
apl2 / # file -s /dev/sdb
/dev/sdb: sticky x86 boot sector; partition 1: ID=0x83, starthead 32, startsector 2048, 976771072 sectors, code offset 0xb8

Last edited by Nuuk; 05-05-2020 at 09:12 AM.
 
Old 05-05-2020, 09:11 AM   #108
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post

I know we've asked the same question numerous but what happens when you try to mount the filesystem from the command line using a file type.

mount -t ext4 /dev/sdb /home/nick/Music/music
Here it is:

Quote:
apl2 / # mount -t ext4 /dev/sdb /home/nick/Music/music
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
 
Old 05-05-2020, 09:55 AM   #109
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Quote:
/dev/sdb: sticky x86 boot sector; partition 1: ID=0x83, starthead 32, startsector 2048, 976771072 sectors, code offset 0xb8
/dev/sdb: LABEL="Music" UUID="3b754aac-49bb-46fd-b3fc-e253449a1f62" TYPE="ext4"
I think we are going around in circles. That indicates a partition table with a single partition. Not sure if the code offset is valid nor sticky. I don't know why fdisk, lsblk does not show the partition nor why blkid show a valid label UUID or a filesystem. And yet it mounts when you right click in the file browser...

It was asked previously but mount it via right click and then post the output of the command
mount | grep /dev/sdb

Last edited by michaelk; 05-05-2020 at 09:57 AM.
 
1 members found this post helpful.
Old 05-05-2020, 10:09 AM   #110
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Code:
sudo gdisk -l /dev/sdb
is useful - I get:-
Quote:
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 1953525168 sectors, 931.5 GiB
Model: ST1000DM003-1CH1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 83E6C9B0-EB46-4C66-8518-8A63ADE7F56A
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 409498988 sectors (195.3 GiB)

Number Start (sector) End (sector) Size Code Name
1 2048 614400 299.0 MiB 0700 Linux filesystem
2 616448 651102207 310.2 GiB 8300 Linux filesystem
3 651102208 1544030207 425.8 GiB 8300 Linux filesystem
 
Old 05-05-2020, 10:29 AM   #111
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
With a valid GPT disk I would of expected the output of fdisk like
Quote:
/dev/sdb1 1 77108479 38554239+ ee GPT
and
the output of the file command like
Quote:
/dev/sdb: sticky x86 boot sector; partition 1: ID=0xee, starthead 0, startsector 1, 77108479 sectors, extended partition table (last)\011, code offset 0x0
 
Old 05-05-2020, 01:57 PM   #112
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by Nuuk View Post
Hopefully, this is what you want.
Yes, that is much better. But I cannot find /dev/sdb here. Was that working when you executed this mount command?
 
Old 05-05-2020, 02:31 PM   #113
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
I'm rather tired this evening so will start again tomorrow.

I will mount the drive using the right-click method and then try 'mount | grep /dev/sdb'

And then sudo gdisk -l /dev/sdb

This afternoon I went to listen to some music using an external USB hard drive. But that wasn't recognised at all so I couldn't use it. Same with a second USB hard drive, but a USB stick was recognised, and I was able to play music off that.

I also noticed this if it is possibly relevant. The drive with the music inside the computer is reported as having 26.2 GB used with 467 GB free. The file system is reported as Ext3/Ext4. I partitioned it after the format as Ext4 so I wonder what is taking up 26.2 GB, and why there is some Ext3?
 
Old 05-06-2020, 01:40 AM   #114
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Duplicated post.

Last edited by Nuuk; 05-06-2020 at 01:47 AM.
 
Old 05-06-2020, 01:46 AM   #115
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post

It was asked previously but mount it via right click and then post the output of the command
mount | grep /dev/sdb
Here is what you asked for.

Quote:
apl2 nick # mount | grep /dev/sdb
/dev/sdb1 on /media/Music type ext4 (rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered,uhelper=udisks)
apl2 nick # sudo gdisk -l /dev/sdb
sudo: gdisk: command not found
I have previously said that 'mount -a' will mount the drive if there is not a 'bottom line' in fstab but that appears to be wrong. Although I get no error message after using 'mount -a', the drive/filesystem is not mounted. The only way that it will mount is from the desktop with a right click, and then selecting the mount option.
 
Old 05-06-2020, 01:49 AM   #116
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
/dev/sdb1 is mounted on /media/Music. that is what you posted. And the filesystem is ext4. So it works that way.
Would be nice to post your full fstab.
 
Old 05-06-2020, 01:54 AM   #117
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
/dev/sdb1 is mounted on /media/Music. that is what you posted. And the filesystem is ext4. So it works that way.
Would be nice to post your full fstab.
Here you are.

Quote:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=42007db2-50af-46ae-9f4c-8b87b87c893f / ext4 rw,errors=remount-ro 0 1

# /dev/sdb
#UUID=5f85ddfd-819d-4041-b685-fc57c4676d9f /nick/Music/music ext4 # 0 0

Last edited by Nuuk; 05-06-2020 at 02:02 AM.
 
Old 05-06-2020, 01:58 AM   #118
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
fstab is a file in /etc
 
Old 05-06-2020, 02:06 AM   #119
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
fstab is a file in /etc
Yes, sorry, I am in quite a lot of pain this morning , and wasn't thinking. I have now edited the previous post to include the fstab file.
 
Old 05-06-2020, 03:37 AM   #120
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Is this the current situation? UUID looks correct (and it is actually /dev/sdb1), so you need to decide if /nick/Music/music or /media/Music should be used as mount point (or anything else).
You need to create it (if does not exist). Also need to remove the comment (if you wish to use that). You can mount only once, so repeated mount -a will do nothing.

That's all, during reboot it should be automatically mounted. BUT if it was an external disk/usb stick this /etc/fstab is not a solution (works only if it is plugged in continuously).
 
1 members found this post helpful.
  


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
Mount second drive and move Home to second drive edjenn1998 Linux - Newbie 9 07-08-2019 10:50 AM
Second Hard Drive Mounting Problems JC404 Linux - Newbie 16 07-11-2003 06:52 AM
Why does Redhat 8.0 access hard drive second by second? Cyclops Linux - Distributions 5 11-20-2002 07:34 PM
mounting a second hard drive evilRhino Linux - General 2 10-17-2002 01:22 AM
Questions regarding mounting partitions on the second hard drive HoHah Linux - General 15 04-16-2002 08:56 AM

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

All times are GMT -5. The time now is 08:28 AM.

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