当前位置:网站首页>initramfs详解----添加硬盘驱动并访问磁盘
initramfs详解----添加硬盘驱动并访问磁盘
2022-08-04 01:07:00 【巭犇】
在前面的两篇文章大致的讲解了initramfs,和设备文件文件系统,这篇文章就继续前两篇的文章继续讲解initramfs是如何实现让内核访问磁盘的。
设备的驱动程序都是以内核模块的形式存放的,本人用的是kvm的环境,机器挂载磁盘文件需要用到virtio相关的驱动,将相关的驱动复制到initramfs文件中。
安装驱动需要用到相关的程序,例如insmod,modprobe,lsmod等,其实这些程序都指向kmod,将相关程序也在initramfs中创建好。
开机进行测试
加载virtio_pci与virtio_blk


modprobe会自动分析驱动之间的依赖关系,其实相关的驱动会自动加载,但是以上两个驱动需要手动加载。
加载完驱动后会发现/dev/目录下已经出现了vda磁盘设备
最后就是切换到真正的根文件系统,并启动根文件系统的第一个进程,完成操作系统的启动工作
边栏推荐
- Deng Qinglin, Alibaba Cloud Technical Expert: Best Practices for Disaster Recovery across Availability Zones and Multiple Lives in Different Locations on the Cloud
- 如何通过单步调试的方式找到引起 Fiori Launchpad 路由错误的原因试读版
- 微服务的简单介绍
- 研究生新生培训第四周:MobileNetV1, V2, V3
- FeatureNotFound( bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested:
- 2022年上半年各大厂Android面试题整理及答案解析(持续更新中......)
- typescript54 - generic constraints
- Thinkphp commonly used techniques
- 【正则表达式】笔记
- typescript50-交叉类型和接口之间的类型说明
猜你喜欢
随机推荐
redis中常见的问题(缓存穿透,缓存雪崩,缓存击穿,redis淘汰策略)
typescript50 - type specification between cross types and interfaces
因为一次bug的教训,我决定手撕Nacos源码(先撕客户端源码)
Apache DolphinScheduler新一代分布式工作流任务调度平台实战-中
Jmeter cross-platform operation CSV files
How to copy baby from Taobao (or Tmall store) through API interface to Pinduoduo interface code docking tutorial
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化
nodejs install multi-version version switching
ThreadLocal
《The Google File System》新说
GNSS文章汇总
ML18-自然语言处理
2022 China Computing Power Conference released the excellent results of "Innovation Pioneer"
Android interview questions and answer analysis of major factories in the first half of 2022 (continuously updated...)
MongoDB数据接入实践
C# WPF设备监控软件(经典)-下篇
outputBufferIndex = mDecode.dequeueOutputBuffer(bufferInfo, 0) 一直返回为-1
typescript50-交叉类型和接口之间的类型说明
Sticker Spelling - Memory Search / Shape Pressure DP
BGP实验(含MPLS)









