LinuxQuestions.org
Visit Jeremy's Blog.
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-03-2009, 11:29 PM   #1
naisanza
LQ Newbie
 
Registered: May 2009
Posts: 4

Rep: Reputation: 0
[SOLVED] how can you find out what devices you have on your system?


I'm super fresh to linux so please bare with me.
I have two hard drives on my system. One was automatically mounted.
My question is: How do you find the device of the second hard drive which to mount? Is there a device manager (devmgmt.msc in win) that lists all connected devices?

Here is a list of existing devices that are mounted. I don't know if that will help.
pubuntu@pubuntu:~$ mount
/dev/cobd0 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cobd2 on /tmp type ext2 (rw)
cofs0 on /etc/portable_ubuntu type cofs (rw,noexec,nosuid,nodev,dmask=0777,fmask=0666)
cofs1 on /mnt/C type cofs (rw,noexec,nosuid,nodev,dmask=0777,fmask=0666)
gvfs-fuse-daemon on /home/pubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=pubuntu)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

Thanks in advance.

Last edited by naisanza; 05-04-2009 at 04:13 PM.
 
Old 05-03-2009, 11:50 PM   #2
kellinwood
Member
 
Registered: Jan 2006
Location: Culver City, California
Distribution: Fedora
Posts: 64

Rep: Reputation: 21
Try looking through the output of the 'dmesg' command.

Ken
 
Old 05-04-2009, 12:19 AM   #3
naisanza
LQ Newbie
 
Registered: May 2009
Posts: 4

Original Poster
Rep: Reputation: 0
This was its output:

root@pubuntu:~# dmesg
Linux version 2.6.22.18-co-0.7.3 (hn@coLinux) (gcc version 4.1.2) #1 PREEMPT Sat May 24 22:27:30 UTC 2008
512MB LOWMEM available.
initrd enabled: start: 0xdff9a000 size: 0x00065881
Entering add_active_range(0, 0, 131072) 0 entries of 256 used
Zone PFN ranges:
DMA 0 -> 0
Normal 0 -> 131072
early_node_map[1] active PFN ranges
0: 0 -> 131072
On node 0 totalpages: 131072
DMA zone: 0 pages used for memmap
Normal zone: 1024 pages used for memmap
Normal zone: 130048 pages, LIFO batch:31
Built 1 zonelists. Total pages: 130048
Kernel command line: root=/dev/cobd0 ro
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Setting proxy interrupt vectors
PID hash table entries: 2048 (order: 11, 8192 bytes)
Console: colour CoCON 80x25
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 515456k/524288k available (1705k kernel code, 0k reserved, 470k data, 128k init, 0k highmem)
virtual kernel memory layout:
fixmap : 0xffffc000 - 0xfffff000 ( 12 kB)
vmalloc : 0xe0800000 - 0xffffa000 ( 503 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
.init : 0xc0322000 - 0xc0342000 ( 128 kB)
.data : 0xc02aa638 - 0xc031ffe4 ( 470 kB)
.text : 0xc0100000 - 0xc02aa638 (1705 kB)
Calibrating delay loop... 2503.47 BogoMIPS (lpj=12517376)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: bfebfbff 20100000 00000000 00000000 0000e3bd 00000000 00000001
monitor/mwait feature present.
using mwait in idle threads.
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
CPU: After all inits, caps: bfebf3ff 20100000 00000000 00003940 0000e3bd 00000000 00000001
Compat vDSO mapped to ffffe000.
CPU: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz stepping 06
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 406k freed
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
cofuse init 0.1 (API version 2.2)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
cobd: loaded (max 32 devices)
loop: module loaded
conet: loaded (max 16 devices)
conet0: initialized
serio: cokbd at irq 1
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /class/input/input0
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
ReiserFS: cobd0: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on cobd0
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: cobd0: orphan cleanup on readonly fs
ext3_orphan_cleanup: deleting unreferenced inode 82006
EXT3-fs: cobd0: 1 orphan inode deleted
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Trying to move old root to /initrd ... okay
Freeing unused kernel memory: 128k freed
fuse init (API version 7.8)
Unable to find swap-space signature
EXT3 FS on cobd0, internal journal
Adding 262136k swap on /dev/cobd1. Priority:-1 extents:1 across:262136k
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
eth0: no IPv6 routers present
fuse_dir_open: host returned error: ffffffff
fuse_dir_open: host returned error: ffffffff
fuse_dir_open: host returned error: ffffffff
fuse_dir_open: host returned error: ffffffff


=========================================================
=========================================================


under the mount command it listed these mounted drives:

root@pubuntu:~# mount
/dev/cobd0 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cobd2 on /tmp type ext2 (rw)
cofs0 on /etc/portable_ubuntu type cofs (rw,noexec,nosuid,nodev,dmask=0777,fmask=0666)
cofs1 on /mnt/C type cofs (rw,noexec,nosuid,nodev,dmask=0777,fmask=0666)
gvfs-fuse-daemon on /home/pubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=pubuntu)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)



