LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-05-2015, 02:45 AM   #1
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Rep: Reputation: 26
How can gdb be used to find out why this command fails ? [/dev/sdb]


Hello.
How can gdb be used to find out why this command fails ? see [1]
Thanks Glenn

[1]
# md /media/disk
# mount -t reiser4 /dev/sdb /media/disk
mount: mount(2) failed: No such file or directory

# ll /lib/modules/`uname -r`/kernel/fs/reiser4
total 733
-rw-r--r-- 1 root root 747680 Feb 16 12:34 reiser4.ko

gdb is installed.

Thanks Glenn
------------

other details
=============

--plug disk in

[ 1042.111807] usb 1-1: SerialNumber: ST32000542 5XW1ZMG4
[ 1042.113859] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1042.114236] scsi host5: usb-storage 1-1:1.0
[ 1043.116050] scsi 5:0:0:0: Direct-Access ST320005 42AS PQ: 0 ANSI: 2
[ 1043.117192] sd 5:0:0:0: Attached scsi generic sg2 type 0
[ 1043.117242] sd 5:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[ 1043.120559] sd 5:0:0:0: [sdb] Write Protect is off
[ 1043.120566] sd 5:0:0:0: [sdb] Mode Sense: 38 00 00 00
[ 1043.123571] sd 5:0:0:0: [sdb] No Caching mode page found
[ 1043.123579] sd 5:0:0:0: [sdb] Assuming drive cache: write through

# rpm installed
###############

# rpm -qa | grep -i reiser4 |sort
kernel-reiser4-3.18.7-1.1.gd2bbe7f.x86_64
kernel-reiser4-debugsource-3.18.6-2.1.gd2bbe7f.x86_64
libreiser4-1_0-9-1.0.9-1.3.x86_64
reiser4progs-1.0.9-58.1.x86_64
reiser4progs-debuginfo-1.0.9-56.1.x86_64

# details about rpm reiser4progs
################################

Description :
A set of commands for using the Reiser4 file system, including mkfs.reiser4

#rpm reiser4progs content:
#########################

rpm -qlp reiser4progs-1.0.9-58.1.x86_64.rpm
warning: reiser4progs-1.0.9-58.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 5b40f0db: NOKEY
/usr/sbin/debugfs.reiser4
/usr/sbin/fsck.reiser4
/usr/sbin/make_reiser4
/usr/sbin/measurefs.reiser4
/usr/sbin/mkfs.reiser4
/usr/share/doc/packages/reiser4progs
/usr/share/doc/packages/reiser4progs/BUGS
/usr/share/doc/packages/reiser4progs/COPYING
/usr/share/doc/packages/reiser4progs/ChangeLog
/usr/share/doc/packages/reiser4progs/NEWS
/usr/share/doc/packages/reiser4progs/README
/usr/share/doc/packages/reiser4progs/TODO
/usr/share/man/man8/debugfs.reiser4.8.gz
/usr/share/man/man8/fsck.reiser4.8.gz
/usr/share/man/man8/measurefs.reiser4.8.gz
/usr/share/man/man8/mkfs.reiser4.8.gz

# partition format details
##########################

# fsck.reiser4 --build-fs --force /dev/sdb

Fscking the /dev/sdb block device.

***** fsck.reiser4 started at Thu Mar 5 16:54:06 2015
Reiser4 fs was detected on /dev/sdb.
Master super block (16):
magic: ReIsEr4
blksize: 4096
format: 0x0 (format40)
uuid: 3006ced1-7490-4ea8-a9b8-d82143c6bede
label: <none>

Format super block (17):
plugin: format40
description: Disk-format plugin.
version: 0
magic: ReIsEr40FoRmAt
mkfs id: 0x1ddaf754
flushes: 0
blocks: 488378640
free blocks: 217146980
root block: 37017218
tail policy: 0x2 (smart)
next oid: 0xedade
file count: 188313
tree height: 6
key policy: LARGE
 
Old 03-05-2015, 04:09 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by Glenn D. View Post
# md /media/disk
# mount -t reiser4 /dev/sdb /media/disk
mount: mount(2) failed: No such file or directory

But md is perhaps DOS way of creating directory.

In linux you use:

Code:
mkdir /media/disk
Please try and report.
 
Old 03-05-2015, 10:11 PM   #3
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
Hello,

Details:
mkdir /media/disk

# cd /media/

/media # ll
total 0
drwxr-xr-x 2 root users 48 Mar 6 00:11 disk

# cd /media/disk

# ll
total 0

Question:

What sdb commands do I use to determine why mount command fails:

# mount -t reiser4 /dev/sdb /media/disk
mount: mount(2) failed: No such file or directory
Thanks Glenn
 
Old 03-05-2015, 11:49 PM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
sdb is the name of block device representing your whole hard disk(secondary). It is the way linux accesses a hard disk.

Try this:

Code:
modprobe reiser4
mount -t reiser4 /dev/sdb /media/disk
List the output of command:

Code:
fdisk -l /dev/sdb
and
fdisk -l
 
Old 03-06-2015, 08:27 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,886
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
GDB is the GnuDebugger.

You would normally use it if you had source code compiled with symbols so that you could debug a program.

Odds are that you do not have the source for mount readily available, however it is very possible to obtain that source, rebuild it with symbols, and then perform some debug.

HOWEVER, you do not need to go to that level to diagnose this issue. You just need to figure out how to use the mount command. Veerain is on the way to helping you with that. Basically you need to determine the type of disk partition which you are attempting to mount and then tailor the arguments for the mount command to perform the operation. You also need to get the syntax for mount correctly as well and need to be root or sudo, which you already appear to be.

So for now just realize that GDB is not a general debugger for system commands and it's really a debugger for source code debugging. It is very powerful, just not the tool which will benefit you in this particular case.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Format /dev/sdb1 fails but /dev/sdb succeeds? Lop3 Linux - Hardware 2 02-09-2014 05:06 PM
Can i dd if=/dev/sdb of=/dev/sdc if hdsize(sdb)>hdsize(sdc) & size(sdb)<hdsize(sdc) ? ununun Linux - Software 6 06-28-2011 11:48 AM
RHEL 6 after boot primary partition shows /dev/sdb instead of /dev/sda vipul_patel Red Hat 1 04-26-2011 09:48 AM
Umount /dev/sdb for ejecting IPOD. Debian couldnt find the device anymore auroches Linux - Newbie 1 07-24-2009 12:00 AM
hfs: unable to find HFS+ superblock VFS: Can't find ext3 filesystem on dev sdb. macroron Linux - Hardware 3 11-20-2006 09:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:58 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