Skip to content

Commit

Permalink
Prepare for initial mbpt live iso release
Browse files Browse the repository at this point in the history
  • Loading branch information
T-vK committed Apr 21, 2022
1 parent da8c37e commit 7102471
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ Credits to [Cole Robinson](https://blog.wikichoon.com/) for giving me a lot of i
- Fix Samba sharing
- Add virt-install version check because 2.2.1 doesn't seem to support the --xml flag
- Get rid of the `--no-check-certificate` workaround for the win iso download
- Install remix logo package inside of ISO
- Disable autostart of install promt when booting Live ISO
- Add pre-built Live ISO to the GitHub releases
- Move to Fedora 35
### Low prio
- Add nouveau driver compatibility
Expand Down
21 changes: 14 additions & 7 deletions scripts/main/generate-live-iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ DRIVE="$2"
ISO_DOWNLOAD_URL="https://download.fedoraproject.org/pub/fedora/linux/releases/34/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-34-1.2.iso"
ISO_FILE="${LIVE_ISO_FILES_DIR}/Fedora-Workstation-Live-x86_64-34-1.2.iso"
ISO_FILE_MODIFIED="${LIVE_ISO_FILES_DIR}/Fedora-Workstation-Live-x86_64-34-1.2.modified.iso"
#ISO_DOWNLOAD_URL="https://download.fedoraproject.org/pub/fedora/linux/releases/35/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-35-1.2.iso"
#ISO_FILE="${LIVE_ISO_FILES_DIR}/Fedora-Workstation-Live-x86_64-35-1.2.iso"
#ISO_FILE_MODIFIED="${LIVE_ISO_FILES_DIR}/Fedora-Workstation-Live-x86_64-35-1.2.modified.iso"

SOURCE_SQUASHFS_IMG="/LiveOS/squashfs.img"
SQUASHFS_IMG="/tmp/squashfs.img"
Expand Down Expand Up @@ -62,9 +65,9 @@ function build_method_1() {
else
echo "> [Skipped] Fedora ISO already downloaded."
fi

sudo rm -rf "${ISO_FILE_MODIFIED}"

echo "> Rebuilding the ISO adding kernel parameters and some files..."
TMP_SCRIPT="/tmp/tmp-rootfs-setup.sh"
sudo rm -f "${TMP_SCRIPT}"
Expand All @@ -80,8 +83,14 @@ function build_method_1() {
echo "EOF" >> "${TMP_SCRIPT}"
echo 'echo "$GET_MBPT_DESKTOP_FILE" > /etc/skel/.config/autostart/mbpt.desktop' >> "${TMP_SCRIPT}"
echo 'echo "$GET_MBPT_DESKTOP_FILE" > /usr/share/applications/mbpt.desktop' >> "${TMP_SCRIPT}"
#echo "touch /etc/skel/.config/autostart/fedora-welcome.desktop" >> "${TMP_SCRIPT}"
echo "sed -i 's/^\(Exec=\).*/\1\/usr\/bin\/true/' /usr/share/anaconda/gnome/fedora-welcome.desktop" >> "${TMP_SCRIPT}"
#echo "dnf install -y --allowerasing fedora-remix-logos generic-release" >> "${TMP_SCRIPT}"
echo "dnf install -y --allowerasing generic-logos generic-release" >> "${TMP_SCRIPT}"
echo "dnf install -y fedora-remix-logos" >> "${TMP_SCRIPT}"
#echo "dnf remove -y fedora-logos" >> "${TMP_SCRIPT}" # impossbile because of gnome-shell dependency
sudo chmod +x "${TMP_SCRIPT}"

USERNAME="T-vK" sudo editliveos \
--builder "T-vK" \
--noshell \
Expand All @@ -92,7 +101,7 @@ function build_method_1() {
"${ISO_FILE}"

mv "${LIVE_ISO_FILES_DIR}/mbpt-"*.iso "${ISO_FILE_MODIFIED}"

sudo rm -f "${TMP_SCRIPT}"
}

Expand Down Expand Up @@ -171,8 +180,6 @@ function flash() {
sudo umount --force "$mp"
done <<< "$mps"
fi
echo "aa ${ISO_FILE_MODIFIED}"
echo "bb $DRIVE"
yes "" | sudo livecd-iso-to-disk --format ext4 --overlay-size-mb 4095 --efi --force --extra-kernel-args "$ALL_KERNEL_PARAMS" "${ISO_FILE_MODIFIED}" "$DRIVE"
}

Expand All @@ -187,4 +194,4 @@ if [ "$MODE" = "flash" ]; then
flash
elif [ "$MODE" = "build" ]; then
build_method_1
fi
fi
8 changes: 6 additions & 2 deletions scripts/utils/common/tools/download-windows-iso
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ echo "Making sure the URL comes from a trusted Microsoft domain..."
if [[ $WINDOWS_10_ISO_URL == https://*.microsoft.com/* ]] ; then
echo "Downloading the Windows 10 installation iso..."
if [ ! -f "${WIN10_IMG_DESTINATION}" ]; then
wget "${WINDOWS_10_ISO_URL}" --no-check-certificate -c -O "${WIN10_IMG_DESTINATION}.part"
mv "${WIN10_IMG_DESTINATION}.part" "${WIN10_IMG_DESTINATION}"
if wget "${WINDOWS_10_ISO_URL}" --no-check-certificate -c -O "${WIN10_IMG_DESTINATION}.part"; then
mv "${WIN10_IMG_DESTINATION}.part" "${WIN10_IMG_DESTINATION}"
else
echo "Download failed. Please try again or download the Windows 10 iso manually."
exit 1
fi
else
echo "Skipping download because the Windows ISO already exists: ${WIN10_IMG_DESTINATION}"
fi
Expand Down

0 comments on commit 7102471

Please sign in to comment.