SlideShare a Scribd company logo
1 of 19
Download to read offline
Introduction to device management in Linux By Unnikrishnan [email_address]
Modern distributions ,[object Object],[object Object],[object Object],[object Object]
Past to present ,[object Object],[object Object],[object Object]
How they are doing this ?
Udev, HAL and Dbus ,[object Object],[object Object],[object Object],[object Object]
Udev ,[object Object],[object Object],[object Object],[object Object]
Udev ( cont .. ) ,[object Object],MODALIAS=usb:v0951p1607d0200dc00dsc00dp00ic08isc06ip50 MAJOR=8 MINOR=16
Udev ( cont... ) Kernel exports the informations to sysfs # cat /sys/block/sdb/size  7856128 # cat /sys/block/sdb/removable  1 # cat /sys/block/sdb/uevent  MAJOR=8 MINOR=16 DEVTYPE=disk #
Udev ( cont... ) Udev creates the device node using the major and minor number got from the kernel and loads the device driver using the modalias information # mknod /dev/sdc b 8 20 # ls -l /dev/sdc  brw-r--r-- 1 root root 8, 20 2009-12-20 10:35 /dev/sdc
Udev and modalias pci:v000011ABd00004363sv00001179sd0000FF10bc02sc00i00 V :- 000011AB D :- 00004363 sv and sd are subsystem version for both vendor and device. The best place to find the vendor/product from their id for a PCI device is http://www.pcidatabase.com/ .  # grep -i 11AB /lib/modules/2.6.28-11-generic/modules.alias | grep 4363 alias pci:v000011ABd00004363sv*sd*bc*sc*i* sky2
Dbus ,[object Object],[object Object],[object Object]
HAL ,[object Object],# cat /lib/udev/rules.d/90-hal.rules  RUN+="socket:@/org/freedesktop/hal/udev_event"
Working of HAL ,[object Object],[object Object],[object Object]
Device information file <deviceinfo version=&quot;0.2&quot;> <device> <match key=&quot;@storage.physical_device:info.bus&quot; string=&quot;usb&quot;> <match key=&quot;@storage.physical_device:usb.vendor_id&quot; int=&quot;0x05dc&quot;> <match key=&quot;@storage.physical_device:usb.product_id&quot; int=&quot;0x0002&quot;>   <merge key=&quot;storage.drive_type&quot; type=&quot;string&quot;>compact_flash</merge> </match> </match> </match> </device> </deviceinfo>
HAL DB The system command lshal will list the HAL DB udi = '/org/freedesktop/Hal/devices/volume_uuid_da6ed050_2beb_4a3e_b446_8eb8bb81b149' block.device = '/dev/sda5'  (string) block.is_volume = true  (bool) block.major = 8  (0x8)  (int) block.minor = 5  (0x5)  (int) block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_SATA_TOSHIBA_MK1237G_87FITJ8IT'  (string) info.capabilities = {'volume', 'block'} (string list) info.category = 'volume'  (string)
Other way to get the device info # hal-get-property --udi /org/freedesktop/Hal/devices/volume_uuid_da6ed050_2beb_4a3e_b446_8eb8bb81b149 --key volume.fstype ext4
Namespace / properties namespace properties info bus, udi, persistent, capabilities, product, vendor, parent, locked usb_device device_class, speed_bcd, serial, product, vendor, host, bus, target, lun block device, major, minor, is_volume, no_partitions volume is_mounted, mount_point, fstype, label, uuid, block_size, size, is_partition storage bus, drive_type, removable, hotpluggable, requires_eject media_check_enabled, automount_enabled_hint storage.cdrom cdr, cdrw, dvd, dvdr, ..., read_speed, write_speed storage.policy.default mount_option.*, mount_root camera access_method, libgphoto2.support
Desktop application and HAL HAL exports all the device informations to desktop application like  GNOME volume manager That helps it to mount the device to the file system.
?

More Related Content

What's hot

Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven RostedtKernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven RostedtAnne Nicolas
 
RYU Introduction
RYU IntroductionRYU Introduction
RYU IntroductionNCTU
 
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzerDmitry Vyukov
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernelKiran Divekar
 
Making a Headless Android Device
Making a Headless Android DeviceMaking a Headless Android Device
Making a Headless Android DevicePatricia Aas
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking ExplainedThomas Graf
 
