当前位置:网站首页>onie支持pice硬盘
onie支持pice硬盘
2022-07-06 07:39:00 【菜菜的阿庄】
文章目录
引言
我们知道,SATA硬盘和pcie硬盘的dev设备名不一样:
SATA设备名一般是是sd*,例如sda sdb,分区后设备名为sda1,sda2等;
而pcie接口硬盘设备名一般是nvme0n*,分区后设备名为nvme0n1p1 nvme0n1p2等。
onie中怎么支持将onie安装到指定硬盘上的呢?
onie支持pice类型硬盘
在 installer/grub-arch/install-arch 中的 install_image 接口中,将 $onie_dev 变量作为onie安装位置,从 echo "Installing ONIE on: $onie_dev"也可以看出这点。onie_dev 变量是在 init_onie_install 接口中,通过 [ -b "$onie_dev" ] || onie_dev="$(install_device_platform)" 定义了的。
因此,需要支持指定的硬盘,只需要在自己的vendor_modules下重载 install_device_platform 接口,并返回相应的硬盘设备名。例如支持nvme硬盘:
install_device_platform()
{
mass_bus="nvme0"
for i in 1 2 3 4 ; do
if $(ls -l /sys/block/nvme0n$i/device 2>/dev/null | grep -q "$mass_bus") ; then
echo "/dev/nvme0n$i"
return 0
fi
done
echo "storage-not-found"
return 1
}
接口只要返回/dev/nvme0n1即可。
同样如果需要将onie安装到SATA硬盘或U盘,接口返回/dev/sda /dev/sdb等即可.
边栏推荐
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- [dictionary tree] [trie] p3879 [tjoi2010] reading comprehension
- Ali's redis interview question is too difficult, isn't it? I was pressed on the ground and rubbed
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- Memory error during variable parameter overload
- [computer skills]
- Simulation of Michelson interferometer based on MATLAB
- 杰理之开发板上电开机,就可以手机打开 NRF 的 APP【篇】
- js对象获取属性的方法(.和[]方式)
猜你喜欢

杰理之BLE【篇】

链表面试题(图文详解)

How to delete all the words before or after a symbol in word

Typescript interface and the use of generics

Simulation of Michelson interferometer based on MATLAB
![If Jerry needs to send a large package, he needs to modify the MTU on the mobile terminal [article]](/img/57/12a97ab3d2dabfaf06bbe1788450cf.png)
If Jerry needs to send a large package, he needs to modify the MTU on the mobile terminal [article]

Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master

Force buckle day31

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower

Fundamentals of C language 9: Functions
随机推荐
Three treasures of leeks and Chinese men's football team
杰理之蓝牙设备想要发送数据给手机,需要手机先打开 notify 通道【篇】
Compliance and efficiency, accelerate the digital transformation of pharmaceutical enterprises, and create a new document resource center for pharmaceutical enterprises
When the Jericho development board is powered on, you can open the NRF app with your mobile phone [article]
Simulation of Teman green interferometer based on MATLAB
[MySQL learning notes 30] lock (non tutorial)
【Redis】NoSQL数据库和redis简介
杰理之普通透传测试---做数传搭配 APP 通信【篇】
HTTP cache, forced cache, negotiated cache
Wonderful use of TS type gymnastics string
数字经济时代,如何保障安全?
【mysql学习笔记29】触发器
Rust language - receive command line parameter instances
Sharing of source code anti disclosure scheme under burning scenario
TypeScript 变量作用域
Luogu p1836 number page solution
Le chemin du navigateur Edge obtient
Do you really think binary search is easy
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
QT color is converted to string and uint