📄 mksyslinux.sh
字号:
#!/bin/bash## Formats a floppy to use Syslinuxdummy=""# need to have mtools installedif [ -z `which mformat` -o -z `which mcopy` ]; then echo "You must have the mtools package installed to run this script" exit 1fi# need an arg for the location of the kernelif [ -z "$1" ]; then echo "usage: `basename $0` path/to/linux/kernel" exit 1fi# need to have a root file system builtif [ ! -f rootfs.gz ]; then echo "You need to have a rootfs built first." echo "Hit RETURN to make one now or Control-C to quit." read dummy ./mkrootfs.shfi# prepare the floppyecho "Please insert a blank floppy in the drive and press RETURN to format"echo "(WARNING: All data will be erased! Hit Control-C to abort)"read dummyecho "Formatting the floppy..."mformat a:echo "Making it bootable with Syslinux..."syslinux -s /dev/fd0echo "Copying Syslinux configuration files..."mcopy syslinux.cfg display.txt a:echo "Copying root filesystem file..."mcopy rootfs.gz a:# XXX: maybe check for "no space on device" errors hereecho "Copying linux kernel..."mcopy $1 a:linux# XXX: maybe check for "no space on device" errors here tooecho "Finished: boot floppy created"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -