【Linux/docker】启动报错 Could not find kernel image :/boot/vmlinuxz64

根据网上很多教程,制作了个iso文件,结果运行后如下图结果

【Linux/docker】启动报错 Could not find kernel image :/boot/vmlinuxz64


折腾了好久,终于找到正确解决办法,出现上图错误原因为docker iso镜像文件错误  即制作的iso文件有问题,制作iso文件的命令为mkisofs  linux下的,网上有很多,但是否有运行过制作后的iso,小编持怀疑态度;

mkisofs命令  参数意义,可以去man mkisofs 下;

修改以后的img文件后,参考https://blog.****.net/weixin_40747106/article/details/80678076

制作iso 命令

mkisofs -o boot2docker2.iso -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat

 -no-emul-boot -boot-load-size 4 -boot-info-table   -R -J -V boot2docker -l ./

 如下图

【Linux/docker】启动报错 Could not find kernel image :/boot/vmlinuxz64

制作的镜像不会报错,亲测可用;


其中  如果少加 最后的 -l 参数  ,制作出来的iso在docker 上就启动不来


man mkisofs    -l 参数说明;


       -l     Allow full 31-character filenames.  Normally the ISO9660
              filename  will  be  in an 8.3 format which is compatible
              with MS-DOS, even though  the  ISO9660  standard  allows
              filenames  of  up  to  31  characters.   If you use this
              option, the disc may be difficult to  use  on  a  MS-DOS
              system,  but  will work on most other systems.  Use with

              caution.

红色部分应该能说明问题,如果是MS-DOS 系统的估计就不用加,作者制作的是linux系统的。


版权所有,转载请注明出处!