mklnim
来自「linux下从网卡远程启动」· 代码 · 共 49 行
TXT
49 行
#!/bin/sh## Make Linux Netinstall Image# Takes a RedHat, TurboLinux or SuSE CD# and creates a network bootable image## mklnim outputfile [path-to-cdrom]## path-to-cdrom defaults to /mnt/cdrom#if [ $# -lt 1 ]then echo Usage: $0 outputfile [path-to-cdrom] exit 1fipathtocdrom=${2:-"/mnt/cdrom"}trap '' INTtmpmount=/tmp/lnim.$$mkdir $tmpmountif [ -r $pathtocdrom/images/cdboot.img ]then bootfloppyimage="$pathtocdrom/images/cdboot.img" echo TurboLinux CDROMelif [ -r $pathtocdrom/images/bootnet.img ]then bootfloppyimage="$pathtocdrom/images/bootnet.img" append='--append=network' echo RedHat 6.x CDROMelif [ -r $pathtocdrom/images/boot.img ]then bootfloppyimage="$pathtocdrom/images/boot.img" echo RedHat 5.2 CDROMelif [ -r $pathtocdrom/disks/bootdisk ]then bootfloppyimage="$pathtocdrom/disks/bootdisk" linuximage=linux initdisk=initdisk.gz echo SuSE 6.x CDROMelse echo Cannot find either TurboLinux, RedHat or SuSE CD trap INT exit 1fimount -t msdos -o loop,ro $bootfloppyimage $tmpmountmknbi-linux $append --output=$1 $tmpmount/${linuximage:-vmlinuz} $tmpmount/${initdisk:-initrd.img}umount $tmpmountrmdir $tmpmounttrap INT
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?