Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
### This gist lists all the commands necessary to generate a GearsOnGallium live USB/CD ".iso" on any system with "docker" installed.
### Generated live image will contain OpenSUSE with latest opensource video drivers and wine (with gallium-nine: native D3D9).
### This is based on,
### but removes some dead links, updates some package versions, and is deployable on systems other than openSUSE.
### Tested on Ubuntu 16.04 on 2017-08-13.
# In the user terminal, execute as non-root user:
echo "Preparing docker image, and logging in into the container..."
docker run -ti --privileged --rm -v=$(echo "`pwd`" | sed 's/ /\\ /g'):/opt:rw opensuse:latest bash
# We're now in the container
echo "Installing some tools needed to perform building image..."
zypper --non-interactive install kiwi kiwi-tools kiwi-desc-isoboot grub2 grub2-x86_64-efi squashfs mkisofs mtools git
echo "Adding missing boot prefix argument to grub2-mkimage in KIWIImage module..."
cp /usr/share/kiwi/modules/ /usr/share/kiwi/modules/
sed -i -- 's/my $core_opts = "-O $efi_fo -o $core -c $bootefi -d $ir_modules";/my $core_opts = "-O $efi_fo -o $core -c $bootefi -p \/boot\/grub2 -d $ir_modules";/g' /usr/share/kiwi/modules/
echo "Checking out vanilla gearsongallium-git..."
cd /root/
git clone
cd gearsongallium/
cp -R suse-gog/ /usr/share/kiwi/image/isoboot/
cd ./cd-image/
cp ./source/config.xml ./source/config.xml.orig
echo "Patching gearsongallium: Updating versions of some to-be-installed packages..."
sed -i -- 's/libcrypto38/libcrypto41/g' ./source/config.xml
sed -i -- 's/libssl39/libssl43/g' ./source/config.xml
sed -i -- 's/libtls11/libtls15/g' ./source/config.xml
mv "./source/root/etc/zypp/repos.d/http:__download.opensuse.org_repositories_KDE:_Qt58_openSUSE_Leap_42.2.repo" "./source/root/etc/zypp/repos.d/http:__download.opensuse.org_repositories_KDE:_Qt59_openSUSE_Leap_42.2.repo"
sed -i -- 's/Qt58/Qt59/g' ./source/config.xml "./source/root/etc/zypp/repos.d/http:__download.opensuse.org_repositories_KDE:_Qt59_openSUSE_Leap_42.2.repo"
echo "Patching gearsongallium: Removing proprietary AMDGPU-PRO from list of to-be-installed packages..."
rm "./source/root/etc/zypp/repos.d/http:__www.gearsongallium.com_download_amdgpu-pro-16.60-379184.repo"
perl -0777 -pe 's/<repository type="rpm-md" priority="90" imageinclude="false" >\n\s*<source path="http:\/\/www\.gearsongallium\.com\/download\/amdgpu-pro-16\.60-379184\/"\/>\n\s*<\/repository>//g' -i ./source/config.xml
sed -i -- 's/<package name="libdrm-amdgpu-pro"\/>//g' ./source/config.xml
sed -i -- 's/<package name="libopencl-amdgpu-pro"\/>//g' ./source/config.xml
sed -i -- 's/<package name="libopencl-amdgpu-pro-icd"\/>//g' ./source/config.xml
sed -i -- 's/<package name="vulkan-amdgpu-pro"\/>//g' ./source/config.xml
sed -i -- 's/<package name="radeon-profile"\/>//g' ./source/config.xml
echo "Building image filesystem..."
kiwi -p ./source/ --root ./image
echo "Building bootable image..."
mkdir ./dist
kiwi -c ./image -d ./dist
echo "Copying generated '.iso' image to your current (host) directory..."
mv ./dist/*.iso /opt/
# We're back in the host system
echo "Done."
ls -l ./*.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.