VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/Etherboot-src/util/genliso@ 26302

最後變更 在這個檔案從26302是 1,由 vboxsync 提交於 55 年 前

import

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.2 KB
 
1#!/bin/bash
2#
3# Generate a legacy floppy emulation ISO boot image
4#
5# genliso foo.liso foo.zlilo
6#
7# the ISO image is the first argument so that a list of .zlilo images
8# to include can be specified
9#
10case $0 in
11*genliso)
12 ;;
13*genfdimg)
14 genfdimg=1
15 ;;
16esac
17case $# in
180|1)
19 echo Usage: $0 foo.liso foo.zlilo ...
20 exit 1
21 ;;
22esac
23case "`mtools -V`" in
24Mtools\ version\ 3.9.9*|Mtools\ version\ 4.*)
25 ;;
26*)
27 echo Mtools version 3.9.9 or later is required
28 exit 1
29 ;;
30esac
31out=$1
32shift
33dir=bin/liso.dir
34mkdir -p $dir
35case "$genfdimg" in
361)
37 img=$out
38 ;;
39*)
40 img=$dir/boot.img
41 ;;
42esac
43mformat -f 1440 -C -i $img ::
44cfg=bin/syslinux.cfg
45cat > $cfg <<EOF
46# These default options can be changed in the genliso script
47SAY Etherboot ISO boot image generated by genliso
48TIMEOUT 30
49EOF
50first=
51for f
52do
53 if [ ! -r $f ]
54 then
55 echo $f does not exist, skipping 1>&2
56 continue
57 fi
58 # shorten name for 8.3 filesystem
59 b=$(basename $f)
60 g=${b%.zlilo}
61 g=${g//[^a-z0-9]}
62 g=${g:0:8}.zli
63 case "$first" in
64 "")
65 echo DEFAULT $g
66 ;;
67 esac
68 first=$g
69 echo LABEL $b
70 echo "" KERNEL $g
71 mcopy -m -i $img $f ::$g
72done >> $cfg
73mcopy -i $img $cfg ::syslinux.cfg
74if ! syslinux $img
75then
76 exit 1
77fi
78case "$genfdimg" in
791)
80 ;;
81*)
82 mkisofs -o $out -c boot.cat -b boot.img $dir
83 ;;
84esac
85rm -fr $dir
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette