当前位置:网站首页>Onie supports pice hard disk
Onie supports pice hard disk
2022-07-06 07:41:00 【Caicai azhuang】
List of articles
introduction
We know ,SATA Hard disk and pcie The hard disk dev The device name is different :
SATA The device name is generally sd*, for example sda sdb, The device name after partition is sda1,sda2 etc. ;
and pcie The interface hard disk device name is generally nvme0n*, The device name after partition is nvme0n1p1 nvme0n1p2 etc. .
onie How to support will onie Installed on the designated hard disk ?
onie Support pice Type of hard disk
stay installer/grub-arch/install-arch Medium install_image Interface , take $onie_dev Variable as onie Installation position , from echo "Installing ONIE on: $onie_dev" You can also see this .onie_dev A variable is in init_onie_install Interface , adopt [ -b "$onie_dev" ] || onie_dev="$(install_device_platform)" Defined .
therefore , You need to support the specified hard disk , Just need to be in your own vendor_modules Lower heavy load install_device_platform Interface , And return the corresponding hard disk device name . For example, support nvme Hard disk :
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
}
Interface as long as it returns /dev/nvme0n1 that will do .
Similarly, if necessary onie The installation to SATA Hard disk or U disc , Interface to return /dev/sda /dev/sdb Just wait .
边栏推荐
- Opencv learning notes 8 -- answer sheet recognition
- How can word delete English only and keep Chinese or delete Chinese and keep English
- TS类型体操 之 字符串的妙用
- TypeScript 变量作用域
- Memory error during variable parameter overload
- [MySQL learning notes 30] lock (non tutorial)
- word删除括号里内容
- Vit (vision transformer) principle and code elaboration
- Wonderful use of TS type gymnastics string
- Typescript void base type
猜你喜欢
![Ble of Jerry [chapter]](/img/00/27486ad68bf491997d10e387c32dd4.png)
Ble of Jerry [chapter]

Bugku CTF daily question: do you want seeds? Blackmailed

Oracle column to row -- a field is converted to multiple rows according to the specified separator
![[CF Gym101196-I] Waif Until Dark 网络最大流](/img/66/6b339fc23146b5fbdcd2a1fa0a2349.png)
[CF Gym101196-I] Waif Until Dark 网络最大流

Significance and measures of encryption protection for intelligent terminal equipment

学go之路(一)go的基本介绍到第一个helloworld
![DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist](/img/17/415e66d67afb055e94a966de25c2bc.png)
DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist

Sharing of source code anti disclosure scheme under burning scenario
![[MySQL learning notes 32] mvcc](/img/0d/2df82b63d1eb3283a84e27f67c1523.png)
[MySQL learning notes 32] mvcc

opencv学习笔记九--背景建模+光流估计
随机推荐
How to prevent Association in cross-border e-commerce multi account operations?
Three treasures of leeks and Chinese men's football team
TypeScript 可索引类型
Solution: système de surveillance vidéo intelligent de patrouille sur le chantier
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
How MySQL merges data
(lightoj - 1410) consistent verbs (thinking)
TS 体操 &(交叉运算) 和 接口的继承的区别
QT color is converted to string and uint
word设置目录
Fundamentals of C language 9: Functions
Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master
解决方案:智慧工地智能巡检方案视频监控系统
edge浏览器 路径获得
学go之路(一)go的基本介绍到第一个helloworld
超级浏览器是指纹浏览器吗?怎样选择一款好的超级浏览器?
qt颜色与字符串、uint相互转换
opencv学习笔记八--答题卡识别
Rust language - receive command line parameter instances
Ble of Jerry [chapter]