Commit 2150bd41 authored by OSAK Buildhauer's avatar OSAK Buildhauer

Changes to

- Added $workspace variable
- Remastering image, using correct permissions (like official ubuntu image)
- Tried using preseed files in iso_files/preseed/, but so far no effect
- Also tried them as kernel commandline, no effect
- Changed grub cfg in lipstick repo, tardis branch
parent d069077a
...@@ -4,37 +4,51 @@ set -x ...@@ -4,37 +4,51 @@ set -x
image_size="3G" image_size="3G"
iso_file="ubuntu-18.04.1-desktop-amd64.iso" iso_file="ubuntu-18.04.1-desktop-amd64.iso"
# mtools, ddrescure, fdisk, grub, 7z # mtools, ddrescure, fdisk, grub, 7z
rm -rf "$workspace/part_files"
rm -rf part_files mkdir -p "$workspace/part_files"
mkdir -p part_files git -C "$workspace/part_files" clone -b tardis .
git -C part_files clone .
#rsync -av /usr/lib/grub/x86_64-efi part_files/grub #rsync -av /usr/lib/grub/x86_64-efi part_files/grub
#mkdir -p part_files/efi/ubuntu #mkdir -p part_files/efi/ubuntu
#rsync -av /usr/lib/grub/x86_64-efi part_files/efi/ubuntu #rsync -av /usr/lib/grub/x86_64-efi part_files/efi/ubuntu
rsync -av /usr/lib/grub/i386-efi part_files/grub rsync -av /usr/lib/grub/i386-efi "$workspace/part_files"/grub
rsync -av /usr/lib/grub/i386-pc part_files/grub rsync -av /usr/lib/grub/i386-pc "$workspace/part_files"/grub
rsync -av /usr/share/grub/themes part_files/grub rsync -av /usr/share/grub/themes "$workspace/part_files"/grub
mkdir -p part_files/grub/fonts/ mkdir -p "$workspace/part_files"/grub/fonts/
rsync -av /usr/share/grub/unicode.pf2 part_files/grub/fonts/ rsync -av /usr/share/grub/unicode.pf2 "$workspace/part_files"/grub/fonts/
7z x "$iso_file" -opart_files EFI/ 7z x "$iso_file" -o"$workspace/part_files" EFI/
7z x "$iso_file" -opart_files boot/grub/x86_64-efi 7z x "$iso_file" -o"$workspace/part_files" boot/grub/x86_64-efi
mv part_files/grub/* part_files/boot/grub/ mv "$workspace/part_files"/grub/* "$workspace/part_files"/boot/grub/
rm -rf part_files/grub rm -rf "$workspace/part_files"/grub
#wget -O part_files/gparted-live-i686.iso #wget -O part_files/gparted-live-i686.iso
wget -O part_files/gparted-live-i686.iso #wget -O part_files/gparted-live-i686.iso
ln "$iso_file" part_files/ #ln "$iso_file" part_files/kubuntu.iso
rm part.img # cdrtools
truncate -s "$image_size" part.img rm -rf "$workspace/iso_files"
mkfs.vfat -n "LIPSTICK" "part.img" mkdir -p "$workspace/iso_files"
MTOOLS_SKIP_CHECK=1 mcopy -i part.img -b -s -v part_files/* :: 7z x "$iso_file" -o"$workspace/iso_files"
grub-mkimage --prefix "(hd0,msdos1)/boot/grub" --output "grub.i386-pc.img" --format "i386-pc" part_msdos fat ext2 biosdisk echo 'd-i preseed/early_command string echo TARDIS > /dev/kmsg' >> "$workspace/iso_files/preseed/ubuntu.seed"
dd if=/usr/lib/grub/i386-pc/boot.img of="output.img" bs=446 count=1 echo 'd-i preseed/early_command string touch /TARDIS' >> "$workspace/iso_files/preseed/ubuntu.seed"
dd if="grub.i386-pc.img" of="output.img" bs=512 seek=1 echo 'd-i debian-installer/language string en' >> "$workspace/iso_files/preseed/ubuntu.seed"
ddrescue --output-position=2048s --sparse "part.img" "output.img" echo 'd-i debian-installer/country string NL' >> "$workspace/iso_files/preseed/ubuntu.seed"
printf "label: dos\nunit: sectors\n2048,+,b,*\n" | sfdisk "output.img" echo 'd-i keyboard-configuration/xkb-keymap select us' >> "$workspace/iso_files/preseed/ubuntu.seed"
cp "$workspace/iso_files/preseed/ubuntu.seed" "$workspace/iso_files/preseed/kubuntu.seed"
mkisofs -J -r -o "$workspace/part_files"/kubuntu.iso -l "$workspace/iso_files"
#echo "d-i preseed/early_command string touch /TARDIS" > preseed.cfg
rm "$workspace/part.img"
truncate -s "$image_size" "$workspace/part.img"
mkfs.vfat -n "LIPSTICK" "$workspace/part.img"
MTOOLS_SKIP_CHECK=1 mcopy -i "$workspace/part.img" -b -s -v "$workspace/part_files"/* ::
grub-mkimage --prefix "(hd0,msdos1)/boot/grub" --output "$workspace/grub.i386-pc.img" --format "i386-pc" part_msdos fat ext2 biosdisk
dd if=/usr/lib/grub/i386-pc/boot.img of="$workspace/output.img" bs=446 count=1
dd if="$workspace/grub.i386-pc.img" of="$workspace/output.img" bs=512 seek=1
ddrescue --output-position=2048s --sparse "$workspace/part.img" "$workspace/output.img"
printf "label: dos\nunit: sectors\n2048,+,b,*\n" | sfdisk "$workspace/output.img"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment