{"id":244781,"date":"2022-07-02T08:10:14","date_gmt":"2022-07-02T00:10:14","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=244781"},"modified":"2022-06-23T18:10:30","modified_gmt":"2022-06-23T10:10:30","slug":"overlay2-bind-iso","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/overlay2-bind-iso.html","title":{"rendered":"\u5982\u4f55\u901a\u8fc7 Overlay2 \u6216 Bind \u8fdb\u884cISO \u91cd\u65b0\u6784\u5efa"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u81ea\u4ece\u6362\u4e86\u65b0\u5de5\u4f5c\u4e4b\u540e\uff0c\u5219\u5f00\u59cb\u8d1f\u8d23 \u8d85\u878d\u5408\u4ea7\u54c1[3] \u96c6\u7fa4\u90e8\u7f72\u76f8\u5173\u5de5\u4f5c\uff0c\u56e0\u6b64\u4e5f\u4f1a\u63a5\u89e6\u5f88\u591a\u955c\u50cf\uff0c\u4e0d\u8fc7\u8fd9\u4e2a\u955c\u50cf\u662f\u64cd\u4f5c\u7cfb\u7edf\u7684 ISO \u955c\u50cf\u800c\u4e0d\u662f\u5bb9\u5668\u955c\u50cf \u3002\u867d\u7136\u4e24\u8005\u90fd\u7edf\u79f0\u4e3a\u955c\u50cf\uff0c\u4f46\u4e24\u8005\u6709\u7740\u672c\u8d28\u7684\u533a\u522b\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u7b14\u8005\u4e4b\u524d\u5728\u5b57\u8282\u8df3\u52a8\u7684\u65f6\u5019\u662f\u8d1f\u8d23 PaaS \u5bb9\u5668\u4e91\u5e73\u53f0\u7684\u79c1\u6709\u5316\u90e8\u7f72\u76f8\u5173\u7684\u5de5\u4f5c\uff0c\u6240\u4ee5\u7ecf\u5e38\u4f1a\u548c\u4e00\u4e9b\u5bb9\u5668\u955c\u50cf\u6253\u4ea4\u9053\uff0c\u5bf9\u5bb9\u5668\u955c\u50cf\u4e5f\u6709\u4e00\u4e9b\u7814\u7a76\uff0c\u4e4b\u524d\u8fd8\u5199\u8fc7\u4e0d\u5c11\u535a\u5ba2\u6587\u7ae0\u3002\u6bd4\u5982 \u6df1\u5165\u6d45\u51fa\u5bb9\u5668\u955c\u50cf\u7684\u4e00\u751f[1]\u3001overlay2 \u5728\u6253\u5305\u53d1\u5e03\u6d41\u6c34\u7ebf\u4e2d\u7684\u5e94\u7528[2] \u7b49\u7b49\u3002<\/p>\n

\u9996\u5148\u4e24\u8005\u6784\u5efa\u7684\u65b9\u5f0f\u6709\u672c\u8d28\u7684\u5f88\u5927\u7684\u533a\u522b\uff0cISO \u955c\u50cf\u4e00\u822c\u4f7f\u7528 mkisofs \u6216\u8005 genisoimage \u7b49\u547d\u4ee4\u5c06\u4e00\u4e2a\u5305\u542b\u64cd\u4f5c\u7cfb\u7edf\u5b89\u88c5\u6240\u6709\u6587\u4ef6\u76ee\u5f55\u6784\u5efa\u4e3a\u4e00\u4e2a ISO \u955c\u50cf\uff1b\u800c\u5bb9\u5668\u955c\u50cf\u6784\u5efa\u5219\u662f\u6839\u636e Dockerfile \u6587\u4ef6\u4f7f\u7528\u76f8\u5e94\u7684\u5bb9\u5668\u955c\u50cf\u6784\u5efa\u5de5\u5177\u6765\u4e00\u5c42\u4e00\u5c42\u6784\u5efa\uff1b<\/p>\n

\u53e6\u5916 ISO \u955c\u50cf\u6302\u8f7d\u540e\u662f\u53ea\u8bfb\u7684\uff0c\u8fd9\u5c31\u610f\u5473\u7740\u5982\u679c\u60f3\u8981\u4fee\u6539 ISO \u955c\u50cf\u4e2d\u7684\u4e00\u4e2a\u6587\u4ef6\uff08\u6bd4\u5982 kickstart \u6587\u4ef6\uff09\uff0c\u5219\u9700\u8981\u5148\u5c06 ISO \u955c\u50cf\u4e2d\u7684\u6240\u6709\u5185\u5bb9\u590d\u5236\u5230\u4e00\u4e2a\u53ef\u4ee5\u8bfb\u5199\u7684\u76ee\u5f55\u4e2d\uff0c\u5728\u8fd9\u4e2a\u8bfb\u5199\u7684\u76ee\u5f55\u4e2d\u8fdb\u884c\u4fee\u6539\u548c\u91cd\u65b0\u6784\u5efa ISO \u64cd\u4f5c\u3002<\/p>\n

\u256d\u2500root@esxi-debian-devbox ~\/build\r\n\u2570\u2500# mount -o loop CentOS-7-x86_64-Minimal-2009.iso \/mnt\/iso\r\nmount: \/mnt\/iso: WARNING: device write-protected, mounted read-only.\r\n\u256d\u2500root@esxi-debian-devbox ~\/build\r\n\u2570\u2500# touch \/mnt\/iso\/kickstart.cfg\r\ntouch: cannot touch '\/mnt\/iso\/kickstart.cfg': Read-only file system<\/pre>\n

\u5728\u65e5\u5e38\u5de5\u4f5c\u4e2d\u7ecf\u5e38\u4f1a\u5bf9\u4e00\u4e9b\u5df2\u6709\u7684 ISO \u955c\u50cf\u8fdb\u884c\u91cd\u65b0\u6784\u5efa\uff0c\u91cd\u65b0\u6784\u5efa ISO \u7684\u6548\u7387\u6839\u636e\u4e0d\u540c\u7684\u65b9\u5f0f\u4e5f\u4f1a\u6709\u6240\u4e0d\u540c\uff0c\u672c\u6587\u5c31\u6574\u7406\u4e86\u4e09\u79cd\u4e0d\u540c\u91cd\u65b0\u6784\u5efa ISO \u955c\u50cf\u7684\u65b9\u6848\u4f9b\u5927\u5bb6\u53c2\u8003\u3002<\/p>\n

\u5e38\u89c4\u65b9\u5f0f<\/strong><\/div>\n

\u4ee5\u4e0b\u662f\u6309\u7167 RedHat \u5b98\u65b9\u6587\u6863 WORKING WITH ISO IMAGES[4] \u4e2d\u7684\u64cd\u4f5c\u6b65\u9aa4\u8fdb\u884c ISO \u91cd\u65b0\u6784\u5efa\u3002<\/p>\n

    \n
  • \u9996\u5148\u6211\u4eec\u4e0b\u8f7d\u4e00\u4e2a ISO \u6587\u4ef6\uff0c\u8fd9\u91cc\u4ee5 CentOS-7-x86_64-Minimal-2009.iso[5] \u4e3a\u4f8b\uff0c\u4e0b\u8f7d\u597d\u4e4b\u540e\u5c06\u5b83\u6302\u8f7d\u5230\u672c\u5730 \/mnt\/iso \u76ee\u5f55\u4e0b\uff1b<\/li>\n<\/ul>\n
    \u256d\u2500root@esxi-debian-devbox ~\/build\r\n\u2570\u2500# mount -o loop CentOS-7-x86_64-Minimal-2009.iso \/mnt\/iso\r\nmount: \/mnt\/iso: WARNING: device write-protected, mounted read-only.<\/pre>\n
      \n
    • \u5c06 ISO \u91cc\u7684\u6240\u6709\u6587\u4ef6\u590d\u5236\u5230\u53e6\u4e00\u4e2a\u76ee\u5f55<\/li>\n<\/ul>\n
      \u256d\u2500root@esxi-debian-devbox ~\/build\r\n\u2570\u2500# rsync -avrut --force \/mnt\/iso\/ \/mnt\/build\/<\/pre>\n
        \n
      • \u8fdb\u5165\u5230\u8be5\u76ee\u5f55\u4e0b\u4fee\u6539\u6216\u65b0\u589e\u6587\u4ef6\uff0c\u7136\u540e\u91cd\u65b0\u6784\u5efa ISO \u955c\u50cf<\/li>\n<\/ul>\n

        # \u4f7f\u7528 genisoimage \u547d\u4ee4\u6784\u5efa ISO \u955c\u50cf\uff0c\u5728 CentOS \u4e0a\u53ef\u4ee5\u4f7f\u7528 mkisofs \u547d\u4ee4\uff0c\u53c2\u6570\u4e0a\u4f1a\u6709\u4e00\u4e9b\u5dee\u5f02<\/p>\n

        \u256d\u2500root@esxi-debian-devbox ~\/build\r\n\u2570\u2500# genisoimage -U -r -v -T -J -joliet-long -V \"CentOS 7 x86_64\" -volset \"CentOS 7 x86_64\" -A \"CentOS 7 x86_64\" -b isolinux\/isolinux.bin -c isolinux\/boot.cat -no-emul-boot -boot-load-size 4 -no-emul-boot -o \/mnt\/CentOS-7-x86_64-Minimal-2009-dev.iso .\r\nTotal translation table size: 124658\r\nTotal rockridge attributes bytes: 55187\r\nTotal directory bytes: 100352\r\nPath table size(bytes): 140\r\nDone with: The File(s) Block(s) 527985\r\nWriting: Ending Padblock Start Block 528101\r\nDone with: Ending Padblock Block(s) 150\r\nMax brk space used a4000\r\n528251 extents written (1031 MB)\r\n# \u7ed9 ISO \u955c\u50cf\u751f\u6210 md5 \u6821\u9a8c\r\n\u256d\u2500root@esxi-debian-devbox ~\/build\r\n\u2570\u2500# implantisomd5 \/mnt\/CentOS-7-x86_64-Minimal-2009-dev.iso\r\nInserting md5sum into iso image...\r\nmd5 = 9ddf5277bcb1d8679c367dfa93f9b162\r\nInserting fragment md5sums into iso image...\r\nfragmd5 = f39e2822ec1ae832a69ae399ea4bd3e891eeb31e9deb9c536f529c15bbeb\r\nfrags = 20\r\nSetting supported flag to 0<\/pre>\n

        \u5bf9\u4e8e ISO \u955c\u50cf\u6bd4\u8f83\u5c0f\u6216\u8005\u8be5\u64cd\u4f5c\u4e0d\u662f\u5f88\u9891\u7e41\u7684\u60c5\u51b5\u4e0b\u6309\u7167\u8fd9\u79cd\u65b9\u5f0f\u662f\u6700\u7701\u4e8b\u513f\u7684\uff0c\u4f46\u5982\u679c\u662f ISO \u955c\u50cf\u6bd4\u8f83\u5927\uff0c\u6216\u8005\u662f\u5728 CI\/CD \u6d41\u6c34\u7ebf\u4e2d\u9891\u7e41\u5730\u91cd\u65b0\u6784\u5efa\u955c\u50cf\uff0c\u6bcf\u6b21\u90fd\u8981 cp \u590d\u5236\u539f ISO \u955c\u50cf\u7684\u5185\u5bb9\u786e\u5b9e\u6bd4\u8f83\u6d6a\u8d39\u65f6\u95f4\u3002\u90a3\u6709\u6ca1\u6709\u4e00\u4e2a\u66f4\u52a0\u9ad8\u6548\u7684\u65b9\u6cd5\u5462 \uff1f️<\/p>\n

        \u7ecf\u8fc7\u4e00\u756a\u6478\u7d22\uff0c\u6298\u817e\u51fa\u6765\u4e24\u79cd\u53ef\u4ee5\u907f\u514d\u4f7f\u7528 cp \u590d\u5236\u8fd9\u79cd\u5360\u7528\u5927\u91cf IO \u64cd\u4f5c\u7684\u6784\u5efa\u65b9\u6848\uff0c\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u7684\u573a\u666f\u8fdb\u884c\u9009\u62e9\u3002<\/p>\n

        overlay2<\/strong><\/div>\n

        \u719f\u6089 docker \u955c\u50cf\u7684\u5e94\u8be5\u90fd\u77e5\u9053\u955c\u50cf\u662f\u53ea\u8bfb\u7684\uff0c\u4f7f\u7528\u955c\u50cf\u7684\u65f6\u5019\u5219\u662f\u901a\u8fc7\u8054\u5408\u6302\u8f7d\u7684\u65b9\u5f0f\u5c06\u955c\u50cf\u7684\u6bcf\u4e00\u5c42 layer \u6302\u8f7d\u4e3a\u53ea\u8bfb\u5c42\uff0c\u5c06\u5bb9\u5668\u5b9e\u9645\u8fd0\u884c\u7684\u76ee\u5f55\u6302\u8f7d\u4e3a\u8bfb\u5199\u5c42\uff0c\u800c\u5bb9\u5668\u8fd0\u884c\u671f\u95f4\u5728\u8bfb\u5199\u5c42\u7684\u6240\u6709\u64cd\u4f5c\u4e0d\u4f1a\u5f71\u54cd\u5230\u955c\u50cf\u539f\u6709\u7684\u5185\u5bb9\u3002\u5bb9\u5668\u955c\u50cf\u6302\u8f7d\u7684\u65b9\u5f0f\u4f7f\u7528\u6700\u591a\u7684\u662f overlay2 \u6280\u672f\uff0c\u5728 overlay2 \u5728\u6253\u5305\u53d1\u5e03\u6d41\u6c34\u7ebf\u4e2d\u7684\u5e94\u7528[6] \u548c 👉\u6df1\u5165\u6d45\u51fa\u5bb9\u5668\u955c\u50cf\u7684\u4e00\u751f \u4e2d\u54b1\u66fe\u5bf9\u5b83\u8fdb\u884c\u8fc7\u6bd4\u8f83\u6df1\u5165\u7684\u7814\u7a76\u548c\u4f7f\u7528\uff0c\u5bf9 overlay2 \u6280\u672f\u611f\u5174\u8da3\u7684\u53ef\u4ee5\u7ffb\u770b\u4e00\u4e0b\u8fd9\u4e24\u7bc7\u535a\u5ba2\uff0c\u672c\u6587\u5c31\u4e0d\u518d\u8be6\u89e3\u5176\u4e2d\u7684\u6280\u672f\u539f\u7406\u4e86\uff0c\u53ea\u5bf9\u4f7f\u7528 overlay2 \u6280\u672f\u91cd\u65b0\u6784\u5efa ISO \u955c\u50cf\u7684\u53ef\u884c\u6027\u8fdb\u884c\u4e00\u4e0b\u5206\u6790\u3002<\/p>\n

          \n
        • \u9996\u5148\u662f\u521b\u5efa overlay2 \u6302\u8f7d\u6240\u9700\u8981\u7684\u51e0\u4e2a\u76ee\u5f55<\/li>\n<\/ul>\n
          \u256d\u2500root@esxi-debian-devbox ~\r\n\u2570\u2500# mkdir -p \/mnt\/overlay2\/{lower,upper,work,merged}\r\n\u256d\u2500root@esxi-debian-devbox ~\r\n\u2570\u2500# cd \/mnt\/overlay2<\/pre>\n
            \n
          • \u63a5\u7740\u5c06 ISO \u955c\u50cf\u6302\u8f7d\u5230 overlay2 \u7684\u53ea\u8bfb\u5c42 lower \u76ee\u5f55<\/li>\n<\/ul>\n
            \u256d\u2500root@esxi-debian-devbox \/mnt\/overlay2\r\n\u2570\u2500# mount -o loop \/root\/build\/CentOS-7-x86_64-Minimal-2009.iso lower\r\nmount: \/mnt\/overlay2\/lower: WARNING: device write-protected, mounted read-only.<\/pre>\n
              \n
            • \u4f7f\u7528 mount \u547d\u4ee4\u6302\u8f7d overlay2 \u6587\u4ef6\u7cfb\u7edf\uff0c\u6302\u8f7d\u70b9\u4e3a merged \u76ee\u5f55<\/li>\n<\/ul>\n
              \u256d\u2500root@esxi-debian-devbox \/mnt\/overlay2\r\n\u2570\u2500# mount -t overlay overlay -o lowerdir=lower,upperdir=upper,workdir=work merged\r\n\u256d\u2500root@esxi-debian-devbox \/mnt\/overlay2\r\n\u2570\u2500# cd merged<\/pre>\n
                \n
              • \u65b0\u589e\u4e00\u4e2a kickstart.cfg \u6587\u4ef6\uff0c\u7136\u540e\u91cd\u65b0\u6784\u5efa ISO \u955c\u50cf<\/li>\n<\/ul>\n
                \u256d\u2500root@esxi-debian-devbox \/mnt\/overlay2\/merged\r\n\u2570\u2500# echo '# this is a kickstart config file' > kickstart.cfg\r\n\u256d\u2500root@esxi-debian-devbox \/mnt\/overlay2\/merged\r\n\u2570\u2500# genisoimage -U -r -v -T -J -joliet-long -V \"CentOS 7 x86_64\" -volset \"CentOS 7 x86_64\" -A \"CentOS 7 x86_64\" -b isolinux\/isolinux.bin -c isolinux\/boot.cat -no-emul-boot -boot-load-size 4 -no-emul-boot -o \/mnt\/CentOS-7-x86_64-Minimal-2009-dev.iso .\r\nTotal translation table size: 124658\r\nTotal rockridge attributes bytes: 55187\r\nTotal directory bytes: 100352\r\nPath table size(bytes): 140\r\nDone with: The File(s) Block(s) 527985\r\nWriting: Ending Padblock Start Block 528101\r\nDone with: Ending Padblock Block(s) 150\r\nMax brk space used a4000\r\n528251 extents written (1031 MB)<\/pre>\n
                  \n
                • \u6302\u8f7d\u65b0\u7684 ISO \u955c\u50cf\u9a8c\u8bc1\u540e\u53d1\u73b0\u786e\u5b9e\u53ef\u884c<\/li>\n<\/ul>\n
                  \u256d\u2500root@esxi-debian-devbox \/mnt\/overlay2\/merged\r\n\u2570\u2500# mount -o loop \/mnt\/CentOS-7-x86_64-Minimal-2009-dev.iso \/mnt\/newiso\r\nmount: \/mnt\/newiso: WARNING: device write-protected, mounted read-only.\r\n\u256d\u2500root@esxi-debian-devbox \/mnt\/overlay2\/merged\r\n\u2570\u2500# cat \/mnt\/newiso\/kickstart.cfg\r\n# this is a kickstart config file<\/pre>\n
                  mount --bind<\/strong><\/div>\n

                  \u524d\u9762\u8bb2\u5230\u4e86\u4f7f\u7528 overlay2 \u7684\u65b9\u5f0f\u907f\u514d\u590d\u5236\u539f\u955c\u50cf\u5185\u5bb9\u8fdb\u884c\u91cd\u65b0\u6784\u5efa\u955c\u50cf\u7684\u65b9\u6848\uff0c\u4f46\u662f overlay2 \u5bf9\u4e8e\u4e0d\u662f\u5f88\u719f\u6089\u7684\u4eba\u6765\u8bb2\u8fd8\u662f\u6bd4\u8f83\u590d\u6742\uff0c\u5149 lowerdir\u3001upperdir\u3001workdir\u3001mergeddir \u8fd9\u56db\u4e2a\u6587\u4ef6\u5939\u7684\u4f5c\u7528\u548c\u539f\u7406\u5c31\u628a\u4eba\u76f4\u63a5\u7ed9\u6574\u4e0d\u4f1a\u4e86\u3002\u90a3\u4e48\u8fd8\u6709\u6ca1\u6709\u66f4\u4e3a\u7b80\u5355\u4e00\u70b9\u7684\u65b9\u5f0f\u5462\uff1f<\/p>\n

                  \u522b\u8bf4\u8fd8\u771f\u6709\uff0c\u53ea\u4e0d\u8fc7\u8fd9\u79cd\u65b9\u5f0f\u7684\u7528\u9014\u6bd4\u8f83\u5c40\u9650\u3002\u5982\u679c\u4ec5\u4ec5\u662f\u7528\u4e8e\u4fee\u6539 ISO \u4e2d\u7684\u4e00\u4e2a\u6587\u4ef6\u6216\u8005\u76ee\u5f55\uff0c\u53ef\u4ee5\u5c06\u8be5\u6587\u4ef6\u6216\u76ee\u5f55\u4ee5 bind \u6302\u8f7d\u7684\u65b9\u5f0f\u5c06\u5b83\u6302\u8f7d\u5230 ISO \u76ee\u5f55\u76ee\u5f55\u5bf9\u5e94\u7684\u6587\u4ef6\u4e0a\u3002<\/p>\n

                  \u539f\u7406\u5c31\u662f\u867d\u7136 ISO \u76ee\u5f55\u672c\u8eab\u662f\u53ea\u8bfb\u7684\uff0c\u4f46\u5b83\u91cc\u9762\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u662f\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u6302\u8f7d\u70b9\u7684\u3002\u4e5f\u5c31\u662f\u8bf4\u6211\u628a\u6587\u4ef6 A \u6302\u8f7d\u5230\u6587\u4ef6 B\uff0c\u5e76\u4e0d\u662f\u5728\u4fee\u6539\u6587\u4ef6 B\uff0c\u8fd9\u5c31\u662f Unix\/Linux \u6587\u4ef6\u7cfb\u7edf\u5341\u5206\u5947\u5999\u7684\u5730\u65b9\u3002\u540c\u6837\u8fd0\u7528 bind \u6302\u8f7d\u7684\u8fd8\u6709 docker \u7684 volume \u4ee5\u53ca pod \u7684 volume \u4e5f\u662f\u8fd0\u7528\u540c\u6837\u7684\u539f\u7406\uff0c\u4ee5 bind \u7684\u65b9\u5f0f\u5c06\u5bbf\u4e3b\u673a\u4e0a\u7684\u76ee\u5f55\u6216\u6587\u4ef6\u6302\u8f7d\u5230\u5bb9\u5668\u8fd0\u884c\u5bf9\u5e94\u7684\u76ee\u5f55\u4e0a\u3002\u5bf9\u4e8e\u4fee\u6539\u53ea\u8bfb ISO \u91cc\u7684\u6587\u4ef6\/\u76ee\u5f55\u6211\u4eec\u5f53\u7136\u4e5f\u53ef\u4ee5\u8fd9\u6837\u505a\u3002\u5e9f\u8bdd\u4e0d\u591a\u8bf4\u6765\u5b9e\u8df5\u9a8c\u8bc1\u4e00\u4e0b\uff1a<\/p>\n

                    \n
                  • \u9996\u5148\u4f9d\u65e7\u662f\u5c06 ISO \u955c\u50cf\u6302\u8f7d\u5230 \/mn\/iso \u76ee\u5f55<\/li>\n<\/ul>\n
                    \u256d\u2500root@esxi-debian-devbox ~\/build\r\n\u2570\u2500# mount -o loop CentOS-7-x86_64-Minimal-2009.iso \/mnt\/iso\r\nmount: \/mnt\/iso: WARNING: device write-protected, mounted read-only.<\/pre>\n
                      \n
                    • \u63a5\u7740\u521b\u5efa\u4e00\u4e2a \/mnt\/files\/ks.cfg \u6587\u4ef6\uff0c\u5e76\u5199\u5165\u6211\u4eec\u9700\u8981\u7684\u5185\u5bb9<\/li>\n<\/ul>\n
                      \u256d\u2500root@esxi-debian-devbox ~\/build\r\n\u2570\u2500# mkdir -p \/mnt\/files\r\n\u256d\u2500root@esxi-debian-devbox ~\/build\r\n\u2570\u2500# echo '# this is a kickstart config file' > \/mnt\/files\/ks.cfg<\/pre>\n
                        \n
                      • \u63a5\u7740\u4ee5 mount --bind \u7684\u65b9\u5f0f\u6302\u8f7d\u65b0\u5efa\u7684\u6587\u4ef6\u5230 ISO \u7684 EULA \u6587\u4ef6<\/li>\n<\/ul>\n
                        \u256d\u2500root@esxi-debian-devbox \/mnt\/build\r\n\u2570\u2500# mount --bind \/mnt\/files\/ks.cfg \/mnt\/iso\/EULA\r\n\u256d\u2500root@esxi-debian-devbox \/mnt\/build\r\n\u2570\u2500# cat \/mnt\/iso\/EULA\r\n# this is a kickstart config file<\/pre>\n

                        \u53ef\u4ee5\u770b\u5230\u539f\u6765 ISO \u6587\u4ef6\u4e2d\u7684 EULA \u6587\u4ef6\u5df2\u7ecf\u88ab\u6210\u529f\u66ff\u6362\u6210\u4e86\u6211\u4eec\u4fee\u6539\u7684\u6587\u4ef6\uff0c\u7136\u540e\u518d\u91cd\u65b0\u6784\u5efa\u4e00\u4e0b\u8be5 ISO \u955c\u50cf<\/p>\n

                        \u256d\u2500root@esxi-debian-devbox \/mnt\/iso\r\n\u2570\u2500# genisoimage -U -r -v -T -J -joliet-long -V \"CentOS 7 x86_64\" -volset \"CentOS 7 x86_64\" -A \"CentOS 7 x86_64\" -b isolinux\/isolinux.bin -c isolinux\/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -no-emul-boot -o \/mnt\/CentOS-7-x86_64-Minimal-2009-dev.iso .\r\n\r\n\u7136\u540e\u6211\u4eec\u518d\u91cd\u65b0\u6302\u8f7d\u65b0\u7684 ISO \u6587\u4ef6\u9a8c\u8bc1\u4e00\u4e0b\u662f\u5426\u53ef\u4ee5<\/pre>\n
                        \u256d\u2500root@esxi-debian-devbox \/mnt\/iso\r\n\u2570\u2500# mkdir \/mnt\/newiso\r\n\u256d\u2500root@esxi-debian-devbox \/mnt\/iso\r\n\u2570\u2500# mount -o loop \/mnt\/CentOS-7-x86_64-Minimal-2009-dev.iso \/mnt\/newiso\r\nmount: \/mnt\/newiso: WARNING: device write-protected, mounted read-only.\r\n\u256d\u2500root@esxi-debian-devbox \/mnt\/iso\r\n\u2570\u2500# cat \/mnt\/newiso\/EULA\r\n# this is a kickstart config file<\/pre>\n

                        \u9a8c\u8bc1\u901a\u8fc7\uff0c\u786e\u5b9e\u53ef\u4ee5\uff01\u4e0d\u8fc7\u8fd9\u79cd\u65b9\u5f0f\u5f88\u5c40\u9650\uff0c\u6bd4\u8f83\u9002\u7528\u4e8e\u4fee\u6539\u5355\u4e2a\u6587\u4ef6\u5982 kickstart.cfg\uff0c\u5982\u679c\u662f\u8981\u65b0\u589e\u6587\u4ef6\u90a3\u8fd8\u662f\u4f7f\u7528\u4e0a\u6587\u63d0\u5230\u7684 overlay2 \u7684\u65b9\u5f0f\u66f4\u4e3a\u65b9\u4fbf\u4e00\u4e9b\u3002<\/p>\n

                        \u6536\u83b7<\/strong><\/div>\n

                        \u867d\u7136 ISO \u955c\u50cf\u548c\u5bb9\u5668\u955c\u50cf\u4e8c\u8005\u6709\u7740\u672c\u8d28\u7684\u5dee\u522b\uff0c\u4f46\u5bf9\u4e8e\u53ea\u8bfb\u548c\u8054\u5408\u6302\u8f7d\u7684\u8fd9\u4e9b\u7279\u6027\u4e8c\u8005\u53ef\u4ee5\u76f8\u4e92\u501f\u9274\u6ef4\u3002<\/p>\n

                        \u4e0d\u6b62\u5982\u6b64 overlay2 \u8fd9\u79cd\u8054\u5408\u6302\u8f7d\u7684\u7279\u6027\uff0c\u8fd8\u53ef\u4ee5\u7528\u5728\u5176\u4ed6\u5730\u65b9\u3002\u6bd4\u5982\u6211\u6709\u4e00\u4e2a\u516c\u5171\u7684 NFS \u5171\u4eab\u670d\u52a1\u5668\uff0c\u5171\u4eab\u7740\u4e00\u4e9b\u76ee\u5f55\uff0c\u6240\u6709\u4eba\u90fd\u53ef\u4ee5\u4ee5 root \u7528\u6237\u5e76\u4ee5\u8bfb\u5199\u7684\u6743\u9650\u8fdb\u884c NFS \u6302\u8f7d\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b\u5f88\u96be\u4fdd\u969c\u4e00\u4e9b\u91cd\u8981\u7684\u6587\u4ef6\u548c\u6570\u636e\u88ab\u8bef\u5220\u3002\u8fd9\u65f6\u5019\u5c31\u53ef\u4ee5\u4f7f\u7528 overlay2 \u7684\u65b9\u5f0f\u5c06\u4e00\u4e9b\u91cd\u8981\u7684\u6587\u4ef6\u6570\u636e\u6302\u8f7d\u4e3a overlay2 \u7684 lowerdir \u53ea\u8bfb\u5c42\uff0c\u4fdd\u8bc1\u8fd9\u4e9b\u6570\u636e\u5c31\u5982\u5bb9\u5668\u955c\u50cf\u4e00\u6837\uff0c\u6bcf\u6b21\u6302\u8f7d\u4f7f\u7528\u7684\u65f6\u5019\u90fd\u4f5c\u4e3a\u4e00\u4e2a\u53ea\u8bfb\u5c42\u3002\u6240\u6709\u7684\u8bfb\u5199\u64cd\u4f5c\u90fd\u5728 overlay2 \u7684 merged \u90a3\u4e00\u5c42\uff0c\u4e0d\u4f1a\u771f\u6b63\u5f71\u54cd\u5230\u53ea\u8bfb\u5c42\u7684\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

                        \u7b14\u8005\u4e4b\u524d\u5728\u5b57\u8282\u8df3\u52a8\u7684\u65f6\u5019\u662f\u8d1f\u8d23 PaaS \u5bb9\u5668\u4e91\u5e73\u53f0\u7684\u79c1\u6709\u5316\u90e8\u7f72\u76f8\u5173\u7684\u5de5\u4f5c\uff0c\u6240\u4ee5\u7ecf\u5e38\u4f1a\u548c\u4e00\u4e9b\u5bb9\u5668\u955c\u50cf\u6253\u4ea4\u9053\uff0c\u5bf9 […]<\/p>\n","protected":false},"author":323,"featured_media":242026,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-244781","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/244781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=244781"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/244781\/revisions"}],"predecessor-version":[{"id":246023,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/244781\/revisions\/246023"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/242026"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=244781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=244781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=244781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}