Commit eab6d626 authored by Lucas Sulzbach's avatar Lucas Sulzbach

SCRUM#565: WIP

parent 2d2383c6
......@@ -123,20 +123,21 @@ create_iso_logger --message "Failed to install basic tools" --tag "apt-get"
cond_mount tmpfs "${TMPFS}" tmpfs "suid,dev,size=${TMPFS_SIZE}"
if [[ -z "${_INPUT}" ]]; then
_INPUT="$(get_iso "${ISODIR}" "${ISOURL}")"
# Dump the cache if the base image changed (Should be improved)
rm --recursive --force "${CACHEDIR}"/../
fi
cond_mount "${_INPUT}" "${PREFIX}/isobase" iso9660 ro,loop
lowerdir="${PREFIX}/isobase"
mkdir --parents "${CACHEDIR}"
find="$(find "${CACHEDIR}" -mindepth 1 -maxdepth 1 -type d | sort --numeric)"
if [[ -z "${find}" ]]; then
[[ -z "${_INPUT}" ]] && _INPUT="$(get_iso "${ISODIR}" "${ISOURL}")"
cond_mount "${_INPUT}" "${PREFIX}/isobase" iso9660 ro,loop
# TODO: Mount iso in place
# mkdir --parents "${TMP}/lower"
# lowerdir="${TMP}/lower"
lowerdir="${PREFIX}/isobase"
SQUASHFSPATH="${PREFIX}/isobase/casper/filesystem.squashfs"
else
lowerdir="$(head --lines=1 <<< "${find}")"
find="$(grep --invert-match "${lowerdir}" <<< "${find}")"
lowerdir="$(sed 's/:/\\:/g' <<< "${lowerdir}")/image"
for dir in ${find}; do
lowerdir="$(sed 's/:/\\:/g' <<< "${dir}")/image:${lowerdir}"
done
......@@ -208,8 +209,8 @@ pushd "${TMP}/image" || \
create_iso_logger --message "Unable to change directory" --tag "pushd"
xorriso -as mkisofs -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -c \
isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \
-boot-info-table -eltorito-alt-boot -no-emul-boot -isohybrid-gpt-basdat -o \
"${_OUTPUT}" . || \
-boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
-isohybrid-gpt-basdat -o "${_OUTPUT}" . || \
create_iso_logger --message "Failed to generate iso image." --tag "xorriso"
popd || create_iso_logger --message "Unable to change directory" --tag "popd"
......
......@@ -60,10 +60,13 @@ reprepro --basedir "${PREFIX}/repo/" includedeb "${REPO}" \
create_iso_logger --message "Unable to include package in local repository" \
--tag "reprepro"
rm --recursive --force "${TMP}"/image/{dists,pool} || \
create_iso_logger --message "Unable to remove old local repo" --tag "rm"
cp --recursive "${PREFIX}"/repo/{dists,pool} "${TMP}/image/" || \
create_iso_logger --message "Unable to move local repository to image" \
--tag "mv"
rm --recursive --force "${PREFIX:?}/repo/"
rm --recursive --force "${PREFIX:?}/repo/" || \
create_iso_logger --message "Unable to remove temporary repo" --tag "rm"
gpg --armor --export 'C3SL Live' > "${CHROOTDIR}/tmp/public.key" || \
create_iso_logger --message "Unable to export key" --tag "gpg"
......
......@@ -53,14 +53,20 @@ if [[ -f "${PREVIOUS}/MD5SUMS" ]]; then
if [[ "${OLDMD5}" == "${NEWMD5}" ]]; then
create_iso_logger --message \
"Caching '${PREVIOUS}/image/casper/initrd.lz'" --type info
"Caching initrd" --type info
exit 0
fi
fi
version="$(basename "${initrd_path}" | cut --delimiter='-' --fields=2,3)"
# Search for kernel path and get its filename
kernel_filename="$(awk -F ' ' '/kernel \/casper\// { print $2 ; exit }' < \
"${TMP}/image/isolinux/txt.cfg" | xargs basename)" || \
create_iso_logger --message "Unable to find vmlinuz file" --tag "awk"
cp "${CHROOTDIR}/boot/vmlinuz-${version}-generic" \
"${TMP}/image/casper/vmlinuz" || \
"${TMP}/image/casper/${kernel_filename}" || \
create_iso_logger --message "Unable to copy kernel to image" --tag "cp"
# The initrd is converted from gzip to lzma
......@@ -74,7 +80,6 @@ if grep --quiet --ignore-case "gzip" <<< "${initrd_type}"; then
--make-directories || \
create_iso_logger --message "Unable to decompress initrd" --tag "gzip"
elif grep --quiet --ignore-case "ascii" <<< "${initrd_type}"; then
# TODO: Check what's happening here
block_size="$(binwalk --include="compressed data" "${initrd_path}" | \
cut --delimiter=" " --fields=1 | \
grep -E "[0-9]+" | \
......@@ -86,13 +91,20 @@ elif grep --quiet --ignore-case "ascii" <<< "${initrd_type}"; then
else
create_iso_logger --message "Invalid initrd format"
fi
find . | cpio --quiet --create -H newc | lzma -7 > ../initrd.lz || \
find . | cpio --quiet --create -H newc | lzma -7 > ../initrd_file || \
create_iso_logger --message "Unable to compress initrd" --tag "lzma"
popd || create_iso_logger --message "Unable to change directory" --tag "popd"
rm --recursive --force "${PREFIX:?}/initrd" || \
create_iso_logger --message "Unable to remove dir \"${PREFIX}/initrd\"" --tag \
"rm"
mv "${PREFIX}/initrd.lz" "${TMP}/image/casper/initrd.lz" || \
# Search for initrd path and get its filename
initrd_filename="$(awk -F ' ' '/initrd=\/casper\// { print $4 ; exit }' < \
"${TMP}/image/isolinux/txt.cfg" | xargs basename)" || \
create_iso_logger --message "Unable to find initrd file" --tag "awk"
mv "${PREFIX}/initrd_file" "${TMP}/image/casper/${initrd_filename}" || \
create_iso_logger --message "Unable to move initrd to image" --tag "mv"
exit 0
......@@ -54,6 +54,30 @@ fi
# create_iso_logger --message "Unable to copy ldlinux.c32 to image" --tag "cp"
# cp "${PREFIX}"/src/isolinux/* "${TMP}/image/isolinux/" || create_iso_logger \
# --message "Unable to copy isolinux files to image" --tag "cp"
mkdir --parents "${TMP}/bl/" || \
create_iso_logger --message "Unable to create temp dir" --tag "mkdir"
# Replace ubuntu by the distro name
pushd "${TMP}/bl/" || create_iso_logger --message "Unable to change directory" \
--tag "pushd"
cpio --extract < "${TMP}/image/isolinux/bootlogo" || \
create_iso_logger --message "Unable to extract archive" --tag "cpio"
cp "${PREFIX}/src/${PROFILE}/splash.png" . || \
create_iso_logger --message "Unable to copy splash to isolinux" --tag "cp"
cp "${PREFIX}/src/${PROFILE}/splash.pcx" . || \
create_iso_logger --message "Unable to copy splash to isolinux" --tag "cp"
sed --in-place "s/Ubuntu GNOME/${NAME}/Ig" ./*.{tr,hlp} || \
create_iso_logger --message "Unable to replace distro name" --tag "sed"
ls | cpio --create > bootlogo || \
create_iso_logger --message "Unable to create archive" --tag "cpio"
mv * "${TMP}/image/isolinux/" || \
create_iso_logger --message "Unable to move contents to isolinux dir"
popd || create_iso_logger --message "Unable to change directory" --tag "popd"
rm --recursive --force "${TMP}/bl/" || \
create_iso_logger --message "Unable to remove dir \"${TMP}/bl/\"" --tag "rm"
cp "${PREFIX}/src/${PROFILE}/preseed.cfg" "${TMP}/image/preseed/" || \
create_iso_logger --message "Unable to copy preseed to image" --tag "cp"
......@@ -77,24 +101,15 @@ if [[ "${size}" == 0 ]]; then
create_iso_logger --message "The chroot returns size 0" --tag "du"
fi
echo "${size}" > "${TMP}/image/casper/filesystem.size"
# cp "${PREFIX}/src/README.diskdefines" "${TMP}/image/" || create_iso_logger \
# --message "Unable to copy README.diskdefines to image" --tag "cp"
sed --in-place "s/##DISKNAME##/${NAME}/" "${TMP}/image/README.diskdefines" || \
sed --in-place "s/\(#define DISKNAME[ ]\+\).*/\1${NAME}/" \
"${TMP}/image/README.diskdefines" || \
create_iso_logger --message "Unable to set up DISKNAME on README.diskdefines"
pushd "${TMP}/image/" || create_iso_logger --message \
"Unable to change directory" --tag "pushd"
# ln --symbolic --force --no-dereference . ubuntu || create_iso_logger --message \
# "Unable to create ${TMP}/image/ubuntu symbolic link" --tag "ln"
popd || create_iso_logger --message "Unable to change directory" --tag "popd"
# touch "${TMP}/image/.disk/base_installable" || create_iso_logger --message \
# "Unable to create ${TMP}/image/.disk/base_installable" --tag "touch"
# echo "full_cd/single" > "${TMP}/image/.disk/cd_type" || \
# create_iso_logger --message "Unable to set ${TMP}/image/.disk/cd_type" --tag \
# "echo"
sed 's/ /-/' <<< "${NAME}" > "${TMP}/image/.disk/info" || \
create_iso_logger --message "Unable to set ${TMP}/image/.disk/info" --tag "echo"
create_iso_logger --message "Unable to set ${TMP}/image/.disk/info" --tag "sed"
echo "${WEBSITE}" > "${TMP}/image/.disk/release_notes_url" || create_iso_logger \
--message "Unable to set ${TMP}/image/.disk/release_notes/url" --tag "echo"
--message "Unable to set ${TMP}/image/.disk/release_notes/url" --tag "sed"
# Change label on grub menu
sed --in-place "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${NAME}\"/" \
......
#define DISKNAME ##DISKNAME##
#define TYPE binary
#define TYPEbinary 1
#define ARCH amd64
#define ARCHamd64 1
#define DISKNUM 1
#define DISKNUM1 1
#define TOTALNUM 0
#define TOTALNUM0 1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
No preview for this file type
menu hshift 9
menu width 58
menu begin desktop
include stdmenu.cfg
menu hshift 13
menu width 49
menu label Alternative desktop environments
menu title Desktop environment menu
label mainmenu-kde
menu label ^Back..
text help
Higher level options install the GNOME desktop environment
endtext
menu exit
menu begin kde-desktop
include stdmenu.cfg
menu label ^KDE
menu title KDE desktop boot menu
text help
Select the 'K Desktop Environment' for the Desktop task
endtext
label mainmenu-kde
menu label ^Back..
menu exit
include kde/menu.cfg
menu end
menu begin lxde-desktop
include stdmenu.cfg
menu label ^LXDE
menu title LXDE desktop boot menu
text help
Select the 'Lightweight X11 Desktop Environment' for the Desktop task
endtext
label mainmenu-lxde
menu label ^Back..
menu exit
include lxde/menu.cfg
menu end
menu begin xfce-desktop
include stdmenu.cfg
menu label ^Xfce
menu title Xfce desktop boot menu
text help
Select the 'Xfce lightweight desktop environment' for the Desktop task
endtext
label mainmenu-xfce
menu label ^Back..
menu exit
include xfce/menu.cfg
menu end
menu end
This diff is collapsed.
label menu
kernel vesamenu.c32
config isolinux.cfg
 0fWelcome to Ubuntu!07 09F107