Linux : The Common Mailbox Framework
Linux : The Common Mailbox FrameworkLinux : The Common Mailbox Framework
Linux : The Common Mailbox FrameworkMr. Vengineer
 
Ipmi Server Management
Ipmi Server ManagementIpmi Server Management
Ipmi Server Managementsjtu1234567
 
OpenWrt From Top to Bottom
OpenWrt From Top to BottomOpenWrt From Top to Bottom
OpenWrt From Top to BottomKernel TLV
 

What's hot (20)

Advanced rf troubleshooting_peter lane
Advanced rf troubleshooting_peter laneAdvanced rf troubleshooting_peter lane
Advanced rf troubleshooting_peter lane
 
NAT Traversal
NAT TraversalNAT Traversal
NAT Traversal
 
Sockets and Socket-Buffer
Sockets and Socket-BufferSockets and Socket-Buffer
Sockets and Socket-Buffer
 
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven RostedtKernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
 
RYU Introduction
RYU IntroductionRYU Introduction
RYU Introduction
 
Mikrotik Hardening
Mikrotik HardeningMikrotik Hardening
Mikrotik Hardening
 
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernel
 
Making a Headless Android Device
Making a Headless Android DeviceMaking a Headless Android Device
Making a Headless Android Device
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
Perf File Format
Perf File FormatPerf File Format
Perf File Format
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
Burpsuite 101
Burpsuite 101Burpsuite 101
Burpsuite 101
 
Linux : The Common Mailbox Framework
Linux : The Common Mailbox FrameworkLinux : The Common Mailbox Framework
Linux : The Common Mailbox Framework
 
Ipmi Server Management
Ipmi Server ManagementIpmi Server Management
Ipmi Server Management
 
Web Cache Poisoning
Web Cache PoisoningWeb Cache Poisoning
Web Cache Poisoning
 
OpenWrt From Top to Bottom
OpenWrt From Top to BottomOpenWrt From Top to Bottom
OpenWrt From Top to Bottom
 
ACI DHCP Config Guide
ACI DHCP Config GuideACI DHCP Config Guide
ACI DHCP Config Guide
 
Dive in burpsuite
Dive in burpsuiteDive in burpsuite
Dive in burpsuite
 
Campus Redundancy Models
Campus Redundancy ModelsCampus Redundancy Models
Campus Redundancy Models
 

Viewers also liked

Android Architecture
Android ArchitectureAndroid Architecture
Android ArchitectureLope Emano
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC MechanismLihan Chen
 
An Introduction to Udev (OBSOLETE)
An Introduction to Udev (OBSOLETE)An Introduction to Udev (OBSOLETE)
An Introduction to Udev (OBSOLETE)Adam Trickett
 
Desktop Virtualisation
Desktop VirtualisationDesktop Virtualisation
Desktop VirtualisationAdam Trickett
 
High-Performance JDBC Voxxed Bucharest 2016
High-Performance JDBC Voxxed Bucharest 2016High-Performance JDBC Voxxed Bucharest 2016
High-Performance JDBC Voxxed Bucharest 2016Vlad Mihalcea
 
Reverse, Multi-Process and Non-Stop Debugging come to the CDT
Reverse, Multi-Process and Non-Stop Debugging come to the CDTReverse, Multi-Process and Non-Stop Debugging come to the CDT
Reverse, Multi-Process and Non-Stop Debugging come to the CDTmarckhouzam
 
Real time debugging: using non-intrusive tracepoints to debug live systems
Real time debugging: using non-intrusive tracepoints to debug live systemsReal time debugging: using non-intrusive tracepoints to debug live systems
Real time debugging: using non-intrusive tracepoints to debug live systemsmarckhouzam
 
Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Kent Chen
 
Advanced Debugging with GDB
Advanced Debugging with GDBAdvanced Debugging with GDB
Advanced Debugging with GDBDavid Khosid
 
Q2.12: Debugging with GDB
Q2.12: Debugging with GDBQ2.12: Debugging with GDB
Q2.12: Debugging with GDBLinaro
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!sourav verma
 
Play With Android
Play With AndroidPlay With Android
Play With AndroidChamp Yen
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting ProcessGaurav Sharma
 
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...Jim St. Leger
 

