Operating System - Linux
1753487 Members
4804 Online
108794 Solutions
New Discussion юеВ

need some help regarding the major number of device file

 
Rajan_sa
Advisor

need some help regarding the major number of device file


Hi,

Need some help regarding the device files major number in Linux...

1. What decides the major number of a device?
2. Can we configure the device with its major number greater than 99?
3. Can we convert the major number of an existing device to something else?
2 REPLIES 2
Ranjith_5
Honored Contributor

Re: need some help regarding the major number of device file

Hi Rajan,

Major number refers to the device driver used for a specific device.

This is system defined. You cannot change it. Eg: in HP-UX the major number for character disk device file is 31 and raw deive file is 188. This cannot be changed.

lsdev will give you the major number for all devices on your system.

Minor number refers the physical location of a device.Minor numbers are unique in a system. ie; there cannot be a minor number with the same name.


regards,
Syam
Mike Stroyan
Honored Contributor

Re: need some help regarding the major number of device file

You can add aliases for module device drivers in /etc/modules.conf . That can use major numbers larger than 99.

char-major-121 drivername