1 命令格式

switch_root newroot init

跳转到另外一个文件系统,并且把newroot作为新的mount tree,并且执行init程序。

2 特殊要求

newroot必须是一个文件系统的挂载点,也就是说,必须是该文件系统当初挂载的那个目录,子目录是不行的。

例子:

mount  -t ext4 /dev/sda1 newroot

设备/dev/sda1里面是新的文件系统,现在将它挂在到newroot目录下,那么在switch_root的时候,就必须要switch到这个newroot目录下,而不能switch到newroot目录的任何子目录。

相关文章:

  • 2021-11-03
  • 2021-09-24
  • 2022-02-15
  • 2022-01-28
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2021-10-06
相关资源
相似解决方案