| Line 1... |
Line 1... |
| 1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
| 2 |
#
|
2 |
#
|
| 3 |
# Authors: Mageia Team
|
3 |
# Authors: Mageia Team
|
| 4 |
# Update for ALCASAR : Hamza ESSAYEGH (Querdos) - Rexy - Laurent Roux - Aurelien Dubois
|
4 |
# Update for ALCASAR : Hamza ESSAYEGH (Querdos) - Rexy - Laurent Roux - Aurelien Dubois - Pierre Rivault
|
| 5 |
##
|
5 |
##
|
| 6 |
# Usage: $0 ARGS
|
6 |
# Usage: $0 ARGS
|
| 7 |
# --iso-file, -i Mageia-xxx-xxxxxx-xxx.iso (mandatory)
|
7 |
# --iso-file, -i Mageia-xxx-xxxxxx-xxx.iso (mandatory)
|
| 8 |
# --lang, -l Language for installation (optional)
|
8 |
# --lang, -l Language for installation (optional)
|
| 9 |
# Supported languages: fr;en
|
9 |
# Supported languages: fr;en
|
| Line 18... |
Line 18... |
| 18 |
# Mageia
|
18 |
# Mageia
|
| 19 |
MAGEIA_VERSION=`cat /etc/release|cut -d" " -f3`
|
19 |
MAGEIA_VERSION=`cat /etc/release|cut -d" " -f3`
|
| 20 |
ARCH=`cat /etc/release|cut -d" " -f6`
|
20 |
ARCH=`cat /etc/release|cut -d" " -f6`
|
| 21 |
MAGEIA_NEW_DIR=/tmp/mageia_new
|
21 |
MAGEIA_NEW_DIR=/tmp/mageia_new
|
| 22 |
MAGEIA_OFFICIAL_DIR=/tmp/mageia_official
|
22 |
MAGEIA_OFFICIAL_DIR=/tmp/mageia_official
|
| - |
|
23 |
MAGEIA_OFFICIAL_DIR_EFI=/tmp/mageia_official_efi
|
| 23 |
# ISO file
|
24 |
# ISO file
|
| 24 |
ISO_DIR="/var/iso"
|
25 |
ISO_DIR="/var/iso"
|
| 25 |
ISO_IN="$ISO_DIR/Mageia-$MAGEIA_VERSION-$ARCH.iso"
|
26 |
ISO_IN="$ISO_DIR/Mageia-$MAGEIA_VERSION-$ARCH.iso"
|
| 26 |
|
27 |
|
| 27 |
# Drake installer
|
28 |
# Drake installer
|
| Line 226... |
Line 227... |
| 226 |
|
227 |
|
| 227 |
# Creating the new iso file
|
228 |
# Creating the new iso file
|
| 228 |
echo "Creating the isofile..."
|
229 |
echo "Creating the isofile..."
|
| 229 |
alcasarVersion=$(echo $ALCASAR_TAR | cut -d '-' -f2 | rev | cut -d '.' -f 3- | rev )
|
230 |
alcasarVersion=$(echo $ALCASAR_TAR | cut -d '-' -f2 | rev | cut -d '.' -f 3- | rev )
|
| 230 |
newIsoName=Mageia-$MAGEIA_VERSION-${ARCH}-Alcasar${alcasarVersion}.iso
|
231 |
newIsoName=Mageia-$MAGEIA_VERSION-${ARCH}-Alcasar${alcasarVersion}.iso
|
| - |
|
232 |
|
| - |
|
233 |
# Generating the iso file
|
| - |
|
234 |
# Parameters for xorriso found using the following command on the original mageia iso
|
| - |
|
235 |
# xorriso -indev Mageia-7-x86_64.iso -report_el_torito as_mkisofs
|
| 231 |
#cd ${MAGEIA_NEW_DIR} && genisoimage -quiet -o ${CURRENT_DIR}/${newIsoName} \
|
236 |
cd ${MAGEIA_NEW_DIR} && xorriso -as mkisofs \
|
| - |
|
237 |
-V 'Mageia-7.1-x86_64' \
|
| - |
|
238 |
--grub2-mbr --interval:local_fs:0s-15s:zero_mbrpt:${ISO_IN} \
|
| 232 |
# -b isolinux/isolinux.bin \
|
239 |
-partition_cyl_align off \
|
| 233 |
# -c boot.catalog \
|
240 |
-partition_offset 0 \
|
| 234 |
# -no-emul-boot -boot-load-size 4 \
|
241 |
--mbr-force-bootable \
|
| 235 |
# -boot-info-table -J -R -V "Mageia-$MAGEIA_VERSION Alcasar ${ARCH}" .
|
242 |
-append_partition 2 0xef --interval:local_fs:8785156d-8793347d::${ISO_IN} \
|
| 236 |
|
- |
|
| 237 |
cd ${MAGEIA_NEW_DIR} && xorriso -as mkisofs -quiet -o ${CURRENT_DIR}/${newIsoName} \
|
- |
|
| 238 |
-isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
|
243 |
-iso_mbr_part_type 0x00 \
|
| 239 |
-isohybrid-gpt-basdat \
|
244 |
-c '/boot.catalog' \
|
| 240 |
-b /boot/grub2/eltorito.img \
|
245 |
-b '/boot/grub2/eltorito.img' \
|
| 241 |
-c boot.catalog \
|
246 |
-no-emul-boot \
|
| 242 |
-no-emul-boot -boot-load-size 4 \
|
247 |
-boot-load-size 4 \
|
| - |
|
248 |
-boot-info-table \
|
| - |
|
249 |
--grub2-boot-info \
|
| - |
|
250 |
-eltorito-alt-boot \
|
| 243 |
-boot-info-table -J -R -V "Mageia-$MAGEIA_VERSION Alcasar ${ARCH}" .
|
251 |
-e '--interval:appended_partition_2_start_2196289s_size_8192d:all::' \
|
| - |
|
252 |
-no-emul-boot \
|
| - |
|
253 |
-boot-load-size 8192 \
|
| - |
|
254 |
-o ${CURRENT_DIR}/${newIsoName} .
|
| 244 |
|
255 |
|
| 245 |
|
256 |
|
| 246 |
# Unmounting
|
257 |
# Unmounting
|
| 247 |
echo "Umounting..."
|
258 |
echo "Umounting..."
|
| 248 |
umount ${MAGEIA_OFFICIAL_DIR} && rmdir ${MAGEIA_OFFICIAL_DIR}
|
259 |
umount ${MAGEIA_OFFICIAL_DIR} && rmdir ${MAGEIA_OFFICIAL_DIR}
|