I don't know what to be looking for in the dmesg output.
I see my C drive is mounted to /mnt/C but I don't see 'cofs1' anywhere in /dev/
 
Old 05-04-2009, 03:01 AM   #4
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Rep: Reputation: Disabled
naisanza:

Quote:
My question is: How do you find the device of the second hard drive which to mount? Is there a device manager (devmgmt.msc in win) that lists all connected devices?
In Ubuntu I type this command from the console (Applications > Accessories > Terminal)
Code:
sudo lshw
will show all hardware plugged in your pc...also you might try gparted, that program shows all the partitions and disk space...be careful with this one...don't change anything unless you know what you're doing.

I had a very hard time getting the system to accept my second drive, after a few days here, and a lot of help from some nice folks, I got it to be mounted on bootup by changing a few files.

Linux is hard at first but gets easier every day.

good luck

Last edited by joseph2020; 05-04-2009 at 03:03 AM.
 
Old 05-04-2009, 06:22 AM   #5
Eric952x
Member
 
Registered: Apr 2006
Location: Florida
Distribution: Ubuntu 10.04 & Linux Mint 9
Posts: 39

Rep: Reputation: 15
I use Ubuntu 8.04 and also have two hard drives. One of the drives is used as a back-up and is not automatically mounted. When I need access to it I click on Places in the top taskbar than computer in the next window the hard drive is in the list than I just click on it. The drive is mounted and ready to use. I think that if the drive is used as a back-up drive it probably is better it is not mounted automatically that way if something goes wrong with your system the back-up drive will not be effected. When the second drive is mounted it will be on your desktop you can right click on the drive and find the mount point you can use the command line to mount the drive in the future if you would rather mount it that way.
Good Luck
Eric
 
Old 05-04-2009, 07:25 AM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
fdisk -l is typically the command you would use to see all the disks on a system.

Code:
it-lenny:~# fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0e1069f4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         851     6835626   83  Linux
/dev/sda2             852       19452   149412532+   5  Extended
/dev/sda5             852        1181     2650693+  82  Linux swap / Solaris
/dev/sda6            1182       19452   146761776   83  Linux

Disk /dev/sdb: 511 MB, 511705088 bytes
33 heads, 32 sectors/track, 946 cylinders
Units = cylinders of 1056 * 512 = 540672 bytes
Disk identifier: 0xf01cd10d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         947      499696    6  FAT16
Partition 1 has different physical/logical endings:
     phys=(976, 32, 32) logical=(946, 13, 32)

I don't know if that will be different in colinux or not..
http://colinux.wikia.com/wiki/Cofs_device
 
Old 05-04-2009, 07:32 AM   #7
mikepeters76
Member
 
Registered: Apr 2009
Location: Sydney, Australia
Distribution: Ubuntus, Fedora, openSUSE, and Vector Lite 6.0
Posts: 46

Rep: Reputation: 16
Mate,
I use the following commands:
"sg_map" shows where the devices is mapped to /dev/; and
"sg_scan -i" which shows which device it is that is mapped to /dev, useful info such as who makes the hdd etc.
Quote:
sg_scan -i
/dev/sg0: scsi0 channel=0 id=0 lun=0 [em]
ATA FUJITSU MHV2060A 0000 [rmb=0 cmdq=0 pqual=0 pdev=0x0]
Quote:
sg_map
/dev/sg0 /dev/sda

Last edited by mikepeters76; 05-04-2009 at 07:34 AM.
 
Old 05-04-2009, 04:13 PM   #8
naisanza
LQ Newbie
 
Registered: May 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Yup that all works.
You all have been excellent help. Thanks for all your answers!

-Eric
 
  


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
CentOs5.1- - - cannot find /sys/devices/system/cpu/cpu0/cpufreq/ lukegong Red Hat 4 02-27-2008 10:15 AM
insmod can't find acpi devices akirapill Debian 5 06-26-2007 03:16 PM
system calls to devices?Talking to devices. kiruxa Linux - Hardware 6 12-09-2006 05:46 PM
sure, fdisk -l to find devices ... stabu Slackware 7 10-02-2005 01:10 AM
find the devices.... alaios Linux - Networking 3 08-30-2004 03:01 PM

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

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