LinuxQuestions.org
Visit Jeremy's Blog.
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-16-2006, 09:35 AM   #1
xcore_on
Member
 
Registered: Mar 2006
Posts: 96

Rep: Reputation: 15
how know if my system (debian) have /dev/hdb, etc


I have o computer with several disks IDE, but I no know how much or whats have?

how know if my system (debian) have /dev/hdb, /devhdc, etc..

have one command (in text mode) for see only hard disk informations (HD's installed)?
(not lshw)

Last edited by xcore_on; 05-16-2006 at 09:41 AM.
 
Old 05-16-2006, 09:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
try "fdisk -l"
 
Old 05-16-2006, 10:00 AM   #3
xcore_on
Member
 
Registered: Mar 2006
Posts: 96

Original Poster
Rep: Reputation: 15
thi command not show nothing in my distro (debian 3.1r1, kernel 2.4)!

thanks
 
Old 05-16-2006, 10:47 AM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Quote:
thi command not show nothing in my distro (debian 3.1r1, kernel 2.4)!
that's odd. Did you run as root? if so, did it give you any errors or does it just go back to the command line with no output? Please post any output from 'fdisk -l' if there is any.

note: this is a lowercase 'L' not a 1, my font makes it look like a 1 ...could be the problem.

regards,
..drkstr
 
Old 05-16-2006, 01:27 PM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Try
Code:
sudo fdisk -l
and then supply the root password.

Debian disallows login with root and "fdisk -l" is a system-related command requiring root privileges. The above should overcome it.
 
Old 05-16-2006, 01:38 PM   #6
Lotharster
Member
 
Registered: Nov 2005
Posts: 144

Rep: Reputation: 18
Quote:
Originally Posted by saikee
Try
Code:
sudo fdisk -l
and then supply the root password.

Debian disallows login with root and "fdisk -l" is a system-related command requiring root privileges. The above should overcome it.
The above comment applies to Ubuntu, NOT debian.
 
Old 05-16-2006, 02:36 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
yeah thought as much. this guy has still not tried to clarify "shows nothing" yet though... path issue or something? maybe he's just not reading it right... i do recall some versions of fdisk require the single /dev entry and only show on a per disk basis. think that was redhat 7.3 i had that on.
 
Old 05-16-2006, 06:18 PM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Ubuntu is a variant of Debian and inherits much of its security arrangement.
 
Old 05-16-2006, 09:57 PM   #9
xcore_on
Member
 
Registered: Mar 2006
Posts: 96

Original Poster
Rep: Reputation: 15
On debian:
I am use fdisk -l (run as root)!!!
Nothing happen, any erro, any message!!!


so I try this command with othes distribution (Fedora Core 5)
it show information about all disks.


strange not work on debian 3.1r1, kernel 2.4.27-2-386!!!

others ideas?
 
Old 05-17-2006, 12:15 AM   #10
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
I don't know a lot about debian releases but 3.1 seems like a pretty small number for a release, is this an older release or something? It's possible the fdisk you have is an out of date version as kewpie suggested. Try listing the device directly:
Code:
#fdisk -l /dev/hda
#fdisk -l /dev/hdb
still nothing? then try
Code:
#fdisk -h
and see what happens (note: '-h' is actually an invalid option, but will list the usage anyways). It seems strange that a command would run without any output whatsoever as this is not very typical for Linux. It makes me wonder if there are deeper issues at work here. If you get any output at all form the above commands, please post.

regards,
...drkstr
 
Old 05-17-2006, 01:30 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Quote:
Originally Posted by saikee
Ubuntu is a variant of Debian and inherits much of its security arrangement.
yes, correct, doesn't mean that whatever you know on ubuntu instantly applies to debian though.
 
Old 05-17-2006, 01:59 PM   #12
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
acid_kewpie

You are right. Debian reacts differently to the sudo command than Ubuntu.

I tried "sudo fdisk -l" on my Ubuntu 5.10 Breezy before putting up my last reply. Tried again and it certainly works OK for me. For Debian I have to do a "su" first.
 
Old 05-17-2006, 05:16 PM   #13
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
ok 2 things to try, both can be ran as user:

Code:
df -h
this should give you a list of the partitions and where they are mounted along with the size of each and amount free.

Code:
cat /etc/fstab
will give you a print out of your fstab file that tells Debian were and what everything is. my system looks like this:

Code:
df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             5.8G  3.8G  1.7G  70% /
tmpfs                 506M     0  506M   0% /dev/shm
/dev/sda2              89M   20M   65M  24% /boot
/dev/sda3              68G   51G   14G  80% /home
/dev/sdb2             183G  157G   17G  91% /sharedisk
/dev/hdb1              56G   37G   16G  71% /stuffdisk
tmpfs                 506M  132K  506M   1% /dev
ray@p4ssmahome:~$ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/sda2       /boot           ext3    defaults        0       2
/dev/sda3       /home           ext3    defaults        0       2
/dev/sdb2       /sharedisk      ext3    defaults        0       2
/dev/sdb1       swap            swap    defaults        0       0
/dev/hdc        /media/cdrom0   iso9660 ro,user,noauto  0       0
/dev/hdd        /media/cdrom1   iso9660 ro,user,noauto  0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/hdb1       /stuffdisk      ext3    defaults        0       2
/dev/sdc1       /mnt/camera     auto    defaults,user,noauto    0       0
/dev/sdc1       /mnt/USBdrive   auto    user,rw,auto    0       0
/dev/sr0        /dev/dvd        auto    rw,user,auto    0       0
so as you can see it shows all of my IDE and sATA (sd devices) what partition they are on and what they are mounted too.

hope that helps.
 
Old 05-17-2006, 05:17 PM   #14
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
Originally Posted by saikee
acid_kewpie

You are right. Debian reacts differently to the sudo command than Ubuntu.

I tried "sudo fdisk -l" on my Ubuntu 5.10 Breezy before putting up my last reply. Tried again and it certainly works OK for me. For Debian I have to do a "su" first.

do you have sudo setup for your debian box? if not then sudo will not work for you.
 
Old 05-17-2006, 05:56 PM   #15
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by drkstr
I don't know a lot about debian releases but 3.1 seems like a pretty small number for a release, is this an older release or something?
Debian Sarge (3.1) is the latest "stable" release of Debian (June 6th, 2005). But Debian is one of the oldest distros around and many distros are based off it.
 
  


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
/dev/hda under lilo.conf even thoug my HD is under /dev/hdb Basel Slackware 8 10-27-2005 06:00 PM
dd if=/dev/hda of=dev/hdb taking forever to complete fechin Linux - Hardware 7 06-19-2005 12:04 AM
Clone with dd if=/dev/hda of=/dev/hdb question wrc1944 Linux - Hardware 2 11-28-2004 09:10 AM
can't boot anymore /dev/hdb -> /dev/hde broxtor Linux - Hardware 4 11-13-2004 10:55 AM
How can I boot either one of my hard drives /dev/hda or /dev/hdb, I have RH9 and FC2 omogunkristi Linux - General 1 06-21-2004 05:11 AM


All times are GMT -5. The time now is 02:25 PM.

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