DebianThis forum is for the discussion of Debian 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.
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.
I have installed Debian 3.1 Sarge on a multiple boot system, multiple disk system (WinXP on hda1, Sarge on hda3 and FC4 on hda7, plus hdb and hdd with some old stuff), and Debian fdisk produces no output from:
Code:
# fdisk -l
Its version is:
Code:
# fdisk -v
fdisk v2.12p
So here comes instead the output from Fedora Core 4:
Code:
# fdisk -v
fdisk v2.12p
#fdisk -l
Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/hda2 3825 11473 61440592+ 5 Extended
/dev/hda3 11474 14946 27896872+ 83 Linux
/dev/hda5 3825 7648 30716248+ b W95 FAT32
/dev/hda6 7649 7903 2048256 82 Linux swap / Solaris
/dev/hda7 7904 11473 28675993+ 83 Linux
Disk /dev/hdb: 6481 MB, 6481293312 bytes
255 heads, 63 sectors/track, 787 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 261 2096451 b W95 FAT32
/dev/hdb2 262 274 104422+ 6 FAT16
/dev/hdb3 415 431 136552+ 82 Linux swap / Solaris
/dev/hdb4 432 787 2859570 83 Linux
Disk /dev/hdd: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdd1 1 13 104391 6 FAT16
/dev/hdd2 14 20 56227+ 83 Linux
/dev/hdd3 * 21 785 6144862+ c W95 FAT32 (LBA)
/dev/hdd4 786 2434 13245592+ f W95 Ext'd (LBA)
/dev/hdd5 786 913 1028128+ b W95 FAT32
/dev/hdd6 914 1041 1028128+ b W95 FAT32
/dev/hdd7 * 1042 1679 5124703+ b W95 FAT32
/dev/hdd8 1680 1712 265041 82 Linux swap / Solaris
/dev/hdd9 1713 2434 5799433+ 83 Linux
Disk /dev/sda: 1026 MB, 1026555904 bytes
16 heads, 32 sectors/track, 3916 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 3916 1002480 e W95 FAT16 (LBA)
Nevertheless, Debian fdisk does produce the correct output for each drive as in:
Code:
# fdisk -l /dev/hda
Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/hda2 3825 11473 61440592+ 5 Extended
/dev/hda3 11474 14946 27896872+ 83 Linux
/dev/hda5 3825 7648 30716248+ b W95 FAT32
/dev/hda6 7649 7903 2048256 82 Linux swap / Solaris
/dev/hda7 7904 11473 28675993+ 83 Linux
What could be the cause of this problem? How to solve it?
-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 I guess you have no /proc/partitions or the file is empty. Perhaps there was an error mounting /proc or something similar. Check the output of
Code:
dmesg
for errors and also take a look at your system's log files (/var/log/messages, /var/log/syslog etc) to see if you find something.
Try what bathory said to attempt to locate the problem.
Have you tried "fdisk -l" on a drive. For example, does "fdisk -l /dev/hda" output anything? (It should. If it doesnt, I would suspect an issue with fdisk).
Have you tried "fdisk -l" on a drive. For example, does "fdisk -l /dev/hda" output anything? (It should. If it doesnt, I would suspect an issue with fdisk).
Apparently, it implies a problem with /etc/hotplug/input.rc. I do not know whether these error messages could have any relationship with this fdisk problem.
So, is this a known issue? Should I report it as a bug?
Dunno but the contents of /proc/partitions are strange. Only hdc has a "normal" name. The other disks/partitions are named like: ide/host0/bus1/target1/lun0/disc etc and there are also the columns (rio rmerge rsect ruse wio wmerge wsect wuse running use aveq) which are not present at least in my 3 linux boxes:
An empty directory /sys was created at Sarge default installation for kernel 2.4.27, and no entry for sysfs was added in /etc/fstab. My understanding was that it is related to the workings of the kernel 2.6, as in Fedora Core 4, whose /etc/fstab has the line:
Code:
/dev/sys /sys sysfs defaults 0 0
Anyway, I have added that line to Sarge /etc/fstab, and got instead the error message in /var/log/boot:
Code:
Sat Aug 26 17:59:15 2006: mount: unknown filesystem type 'sysfs'
So, I wonder whether this line should remain there.
Indeed, Fedora Core 4 /proc/partitions looks quite different to the Debian one and much more like yours:
In particular, hdc (the CD/DVD drive) does not appear here. I am not familiar with the syntax of /proc/partitions and how it is generated (pointers?). If I understand correctly, there is a problem with the generation of /proc/partitions.
where a similarly looking /proc/partitions file seems to be correlated with fdisk -l producing no output.
There is a statement at the end of that thread:
Quote:
It's the devfs kernel option that kills fdisk. i had had this problem a year ago and found no answer and saw this thread also. devfs completely changes the format of the info in /proc/partitions and fdisk (nor 'probe') can't parse it.
Recompile kernel without devfs support to fix fdisk.
that I do not fully understand (an explanation/pointer on devfs would be welcomed, if relevant here). And I am not sure either whether it applies to my case as I am using the stock kernel 2.4.27-3-686-smp (I have never compiled a kernel, nor I have any intentions to do it).
Anyway, I have identified yet another error message in /var/log/boot that might be related with this fdisk issue:
Code:
Sat Aug 26 17:59:43 2006: Starting automounter: loading autofs4 kernel module, no automount maps defined.
but I do not know yet which is the problem in this case.
Sat Aug 26 17:59:15 2006: mount: unknown filesystem type 'sysfs'
sysfs is for the 2.6 kernels which I thought your are using.
Since I don't know much about Debian, I did a little search and it seems that the usage or not of devfs is done through the config of your boot loader. So, since you don't want to recompile your kernel remove the devfs part (devfs=mount) of it to see if it works.
remove the devfs part (devfs=mount) of it to see if it works.
As I did not know what devfs is, hence what do you mean by devfs part I have googled "devfs=mount" and found a link to the devfs man page which is absent in this system. So I have looked with aptitude and realized that there is a package named devfsd that is not loaded, and shows this info:
Code:
Daemon for the device file system
This daemon sets up the devfs file system for use. It sets
permissions of devices, and creates compatibility symlinks to the old
names when devices are created by drivers....
Perhaps I should load it. What do you think?
Indeed, there is no "devfs=mount" in the Debian section of /boot/grub/menu.lst (or elsewhere in this file).
in grub to see if that fixes it.
Else install devfsd, but I think it's better to go for a 2.6.x kernel that uses udev and not devfs which is deprecated.
The most important consequence for me is that this issue is not the manifestation of a serious problem, but just a minor inconvenience that, in practical terms, I can solve using the fdisk -l output from Fedora Core 4.
The util-linux package accumulates many bug reports, but I assume that this issue will be addressed.
In any case, it does not justify experimentation with devfs, etc, until at least I have studied this subject and I can understand what is implied by making these changes.
And less it makes sense to to move to kernel 2.6 for a system that works fine.
Indeed, I have already FC4 in case that I need a system with kernel 2.6, but I prefer Debian Sarge with kernel 2.4 (installed by default) where applications run in a much more reliable way. Besides, it may occur that some applications do not run with kernel 2.6, so I need options.
make sure you have the permission to open the device file.
try sudo fdisk -l
maybe you can use strace to check the system calls relevant with the fdisk -l command
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.