Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For example will sda2 be sda2 on every boot? What about NICs? Will eth0 always be the same card?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Most linux/Unix systems use udev to take the devices the kernel puts in /sys and create symlinks in /dev based on various rules.

Udev rules go in /etc/udev/rules.d and sometimes in /lib/udev/rules.d - you can change them to fit your needs (for instance, changing eth0 and eth1 around) by changing the relevant rules file.

Edit: I should add that, it's possible to run without udev, and instead create static symlinks for devices (which may be desirable in a server config where the hardware is unlikely to change often). These types of systems are however more difficult to maintain as a result, because you manually take on the role of populating /dev with any new hardware further down the line.

share|improve this answer
    
Update: The new Udev naming scheme is worth a mention here - a new feature in v197 is "Predictable Network Interface Names" which changes slightly some of the previous information with respect to names like eth0, eth1, and so on. You can read more about that here: freedesktop.org/wiki/Software/systemd/… –  Xyon Aug 5 at 11:01

I believe they usualy are. The number 2 in sda2 means it is the second partition and that depends on partition table and doesn't usualy change.

The letters a, b, c in the names sda, sdb, sdc are in the same order according to the order in which they are physically connected to the controller.

The eth0 will probably stay eth0 too. And I don't know about other devices, but I don't see the reason why should be their order changed neither.

share|improve this answer
1  
The letters a, b, c in the names sda, sdb, sdc are in the same order according to the order in which they are physically connected to the controller. - sometimes. They're ordered in whichever order the kernel detects them first (same as the network devices) which can change on each boot. –  Xyon Nov 20 '12 at 7:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.