LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-12-2010, 06:13 AM   #1
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
How to find out the serial number of my hard disk through command line on OpenSuse 11.2 ?


I read this thread but
Code:
anisha@linux-uitj:~> su
Password:
linux-uitj:/home/anisha # lshw
If 'lshw' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf lshw
linux-uitj:/home/anisha # cnf lshw
lshw: command not found
Any other way out ?
Kindly guide !
 
Old 07-12-2010, 06:20 AM   #2
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Hi

I suspect you need to install the lshw package - I know it does not come standard on RHEL/Fedora; perhaps its the same for OpenSuse?

On my Fedora machine:

Code:
# yum install lshw
did the trick!
 
1 members found this post helpful.
Old 07-12-2010, 06:21 AM   #3
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,564
Blog Entries: 56

Rep: Reputation: Disabled
You can probably install lshw via your package manager.
Or, there may be a cover on the base of your laptop that enables you to access the hard drive and read its label.

Last edited by brianL; 07-12-2010 at 06:25 AM.
 
1 members found this post helpful.
Old 07-12-2010, 06:24 AM   #4
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Thanks to both of you !

But AFAIK cnf saying command not found means that there is no such command because if the command can be installed cnf says "You can install it through zypper ..."

OK I shall try the package manager.
 
Old 07-12-2010, 06:26 AM   #5
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,564
Blog Entries: 56

Rep: Reputation: Disabled
I'd be surprised if it wasn't available for OpenSuse.
 
Old 07-12-2010, 06:27 AM   #6
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by brianL View Post
I'd be surprised if it wasn't available for OpenSuse.
Here is something to surprise you:
Code:
linux-uitj:/home/anisha # zypper install lshw
Retrieving repository 'KDE:KDE3' metadata [done]
Building repository 'KDE:KDE3' cache [done]
Retrieving repository 'X11:lxde' metadata [done]
Building repository 'X11:lxde' cache [done]
Retrieving repository 'openSUSE-11.2-Update' metadata [done]
Building repository 'openSUSE-11.2-Update' cache [done]
Loading repository data...
Reading installed packages...
'lshw' not found.
Resolving package dependencies...

Nothing to do.
 
Old 07-12-2010, 06:30 AM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,564
Blog Entries: 56

Rep: Reputation: Disabled
Time to change your distro!
 
0 members found this post helpful.
Old 07-12-2010, 06:30 AM   #8
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Have a look at this: http://linuxpoison.blogspot.com/2009...-in-linux.html
 
2 members found this post helpful.
Old 07-12-2010, 06:31 AM   #9
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
I should change my distro just to know the hard disk number ????
 
Old 07-12-2010, 06:33 AM   #10
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,564
Blog Entries: 56

Rep: Reputation: Disabled
It's as good a reason as any.
 
0 members found this post helpful.
Old 07-12-2010, 07:01 AM   #11
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Well I searched Google and found this thread:
http://forums.opensuse.org/archives/...ml#post1787445

Running hwinfo command has given me a extremely long output, a small part of it i have presented here:

I do not know how to find out the hard disk serial number from this.

Code:
linux-uitj:/home/anisha # hwinfo
============ start debug info ============                      
libhd version 16.10 (x86-64)                                    
using /var/lib/hardware                                         
kernel version is 2.6                                           
----- /proc/cmdline -----                                       
  root=/dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part5 resume=/dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part2 splash=silent quiet vga=0x31a                                                                                                                     