Viewers also liked (20)

Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
An Introduction to Udev (OBSOLETE)
An Introduction to Udev (OBSOLETE)An Introduction to Udev (OBSOLETE)
An Introduction to Udev (OBSOLETE)
 
Embedded Android : System Development - Part IV
Embedded Android : System Development - Part IVEmbedded Android : System Development - Part IV
Embedded Android : System Development - Part IV
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Desktop Virtualisation
Desktop VirtualisationDesktop Virtualisation
Desktop Virtualisation
 
Aag c45 697761
Aag c45 697761Aag c45 697761
Aag c45 697761
 
High-Performance JDBC Voxxed Bucharest 2016
High-Performance JDBC Voxxed Bucharest 2016High-Performance JDBC Voxxed Bucharest 2016
High-Performance JDBC Voxxed Bucharest 2016
 
Reverse, Multi-Process and Non-Stop Debugging come to the CDT
Reverse, Multi-Process and Non-Stop Debugging come to the CDTReverse, Multi-Process and Non-Stop Debugging come to the CDT
Reverse, Multi-Process and Non-Stop Debugging come to the CDT
 
Real time debugging: using non-intrusive tracepoints to debug live systems
Real time debugging: using non-intrusive tracepoints to debug live systemsReal time debugging: using non-intrusive tracepoints to debug live systems
Real time debugging: using non-intrusive tracepoints to debug live systems
 
Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!Working Remotely (via SSH) Rocks!
Working Remotely (via SSH) Rocks!
 
Advanced Debugging with GDB
Advanced Debugging with GDBAdvanced Debugging with GDB
Advanced Debugging with GDB
 
Q2.12: Debugging with GDB
Q2.12: Debugging with GDBQ2.12: Debugging with GDB
Q2.12: Debugging with GDB
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!
 
GDB Rocks!
GDB Rocks!GDB Rocks!
GDB Rocks!
 
Vim Rocks!
Vim Rocks!Vim Rocks!
Vim Rocks!
 
Play With Android
Play With AndroidPlay With Android
Play With Android
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting Process
 
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
 

Similar to Udev

Windows 10 IoT Core, a real sample
Windows 10 IoT Core, a real sampleWindows 10 IoT Core, a real sample
Windows 10 IoT Core, a real sampleMirco Vanini
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry PiLloydMoore
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsPositive Hack Days
 
Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementKenny (netman)
 
IoThings you don't even need to hack
IoThings you don't even need to hackIoThings you don't even need to hack
IoThings you don't even need to hackSlawomir Jasek
 
outpass system
outpass systemoutpass system
outpass systemDhivakar K
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BJingfeng Liu
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PICliff Samuels Jr.
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Codemotion
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day Simone Onofri
 

Similar to Udev (20)

Notes for LX0-101 Linux
Notes for LX0-101 Linux Notes for LX0-101 Linux
Notes for LX0-101 Linux
 
Windows 10 IoT Core, a real sample
Windows 10 IoT Core, a real sampleWindows 10 IoT Core, a real sample
Windows 10 IoT Core, a real sample
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
 
Android in ubuntu
Android in ubuntuAndroid in ubuntu
Android in ubuntu
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android Applications
 
What & How to Customize Android?
What & How to Customize Android?What & How to Customize Android?
What & How to Customize Android?
 
Arduino Forensics
Arduino ForensicsArduino Forensics
Arduino Forensics
 
Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware Management
 
IoThings you don't even need to hack
IoThings you don't even need to hackIoThings you don't even need to hack
IoThings you don't even need to hack
 
outpass system
outpass systemoutpass system
outpass system
 
DeviceDriverNov18.ppt
DeviceDriverNov18.pptDeviceDriverNov18.ppt
DeviceDriverNov18.ppt
 
Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
 
Dx diag
Dx diagDx diag
Dx diag
 
Introduction of computer
Introduction of computerIntroduction of computer
Introduction of computer
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
 
Basic Linux kernel
Basic Linux kernelBasic Linux kernel
Basic Linux kernel
 

More from Barcamp Kerala

More from Barcamp Kerala (11)

Multi Monitor Machines
Multi Monitor MachinesMulti Monitor Machines
Multi Monitor Machines
 
The Drupal Way
The Drupal WayThe Drupal Way
The Drupal Way
 
Ltsp
LtspLtsp
Ltsp
 
