当前位置:网站首页>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
- 实现精细化生产, MES、APS、ERP必不可少
- Cf1036c class numbers solution
- TypeScript接口与泛型的使用
- 2022年Instagram运营小技巧简单讲解
- C # create database connection object SQLite database
- Bit operation XOR
- 数字经济时代,如何保障安全?
- TS类型体操 之 字符串的妙用
- Select all the lines with a symbol in word and change them to titles
猜你喜欢

杰理之BLE【篇】

word中如何删除某符号前面或后面所有的文字

解决方案:智慧工地智能巡检方案视频监控系统

Apache middleware vulnerability recurrence

软件测试界的三无简历,企业拿什么来招聘你,石沉大海的简历

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

合规、高效,加快药企数字化转型,全新打造药企文档资源中心

leecode-C語言實現-15. 三數之和------思路待改進版
![When the Jericho development board is powered on, you can open the NRF app with your mobile phone [article]](/img/3e/3d5bff87995b4a9fac093a6d9f9473.png)
When the Jericho development board is powered on, you can open the NRF app with your mobile phone [article]

Simulation of holographic interferogram and phase reconstruction of Fourier transform based on MATLAB
随机推荐
位运算异或
TypeScript接口与泛型的使用
[window] when the Microsoft Store is deleted locally, how to reinstall it in three steps
Simulation of Michelson interferometer based on MATLAB
TypeScript 可索引类型
Generator Foundation
Significance and measures of encryption protection for intelligent terminal equipment
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
Sélectionnez toutes les lignes avec un symbole dans Word et changez - les en titre
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
Three no resumes in the software testing industry. What does the enterprise use to recruit you? Shichendahai's resume
Relevant introduction of clip image
edge浏览器 路径获得
Solution: intelligent site intelligent inspection scheme video monitoring system
Cf1036c class numbers solution
C # connect to SQLite database to read content
Compliance and efficiency, accelerate the digital transformation of pharmaceutical enterprises, and create a new document resource center for pharmaceutical enterprises
How can word delete English only and keep Chinese or delete Chinese and keep English
学go之路(一)go的基本介绍到第一个helloworld
Scala language learning-08-abstract classes