This is an installation system for Ubuntu 16.04.
It was built on 20170215.10.
0fHELP INDEX07
0fKEY TOPIC07
<09F107> This page, the help index.
<09F207> Prerequisites for installing Ubuntu.
<09F307> Boot methods for special ways of using this system.
<09F407> Additional boot methods; rescue mode.
<09F507> Special boot parameters, overview.
<09F607> Special boot parameters for special machines.
<09F707> Special boot parameters for selected disk controllers.
<09F807> Special boot parameters for the install system.
<09F907> How to get help.
<09F1007> Copyrights and warranties.

For F1-F9 type control and F then the digit 1-9
For F10 type control and F then the digit 0

Press F2 through F10 for details, or ENTER to
\ No newline at end of file
 0fCOPYRIGHTS AND WARRANTIES07 09F1007
Ubuntu is Copyright (C) 2004-2010 Canonical Ltd., and incorporates the work
of many other original authors and contributors.
The Ubuntu system is freely redistributable. After installation, the
exact distribution terms for each package are described in the
corresponding file /usr/share/doc/0bpackagename07/copyright.
Ubuntu comes with 0fABSOLUTELY NO WARRANTY07, to the extent
permitted by applicable law.
This installation system is based on the Debian installer. See
http://www.debian.org/ for more details and information on the Debian
project.
Press F1control and F then 1 for the help index, or ENTER to
\ No newline at end of file
 0fPREREQUISITES FOR INSTALLING UBUNTU07 09F207