Bar Camp Kerala 7
Bar Camp Kerala 7Bar Camp Kerala 7
Bar Camp Kerala 7
 
Praseed Pai
Praseed PaiPraseed Pai
Praseed Pai
 
Code Snippet
Code SnippetCode Snippet
Code Snippet
 
Blood Search
Blood SearchBlood Search
Blood Search
 
Starting Up - What they did not teach you at B-School
Starting Up - What they did not teach you at B-SchoolStarting Up - What they did not teach you at B-School
Starting Up - What they did not teach you at B-School
 
Pooling The Carpool
Pooling The CarpoolPooling The Carpool
Pooling The Carpool
 
Bar Camp 11 Oct09 Hacking
Bar Camp 11 Oct09 HackingBar Camp 11 Oct09 Hacking
Bar Camp 11 Oct09 Hacking
 
Young Kerala Technopark
Young Kerala TechnoparkYoung Kerala Technopark
Young Kerala Technopark
 

Recently uploaded

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 

Recently uploaded (20)

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 

Udev

  • 1. Introduction to device management in Linux By Unnikrishnan [email_address]
  • 2.
  • 3.
  • 4. How they are doing this ?
  • 5.
  • 6.
  • 7.
  • 8. Udev ( cont... ) Kernel exports the informations to sysfs # cat /sys/block/sdb/size 7856128 # cat /sys/block/sdb/removable 1 # cat /sys/block/sdb/uevent MAJOR=8 MINOR=16 DEVTYPE=disk #
  • 9. Udev ( cont... ) Udev creates the device node using the major and minor number got from the kernel and loads the device driver using the modalias information # mknod /dev/sdc b 8 20 # ls -l /dev/sdc brw-r--r-- 1 root root 8, 20 2009-12-20 10:35 /dev/sdc
  • 10. Udev and modalias pci:v000011ABd00004363sv00001179sd0000FF10bc02sc00i00 V :- 000011AB D :- 00004363 sv and sd are subsystem version for both vendor and device. The best place to find the vendor/product from their id for a PCI device is http://www.pcidatabase.com/ . # grep -i 11AB /lib/modules/2.6.28-11-generic/modules.alias | grep 4363 alias pci:v000011ABd00004363sv*sd*bc*sc*i* sky2
  • 11.
  • 12.
  • 13.
  • 14. Device information file <deviceinfo version=&quot;0.2&quot;> <device> <match key=&quot;@storage.physical_device:info.bus&quot; string=&quot;usb&quot;> <match key=&quot;@storage.physical_device:usb.vendor_id&quot; int=&quot;0x05dc&quot;> <match key=&quot;@storage.physical_device:usb.product_id&quot; int=&quot;0x0002&quot;> <merge key=&quot;storage.drive_type&quot; type=&quot;string&quot;>compact_flash</merge> </match> </match> </match> </device> </deviceinfo>
  • 15. HAL DB The system command lshal will list the HAL DB udi = '/org/freedesktop/Hal/devices/volume_uuid_da6ed050_2beb_4a3e_b446_8eb8bb81b149' block.device = '/dev/sda5' (string) block.is_volume = true (bool) block.major = 8 (0x8) (int) block.minor = 5 (0x5) (int) block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_SATA_TOSHIBA_MK1237G_87FITJ8IT' (string) info.capabilities = {'volume', 'block'} (string list) info.category = 'volume' (string)
  • 16. Other way to get the device info # hal-get-property --udi /org/freedesktop/Hal/devices/volume_uuid_da6ed050_2beb_4a3e_b446_8eb8bb81b149 --key volume.fstype ext4
  • 17. Namespace / properties namespace properties info bus, udi, persistent, capabilities, product, vendor, parent, locked usb_device device_class, speed_bcd, serial, product, vendor, host, bus, target, lun block device, major, minor, is_volume, no_partitions volume is_mounted, mount_point, fstype, label, uuid, block_size, size, is_partition storage bus, drive_type, removable, hotpluggable, requires_eject media_check_enabled, automount_enabled_hint storage.cdrom cdr, cdrw, dvd, dvdr, ..., read_speed, write_speed storage.policy.default mount_option.*, mount_root camera access_method, libgphoto2.support
  • 18. Desktop application and HAL HAL exports all the device informations to desktop application like GNOME volume manager That helps it to mount the device to the file system.
  • 19. ?