LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-13-2004, 09:21 PM   #1
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
fdisk -l has stopped giving output


Using Slack 9.1 with kernel 2.4.23. I've posted before but no one could help. I've read man pages, LQ threads, Googled all over the place, and can't seem to find out why this has happened. If I do the normal fdisk -l command it just returns me to a prompt. If I list the device afterwards, I get the proper output. So fdisk is working, but just not as it should.

From man fdisk
Quote:
-l List the partition tables for the specified devices and then exit. If no devices are given, those mentioned in /proc/partitions (if that exists) are used.
So, here's my output
Code:
root@paul:Wed Jan 14 11:16:10/home/mingdao# cat /proc/partitions
major minor  #blocks  name     rio rmerge rsect ruse wio wmerge wsect wuse running use aveq

   8     0     128000 scsi/host1/bus0/target0/lun0/disc 2032 7714 9750 12970 1139 153885 155025 10137020 0 203060 10149990
   8     1     127983 scsi/host1/bus0/target0/lun0/part1 2031 7711 9742 12960 1139 153885 155025 10137020 0 203050 10149980
  22     0     672292 hdc 5 0 14 2750 0 0 0 0 -78 9318721 7167115
   3     0   60051600 ide/host0/bus0/target0/lun0/disc 141485 424280 3928771 10676000 278438 1038107 6862161 1030380 -2 5730581 36018560
   3     1    3076416 ide/host0/bus0/target0/lun0/part1 0 0 0 0 0 0 0 0 0 0 0
   3     2          1 ide/host0/bus0/target0/lun0/part2 0 0 0 0 0 0 0 0 0 0 0
   3     5   25607578 ide/host0/bus0/target0/lun0/part5 79105 6032 85137 78410 4314 520247 524561 366460 0 53960 444870
   3     6      96358 ide/host0/bus0/target0/lun0/part6 12 0 84 80 49 19 544 70 0 130 150
   3     7    1951866 ide/host0/bus0/target0/lun0/part7 1 0 8 10 29 315 2808 60 0 30 70
   3     8     979933 ide/host0/bus0/target0/lun0/part8 29340 14500 350074 96840 156461 75877 1859632 286890 0 85780 383730
   3     9   22458838 ide/host0/bus0/target0/lun0/part9 32403 403458 3486876 10489550 107001 425944 4264304 364990 0 4604650 10854540
   3    10    4883728 ide/host0/bus0/target0/lun0/part10 544 9 4412 9740 3360 3432 54336 5310 0 4610 15050
   3    11     995998 ide/host0/bus0/target0/lun0/part11 63 182 1948 1100 7224 12273 155976 6600 0 2990 7700
   3    64   60051600 ide/host0/bus0/target1/lun0/disc 95188 24413 567987 203700 16579 15089 254628 1628410 -2 9315541 26144330
   3    65    6144831 ide/host0/bus0/target1/lun0/part1 18103 402 18505 17280 1 7 8 0 0 17280 17280
   3    66          1 ide/host0/bus0/target1/lun0/part2 0 0 0 0 0 0 0 0 0 0 0
   3    69   14161266 ide/host0/bus0/target1/lun0/part5 44223 19827 512388 176890 16569 15072 254600 1628360 0 124130 1805250
   3    70   30724281 ide/host0/bus0/target1/lun0/part6 32855 4143 36998 9450 9 10 20 50 0 9240 9500

root@paul:Wed Jan 14 11:16:17/home/mingdao# fdisk -l
root@paul:Wed Jan 14 11:16:17/home/mingdao# (it just returns to a prompt with no output)

root@paul:Wed Jan 14 11:16:40/home/mingdao# fdisk -l /dev/hda

Disk /dev/hda: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         383     3076416    b  W95 FAT32
/dev/hda2             384        7476    56974522+   f  W95 Ext'd (LBA)
/dev/hda5             384        3571    25607578+   b  W95 FAT32
/dev/hda6            3572        3583       96358+  83  Linux
/dev/hda7            3584        3826     1951866   82  Linux swap
/dev/hda8            3827        3948      979933+  83  Linux
/dev/hda9            3949        6744    22458838+  83  Linux
/dev/hda10           6745        7352     4883728+  83  Linux
/dev/hda11           7353        7476      995998+  83  Linux

root@paul:Wed Jan 14 11:16:49/home/mingdao# fdisk -l /dev/hdb

Disk /dev/hdb: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1         765     6144831    b  W95 FAT32
/dev/hdb2             766        6353    44885610    f  W95 Ext'd (LBA)
/dev/hdb5             766        2528    14161266   83  Linux
/dev/hdb6            2529        6353    30724281    b  W95 FAT32
root@paul:Wed Jan 14 11:16:53/home/mingdao#
 
Old 01-19-2004, 09:23 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
bump

I think I waited the required 24 hours, and some of my favorite posters are online now

Can fdisk be obtained and reinstalled?

Last edited by Bruce Hill; 01-19-2004 at 09:24 PM.
 
Old 01-20-2004, 12:54 PM   #3
reclusivemonkey
Member
 
Registered: May 2003
Location: Halifax, WY, UK
Distribution: Slackware 9
Posts: 167

Rep: Reputation: 30
From 'man fdisk';