----- /proc/cmdline end -----                                                                                                  
hd.ids line 278: invalid info                                                                                                  
debug = 0xff7ffff7                                                                                                             
probe = 0x1d938fcdaa17fcf9fffe (+memory +pci +isapnp +net +floppy +misc +misc.serial +misc.par +misc.floppy +serial +cpu +bios +monitor +mouse +scsi +usb -usb.mods +modem +modem.usb +parallel +parallel.lp +parallel.zip -isa -isa.isdn +isdn +kbd +prom +sbus +int +braille +braille.alva +braille.fhp +braille.ht -ignx11 +sys -bios.vbe -isapnp.old -isapnp.new -isapnp.mod +braille.baum -manual +fb +pppoe -scan +pcmcia +fork -parallel.imm +s390 +cpuemu -sysfs -s390disks +udev +block +block.cdrom +block.part +edd +edd.mod -bios.ddc -bios.fb -bios.mode +input +block.mods +bios.vesa -cpuemu.debug -scsi.noserial +wlan -bios.crc -hal +bios.vram +bios.acpi -bios.ddc.ports=0 +modules.pata +net.eeprom +x86emu=dump -max -lxrc)                                          
shm: attached segment 9666567 at 0x7fbe92b63000                                                                                
>> hal.1: read hal data                                                                                                        
  hal: connected to: :1.123                                                                                                    
----- hal device list -----                                                                                                    
  0: udi = '/org/freedesktop/Hal/devices/pci_8086_27d8_sound_card_0_oss_pcm_0_0'                                               
  info.udi = '/org/freedesktop/Hal/devices/pci_8086_27d8_sound_card_0_oss_pcm_0_0'                                             
  linux.hotplug_type = 2 (0x2)                                                                                                 
  linux.subsystem = 'sound'                                                                                                    
  info.subsystem = 'sound'                                                                                                     
  info.product = 'VT1708S Analog OSS PCM Device'                                                                               
  oss.device_file = '/dev/dsp'                                                                                                 
  oss.originating_device = '/org/freedesktop/Hal/devices/pci_8086_27d8_sound_card_0'                                           
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/dsp'                                                    
  info.parent = '/org/freedesktop/Hal/devices/pci_8086_27d8_sound_card_0'                                                      
  oss.card_id = 'HDA Intel'                                                                                                    
  oss.card = 0 (0x0)                                                                                                           
  info.category = 'oss'                                                                                                        
  info.capabilities = { 'oss' }                                                                                                
  oss.type = 'pcm'                                                                                                             
  oss.device = 0 (0x0)                                                                                                         
  oss.device_id = 'VT1708S Analog'                                                                                             
  linux.device_file = '/dev/dsp'
 
Old 07-12-2010, 07:13 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,737

Rep: Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318
Hard disk serial no.: # hdparm -i /dev/sda
Or : # hdparm -i /dev/sda | grep -i serial

..
 
1 members found this post helpful.
Old 07-12-2010, 07:13 AM   #13
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,564
Blog Entries: 56

Rep: Reputation: Disabled
Maybe this:
Quote:
ata-ST3250310AS_6RYNQEXY
 
1 members found this post helpful.
Old 07-12-2010, 07:17 AM   #14
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by knudfl View Post
Hard disk serial no.: # hdparm -i /dev/sda
Or : # hdparm -i /dev/sda | grep -i serial

..
Thanks a lot

I tried this out, see the results !!
Code:
linux-uitj:/home/anisha # hdparm -i /dev/sda | grep -i serial
 Model=ST3250310AS, FwRev=4.AAA, SerialNo=6RYNQEXY
 
Old 07-12-2010, 07:20 AM   #15
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by brianL View Post
Maybe this:
Yes Brian you are right, I could never have figured out that output on my own.

Thanks for bothering

Last edited by TheIndependentAquarius; 07-12-2010 at 07:23 AM.
 
  


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
How to get Hard Disk serial number using C++ program in linux anu_123 Linux - Newbie 10 05-04-2010 09:23 AM
How do I find the serial ports COM number? morty346 Linux - Newbie 1 02-09-2009 05:04 PM
Best/Right way to extract disk serial number? itnaa Linux - Hardware 4 08-21-2007 12:13 PM
Hard Drive Serial Number? daver Linux - Hardware 4 03-17-2004 10:57 AM
Find Serial Number of Machine zael Programming 4 10-27-2003 01:39 PM

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

All times are GMT -5. The time now is 05:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration