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
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
07-12-2010, 05:13 AM
#1
Senior Member
Registered: Dec 2008
Posts: 4,731
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 !
07-12-2010, 05:20 AM
#2
Member
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559
Rep:
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:
did the trick!
1 members found this post helpful.
07-12-2010, 05:21 AM
#3
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Rep:
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 05:25 AM .
1 members found this post helpful.
07-12-2010, 05:24 AM
#4
Senior Member
Registered: Dec 2008
Posts: 4,731
Original Poster
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.
07-12-2010, 05:26 AM
#5
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Rep:
I'd be surprised if it wasn't available for OpenSuse.
07-12-2010, 05:27 AM
#6
Senior Member
Registered: Dec 2008
Posts: 4,731
Original Poster
Quote:
Originally Posted by
brianL
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.
07-12-2010, 05:30 AM
#7
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Rep:
Time to change your distro!
0 members found this post helpful.
07-12-2010, 05:30 AM
#8
Member
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559
Rep:
2 members found this post helpful.
07-12-2010, 05:31 AM
#9
Senior Member
Registered: Dec 2008
Posts: 4,731
Original Poster
I should change my distro just to know the hard disk number ????
07-12-2010, 05:33 AM
#10
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Rep:
It's as good a reason as any.
0 members found this post helpful.
07-12-2010, 06:01 AM
#11
Senior Member
Registered: Dec 2008
Posts: 4,731
Original Poster
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'
07-12-2010, 06:13 AM
#12
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Hard disk serial no.: # hdparm -i /dev/sda
Or : # hdparm -i /dev/sda | grep -i serial
..
1 members found this post helpful.
07-12-2010, 06:13 AM
#13
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Rep:
1 members found this post helpful.
07-12-2010, 06:17 AM
#14
Senior Member
Registered: Dec 2008
Posts: 4,731
Original Poster
Quote:
Originally Posted by
knudfl
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
07-12-2010, 06:20 AM
#15
Senior Member
Registered: Dec 2008
Posts: 4,731
Original Poster
Quote:
Originally Posted by
brianL
Maybe this:
Yes Brian you are right, I could never have figured out that output on my own.
Thanks for bothering
Last edited by Aquarius_Girl; 07-12-2010 at 06:23 AM .
All times are GMT -5. The time now is 06:26 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News