Slackware This Forum is for the discussion of Slackware Linux.
|
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.
|
 |
|
12-14-2003, 07:33 PM
|
#1
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Rep: 
|
fdisk -l has stopped working
Please tell me I'm not loosing my mind, that fdisk -l (lower case L) should list all the partitions of my hard drives, without me having to add the devices.
I've read man fdisk, searched LQ and Google/Linux, and can't find anyone else having this problem. Something seems to have changed, and I don't know what or how I've done this.
Code:
root@paul:/home/mingdao# fdisk -l
root@paul:/home/mingdao# /sbin/fdisk -l
root@paul:/home/mingdao# fdisk -l /dev/hda /dev/hdb
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
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:/home/mingdao#
As you can see, the only return I get is listing the drives. Just to be certain I tried it on my wife and daughter's comp, and it works fine there.
|
|
|
12-14-2003, 08:17 PM
|
#2
|
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918
Rep: 
|
If you have "cfdisk" installed try:
cfdisk -P s
That should return about the same thing.
|
|
|
12-14-2003, 08:23 PM
|
#3
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Original Poster
Rep: 
|
Quote:
Originally posted by 2damncommon
If you have "cfdisk" installed try:
cfdisk -P s
That should return about the same thing.
|
Thanks, 2damncommon, I do get this ->
Code:
root@paul:/home/mingdao# cfdisk -P s
Partition Table for /dev/hda
First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
1 Primary 0 6152894 63 6152895 W95 FAT32 (0B) Boot
2 Primary 6152895 120101939 0 113949045 W95 Ext'd (LBA) (0F) None
5 Logical 6152895 57368114 63 51215220 W95 FAT32 (0B) None
6 Logical 57368115 57560894 63 192780 Linux (83) None
7 Logical 57560895 61464689 63 3903795 Linux swap (82) None
8 Logical 61464690 63424619 63 1959930 Linux (83) None
9 Logical 63424620 108342359 63 44917740 Linux (83) None
10 Logical 108342360 118109879 63 9767520 Linux (83) None
11 Logical 118109880 120101939 63 1992060 Linux (83) None
root@paul:/home/mingdao#
but it's not the same output (doesn't list device, etc.) as fdisk -l, and I still want fdisk -l to work properly
I'm just getting Slack configured to work and use all the software I need so that I can format c:/q Billy's software off my comps. So, I'd really like to fix whatever I somehow broke.
|
|
|
12-15-2003, 08:32 PM
|
#4
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Original Poster
Rep: 
|
bump
surely someone knows why fdisk -l has stopped working, or what I may do to fix it
|
|
|
12-15-2003, 08:50 PM
|
#5
|
Member
Registered: Dec 2003
Location: Al-Diwania, Iraq (deployed)
Distribution: Slackware ONLY
Posts: 237
Rep:
|
why exactly is it so needed? and can you simply find a better program with proper arguments to produce the same output? ie "man cfdisk"?
Just Curious
_____________
Slackware - enough said.
|
|
|
12-15-2003, 09:04 PM
|
#6
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Original Poster
Rep: 
|
Quote:
Originally posted by miaviator278
why exactly is it so needed? and can you simply find a better program with proper arguments to produce the same output? ie "man cfdisk"?
Just Curious
_____________
Slackware - enough said.
|
If a program as basic as fdisk stopped working properly, would you want to know why? Suppose you logged into your user account as miaviator and tomorrow you couldn't. Why not just adduser johndoe and continue? Wouldn't that work just as well?
And there is no other program which works the same as fdisk. I'd like it to work properly. And I don't like reinstalling in *nix, for that's the Windoze mentality. In *nix you should be able to fix things that break, not just get a new one.