You must have at least 44 megabytes of RAM to use this Ubuntu installer.
You should have space on your hard disk to create a new disk partition
of at least 5 gigabytes to install a standard Ubuntu desktop system or
at least 500 megabytes for a minimal server installation. You'll need
more disk space to install additional packages, depending on what you
wish to do with your new Ubuntu system.
See the Installation Guide or the FAQ for more information; both
documents are available at the Ubuntu web site, 0fhttp://www.ubuntu.com/07
Thank you for choosing Ubuntu!
Press F1control and F then 1 for the help index, or ENTER to
\ No newline at end of file
 0fBOOT METHODS07 09F307
0fAvailable boot methods:07
0finstall07
Start the installation -- this is the default option.
0fexpert07
Start the installation in expert mode, for maximum control.
0fcli07, 0fcli-expert07
Minimal command-line system install.
0fmemtest07
Perform a memory test.
To use one of these boot methods, type it at the prompt, optionally
followed by any boot parameters. For example:
boot: install acpi=off
If unsure, you should use the default boot method, with no special
parameters, by simply pressing enter at the boot prompt.
Except in expert mode, non-critical kernel boot messages are suppressed.
Press F1control and F then 1 for the help index, or ENTER to
\ No newline at end of file
 0fRESCUE MODE07 09F407
