~tsimonq2/debian-cd/lubuntu-cosmic-changes

« back to all changes in this revision

Viewing changes to tools/boot/maverick/boot-i386+mac

  • Committer: Colin Watson
  • Date: 2010-05-04 15:13:12 UTC
  • Revision ID: cjwatson@canonical.com-20100504151312-664dfv9uibyk14fe
add CONF.sh bits for maverick; copy lucid -> maverick elsewhere

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# Do install stuff for i386/mac, including making bootable CDs
 
4
# Works with debian-installer
 
5
#
 
6
# $1 is the CD number
 
7
# $2 is the temporary CD build dir
 
8
 
 
9
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
 
10
 
 
11
set -e
 
12
 
 
13
N=$1
 
14
CDDIR=$2
 
15
BOOTDIR=
 
16
if [ "$DI_WWW_HOME" = "default" ];then
 
17
   DI_WWW_HOME="http://people.debian.org/~joeyh/d-i/images/daily"
 
18
fi
 
19
if [ ! "$DI_DIST" ]; then
 
20
   export DI_DIST="$DI_CODENAME"
 
21
fi
 
22
if [ -z "$DI_PATH" ]; then
 
23
   DI_PATH="$($BASEDIR/tools/find-newest-installer)"
 
24
fi
 
25
 
 
26
default_preseed
 
27
 
 
28
cd $CDDIR/..
 
29
 
 
30
#
 
31
# This script is called with $1 (now $N) as the CD to 
 
32
# make bootable.  N may be in the form "n" or "n_NONUS"
 
33
# There may be more than 4 disks...support extras.
 
34
 
 
35
# Strip NONUS part of disk number
 
36
# NN will be 1...N so it can be used as an index
 
37
#
 
38
NN=`echo $N | sed -e 's/_NONUS//'`
 
39
 
 
40
# List of boot image for each CD
 
41
KTYPE[1]="" #elilo multiboot in fact
 
42
KTYPE[2]="cdrom"
 
43
# XXX add net-image back when it's fixed
 
44
KTYPE[3]=""
 
45
KTYPE[4]=""
 
46
KTYPE[5]=""
 
47
KTYPE[6]=""
 
48
KTYPE[7]=""
 
49
KTYPE[8]=""
 
50
KTYPE[9]=""
 
51
KTYPE[10]=""
 
52
 
 
53
THISTYPE=${KTYPE[$NN]}
 
54
 
 
55
BOOT_IMAGES="udeb.list cdrom/initrd.gz cdrom/vmlinuz cdrom/debian-cd_info.tar.gz"
 
56
DISK_IMAGES=""
 
57
TAR_IMAGES="netboot/netboot.tar.gz"
 
58
 
 
59
# Download boot images
 
60
for image in $BOOT_IMAGES $DISK_IMAGES $TAR_IMAGES; do
 
61
    if [ ! -e "$image" ]; then
 
62
        dir=$(dirname $image)
 
63
        mkdir -p $dir
 
64
        if [ ! "$DI_WWW_HOME" ];then
 
65
                cp "$DI_PATH/current/images/$image" "$image"
 
66
        else
 
67
                wget "$DI_WWW_HOME/$image" -O "$image"
 
68
        fi
 
69
    fi
 
70
done
 
71
 
 
72
if [ "$NN" = "1" ]; then
 
73
    check_kernel_sync udeb.list
 
74
 
 
75
    echo "Using elilo boot-disks image on CD$N"
 
76
    mkdir -p boot$N/install
 
77
    ELILODEB="$($BASEDIR/tools/apt-selection cache show elilo | \
 
78
        grep ^Filename | awk '{print $2}')"
 
79
    (ar p "$MIRROR/$ELILODEB" data.tar.gz | \
 
80
        tar zxf - -C . ./usr/lib/elilo/elilo.efi)
 
81
    mv usr/lib/elilo/elilo.efi boot$N/install/
 
82
 
 
83
    rm -rf usr
 
84
    if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
 
85
        cp -lf cdrom/vmlinuz $CDDIR/install/
 
86
        cp -lf cdrom/initrd.gz $CDDIR/install/
 
87
    fi
 
88
    if [ "$CDIMAGE_LIVE" = 1 ]; then
 
89
        mv $CDDIR/casper/filesystem.kernel-386 $CDDIR/casper/vmlinuz
 
90
        CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-386")"
 
91
        mv $CDDIR/casper/filesystem.initrd-386 "$CDDIR$CASPER_INITRD"
 
92
    fi
 
93
    echo -n "-cache-inodes -J -l " > $N.mkisofs_opts
 
94
    # HFS hybrid filesystem for booting on Intel-based Macs
 
95
    echo -n "--netatalk -hfs -probe -map $BASEDIR/data/hfs.map " >> $N.mkisofs_opts
 