SYNOPSIS
fdisk [-u] [-b sectorsize] [-C cyls] [-H heads] [-S sects] device

Everything in [square brackets] is optional. The device, however, is not. If you only have one drive, then fdisk will show the output for that one disk (as my single hard drive system does). As you have two hard drives, when you give the command fdisk -l, fdisk doesn't know which drive you mean and so returns no output. When you give it the device, it works as it should. I am presuming this is what is happening I don't know if anyone else can confirm this. When I get around to buying a new hard drive, I'll let you know ;-)

munkeh
 
Old 01-20-2004, 02:33 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by reclusivemonkey
SYNOPSIS
fdisk [-u] [-b sectorsize] [-C cyls] [-H heads] [-S sects] device
Read again ....
Quote:
Code:
SYNOPSIS
       fdisk [-u] [-b sectorsize]device

       fdisk -l [-u] [-b sectorsize] [device ...]

       fdisk -s partition ...

       fdisk -v
If invoked with -l device is optional ...

Cheers,
Tink
 
Old 01-20-2004, 03:43 PM   #5
reclusivemonkey
Member
 
Registered: May 2003
Location: Halifax, WY, UK
Distribution: Slackware 9
Posts: 167

Rep: Reputation: 30
So what's happening then?
 
Old 01-20-2004, 05:55 PM   #6
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by reclusivemonkey
So what's happening then?
Dude, you didn't read my first post very well. Try that again, would you? The first line says that I've read man fdisk. And then it tells you this, which I'll repeat for you.
Code:
-l     List the partition tables for the specified devices and then exit.   If  no  devices  are  given,
              those mentioned in /proc/partitions (if that exists) are used.
It used to work just fine, and does on other comps with Slack 9.1 and 2 drives.

Now we get to your question above, which is my question.

What does Tink say in his sig?
guru, n:
A computer owner who can read the manual.
 
Old 01-20-2004, 06:10 PM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
Tink,

Do you have a clue why this may have happened, or what I can read to try and figure it out, or if I can just reinstall fdisk? I'm at the end of my resources.
 
Old 01-20-2004, 06:24 PM   #8
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
just curious, what do you get from

cat /proc/partitions
 
Old 01-20-2004, 06:29 PM   #9
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by PEACEDOG
just curious, what do you get from

cat /proc/partitions
Thanks for joining in helping me, PEACEDOG. That's in post #1
 
Old 01-20-2004, 06:40 PM   #10
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
sorry bout that mate, i was reading thru your original post and skimmed this one, i missed it. this is strange indeed. i believe that a guru will have to pin this one down.
 
Old 01-20-2004, 06:49 PM   #11
reclusivemonkey
Member
 
Registered: May 2003
Location: Halifax, WY, UK
Distribution: Slackware 9
Posts: 167

Rep: Reputation: 30
man:

fdisk is a buggy program that does fuzzy things - usually it happens to produce reasonable results.

...and I'm the only one reading it stoned so I guess I'll be the only one who finds it all funny.
 
Old 01-20-2004, 06:50 PM   #12
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by PEACEDOG
sorry bout that mate, i was reading thru your original post and skimmed this one, i missed it. this is strange indeed. i believe that a guru will have to pin this one down.
When I find someone that can, I'm putting him on retainer! I thought Tink would do it right off the bat. Or 'spot on' - whatever that means :}
 
Old 01-20-2004, 06:57 PM   #13
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Quote:
When I find someone that can, I'm putting him on retainer! I thought Tink would do it right off the bat. Or 'spot on' - whatever that means :}
me too. just thinking out loud here, could there have been some sort of update, or possibly kernel compile that changed the parameters of the fdisk commands? i only ask this because it worked, then, it only works w/ the device parameter.
 
Old 01-20-2004, 07:11 PM   #14
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by reclusivemonkey
man:

fdisk is a buggy program that does fuzzy things - usually it happens to produce reasonable results.

...and I'm the only one reading it stoned so I guess I'll be the only one who finds it all funny.
I used to do everything stoned, and now I don't get stoned anymore. And, I sure wish I had all those brain cells back that I burned up! Stop while there's still hope for you!
 
Old 01-20-2004, 07:13 PM   #15
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by PEACEDOG
me too. just thinking out loud here, could there have been some sort of update, or possibly kernel compile that changed the parameters of the fdisk commands? i only ask this because it worked, then, it only works w/ the device parameter.
Yes I have recompiled the kernel to 2.4.23, but I don't know how to "check the parameters." I'll read, and if you know, you can enlighten me. I'm out to learn, not reinstall Slack, as we'd do if Winders stopped showing 'drives' in Winders Explorer.
 
  


Reply



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
Partition error - Different FDISK and YaST output Jongi SUSE / openSUSE 8 11-26-2005 06:42 PM
Linux commands - giving doubled output shinobi59 Red Hat 1 11-07-2005 06:43 PM
fdisk -l has stopped working Bruce Hill Slackware 42 09-06-2004 08:18 AM
fdisk -l output? hank43 Linux - General 3 03-07-2004 01:59 PM
df -h is giving weird output chens_83 Linux - General 2 12-09-2002 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:16 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
Open Source Consulting | Domain Registration