0fUse one of these boot methods to rescue an existing install:07
0frescue07
Boot into rescue mode.
To use one of these boot methods, type it at the prompt, optionally
followed by any boot parameters. For example:
boot: rescue acpi=off
Press F1control and F then 1 for the help index, or ENTER to
\ No newline at end of file
 0fSPECIAL BOOT PARAMETERS - OVERVIEW07 09F507
On a few systems, you may need to specify a parameter at the 0fboot:07
prompt in order to boot the system. For example, Linux may not be able
to autodetect your hardware, and you may need to explicitly specify
its location or type for it to be recognized.
For more information about what boot parameters you can use, press:
<09F607> -- boot parameters for special machines
<09F707> -- boot parameters for various disk controllers
<09F807> -- boot parameters understood by the install system
Note that to specify a parameter for a particular kernel module, use the form
module.param=value, for example: libata.atapi_enabled=1
Press F1control and F then 1 for the help index, or ENTER to
\ No newline at end of file
 0fSPECIAL BOOT PARAMETERS - VARIOUS HARDWARE07 09F607
You can use the following boot parameters at the 0fboot:07 prompt,
in combination with the boot method (see <09F307>).
If you use hex numbers you have to use the 0x prefix (e.g., 0x300).
0f
HARDWARE PARAMETER TO SPECIFY07
IBM PS/1 or ValuePoint (IDE disk) 0fhd=0bcylinders0f,0bheads0f,0bsectors07
Some IBM ThinkPads 0ffloppy.floppy=thinkpad07
Protect I/O port regions 0freserve=0biobase0f,0bextent07[0f,0b...07]
Laptops with screen display problems 0fvga=77107
Use first serial port at 9600 baud 0fconsole=ttyS0,9600n807
Force use of generic IDE driver 0fall_generic_ide=107
Possible (temporary) workarounds for lockups or other hardware failures:
disable buggy APIC interrupt routing 0fnoapic nolapic07
(partly) disable ACPI 0facpi=noirq07 or 0facpi=off07
disable USB 0fnousb07
poll for interrupts 0firqpoll07
For example:
boot: install vga=771 noapic nolapic
Press F1control and F then 1 for the help index, or ENTER to
\ No newline at end of file
 0fSPECIAL BOOT PARAMETERS - VARIOUS DISK DRIVES07 09F707