|
|
|
12-15-2003, 09:25 PM
|
#7
|
Senior Member
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571
Rep:
|
I agree with you there Chinaman.
Also, it is odd that fdisk is doing that to you.
Only thing I can think of is maybe you got some weird alias thing going.
Or, fdisk got modified somehow.
Have you logged out and back in? Or tried rebooting?
Or, something...
Edit: This from the man page:
Code:
-l List the partition tables for the specified devices and then
exit. If no devices are given, those mentioned in /proc/parti-
tions (if that exists) are used.
Maybe your /proc/partitions is hosed, eh?
Last edited by itsjustme; 12-15-2003 at 09:29 PM.
|
|
|
12-15-2003, 09:39 PM
|
#8
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Original Poster
Rep: 
|
Quote:
Originally posted by itsjustme
I agree with you there Chinaman.
Also, it is odd that fdisk is doing that to you.
Only thing I can think of is maybe you got some weird alias thing going.
Or, fdisk got modified somehow.
Have you logged out and back in? Or tried rebooting?
Or, something...
Edit: This from the man page:
Code:
-l List the partition tables for the specified devices and then
exit. If no devices are given, those mentioned in /proc/parti-
tions (if that exists) are used.
|
Yes, I've had to go into Windoze to finish a newsletter in PageMaker and capture some cassette onto my hard drive. I've been in and out several times. I don't exactly know when it happened, but noticed when I was posting some help to someone and wanted to be certain that fdisk -l produced what I expected. I got your edit in the Preview Reply, so here's that output ->
Code:
mingdao@paul:/proc$ cat partitions
major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq
3 0 60051600 ide/host0/bus0/target0/lun0/disc 69070 53665 629657 310520 84260 67387 1150591 229010 -2 23459007 39502611
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 41318 8873 50191 14670 188 9330 9527 3480 0 13750 18150
3 6 96358 ide/host0/bus0/target0/lun0/part6 9 0 60 40 29 12 328 50 0 90 90
3 7 1951866 ide/host0/bus0/target0/lun0/part7 1 0 8 20 0 0 0 0 0 20 20
3 8 979933 ide/host0/bus0/target0/lun0/part8 19254 11217 243122 92150 66483 33607 801240 195740 0 54030 287890
3 9 22458838 ide/host0/bus0/target0/lun0/part9 7959 33384 330732 193900 12064 18425 247424 23380 0 43970 217280
3 10 4883728 ide/host0/bus0/target0/lun0/part10 477 0 3804 8680 1633 1703 26688 2720 0 3320 11400
3 11 995998 ide/host0/bus0/target0/lun0/part11 44 167 1676 930 3863 4310 65384 3640 0 1910 4570
3 64 60051600 ide/host0/bus0/target1/lun0/disc 82895 267648 772902 4900950 8327 20775 140069 395850 -2 21114157 1310248
3 65 6144831 ide/host0/bus0/target1/lun0/part1 8517 0 8517 8000 0 0 0 0 0 8000 8000
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 39807 20530 482684 171010 7929 7801 126696 392020 0 119160 563030
3 70 30724281 ide/host0/bus0/target1/lun0/part6 34568 247109 281677 4721910 398 12974 13373 3830 0 2368940 4725740
mingdao@paul:/proc$
I'll have to read that some more. I have 2 identical Maxtor hard drives.
I've been installing quite a bit of stuff, so it could have happened just about anytime.
I did change inittab to runlevel 4 to login and change wm to Flux, but when I did that there were no settings like I'd used, no sound, etc. so I logged off and back into KDE. Back in KDE I checked mail in KMail, and when I selected a message it changed the sender to Unknown and everything else in the message just disappeared! All the body text, receiver, everything! Gone! And before I knew it, I had 9 messages that were from Unknown and that's all. So, I changed inittab back to run level 3 and forgot about that method of trying Flux. I'll do the wmconfig route and work there.
Thanks for your help. I didn't mean to sound rude to the other guy, but I want to fix it instead of replacing it. That way I'll learn and can also help the next guy. Fdisk in Windoze will stop all your Windoze problems, but it's not the best solution, now is it? 
|
|
|
12-15-2003, 09:53 PM
|
#9
|
Senior Member
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571
Rep:
|
That's a weird /proc/partitions. Well, to my limited experience.
This is from my freshly installed Slackware 9.1 machine:
Code:
root@bslack:~# fdisk -l
Disk /dev/hda: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 88 706828+ 82 Linux swap
/dev/hda2 * 89 337 2000092+ 83 Linux
/dev/hda3 338 586 2000092+ 83 Linux
/dev/hda4 587 3738 25318440 5 Extended
/dev/hda5 587 2410 14651248+ 83 Linux
/dev/hda6 2411 3738 10667128+ 83 Linux
root@bslack:~# cat /proc/partitions
major minor #blocks name
3 0 30029328 hda
3 1 706828 hda1
3 2 2000092 hda2
3 3 2000092 hda3
3 4 1 hda4
3 5 14651248 hda5
3 6 10667128 hda6
But, this is from my red hat 8 machine:
Code:
[root@bsl1 root]# cat /proc/partitions
major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq
3 0 39088896 hda 31964 34930 533514 342291 25808 34538 486710 3329949 -2 7300261 5806247
3 1 104391 hda1 31 80 222 255 12 7 38 2392 0 1810 2648
3 2 6225187 hda2 23 97 306 222 8 4 72 992 0 1212 1214
3 3 30716280 hda3 31896 34697 532810 341712 25788 34527 486600 3326564 0 285685 3668291
3 4 1 hda4 0 0 0 0 0 0 0 0 0 0 0
3 5 2040223 hda5 9 25 104 48 0 0 0 0 0 48 48
Last edited by itsjustme; 12-15-2003 at 09:56 PM.
|
|
|
12-15-2003, 10:30 PM
|
#10
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Original Poster
Rep: 
|
I'd read man fdisk and man cfdisk before I posted, so I'd also already looked at cat /proc/partitions. I just looked on the girls' Debian comp and it looks the same as your Slack output.
This is what's so strange to me. Check this out ->
Code:
root@paul:/home/mingdao# fdisk -l
root@paul:/home/mingdao# /sbin/fdisk -l
root@paul:/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:/home/mingdao#
It shouldn't ought to be this way  There's no output until you give it the device.
Have you tried fdisk -l on your Red Hat box that has the same cat /proc/partitions output?
Thanks!
|
|
|
12-15-2003, 10:40 PM
|
#11
|
Senior Member
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571
Rep:
|
Oh, yeah, sorry... here's the fdisk -l from red hat 8 that goes with that:
Code:
[root@bsl1 root]# fdisk -l
Disk /dev/hda: 255 heads, 63 sectors, 4866 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 4092 4866 6225187+ 83 Linux
/dev/hda3 14 3837 30716280 83 Linux
/dev/hda4 3838 4091 2040255 f Win95 Ext'd (LBA)
/dev/hda5 3838 4091 2040223+ 82 Linux swap
Partition table entries are not in disk order
That's a weird last line of the fdisk -l output...
So, anyway, your fdisk is hosed!!
Edit: It must have something to do with this stuff: 'ide/host0/bus0/target0/lun0/disc' in your /proc/partitions.
Maybe somebody else more knowledgable will jump in here and comment.
Last edited by itsjustme; 12-15-2003 at 10:43 PM.
|
|
|
12-15-2003, 11:03 PM
|
#12
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Original Poster
Rep: 
|
Quote:
Originally posted by itsjustme
Edit: It must have something to do with this stuff: 'ide/host0/bus0/target0/lun0/disc' in your /proc/partitions.
Maybe somebody else more knowledgable will jump in here and comment.
|
Isn't that the same as this line in yours? ->
Code:
3 0 39088896 hda 31964 34930 533514 342291 25808 34538 486710 3329949 -2 7300261 5806247
Not that the similarities mean my isn't messed up, you understand. Just asking a question. And why does mine output ide/host0/bus0/target0/lun0/disc where yours outputs hda?
Inquiring minds want to know 
|
|
|
12-16-2003, 06:44 AM
|
#13
|
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113
Rep: 
|
I only got that out of order message once and did 'fdisk' hit 'x' and then 'f' to 'fix partition order. It seemed to work. ymm definitely v.
As far as the weird host/bus/blah, I think you must be using 'devfs'? At least my /dev directory in Gentoo is all weird. I'm still figuring it out.  But I think that's how devfs describes disks and partitions and so on. When I specify 'fdisk -l /dev/hdX' I get the proper 'hda' stuff but when I do 'fdisk -l' I get the devfs descriptions. Sounds like your fdisk just isn't reading the 'devfs' stuff properly. Maybe it doesn't know how to read that /proc/partitions for some reason. No clue whether this is right or not or how to fix it, but it might help narrow down the mystery.
|
|
|
12-17-2003, 12:40 AM
|
#14
|
Member
Registered: Jan 2002
Location: Riverside, CA
Distribution: Slackware Convert!!
Posts: 210
Rep:
|
why don't you just create an alias?
alias fdisk -l=fdisk -l /dev/hda /dev/hdb
|
|
|
12-17-2003, 02:01 AM
|
#15
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Quote:
Originally posted by Chinaman
And why does mine output ide/host0/bus0/target0/lun0/disc where yours outputs hda?
|
That's because you're using devfs ...
But fdisk -l should still work as described in man,
does work here...
Code:
Disk /dev/ide/host0/bus1/target0/lun0/disc: 255 heads, 63 sectors, 3720 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/ide/host0/bus1/target0/lun0/part1 1 3720 29880868+ 5 Extended
/dev/ide/host0/bus1/target0/lun0/part5 1 33 265009+ 82 Linux swap
/dev/ide/host0/bus1/target0/lun0/part6 34 1308 10241406 83 Linux
/dev/ide/host0/bus1/target0/lun0/part7 1309 3720 19374358+ 83 Linux
Disk /dev/ide/host0/bus0/target0/lun0/disc: 255 heads, 63 sectors, 9729 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/ide/host0/bus0/target0/lun0/part1 * 8 868 6915951 b Win95 FAT32
/dev/ide/host0/bus0/target0/lun0/part2 1 7 56196 83 Linux
/dev/ide/host0/bus0/target0/lun0/part3 869 9729 71175982+ 5 Extended
/dev/ide/host0/bus0/target0/lun0/part5 869 899 248976 82 Linux swap
/dev/ide/host0/bus0/target0/lun0/part6 900 9729 70926943+ 83 Linux
Did you compare the binaries sizes (your machine vs wifes)?
Cheers,
Tink
|
|
|
All times are GMT -5. The time now is 01:54 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
|
|