• cobbler3使用总结


    按照如下步骤进行安装配置,实现PXE+BIOS安装Centos和Ubuntu,UEFI+iPXE安装Windows2019

    若想实现UEFI+iPXE安装Centos和Ubuntu,可以参考附录《更全的ipxe/default.ipxe》配置default.ipxe即可

    rocky91安装配置cobbler3.3.3

    准备工作

    rocky91的IP地址是192.168.1.177

    yum -y install vim wget epel-release

    systemctl disable --now firewalld

    systemctl disable --now dnf-makecache.timer

    setenforce 0

    sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config

    安装软件包

    yum -y install rsync rsync-daemon httpd dnsmasq tftp tftp-server cobbler pykickstart ipxe-bootimgs-x86

    yum -y install samba ipxe-roms-qemu.noarch # Windows需要使用

    启动服务

    systemctl enable --now httpd cobblerd rsyncd tftp

    修改cobbler配置

    sed -i ‘s/manage_dhcp: false/manage_dhcp: true/’ /etc/cobbler/settings.yaml

    sed -i ‘s/manage_dhcp_v4: false/manage_dhcp_v4: true/’ /etc/cobbler/settings.yaml

    sed -i ‘s/next_server_v4: 127.0.0.1/next_server_v4: 192.168.1.177/’ /etc/cobbler/settings.yaml

    sed -i ‘s/redhat_management_permissive: false/redhat_management_permissive: true/’ /etc/cobbler/settings.yaml

    sed -i ‘s/server: 127.0.0.1/server: 192.168.1.177/’ /etc/cobbler/settings.yaml

    修复一些配置

    cobbler check
    yum -y install yum-utils
    yum -y install syslinux*
    cp /usr/share/syslinux/pxelinux.0 /var/lib/cobbler/loaders/
    cp /usr/share/syslinux/menu.c32 /var/lib/cobbler/loaders/
    cp /usr/share/syslinux/ldlinux.c32 /var/lib/cobbler/loaders/
    cp /usr/share/syslinux/libutil.c32 /var/lib/cobbler/loaders/
    systemctl restart cobblerd
    cobbler sync

    修改一些代码

    根据 https://github.com/cobbler/cobbler/issues/3473

    [root@localhost modules]# grep -nr wlsd sync_post_wingen_ankele.py -C2
    81-    b = h.node_add_child(objs, "{65c31250-afa2-11df-8045-000c29f37d88}")
    82-    d = h.node_add_child(b, "Description")
    83:    # wlsd mod 2
    84-    #h.node_set_value(d, {"key": "Type", "t": REG_DWORD, "value": b"\x03\x00\x20\x13"})
    85-    h.node_set_value(d, {"key": "Type", "t": REG_DWORD, "value": b"\x03\x00\x20\x10"})
    86-    e = h.node_add_child(b, "Elements")
    87:    # wlsd add 2
    88-    e1 = h.node_add_child(e, "12000002")
    89-    h.node_set_value(e1, {"key": "Element", "t": REG_SZ, "value": "\\windows\\system32\\winload.exe\0".encode(encoding="utf-16le"), }, )
    --
    178-
    179-        if is_wimboot:
    180:            # wlsd del 2
    181-            #distro_path = os.path.join(settings.webdir, "distro_mirror", distro.name)
    182-            #kernel_path = os.path.join(distro_path, "boot")
    --
    303-
    304-            if is_wimboot:
    305:                # wlsd mod 2
    306-                #wim_file_name = '\\Boot\\' + wim_file_name
    307-                wim_file_name = '\\Boot\\' + "winpe.wim"
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22

    为Windows修改ipxe.template

    sed -i ‘s/kernel $kernel_path $kernel_options initrd=initrd.magic/kernel $kernel_path $kernel_options/’ /etc/cobbler/boot_loader_conf/ipxe.template

    为Windows配置ipxe

    dnsmasq里边应该是指定的ipxe-x86_64.efi这个文件,所以

    cp /usr/share/ipxe/ipxe-x86_64.efi /var/lib/tftpboot/ipxe-x86_64.efi

    安装wim工具

    不然cobbler import时会报错 no /usr/bin/wiminfo found, please install wimlib-utils 以及 No signature matched in /var/www/cobbler/distro_mirror/win2019

    yum -y install wimlib-utils

    开启Windows

    sed -i ‘s/windows_enabled: false/windows_enabled: true/’ /etc/cobbler/settings.d/windows.settings

    开启dnsmasq

    而不使用dhcp-server,原因是Windows得使用dnsmasq方便指定ipxe

    sed -i ‘s/module = managers.isc/module = managers.dnsmasq/’ /etc/cobbler/modules.conf

    cat /etc/cobbler/dnsmasq.template

    # Cobbler generated configuration file for dnsmasq
    # $date
    #
    
    # resolve.conf .. ?
    #no-poll
    #enable-dbus
    read-ethers
    addn-hosts = /var/lib/cobbler/cobbler_hosts
    
    dhcp-range=192.168.66.100,192.168.66.200
    dhcp-option=66,$next_server_v4
    dhcp-lease-max=1000
    dhcp-authoritative
    #dhcp-boot=pxelinux.0
    #dhcp-boot=net:normalarch,pxelinux.0
    dhcp-match=set:efi-x86_64,option:client-arch,7
    dhcp-boot=tag:efi-x86_64,ipxe-x86_64.efi
    dhcp-match=set:ipxe,175
    dhcp-boot=tag:ipxe,/ipxe/default.ipxe
    dhcp-match=set:bios,option:client-arch,0
    dhcp-boot=tag:bios,pxelinux.0
    
    $insert_cobbler_system_definitions
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24

    systemctl enable --now dnsmasq

    cobbler sync

    cobbler3.3.3安装Windows2019

    配置samba

    cat >> /etc/samba/smb.conf << EOF

    [DISTRO]
    comment = Windows distributions
    path = /var/www/cobbler/distro_mirror
    guest ok = yes
    browseable = yes
    public = yes
    writeable = no
    printable = no
    locking = no
    EOF

    systemctl enable --now smb

    导入ISO镜像

    scp cn_windows_server_2019_x64_dvd_4de40f33.iso 到/root下
    mkdir -p /iso/win2019
    mount -o ro,loop cn_windows_server_2019_x64_dvd_4de40f33.iso /iso/win2019
    cobbler import --path=/iso/win2019 --name=win2019

    指定应答文件

    cobbler profile edit --name=win2019-x86_64 --autoinstall-meta=“kernel=http://@@http_server@@/cobbler/images/@@distro_name@@/wimboot bootmgr=bootmgr.exe bcd=bcd winpe=winpe.wim answerfile=autounattended.xml”
    ln -s /var/www/cobbler/distro_mirror/win2019 /var/www/cobbler/distro_mirror/win2019-x86_64
    cobbler sync

    替换cobbler sync生成的winpe.wim,然后给wimpe.wim注入命令

    cp /root/winpe.wim /var/www/cobbler/images/win2019-x86_64/
    /usr/bin/wimupdate /var/www/cobbler/images/win2019-x86_64/winpe.wim --command=“add /root/winpe_inject /Windows/System32/startnet.cmd”

    [root@localhost win2019-x86_64]# cat /root/winpe_inject
    wpeinit
    
    ping 127.0.0.1 -n 10 >nul
    net use z: \\192.168.1.177\DISTRO\win2019-x86_64
    set exit_code=%ERRORLEVEL%
    IF %exit_code% EQU 0 GOTO INSTALL
    echo "Can't mount network drive"
    pause
    goto EXIT
    
    :INSTALL
    
    z:\sources\setup.exe /unattend:Z:\autounattended.xml
    :EXIT
    exit
    
    # 解释
    # net use z: \\192.168.1.177\DISTRO\win2019-x86_64 表示使用smb协议挂载192.168.1.177的共享目录,可修改此IP
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19

    覆盖
    cd /var/www/cobbler/images/win2019-x86_64/
    cp winpe.wim /var/www/cobbler/distro_mirror/win2019-x86_64/boot/winpe.wim
    cp winpe.wim /var/lib/tftpboot/images/win2019-x86_64/

    下载wimboot

    根据https://github.com/cobbler/cobbler/issues/3473

    https://github.com/ipxe/wimboot/releases/latest/download/wimboot,
    并copy到几个地方
    /var/lib/tftpboot
    /var/lib/tftpboot/images/win2019-x86_64
    /var/www/cobbler/images/win2019-x86_64/

    /var/www/cobbler/images/win2019-x86_64/下边共有这几个文件
    autounattended.xml bcd boot.sdi bootmgr.exe pxeboot.n12 wimboot winpe.wim

    准备好 autounattended.xml,见附件

    /var/lib/tftpboot/images/win2019-x86_64/autounattended.xml
    /var/www/cobbler/distro_mirror/win2019/autounattended.xml
    /var/www/cobbler/images/win2019-x86_64/autounattended.xml

    默认从windows启动

    vim /var/lib/tftpboot/ipxe/default.ipxe

    ...
    set menu-timeout 2000
    isset ${menu-default} || set menu-default win2019-x86_64
    ...
    
    • 1
    • 2
    • 3
    • 4

    systemctl restart cobblerd

    安装Ubuntu20.04.6-live-server

    mkdir /iso/ubuntu20046
    mount -o loop,ro ubuntu-20.04.6-live-server-amd64.iso /iso/ubuntu20046
    cobbler import --path=/iso/ubuntu20046 --name=ubuntu20046
    之后/var/lib/tftpboot/pxelinux.cfg/default中便有了ubuntu20046

    修改default,添加参数

    LABEL ubuntu20046-casper-x86_64
            MENU LABEL ubuntu20046-casper-x86_64
            kernel /images/ubuntu20046-casper-x86_64/vmlinuz
            append initrd=/images/ubuntu20046-casper-x86_64/initrd  hostname=ubuntu20046-casper-x8664 domain=local.lan suite=focal
            ipappend 2
    
    改为
    
    LABEL ubuntu20046-casper-x86_64
            MENU LABEL ubuntu20046-casper-x86_64
            kernel /images/ubuntu20046-casper-x86_64/vmlinuz
            initrd /images/ubuntu20046-casper-x86_64/initrd
            append biosdevname=0 net.ifnames=0 netcfg/choose_interface=auto ip=dhcp autoinstall ds='nocloud-net;s=http://192.168.1.177:3003/' cloud-config-url=http://192.168.1.177:3003/user-data url=http://192.168.1.177/cobbler/isos/ubuntu-20.04.6-live-server-amd64.iso
            ipappend 2
    # 其中biosdevname=0 net.ifnames=0 在live阶段起作用。欲修改安装后系统的网卡名称,cloud-init的user-data中使用shell命令来配置内核参数
    # netcfg/choose_interface=auto ip=dhcp 表示任意选中一张网卡,通过DHCP获取IP,用以与我们的server通信
    # autoinstall 指定自动安装
    # ds='nocloud-net;s=http://192.168.1.177:3003/' 指定安装方式是nocloud-net,并给出包含user-data和meta-data的http静态路径
    # cloud-config-url=http://192.168.1.177:3003/user-data 给出user-data具体路径,方便获取cloud-init指令
    # url=http://192.168.1.177/cobbler/isos/ubuntu-20.04.6-live-server-amd64.iso 指定网络安装时局域网内的ISO文件路径
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20

    添加user-data

    mkdir /root/http_server
    touch /root/http_server/user-data
    touch /root/http_server/meta-data

    cat /root/http_server/meta-data
    
    #cloud-config
    autoinstall:
      version: 1
      apt:
        geoip: true
        preserve_sources_list: false
        primary:
        - arches: [amd64, i386]
          uri: http://us.archive.ubuntu.com/ubuntu
        - arches: [default]
          uri: http://ports.ubuntu.com/ubuntu-ports
      identity:
        hostname: ubuntu-server
        password: $6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0
        username: ubuntu
      keyboard: {layout: us, toggle: null, variant: ''}
      locale: en_US
      network:
        version: 2
        ethernets:
          eth0:
            dhcp4: true
            nameservers:
              addresses: [8.8.8.8]
      ssh:
        allow-pw: true
        authorized-keys: []
        install-server: true
    
      #### POST Install commands
      late-commands:
        - sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /target/etc/ssh/sshd_config
        - sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /target/etc/ssh/sshd_config
        # - echo "root:root" | chpasswd
        # - sed -i '/^GRUB_CMDLINE_LINUX=/s@"$@ net.ifnames=0 biosdevname=0"@' /target/etc/default/grub && update-grub  # there is no grub2-common
        - sed -i '/^GRUB_CMDLINE_LINUX=/s@"$@ net.ifnames=0 biosdevname=0"@' /target/etc/default/grub
        # - apt -y install grub2-common
        # - grub-mkconfig -o /target/boot/grub/grub.cfg
        - echo '#!/bin/bash' > /target/etc/rc.local
        - echo 'echo root:root | chpasswd' >> /target/etc/rc.local
        - echo 'update-grub' >> /target/etc/rc.local
        - echo 'touch /root/haha' >> /target/etc/rc.local
        - echo 'rm -- "$0"' >> /target/etc/rc.local
        - echo 'reboot' >> /target/etc/rc.local
        - chmod a+x /target/etc/rc.local
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47

    然后进入到/root/http_server

    python -m http.server 3003

    安装CentOS

    CentOS-7-x86_64-Everything-2009.iso
    mkdir /iso/centos7
    mount -o loop,ro CentOS-7-x86_64-Everything-2009.iso /iso/centos7/
    cobbler import --path=/iso/centos7 --name=centos7
    准备好centos7.ks,修改里边的IP
    cobbler profile edit --name centos7-x86_64 --autoinstall centos7.ks

    附录

    autounattended.xml

    
    
        
            
                
                
                
            
            
                
            
            
                
            
        
        
            
                
                    en-US
                
                0c09:00000409
                zh-CN
                zh-CN
                zh-CN
                zh-CN
            
            
          
                
                    
                        
                            
                                1
                                485
                                Primary
                            
                            
                                2
                                100
                                EFI
                            
                            
                                3
                                128
                                MSR
                            
                            
                                4
                                Primary
                                true
                            
                        
                        
                            
                                NTFS
                                
                                1
                                1
                            
                            
                                2
                                FAT32
                                
                                2
                            
                            
                                3
                                3
                            
                            
                                C
                                4
                                4
                                
                                NTFS
                            
                        
                        0
                        true
                    
                
                
                    
                        
                            
                                /IMAGE/NAME
                                Windows Server 2019 SERVERSTANDARD
                            
                        
                        
                            0
                            4
                        
                    
                
                
                    
                        N69G4-B89J2-4G8F4-WWYCC-J464C
                    
                    true
                    ankele
                    ankele
                
                
                    false
                
            
        
        
            
                false
            
        
        
            
                1
            
        
        
            
                0c09:00000409
                zh-CN
                zh-CN
                zh-CN
                zh-CN
            
            
                true
            
            
                0
            
            
                -PC-ankele
                N69G4-B89J2-4G8F4-WWYCC-J464C
            
            
                false
                false
            
        
        
            
                
                    
                        aQBuAHMAdABhAGMAawBQAGEAcwBzAHcAbwByAGQA
                        false</PlainText>
                    </Password>
                    <Enabled>true</Enabled>
                    <Username>ankele</Username>
                </AutoLogon>
                <DesktopOptimization>
                    <GoToDesktopOnSignIn>true</GoToDesktopOnSignIn>
                    <ShowWindowsStoreAppsOnTaskbar>false</ShowWindowsStoreAppsOnTaskbar>
                </DesktopOptimization>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server&quot; /v fDenyTSConnections /t REG_DWORD /d 0 /f</CommandLine>
                        <Order>1</Order>
                        <RequiresUserInput>false</RequiresUserInput>
                    </SynchronousCommand>
                </FirstLogonCommands>
                <OOBE>
                    <VMModeOptimizations>
                        <SkipAdministratorProfileRemoval>true</SkipAdministratorProfileRemoval>
                        <SkipNotifyUILanguageChange>true</SkipNotifyUILanguageChange>
                        <SkipWinREInitialization>true</SkipWinREInitialization>
                    </VMModeOptimizations>
                </OOBE>
                <UserAccounts>
                    <AdministratorPassword>
                        <Value>aQBuAHMAdABhAGMAawBBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByAFAAYQBzAHMAdwBvAHIAZAA=</Value>
                        <PlainText>false</PlainText>
                    </AdministratorPassword>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>aQBuAHMAdABhAGMAawBQAGEAcwBzAHcAbwByAGQA</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>pc of ankele</Description>
                            <DisplayName>ankele</DisplayName>
                            <Group>Administrators</Group>
                            <Name>ankele</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <BluetoothTaskbarIconEnabled>false</BluetoothTaskbarIconEnabled>
                <ConvertibleSlateModePromptPreference>0</ConvertibleSlateModePromptPreference>
                <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
                <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
                <EnableStartMenu>true</EnableStartMenu>
                <RegisteredOrganization>ankele</RegisteredOrganization>
                <RegisteredOwner>ankele</RegisteredOwner>
                <ShowPowerButtonOnStartScreen>true</ShowPowerButtonOnStartScreen>
                <SignInMode>0</SignInMode>
                <TimeZone>Asia/Shanghai</TimeZone>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:c:/users/86153/desktop/install.wim#Windows Server 2019 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    <div class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{"spm":"1001.2101.3001.7365"}"><img class="look-more-preCode contentImg-no-view" src="https://1000bd.com/contentImg/2022/06/27/191644837.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li><li style="color: rgb(153, 153, 153);">70</li><li style="color: rgb(153, 153, 153);">71</li><li style="color: rgb(153, 153, 153);">72</li><li style="color: rgb(153, 153, 153);">73</li><li style="color: rgb(153, 153, 153);">74</li><li style="color: rgb(153, 153, 153);">75</li><li style="color: rgb(153, 153, 153);">76</li><li style="color: rgb(153, 153, 153);">77</li><li style="color: rgb(153, 153, 153);">78</li><li style="color: rgb(153, 153, 153);">79</li><li style="color: rgb(153, 153, 153);">80</li><li style="color: rgb(153, 153, 153);">81</li><li style="color: rgb(153, 153, 153);">82</li><li style="color: rgb(153, 153, 153);">83</li><li style="color: rgb(153, 153, 153);">84</li><li style="color: rgb(153, 153, 153);">85</li><li style="color: rgb(153, 153, 153);">86</li><li style="color: rgb(153, 153, 153);">87</li><li style="color: rgb(153, 153, 153);">88</li><li style="color: rgb(153, 153, 153);">89</li><li style="color: rgb(153, 153, 153);">90</li><li style="color: rgb(153, 153, 153);">91</li><li style="color: rgb(153, 153, 153);">92</li><li style="color: rgb(153, 153, 153);">93</li><li style="color: rgb(153, 153, 153);">94</li><li style="color: rgb(153, 153, 153);">95</li><li style="color: rgb(153, 153, 153);">96</li><li style="color: rgb(153, 153, 153);">97</li><li style="color: rgb(153, 153, 153);">98</li><li style="color: rgb(153, 153, 153);">99</li><li style="color: rgb(153, 153, 153);">100</li><li style="color: rgb(153, 153, 153);">101</li><li style="color: rgb(153, 153, 153);">102</li><li style="color: rgb(153, 153, 153);">103</li><li style="color: rgb(153, 153, 153);">104</li><li style="color: rgb(153, 153, 153);">105</li><li style="color: rgb(153, 153, 153);">106</li><li style="color: rgb(153, 153, 153);">107</li><li style="color: rgb(153, 153, 153);">108</li><li style="color: rgb(153, 153, 153);">109</li><li style="color: rgb(153, 153, 153);">110</li><li style="color: rgb(153, 153, 153);">111</li><li style="color: rgb(153, 153, 153);">112</li><li style="color: rgb(153, 153, 153);">113</li><li style="color: rgb(153, 153, 153);">114</li><li style="color: rgb(153, 153, 153);">115</li><li style="color: rgb(153, 153, 153);">116</li><li style="color: rgb(153, 153, 153);">117</li><li style="color: rgb(153, 153, 153);">118</li><li style="color: rgb(153, 153, 153);">119</li><li style="color: rgb(153, 153, 153);">120</li><li style="color: rgb(153, 153, 153);">121</li><li style="color: rgb(153, 153, 153);">122</li><li style="color: rgb(153, 153, 153);">123</li><li style="color: rgb(153, 153, 153);">124</li><li style="color: rgb(153, 153, 153);">125</li><li style="color: rgb(153, 153, 153);">126</li><li style="color: rgb(153, 153, 153);">127</li><li style="color: rgb(153, 153, 153);">128</li><li style="color: rgb(153, 153, 153);">129</li><li style="color: rgb(153, 153, 153);">130</li><li style="color: rgb(153, 153, 153);">131</li><li style="color: rgb(153, 153, 153);">132</li><li style="color: rgb(153, 153, 153);">133</li><li style="color: rgb(153, 153, 153);">134</li><li style="color: rgb(153, 153, 153);">135</li><li style="color: rgb(153, 153, 153);">136</li><li style="color: rgb(153, 153, 153);">137</li><li style="color: rgb(153, 153, 153);">138</li><li style="color: rgb(153, 153, 153);">139</li><li style="color: rgb(153, 153, 153);">140</li><li style="color: rgb(153, 153, 153);">141</li><li style="color: rgb(153, 153, 153);">142</li><li style="color: rgb(153, 153, 153);">143</li><li style="color: rgb(153, 153, 153);">144</li><li style="color: rgb(153, 153, 153);">145</li><li style="color: rgb(153, 153, 153);">146</li><li style="color: rgb(153, 153, 153);">147</li><li style="color: rgb(153, 153, 153);">148</li><li style="color: rgb(153, 153, 153);">149</li><li style="color: rgb(153, 153, 153);">150</li><li style="color: rgb(153, 153, 153);">151</li><li style="color: rgb(153, 153, 153);">152</li><li style="color: rgb(153, 153, 153);">153</li><li style="color: rgb(153, 153, 153);">154</li><li style="color: rgb(153, 153, 153);">155</li><li style="color: rgb(153, 153, 153);">156</li><li style="color: rgb(153, 153, 153);">157</li><li style="color: rgb(153, 153, 153);">158</li><li style="color: rgb(153, 153, 153);">159</li><li style="color: rgb(153, 153, 153);">160</li><li style="color: rgb(153, 153, 153);">161</li><li style="color: rgb(153, 153, 153);">162</li><li style="color: rgb(153, 153, 153);">163</li><li style="color: rgb(153, 153, 153);">164</li><li style="color: rgb(153, 153, 153);">165</li><li style="color: rgb(153, 153, 153);">166</li><li style="color: rgb(153, 153, 153);">167</li><li style="color: rgb(153, 153, 153);">168</li><li style="color: rgb(153, 153, 153);">169</li><li style="color: rgb(153, 153, 153);">170</li><li style="color: rgb(153, 153, 153);">171</li><li style="color: rgb(153, 153, 153);">172</li><li style="color: rgb(153, 153, 153);">173</li><li style="color: rgb(153, 153, 153);">174</li><li style="color: rgb(153, 153, 153);">175</li><li style="color: rgb(153, 153, 153);">176</li><li style="color: rgb(153, 153, 153);">177</li><li style="color: rgb(153, 153, 153);">178</li><li style="color: rgb(153, 153, 153);">179</li><li style="color: rgb(153, 153, 153);">180</li><li style="color: rgb(153, 153, 153);">181</li><li style="color: rgb(153, 153, 153);">182</li><li style="color: rgb(153, 153, 153);">183</li><li style="color: rgb(153, 153, 153);">184</li><li style="color: rgb(153, 153, 153);">185</li><li style="color: rgb(153, 153, 153);">186</li><li style="color: rgb(153, 153, 153);">187</li><li style="color: rgb(153, 153, 153);">188</li><li style="color: rgb(153, 153, 153);">189</li><li style="color: rgb(153, 153, 153);">190</li><li style="color: rgb(153, 153, 153);">191</li><li style="color: rgb(153, 153, 153);">192</li><li style="color: rgb(153, 153, 153);">193</li><li style="color: rgb(153, 153, 153);">194</li><li style="color: rgb(153, 153, 153);">195</li><li style="color: rgb(153, 153, 153);">196</li><li style="color: rgb(153, 153, 153);">197</li><li style="color: rgb(153, 153, 153);">198</li><li style="color: rgb(153, 153, 153);">199</li><li style="color: rgb(153, 153, 153);">200</li><li style="color: rgb(153, 153, 153);">201</li><li style="color: rgb(153, 153, 153);">202</li><li style="color: rgb(153, 153, 153);">203</li><li style="color: rgb(153, 153, 153);">204</li><li style="color: rgb(153, 153, 153);">205</li><li style="color: rgb(153, 153, 153);">206</li><li style="color: rgb(153, 153, 153);">207</li><li style="color: rgb(153, 153, 153);">208</li><li style="color: rgb(153, 153, 153);">209</li><li style="color: rgb(153, 153, 153);">210</li><li style="color: rgb(153, 153, 153);">211</li><li style="color: rgb(153, 153, 153);">212</li><li style="color: rgb(153, 153, 153);">213</li><li style="color: rgb(153, 153, 153);">214</li><li style="color: rgb(153, 153, 153);">215</li><li style="color: rgb(153, 153, 153);">216</li></ul></pre> 
    <h3><a name="t24"></a><a id="centos7ks_569"></a>centos7.ks</h3> 
    <pre data-index="7" class="set-code-hide prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">cat centos7.ks
    # Sample kickstart file for current EL, Fedora based distributions.
    
    
    #platform=x86, AMD64, or Intel EM64T
    # System authorization information
    auth  --useshadow  --enablemd5
    # System bootloader configuration
    bootloader --location=mbr
    # Partition clearing information
    clearpart --all --initlabel
    # Use text mode install
    text
    # Firewall configuration
    firewall --disabled
    # Run the Setup Agent on first boot
    firstboot --disable
    # System keyboard
    keyboard us
    # System language
    lang en_US
    # Use network installation
    # wlsd mod 2
    #url --url=$tree
    url --url=http://192.168.1.177/cblr/links/centos7-x86_64/
    # If any cobbler repo definitions were referenced in the kickstart profile, include them here.
    repo --name=source-1 --baseurl=http://192.168.1.177/cobbler/distro_mirror/centos7
    
    
    # Network information
    network --bootproto=dhcp --device=eth0 --onboot=on
    
    
    # Reboot after installation
    reboot
    
    
    #Root password
    rootpw --iscrypted $1$wHSPTJgs$o8vHsC2Krje.9QMb8slNe/
    # SELinux configuration
    selinux --disabled
    # Do not configure the X Window System
    skipx
    # System timezone
    timezone  America/New_York
    # Install OS instead of upgrade
    # wlsd, install has been removed
    #install
    # Clear the Master Boot Record
    zerombr
    # Allow anaconda to partition the system as needed
    autopart
    
    
    %pre
    
    
    set -x -v
    exec 1>/tmp/ks-pre.log 2>&1
    
    
    # Once root's homedir is there, copy over the log.
    while : ; do
        sleep 10
        if [ -d /mnt/sysimage/root ]; then
            cp /tmp/ks-pre.log /mnt/sysimage/root/
            logger "Copied %pre section log to system"
            break
        fi
    done &
    
    
    
    
    curl "http://192.168.1.177/cblr/svc/op/trig/mode/pre/profile/centos7-x86_64" -o /dev/null
    
    
    # Enable installation monitoring
    #ip -o -4 a | awk '!/^[0-9]*: ?lo/ {print $2, $4}' > /tmp/ip
    #curl "http://192.168.1.177:5000/c?ip=$IP"
    %end
    
    
    %packages
    @core
    %end
    
    
    %post --nochroot
    set -x -v
    exec 1>/mnt/sysimage/root/ks-post-nochroot.log 2>&1
    
    
    %end
    
    
    %post
    set -x -v
    exec 1>/root/ks-post.log 2>&1
    
    
    
    
    
    
    # Start yum configuration
    # wlsd mod 2
    #curl "http://192.168.1.177/cblr/svc/op/yum/profile/centos7-x86_64" --output /etc/yum.repos.d/cobbler-config.repo
    curl "http://192.168.1.177/cblr/distro_mirror/config/centos7-x86_64-0.repo" --output /etc/yum.repos.d/cobbler-config.repo
    
    
    # End yum configuration
    
    
    # Start post_install_network_config generated code
    # End post_install_network_config generated code
    
    
    # Start download cobbler managed config files (if applicable)
    # End download cobbler managed config files (if applicable)
    
    
    # Start koan environment setup
    echo "export COBBLER_SERVER=192.168.1.177" > /etc/profile.d/cobbler.sh
    echo "setenv COBBLER_SERVER 192.168.1.177" > /etc/profile.d/cobbler.csh
    # End koan environment setup
    
    
    # begin Red Hat management server registration
    # not configured to register to any Red Hat management server (ok)
    # end Red Hat management server registration
    
    
    # Begin cobbler registration
    # cobbler registration is disabled in /etc/cobbler/settings.yaml
    # End cobbler registration
    
    
    # Enable post-install boot notification
    
    
    # Start final steps
    
    
    curl "http://192.168.1.177/cblr/svc/op/autoinstall/profile/centos7-x86_64" -o /root/cobbler.ks
    curl "http://192.168.1.177/cblr/svc/op/trig/mode/post/profile/centos7-x86_64" -o /dev/null
    # End final steps
    %end
    <div class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{"spm":"1001.2101.3001.7365"}"><img class="look-more-preCode contentImg-no-view" src="https://1000bd.com/contentImg/2022/06/27/191644837.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li><li style="color: rgb(153, 153, 153);">70</li><li style="color: rgb(153, 153, 153);">71</li><li style="color: rgb(153, 153, 153);">72</li><li style="color: rgb(153, 153, 153);">73</li><li style="color: rgb(153, 153, 153);">74</li><li style="color: rgb(153, 153, 153);">75</li><li style="color: rgb(153, 153, 153);">76</li><li style="color: rgb(153, 153, 153);">77</li><li style="color: rgb(153, 153, 153);">78</li><li style="color: rgb(153, 153, 153);">79</li><li style="color: rgb(153, 153, 153);">80</li><li style="color: rgb(153, 153, 153);">81</li><li style="color: rgb(153, 153, 153);">82</li><li style="color: rgb(153, 153, 153);">83</li><li style="color: rgb(153, 153, 153);">84</li><li style="color: rgb(153, 153, 153);">85</li><li style="color: rgb(153, 153, 153);">86</li><li style="color: rgb(153, 153, 153);">87</li><li style="color: rgb(153, 153, 153);">88</li><li style="color: rgb(153, 153, 153);">89</li><li style="color: rgb(153, 153, 153);">90</li><li style="color: rgb(153, 153, 153);">91</li><li style="color: rgb(153, 153, 153);">92</li><li style="color: rgb(153, 153, 153);">93</li><li style="color: rgb(153, 153, 153);">94</li><li style="color: rgb(153, 153, 153);">95</li><li style="color: rgb(153, 153, 153);">96</li><li style="color: rgb(153, 153, 153);">97</li><li style="color: rgb(153, 153, 153);">98</li><li style="color: rgb(153, 153, 153);">99</li><li style="color: rgb(153, 153, 153);">100</li><li style="color: rgb(153, 153, 153);">101</li><li style="color: rgb(153, 153, 153);">102</li><li style="color: rgb(153, 153, 153);">103</li><li style="color: rgb(153, 153, 153);">104</li><li style="color: rgb(153, 153, 153);">105</li><li style="color: rgb(153, 153, 153);">106</li><li style="color: rgb(153, 153, 153);">107</li><li style="color: rgb(153, 153, 153);">108</li><li style="color: rgb(153, 153, 153);">109</li><li style="color: rgb(153, 153, 153);">110</li><li style="color: rgb(153, 153, 153);">111</li><li style="color: rgb(153, 153, 153);">112</li><li style="color: rgb(153, 153, 153);">113</li><li style="color: rgb(153, 153, 153);">114</li><li style="color: rgb(153, 153, 153);">115</li><li style="color: rgb(153, 153, 153);">116</li><li style="color: rgb(153, 153, 153);">117</li><li style="color: rgb(153, 153, 153);">118</li><li style="color: rgb(153, 153, 153);">119</li><li style="color: rgb(153, 153, 153);">120</li><li style="color: rgb(153, 153, 153);">121</li><li style="color: rgb(153, 153, 153);">122</li><li style="color: rgb(153, 153, 153);">123</li><li style="color: rgb(153, 153, 153);">124</li><li style="color: rgb(153, 153, 153);">125</li><li style="color: rgb(153, 153, 153);">126</li><li style="color: rgb(153, 153, 153);">127</li><li style="color: rgb(153, 153, 153);">128</li><li style="color: rgb(153, 153, 153);">129</li><li style="color: rgb(153, 153, 153);">130</li><li style="color: rgb(153, 153, 153);">131</li><li style="color: rgb(153, 153, 153);">132</li><li style="color: rgb(153, 153, 153);">133</li><li style="color: rgb(153, 153, 153);">134</li><li style="color: rgb(153, 153, 153);">135</li><li style="color: rgb(153, 153, 153);">136</li><li style="color: rgb(153, 153, 153);">137</li><li style="color: rgb(153, 153, 153);">138</li><li style="color: rgb(153, 153, 153);">139</li><li style="color: rgb(153, 153, 153);">140</li><li style="color: rgb(153, 153, 153);">141</li><li style="color: rgb(153, 153, 153);">142</li><li style="color: rgb(153, 153, 153);">143</li><li style="color: rgb(153, 153, 153);">144</li><li style="color: rgb(153, 153, 153);">145</li><li style="color: rgb(153, 153, 153);">146</li><li style="color: rgb(153, 153, 153);">147</li><li style="color: rgb(153, 153, 153);">148</li></ul></pre> 
    <h3><a name="t25"></a><a id="inspectks_724"></a>inspect.ks</h3> 
    <p>inspect的作用是在安装操作系统之前获取物理机的MAC地址,这里我在192.168.1.177上搞了一个restful接口,用于接收来自inspect的主机的MAC地址信息,然后便可以实现通过system来固定裸机要安装什么操作系统以及要给裸机什么IP了(指定IP目前仅支持Centos),这里可以跳过不看</p> 
    <pre data-index="8" class="set-code-hide prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;"># Sample kickstart file for current EL, Fedora based distributions.
    
    # platform=x86, AMD64, or Intel EM64T
    # System authorization information
    auth  --useshadow  --enablemd5
    # System bootloader configuration
    bootloader --location=mbr
    # Partition clearing information
    clearpart --all --initlabel
    # Use text mode install
    text
    # Firewall configuration
    firewall --disabled
    # Run the Setup Agent on first boot
    firstboot --disable
    # System keyboard
    keyboard us
    # System language
    lang en_US
    # Use network installation
    # wlsd mod 2
    # url --url=$tree
    url --url=http://192.168.1.177/cblr/links/centos7-x86_64/
    # If any cobbler repo definitions were referenced in the kickstart profile, include them here.
    repo --name=source-1 --baseurl=http://192.168.1.177/cobbler/distro_mirror/centos7
    
    # Network information
    network --bootproto=dhcp --device=eth0 --onboot=on
    
    # wlsd
    # Reboot after installation
    interactive
    # reboot
    # poweroff
    
    #Root password
    rootpw --iscrypted $1$wHSPTJgs$o8vHsC2Krje.9QMb8slNe/
    # SELinux configuration
    selinux --disabled
    # Do not configure the X Window System
    skipx
    # System timezone
    timezone  America/New_York
    # Install OS instead of upgrade
    # wlsd, install has been removed
    # install
    # Clear the Master Boot Record
    zerombr
    # Allow anaconda to partition the system as needed
    autopart
    
    %pre
    # wlsd
    # ip -o -4 a | awk 'BEGIN{OFS="-"} !/^[0-9]*: ?lo/ {print $2,$4}'
    # ip -o -4 a | awk '!/^[0-9]*: ?lo/ {print $2}' > /tmp/ifname
    # ip -o -4 a | awk '!/^[0-9]*: ?lo/ {print $4}' > /tmp/ipaddr
    
    # ip -o -4 a | awk '!/^[0-9]*: ?lo/ {if (!done) {print $2; done=1}}' > /tmp/ifname
    # ip -o -4 a | awk '!/^[0-9]*: ?lo/ {if (!done) {print $4; done=1}}' > /tmp/ipaddr
    # ip -o link show | awk '$2 !~ /lo:/ {print $17; exit}'> /tmp/macaddr
    # dmidecode -t baseboard > /tmp/baseboard
    # ifname=$(cat /tmp/ifname)
    # ipaddr=$(cat /tmp/ipaddr)
    # macaddr=$(cat /tmp/macaddr)
    # echo $ifname > /etc/ifname
    # echo $ipaddr > /etc/ipaddr
    # echo $macaddr > /etc/macaddr
    # curl "http://192.168.1.177:5000/report_if?ifname=$ifname&ipaddr=$ipaddr&macaddr=$macaddr"
    
    ip a > /tmp/ip
    dmidecode -t baseboard > /tmp/inspect_info
    curl -X POST -F "file=@/tmp/ip" "http://192.168.1.177:5000/inspect_info"
    curl -X POST -F "file=@/tmp/inspect_info" "http://192.168.1.177:5000/inspect_info"
    
    set -x -v
    exec 1>/tmp/ks-pre.log 2>&1
    
    # Once root's homedir is there, copy over the log.
    while : ; do
        sleep 10
        if [ -d /mnt/sysimage/root ]; then
            cp /tmp/ks-pre.log /mnt/sysimage/root/
            logger "Copied %pre section log to system"
            break
        fi
    done &
    
    
    curl "http://192.168.1.177/cblr/svc/op/trig/mode/pre/profile/centos7-x86_64" -o /dev/null
    
    # Enable installation monitoring
    # ip -o -4 a | awk '!/^[0-9]*: ?lo/ {print $2, $4}' > /tmp/ip
    # curl "http://192.168.1.177:5000/c?ip=$IP"
    %end
    
    %packages
    @core
    %end
    
    %post --nochroot
    set -x -v
    exec 1>/mnt/sysimage/root/ks-post-nochroot.log 2>&1
    
    %end
    
    %post
    set -x -v
    exec 1>/root/ks-post.log 2>&1
    
    
    
    # Start yum configuration
    # wlsd mod 2
    # curl "http://192.168.1.177/cblr/svc/op/yum/profile/centos7-x86_64" --output /etc/yum.repos.d/cobbler-config.repo
    curl "http://192.168.1.177/cblr/distro_mirror/config/centos7-x86_64-0.repo" --output /etc/yum.repos.d/cobbler-config.repo
    
    # End yum configuration
    
    # Start post_install_network_config generated code
    # End post_install_network_config generated code
    
    # Start download cobbler managed config files (if applicable)
    # End download cobbler managed config files (if applicable)
    
    # Start koan environment setup
    echo "export COBBLER_SERVER=192.168.1.177" > /etc/profile.d/cobbler.sh
    echo "setenv COBBLER_SERVER 192.168.1.177" > /etc/profile.d/cobbler.csh
    # End koan environment setup
    
    # begin Red Hat management server registration
    # not configured to register to any Red Hat management server (ok)
    # end Red Hat management server registration
    
    # Begin cobbler registration
    # cobbler registration is disabled in /etc/cobbler/settings.yaml
    # End cobbler registration
    
    # Enable post-install boot notification
    
    # Start final steps
    
    curl "http://192.168.1.177/cblr/svc/op/autoinstall/profile/centos7-x86_64" -o /root/cobbler.ks
    curl "http://192.168.1.177/cblr/svc/op/trig/mode/post/profile/centos7-x86_64" -o /dev/null
    # End final steps
    %end
    <div class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{"spm":"1001.2101.3001.7365"}"><img class="look-more-preCode contentImg-no-view" src="https://1000bd.com/contentImg/2022/06/27/191644837.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li><li style="color: rgb(153, 153, 153);">70</li><li style="color: rgb(153, 153, 153);">71</li><li style="color: rgb(153, 153, 153);">72</li><li style="color: rgb(153, 153, 153);">73</li><li style="color: rgb(153, 153, 153);">74</li><li style="color: rgb(153, 153, 153);">75</li><li style="color: rgb(153, 153, 153);">76</li><li style="color: rgb(153, 153, 153);">77</li><li style="color: rgb(153, 153, 153);">78</li><li style="color: rgb(153, 153, 153);">79</li><li style="color: rgb(153, 153, 153);">80</li><li style="color: rgb(153, 153, 153);">81</li><li style="color: rgb(153, 153, 153);">82</li><li style="color: rgb(153, 153, 153);">83</li><li style="color: rgb(153, 153, 153);">84</li><li style="color: rgb(153, 153, 153);">85</li><li style="color: rgb(153, 153, 153);">86</li><li style="color: rgb(153, 153, 153);">87</li><li style="color: rgb(153, 153, 153);">88</li><li style="color: rgb(153, 153, 153);">89</li><li style="color: rgb(153, 153, 153);">90</li><li style="color: rgb(153, 153, 153);">91</li><li style="color: rgb(153, 153, 153);">92</li><li style="color: rgb(153, 153, 153);">93</li><li style="color: rgb(153, 153, 153);">94</li><li style="color: rgb(153, 153, 153);">95</li><li style="color: rgb(153, 153, 153);">96</li><li style="color: rgb(153, 153, 153);">97</li><li style="color: rgb(153, 153, 153);">98</li><li style="color: rgb(153, 153, 153);">99</li><li style="color: rgb(153, 153, 153);">100</li><li style="color: rgb(153, 153, 153);">101</li><li style="color: rgb(153, 153, 153);">102</li><li style="color: rgb(153, 153, 153);">103</li><li style="color: rgb(153, 153, 153);">104</li><li style="color: rgb(153, 153, 153);">105</li><li style="color: rgb(153, 153, 153);">106</li><li style="color: rgb(153, 153, 153);">107</li><li style="color: rgb(153, 153, 153);">108</li><li style="color: rgb(153, 153, 153);">109</li><li style="color: rgb(153, 153, 153);">110</li><li style="color: rgb(153, 153, 153);">111</li><li style="color: rgb(153, 153, 153);">112</li><li style="color: rgb(153, 153, 153);">113</li><li style="color: rgb(153, 153, 153);">114</li><li style="color: rgb(153, 153, 153);">115</li><li style="color: rgb(153, 153, 153);">116</li><li style="color: rgb(153, 153, 153);">117</li><li style="color: rgb(153, 153, 153);">118</li><li style="color: rgb(153, 153, 153);">119</li><li style="color: rgb(153, 153, 153);">120</li><li style="color: rgb(153, 153, 153);">121</li><li style="color: rgb(153, 153, 153);">122</li><li style="color: rgb(153, 153, 153);">123</li><li style="color: rgb(153, 153, 153);">124</li><li style="color: rgb(153, 153, 153);">125</li><li style="color: rgb(153, 153, 153);">126</li><li style="color: rgb(153, 153, 153);">127</li><li style="color: rgb(153, 153, 153);">128</li><li style="color: rgb(153, 153, 153);">129</li><li style="color: rgb(153, 153, 153);">130</li><li style="color: rgb(153, 153, 153);">131</li><li style="color: rgb(153, 153, 153);">132</li><li style="color: rgb(153, 153, 153);">133</li><li style="color: rgb(153, 153, 153);">134</li><li style="color: rgb(153, 153, 153);">135</li><li style="color: rgb(153, 153, 153);">136</li><li style="color: rgb(153, 153, 153);">137</li><li style="color: rgb(153, 153, 153);">138</li><li style="color: rgb(153, 153, 153);">139</li><li style="color: rgb(153, 153, 153);">140</li><li style="color: rgb(153, 153, 153);">141</li><li style="color: rgb(153, 153, 153);">142</li><li style="color: rgb(153, 153, 153);">143</li><li style="color: rgb(153, 153, 153);">144</li><li style="color: rgb(153, 153, 153);">145</li></ul></pre> 
    <h3><a name="t26"></a><a id="pxelinuxcfg_878"></a>pxelinux.cfg</h3> 
    <p>从<a href="https://so.csdn.net/so/search?q=BIOS&spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-view="{"spm":"1001.2101.3001.7020","dest":"https://so.csdn.net/so/search?q=BIOS&spm=1001.2101.3001.7020","extra":"{\"searchword\":\"BIOS\"}"}" data-report-click="{"spm":"1001.2101.3001.7020","dest":"https://so.csdn.net/so/search?q=BIOS&spm=1001.2101.3001.7020","extra":"{\"searchword\":\"BIOS\"}"}" data-tit="BIOS" data-pretit="bios">BIOS</a>引导centos7和Ubuntu</p> 
    <pre data-index="9" class="set-code-hide prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">[root@localhost tftpboot]# cat pxelinux.cfg/default
    DEFAULT menu
    PROMPT 0
    MENU TITLE Cobbler | https://cobbler.github.io
    TIMEOUT 200
    TOTALTIMEOUT 6000
    ONTIMEOUT local
    
    LABEL local
            MENU LABEL (local)
            MENU DEFAULT
            LOCALBOOT -1
    
    LABEL centos7-x86_64
            MENU LABEL centos7-x86_64
            kernel /images/centos7-x86_64/vmlinuz
            append initrd=/images/centos7-x86_64/initrd.img  kssendmac inst.ks=http://192.168.1.177/cblr/svc/op/autoinstall/profile/centos7-x86_64
            ipappend 2
    
    LABEL inspect-x86_64
            MENU LABEL inspect-x86_64
            kernel /images/inspect-x86_64/vmlinuz
            append initrd=/images/inspect-x86_64/initrd.img  kssendmac inst.ks=http://192.168.1.177/cblr/svc/op/autoinstall/profile/inspect-x86_64
            ipappend 2
    
    LABEL ubuntu20046-casper-x86_64
            MENU LABEL ubuntu20046-casper-x86_64
            kernel /images/ubuntu20046-casper-x86_64/vmlinuz
            initrd /images/ubuntu20046-casper-x86_64/initrd
            append biosdevname=0 net.ifnames=0 netcfg/choose_interface=auto ip=dhcp autoinstall ds='nocloud-net;s=http://192.168.1.177:3003/' cloud-config-url=http://192.168.1.177:3003/user-data url=http://192.168.1.177/cobbler/isos/ubuntu-20.04.6-live-server-amd64.iso
            ipappend 2
    
    MENU end
    <div class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{"spm":"1001.2101.3001.7365"}"><img class="look-more-preCode contentImg-no-view" src="https://1000bd.com/contentImg/2022/06/27/191644837.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li></ul></pre> 
    <h3><a name="t27"></a><a id="ipxedefaultipxe_922"></a>ipxe/default.ipxe</h3> 
    <p>从ipxe引导Windows2019</p> 
    <pre data-index="10" class="set-code-hide prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">#!ipxe
    
    set menu-timeout 20000
    set submenu-timeout ${menu-timeout}
    
    # Set Menu Default to Exit after timeout
    isset ${menu-default} || set menu-default local
    
    :Cobbler
    menu Cobbler | https://cobbler.github.io
    item local (local)
    item win2019-x86_64 win2019-x86_64
    choose --default ${menu-default} --timeout ${menu-timeout} target && goto ${target}
    
    :win2019-x86_64
    kernel http://192.168.1.177/cobbler/images/win2019-x86_64/wimboot
    initrd --name boot.sdi http://192.168.1.177/cobbler/images/win2019-x86_64/boot.sdi boot.sdi
    initrd --name bootmgr.exe http://192.168.1.177/cobbler/images/win2019-x86_64/bootmgr.exe bootmgr.exe
    initrd --name bcd http://192.168.1.177/cobbler/images/win2019-x86_64/bcd bcd
    initrd --name winpe.wim http://192.168.1.177/cobbler/images/win2019-x86_64/winpe.wim winpe.wim
    boot
    
    
    :local
    iseq ${smbios/manufacturer} HP && exit ||
    sanboot --no-describe --drive 0x80
    <div class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{"spm":"1001.2101.3001.7365"}"><img class="look-more-preCode contentImg-no-view" src="https://1000bd.com/contentImg/2022/06/27/191644837.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li></ul></pre> 
    <h3><a name="t28"></a><a id="ipxedefaultipxe_955"></a>更全的ipxe/default.ipxe</h3> 
    <p>UEFI+ipxe引导Windows,centos,Ubuntu</p> 
    <pre data-index="11" class="set-code-hide prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;"> cat ipxe/default.ipxe
    #!ipxe
    
    set menu-timeout 20000
    set submenu-timeout ${menu-timeout}
    
    # Set Menu Default to Exit after timeout
    isset ${menu-default} || set menu-default local
    
    :Cobbler
    menu Cobbler | https://cobbler.github.io
    item local (local)
    item centos7-x86_64 centos7-x86_64
    item inspect-x86_64 inspect-x86_64
    item ubuntu20046-casper-x86_64 ubuntu20046-casper-x86_64
    item win2019-x86_64 win2019-x86_64
    choose --default ${menu-default} --timeout ${menu-timeout} target && goto ${target}
    
    
    :centos7-x86_64
    kernel http://192.168.1.177/cobbler/images/centos7-x86_64/vmlinuz
    initrd http://192.168.1.177/cobbler/images/centos7-x86_64/initrd.img
    imgargs vmlinuz initrd=initrd.img inst.ks=http://192.168.1.177/cblr/svc/op/autoinstall/profile/centos7-x86_64
    boot
    
    
    :inspect-x86_64
    kernel http://192.168.1.177/cobbler/images/inspect-x86_64/vmlinuz
    initrd http://192.168.1.177/cobbler/images/inspect-x86_64/initrd.img
    imgargs vmlinuz initrd=initrd.img inst.ks=http://192.168.1.177/cblr/svc/op/autoinstall/profile/inspect-x86_64
    boot
    
    
    :ubuntu20046-casper-x86_64
    kernel http://192.168.1.177/cobbler/images/ubuntu20046-casper-x86_64/vmlinuz
    initrd http://192.168.1.177/cobbler/images/ubuntu20046-casper-x86_64/initrd
    imgargs vmlinuz initrd=initrd biosdevname=0 net.ifnames=0 netcfg/choose_interface=auto ip=dhcp autoinstall ds='nocloud-net;s=http://192.168.1.177:3003/' cloud-config-url=http://192.168.1.177:3003/user-data url=http://192.168.1.177/cobbler/isos/ubuntu-20.04.6-live-server-amd64.iso
    boot
    
    
    :win2019-x86_64
    kernel http://192.168.1.177/cobbler/images/win2019-x86_64/wimboot
    initrd --name boot.sdi http://192.168.1.177/cobbler/images/win2019-x86_64/boot.sdi boot.sdi
    initrd --name bootmgr.exe http://192.168.1.177/cobbler/images/win2019-x86_64/bootmgr.exe bootmgr.exe
    initrd --name bcd http://192.168.1.177/cobbler/images/win2019-x86_64/bcd bcd
    initrd --name winpe.wim http://192.168.1.177/cobbler/images/win2019-x86_64/winpe.wim winpe.wim
    boot
    
    
    :local
    iseq ${smbios/manufacturer} HP && exit ||
    sanboot --no-describe --drive 0x80
    
    <div class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{"spm":"1001.2101.3001.7365"}"><img class="look-more-preCode contentImg-no-view" src="https://1000bd.com/contentImg/2022/06/27/191644837.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li></ul></pre> 
    <h2><a name="t29"></a><a id="_1023"></a>注意</h2> 
    <h3><a name="t30"></a><a id="_1025"></a>错误</h3> 
    <p>局域网中有路由器,路由器开启了dhcp,虽然第一次获取IP地址时,需要tftp,而必须走我们的dnsmasq,但后续dhcp ack时,有可能因为路由器给了一个IP地址,用此IP作为dhcp ack会报错,然后被dnsmasq拒绝掉<br> dnsmasq报错:DHCPNAK(ens3) 192.168.1.106 f0:1f:af:f0:da:6a wrong server-ID<br> 所以,还是直接关掉路由器dhcp,保证局域网中只有一个dhcp服务器</p>
                    </div>
                        </div>
                    </li>
    
                    <li class="list-group-item ul-li">
    
                        <b>相关阅读:</b><br>
                        <nobr>
    <a href="/Article/Index/1421889">gitlab安装</a>                            <br />
    <a href="/Article/Index/739385">devops学习(九) Helm工具--持续部署</a>                            <br />
    <a href="/Article/Index/1324558">光电探测器指标分析</a>                            <br />
    <a href="/Article/Index/1156033">兆易创新 GD32 系列(一) 启动过程分析</a>                            <br />
    <a href="/Article/Index/1024104">HTML网页设计结课作业 web课程设计网页规划与设计 网页设计成品DW静态网页 Web大学生网页成品 web网页设计期末课程大作业</a>                            <br />
    <a href="/Article/Index/770086">C&#x2B;&#x2B;_重载_指针_引用</a>                            <br />
    <a href="/Article/Index/1309913">C&#x2B;&#x2B; switch 语句</a>                            <br />
    <a href="/Article/Index/1041450">上电浪涌电流</a>                            <br />
    <a href="/Article/Index/932895">java教材订购系统计算机毕业设计MyBatis&#x2B;系统&#x2B;LW文档&#x2B;源码&#x2B;调试部署</a>                            <br />
    <a href="/Article/Index/1132349">骨传导耳机优缺点有哪些?骨传导耳机科普与推荐</a>                            <br />
                        </nobr>
                    </li>
                    <li class="list-group-item from-a mb-2">
                        原文地址:https://blog.csdn.net/OldHusband/article/details/133805476
                    </li>
    
                </ul>
            </div>
    
            <div class="col-lg-4 col-sm-12">
                <ul class="list-group" style="word-break:break-all;">
                    <li class="list-group-item ul-li-bg" aria-current="true">
                        最新文章
                    </li>
                    <li class="list-group-item ul-li">
                        <nobr>
    <a href="/Article/Index/2039405">沪漂五周年了:我越来越迷茫了</a>                            <br />
    <a href="/Article/Index/2039406">Agentic Skill Routing 实战:别再把所有 Skill 塞进 AI Agent 上下文</a>                            <br />
    <a href="/Article/Index/2039407">MySQL-Seconds_behind_master的精度误差</a>                            <br />
    <a href="/Article/Index/2039408">[MAF预定义ChatClient中间件-03]CachingChatClient——利用缓存省钱省时间</a>                            <br />
    <a href="/Article/Index/2039409">AI的至暗历史:从万众期待到被政府撤资,AI的两次死亡徘徊</a>                            <br />
    <a href="/Article/Index/2039410">Agent OS :五种驯服不确定性的范式</a>                            <br />
    <a href="/Article/Index/2039411">PortSwigger SQL注入LAB11</a>                            <br />
    <a href="/Article/Index/2039412">数据库即时编译JIT</a>                            <br />
    <a href="/Article/Index/2039413">[Begin]AI Learn Data Day 0</a>                            <br />
    <a href="/Article/Index/2039414">深度学习进阶(二十七)现代 LLM 的核心架构设计其二:SwiGLU</a>                            <br />
                        </nobr>
                    </li>
                </ul>
    
                <ul class="list-group pt-2" style="word-break:break-all;">
                    <li class="list-group-item ul-li-bg" aria-current="true">
                        热门文章
                    </li>
                    <li class="list-group-item ul-li">
                        <nobr>
    <a href="/Article/Index/888177">十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!</a>                            <br />
    <a href="/Article/Index/797680">奉劝各位学弟学妹们,该打造你的技术影响力了!</a>                            <br />
    <a href="/Article/Index/888183">五年了,我在 CSDN 的两个一百万。</a>                            <br />
    <a href="/Article/Index/888179">Java俄罗斯方块,老程序员花了一个周末,连接中学年代!</a>                            <br />
    <a href="/Article/Index/797730">面试官都震惊,你这网络基础可以啊!</a>                            <br />
    <a href="/Article/Index/797725">你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法</a>                            <br />
    <a href="/Article/Index/797702">心情不好的时候,用 Python 画棵樱花树送给自己吧</a>                            <br />
    <a href="/Article/Index/797709">通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!</a>                            <br />
    <a href="/Article/Index/797716">13 万字 C 语言从入门到精通保姆级教程2021 年版</a>                            <br />
    <a href="/Article/Index/888192">10行代码集2000张美女图,Python爬虫120例,再上征途</a>                            <br />
                        </nobr>
                    </li>
                </ul>
    
            </div>
        </div>
    </div>
    <!-- 主体 -->
    
    
        <!--body结束-->
        <!--这里是footer模板-->
        
        <!--footer-->
    <nav class="navbar navbar-inverse navbar-fixed-bottom">
        <div class="container">
            <div class="row">
                <div class="col-md-12 text-center">
                    <div style="padding:0px 5px;">
                        <a href="/tools">小工具</a>
                        <a href="https://games.1000bd.com">小游戏</a>
                    </div>
    
                    <div class="text-muted center foot-height">
                        Copyright&nbsp;©&nbsp;2022&nbsp;侵权请联系<a href="mailto:2656653265@qq.com">2656653265@qq.com</a> &nbsp;&nbsp;
                        <a href="https://beian.miit.gov.cn/" target="_blank">京ICP备2022015340号-1</a>
                    </div>
                  
                    <div style=" padding:5px 0;">
                        <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010502049817" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
                        <img src="" style="float:left;" /><p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">京公网安备 11010502049817号</p></a>
                    </div>
                </div>
            </div>
        </div>
      
    </nav>
    <!--footer-->
    
        <!--footer模板结束-->
    
        <script src="/js/plugins/jquery/jquery.js"></script>
        <script src="/js/bootstrap.min.js"></script>
    
        <!--这里是scripts模板-->
        
    
        
     
    
    
        <!--scripts模板结束-->
       
    </body>
    </html>