Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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 am wondering how the naming scheme om SATA-disks is made. At this moment, I have 4 SATA-slots on my MB, SATA1 trough SATA4. SATA1 has /dev/sda, SATA 4 has sdb.
/dev/sda is boot disk.
How is this naming scheme accomplished?
And, related to that, will it still boot from this disk if I attach the disk to another SATA-port on the MB?
One step further, if I set up a RAID-5 with four disks, will I get in trouble if for some reason I swap disks in the RAID-5 configuration?
Thanks for your answers, or for putting me on the track for further searching.
I am wondering how the naming scheme om SATA-disks is made. At this moment, I have 4 SATA-slots on my MB, SATA1 trough SATA4. SATA1 has /dev/sda, SATA 4 has sdb.
/dev/sda is boot disk.
How is this naming scheme accomplished?
And, related to that, will it still boot from this disk if I attach the disk to another SATA-port on the MB?
One step further, if I set up a RAID-5 with four disks, will I get in trouble if for some reason I swap disks in the RAID-5 configuration?
Thanks for your answers, or for putting me on the track for further searching.
regards, jehojakim
Your boot device is set by selection with your 'BIOS'. Most current distributions use 'udev' to recognize devices for the kernel via defined rules.
Code:
excertp from 'man udev';
udev - dynamic device management
DESCRIPTION
udev provides a dynamic device directory containing only the files for
actually present devices. It creates or removes device node files in
the /dev directory, or it renames network interfaces.
Usually udev runs as udevd(8) and receives uevents directly from the
kernel if a device is added or removed from the system.
If udev receives a device event, it matches its configured rules
against the available device attributes provided in sysfs to identify
the device. Rules that match may provide additional device information
or specify a device node name and multiple symlink names and instruct
udev to run additional programs as part of the device event handling.
CONFIGURATION
udev configuration files are placed in /etc/udev/ and /lib/udev/. All
empty lines, or lines beginning with '#' will be ignored.
Configuration file
udev expects its main configuration file at /etc/udev/udev.conf. It
consists of a set of variables allowing the user to override default
udev values. The following variables can be set:
udev_root
Specifies where to place the device nodes in the filesystem. The
default value is /dev.
udev_log
The logging priority. Valid values are the numerical syslog
priorities or their textual representations: err, info and debug.
Rules files
The udev rules are read from the files located in the default rules
directory /lib/udev/rules.d/, the custom rules directory
/etc/udev/rules.d/ and the temporary rules directory
/dev/.udev/rules.d/. All rule files are sorted and processed in lexical
order, regardless in which of these directories they live.
Rule files are required to have a unique name, duplicate file names are
ignored. Files in /etc/udev/rules.d/ have precedence over files with
the same name in /lib/udev/rules.d/. This can be used to ignore a
default rules file if needed.
Every line in the rules file contains at least one key value pair.
There are two kind of keys, match and assignment keys. If all match
keys are matching against its value, the rule gets applied and the
assign keys get the specified value assigned.
A matching rule may specify the name of the device node, add a symlink
pointing to the node, or run a specified program as part of the event
handling. If no matching rule is found, the default device node name is
used.
I suggest that you read the 'man udev'. You can also look at 'Linux Kernel in a Nutshell' to get some insight.
These links and others can be found at 'Slackware-Links' . More than just SlackwareŽ links!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.