You can use the following boot parameters at the 0fboot:07 prompt,
in combination with the boot method (see <09F307>).
0f
HARDWARE PARAMETER TO SPECIFY07
Adaptec 151x, 152x 0faha152x.aha152x=0biobase07[0f,0birq07[0f,0bscsi-id07[0f,0breconnect07]]]
Adaptec 1542 0faha1542.aha1542=0biobase07[0f,0bbuson0f,0bbusoff07[0f,0bdmaspeed07]]
Adaptec 274x, 284x 0faic7xxx.aic7xxx=no_reset07 (enabled if non-zero)
BusLogic SCSI Hosts 0fBusLogic.BusLogic=0biobase07
Certain DELL machines 0faic7xxx.aic7xxx=no_probe07
This list is incomplete, see the kernel's kernel-parameters.txt file
for more.
For example:
boot: install aic7xxx.aic7xxx=no_probe
Press F1control and F then 1 for the help index, or ENTER to
\ No newline at end of file
 0fSPECIAL BOOT PARAMETERS - INSTALLATION SYSTEM07 09F807
You can use the following boot parameters at the 0fboot:07 prompt,
in combination with the boot method (see <09F307>). These parameters
control how the installer works.
0f
RESULT PARAMETER07
Disable framebuffer 0fvga=normal fb=false07
Don't start PCMCIA 0fhw-detect/start_pcmcia=false07
Force static network config 0fnetcfg/disable_dhcp=true07
Set keyboard map 0fbootkbd=es07
Select the Kubuntu desktop 0ftasks=kubuntu-desktop07
Accessibility options (last 2 options not available for all images):
Use high contrast theme 0ftheme=dark07
Use Braille tty 0fbrltty=driver,device,texttable07
Use Speakup 0fspeakup.synth=driver07
For example:
boot: install vga=normal fb=false
Press F1control and F then 1 for the help index, or ENTER to
\ No newline at end of file
 0fGETTING HELP07 09F907
If you can't install Ubuntu, don't despair! The Ubuntu team is ready to
help you! We are especially interested in hearing about installation
problems, because in general they don't happen to only 0fone07 person.
We've either already heard about your particular problem and can dispense a
quick fix, or we would like to hear about it and work through it with you,
and the next user who comes up with the same problem will profit from your
experience!
See the Installation Guide or the FAQ for more information; both
documents are available at the Ubuntu web site, 0fhttp://www.ubuntu.com/07
Press F1control and F then 1 for the help index, or ENTER to
\ No newline at end of file
No preview for this file type
screen-colour=0x2D3335
hidden-timeout=2
label normal=Normal
append normal=
label driverupdates=Use driver update disc
append driverupdates=debian-installer/driver-update=true
applies driverupdates=live live-install
label oem=OEM install (for manufacturers)
append oem=oem-config/enable=true
applies oem=live live-install install
No preview for this file type
# D-I config version 2.0
# search path for the c32 support libraries (libcom32, libutil etc.)
path
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50
ui gfxboot bootlogo
No preview for this file type
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
No preview for this file type
No preview for this file type
menu hshift 13
menu width 49
menu margin 8
menu title Installer boot menu
include stdmenu.cfg
include txt.cfg
include gtk.cfg
menu begin advanced
menu title Advanced options
include stdmenu.cfg
label mainmenu
menu label ^Back..
menu exit
include adtxt.cfg
include adgtk.cfg
menu end
label help
menu label ^Help
text help
Display help screens; type 'menu' at boot prompt to return to this menu
endtext
config prompt.cfg
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.