[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Disk tools in debian



Hi, 

In other distros, if I want to have a look at what HDs I have and
their size, I just issue 'sfdisk -s', then all the HDs I have and
their size are shown. But in debian, nothing happens after issuing
'sfdisk -s'. Hence, question #1,

How can I know what HDs I have in my system (so that I can feed to
result to the rest of my script)? 

Other things I can do with other distros but not debian are:

- get all disk geometries

$ sfdisk -g
/dev/hdd: 2494 cylinders, 255 heads, 63 sectors/track
/dev/hda: 7476 cylinders, 255 heads, 63 sectors/track

- get all partitions

fdisk -l | grep '^/hd[a-d]'
/dev/hdd1             1        64    514048+  82  Linux swap
/dev/hdd2   *        65       319   2048287+  83  Linux
[...]
/dev/hda1             1        64    514048+  82  Linux swap
/dev/hda2            65       321   2064352+   b  Win95 FAT32

I'll stress that my questions are scripting-wise. I need to write
generic script that doesn't require me to throw in specific hd
info for it to run. I think the disk tools is sadly a week point
in Debian, or maybe I haven't find the right gadget. Please help.

thanks





Reply to: