LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how know if my system (debian) have /dev/hdb, etc (https://www.linuxquestions.org/questions/linux-newbie-8/how-know-if-my-system-debian-have-dev-hdb-etc-445341/)

xcore_on 05-16-2006 09:35 AM

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)

acid_kewpie 05-16-2006 09:42 AM

try "fdisk -l"

xcore_on 05-16-2006 10:00 AM

thi command not show nothing in my distro (debian 3.1r1, kernel 2.4)!

thanks

drkstr 05-16-2006 10:47 AM

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

saikee 05-16-2006 01:27 PM

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.

Lotharster 05-16-2006 01:38 PM

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.

acid_kewpie 05-16-2006 02:36 PM

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.

saikee 05-16-2006 06:18 PM

Ubuntu is a variant of Debian and inherits much of its security arrangement.

xcore_on 05-16-2006 09:57 PM

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?

drkstr 05-17-2006 12:15 AM

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

acid_kewpie 05-17-2006 01:30 AM

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.

saikee 05-17-2006 01:59 PM

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.

lleb 05-17-2006 05:16 PM

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.

lleb 05-17-2006 05:17 PM

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.

pljvaldez 05-17-2006 05:56 PM

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.


All times are GMT -5. The time now is 06:48 AM.