96
    echo -n "-part -no-desktop -hfs-bless CD$N/install -hfs-bless-file CD$N/install/elilo.efi -hfs-volid ${CAPPROJECT}_i386_${CODENAME} " >> $N.mkisofs_opts
 
97
    # Recommended size for an HFS catalog is 4 MB per GB, defaults to 4 MB
 
98
    if [ "$SIZELIMIT1" ]; then
 
99
        if [ "$SIZELIMIT1" -gt 1000000000 ]; then
 
100
            echo -n "-hfs-parms MAX_XTCSIZE=$(($SIZELIMIT1 / 256)) " >> $N.mkisofs_opts
 
101
        fi
 
102
    elif [ "$SIZELIMIT" ]; then
 
103
        if [ "$SIZELIMIT" -gt 1000000000 ]; then
 
104
            echo -n "-hfs-parms MAX_XTCSIZE=$(($SIZELIMIT / 256)) " >> $N.mkisofs_opts
 
105
        fi
 
106
    elif [ "$DEFBINSIZE" ]; then
 
107
        if [ "$DEFBINSIZE" -gt 1000 ]; then
 
108
            echo -n "-hfs-parms MAX_XTCSIZE=$(($DEFBINSIZE * 4096)) " >> $N.mkisofs_opts
 
109
        fi
 
110
    fi
 
111
fi
 
112
 
 
113
"$BASEDIR/tools/sorting_weights" "$N"
 
114
echo -n "-sort $(pwd)/$N.weights " >> $N.mkisofs_opts
 
115
 
 
116
#install_languages $CDDIR
 
117
 
 
118
# Only disk one gets the extra files installed
 
119
#
 
120
if [ "$NN" = "1" ]; then
 
121
 
 
122
 
 
123
# populate the install directory as well
 
124
for disk in $DISK_IMAGES; do
 
125
        dir=$(dirname $disk)
 
126
        mkdir -p $CDDIR/install/$dir
 
127
        cp -lf $disk $CDDIR/install/$dir
 
128
done
 
129
 
 
130
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
131
        for tar in $TAR_IMAGES; do
 
132
                dir=$(dirname $tar)
 
133
                mkdir -p $CDDIR/install/$dir
 
134
                tar -C $CDDIR/install/$dir -xzpf $tar
 
135
        done
 
136
fi
 
137
 
 
138
# elilo setup
 
139
 
 
140
# Extract memtest86+ from the archive
 
141
MEMTEST86DEB="$($BASEDIR/tools/apt-selection cache show memtest86+ | \
 
142
        grep ^Filename | awk '{print $2}')"
 
143
ar p "$MIRROR/$MEMTEST86DEB" data.tar.gz | \
 
144
        tar xzf - -C $CDDIR/install/ ./boot/memtest86+.bin
 
145
mv $CDDIR/install/boot/memtest86+.bin $CDDIR/install/mt86plus
 
146
rm -rf $CDDIR/install/boot
 
147
# elilo help files come from d-i.
 
148
cat cdrom/debian-cd_info.tar.gz | (cd boot$N/install/; tar zx)
 
149
# Remove ISOLINUX configuration; only for non-Macs.
 
150
rm -f boot$N/install/isolinux*
 
151
rm -f boot$N/install/*.txt*
 
152
rm -f boot$N/install/*.hlp*
 
153
# Override splash screen.
 
154
if [ "$SPLASHRLE" ] && [ -e "$SPLASHRLE" ]; then
 
155
    cp -p "$SPLASHRLE" boot$N/install/splash.rle
 
156
fi
 
157
if [ "$GFXSPLASH" ] && [ -e "$GFXSPLASH" ]; then
 
158
    cp -p "$GFXSPLASH" boot$N/install/splash.pcx
 
159
fi
 
160
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
161
    rm -f boot$N/install/*.msg.live
 
162
else
 
163
    for x in boot$N/install/*.msg.live; do
 
164
        [ -f "$x" ] || continue
 
165
        mv "$x" "${x%.live}"
 
166
    done
 
167
    for x in boot$N/install/*.msg.live; do
 
168
        [ -f "$x" ] || continue
 
169
        mv "$x" "${x%.live}"
 
170
    done
 
171
fi
 
172
 
 
173
fi
 
174
 
 
175
# write final lines to mkisofs_opts
 
176
if [ "$NN" = "1" ]; then
 
177
    echo -n "boot$N " >> $N.mkisofs_opts
 
178
else
 
179
    if [ -n "$THISTYPE" ]; then
 
180
        echo -n "-c boot/boot.catalog boot$N "  >> $N.mkisofs_opts
 
181
    fi
 
182
fi
 
183
 
 
184
# th,th, thats all