当前位置:网站首页>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 9 -- background modeling + optical flow estimation
- [非线性控制理论]9_非线性控制理论串讲
- word设置目录
- Le chemin du navigateur Edge obtient
- 珠海金山面试复盘
- OpenJudge NOI 2.1 1661:Bomb Game
- Luogu p4127 [ahoi2009] similar distribution problem solution
- Hackathon ifm
- Three treasures of leeks and Chinese men's football team
猜你喜欢

Risk planning and identification of Oracle project management system
Comparison of usage scenarios and implementations of extensions, equal, and like in TS type Gymnastics

Games101 Lesson 7 shading 1 Notes

opencv学习笔记八--答题卡识别

Compliance and efficiency, accelerate the digital transformation of pharmaceutical enterprises, and create a new document resource center for pharmaceutical enterprises

octomap averageNodeColor函数说明

Fundamentals of C language 9: Functions

Qualitative risk analysis of Oracle project management system

861. Score after flipping the matrix

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
随机推荐
TypeScript 函数定义
TypeScript void 基础类型
Compliance and efficiency, accelerate the digital transformation of pharmaceutical enterprises, and create a new document resource center for pharmaceutical enterprises
Get the path of edge browser
Jerry's ad series MIDI function description [chapter]
1015 reversible primes (20 points) prime d-ary
Methods for JS object to obtain attributes (. And [] methods)
Typescript function definition
word怎么只删除英语保留汉语或删除汉语保留英文
xpath中的position()函数使用
[非线性控制理论]9_非线性控制理论串讲
Helm install Minio
Select all the lines with a symbol in word and change them to titles
TS 体操 &(交叉运算) 和 接口的继承的区别
[factorial inverse], [linear inverse], [combinatorial counting] Niu Mei's mathematical problems
珠海金山面试复盘
Word delete the contents in brackets
Wonderful use of TS type gymnastics string
洛谷P1836 数页码 题解
Summary of Digital IC design written examination questions (I)