diff --git a/Readme.md b/Readme.md index 52eb979..d59cb00 100644 --- a/Readme.md +++ b/Readme.md @@ -29,7 +29,7 @@ Linuxloops is a generic / declarative linux distribution installer that also sup Linuxloops GUI installer can be run from most linux ditributions live images as long as they provide a desktop environment (according to the instructions in the next section), however the available space is often limited in live images and some distros (Bazzite, BlissOS, Brunch, ChromeOS-Flex, Fedora-Atomic, Qubes, Tails) will not be installable due to the lack of storage. As such, it is recommended to use the linuxloops live disk instead. -* Download the linuxloops live 7z archive in the release section of this Github repository, extract it with your archive manager and write it to a USB flashdrive using your favorite image writer (Gnome Disk Utility / KDE ISO Image Writer for Linux or balenaEtcher for Windows). +* Download the linuxloops live 7z archive in the release section of this Github repository, extract it with your archive manager and write it to a USB flashdrive using an image writer (Gnome Disk Utility / KDE ISO Image Writer for Linux or Rufus for Windows). * Reboot your computer and select the USB flashdrive from the UEFI boot menu. @@ -45,12 +45,12 @@ Detailed instructions: Note: Windows WSL does not allow to write directly to a disk but you can create disk images and write them to a USB flashdrive / SD card using Rufus/Etcher or boot them using [Grub2Win][Grub2Win link]. * Install the below packages depending on your distribution: - * Debian / Ubuntu based distributions: `sudo apt install curl libxcb-cursor0 libxcb-ewmh2 libxcb-icccm4 libxcb-keysyms1 libxkbcommon-x11-0 python3-venv xz-utils` - * Arch based distributions: `sudo pacman -Syu curl libxkbcommon-x11 python-virtualenv xcb-util-cursor xcb-util-keysyms xcb-util-wm xz` - * RHEL based distributions: `sudo dnf install curl libatomic libxkbcommon-x11 python-virtualenv xcb-util-cursor xcb-util-keysyms xcb-util-wm xz` - * Gentoo: `sudo emerge app-arch/xz-utils dev-lang/python net-misc/curl x11-libs/libxkbcommon x11-libs/xcb-util-cursor x11-libs/xcb-util-keysyms x11-libs/xcb-util-wm` - * OpenSUSE: `sudo zypper in curl libatomic1 libgthread-2_0-0 libxcb-cursor0 libxcb-keysyms1 libxcb-ewmh2 libxcb-icccm4 libxkbcommon-x11-0 python3-virtualenv xz` - * Void: `sudo xbps-install curl libxkbcommon xcb-util-cursor xcb-util-keysyms xcb-util-wm xz` + * Debian / Ubuntu based distributions: `sudo apt install curl fontconfig libasound2t64 libatomic1 libnss3 libxcb-cursor0 libxcb-ewmh2 libxcb-icccm4 libxcb-keysyms1 libxcb-shape0 libxkbcommon-x11-0 libxkbfile1 python3-venv xz-utils` + * Arch based distributions: `sudo pacman -Syu curl fontconfig libxkbcommon-x11 nss python-virtualenv xcb-util-cursor xcb-util-keysyms xcb-util-wm xz` + * RHEL based distributions: `sudo dnf install curl fontconfig libatomic libxkbcommon-x11 nss python-virtualenv xcb-util-cursor xcb-util-keysyms xcb-util-wm xz` + * Gentoo: `sudo emerge app-arch/xz-utils dev-lang/python dev-libs/nss media-libs/fontconfig net-misc/curl x11-libs/libxkbcommon x11-libs/xcb-util-cursor x11-libs/xcb-util-keysyms x11-libs/xcb-util-wm` + * OpenSUSE: `sudo zypper in curl fontconfig libatomic1 libgthread-2_0-0 libxcb-cursor0 libxcb-ewmh2 libxcb-keysyms1 libxcb-icccm4 libxcb-shape0 libxkbcommon-x11-0 libxkbfile1 mozilla-nss python3-virtualenv xz` + * Void: `sudo xbps-install curl fontconfig libxkbcommon nss xcb-util-cursor xcb-util-keysyms xcb-util-wm xz` * NixOS: No packages to install (the necessary packages will be installed by linuxloops for use in nix-shell environment) * Download the Linuxloops script: diff --git a/Readme/Live-image.md b/Readme/Live-image.md index a528818..47d5d77 100644 --- a/Readme/Live-image.md +++ b/Readme/Live-image.md @@ -39,7 +39,7 @@ Once the live image has booted, set your keyboard layout (Preferences -> Keyboar Install 7zip, download the linuxloops live 7z archive in the release section of this Github repository and extract the linuxloops live 7z archive. -Write the resulting image file to your USB flashdrive using balenaEtcher. +Write the resulting image file to your USB flashdrive using Rufus. Reboot your computer and select the USB flashdrive from the UEFI boot menu. diff --git a/linuxloops b/linuxloops index d5453e2..1b8a2c0 100755 --- a/linuxloops +++ b/linuxloops @@ -10716,9 +10716,6 @@ esac cat >"${bootstrapdir}"/tmp/linuxloops/install_user <"${bootstrapdir}"/tmp/linuxloops/install_user <> "${bootstrapdir}"/tmp/linuxloops/install_initramfs echo -e "chmod 0755 /boot/linuxloops/linuxloops" >> "${bootstrapdir}"/tmp/linuxloops/install_initramfs echo -e "(cd /boot/linuxloops && find . | cpio -o -H newc | gzip > /boot/linuxloops/linuxloops-recovery.img)" >> "${bootstrapdir}"/tmp/linuxloops/install_initramfs -echo -e "if grep -q '^hostonly=' /etc/dracut.conf; then sed -i '@^hostonly=@d' /etc/dracut.conf; fi; echo 'hostonly=\"yes\"' >> /etc/dracut.conf" >> "${bootstrapdir}"/tmp/linuxloops/install_initramfs +echo -e "echo 'hostonly=\"no\"' > /etc/dracut.conf.d/99-linuxloops.conf" >> "${bootstrapdir}"/tmp/linuxloops/install_initramfs echo -e "dracut --regenerate-all --force" >> "${bootstrapdir}"/tmp/linuxloops/install_initramfs chmod 0755 "${bootstrapdir}"/tmp/linuxloops/install_initramfs } @@ -16880,8 +16874,9 @@ if [ "${distribution}" == "Bazzite" ] || [ "${distribution}" == "Fedora-Atomic" for i in \$(echo \${cmdline_root} \${cmdline} \${cmdline_extra} | sed -e 's@ @\n@g'); do kargs="\${kargs} --append-if-missing=\${i}"; done cat >>/boot/linuxloops/reinstall-bootloader < /etc/dracut.conf.d/linuxloops.conf -echo -e 'install_items+=" /etc/vconsole.conf /usr/bin/bash /usr/sbin/blkid /usr/sbin/cryptsetup /usr/bin/cut /usr/sbin/e2fsck /usr/bin/find /usr/bin/grep /usr/sbin/losetup /usr/bin/lsblk /usr/bin/ntfs-3g /usr/bin/ntfsfix /usr/bin/ps /usr/bin/setfont /usr/bin/setsid /usr/lib/systemd/systemd-sysroot-fstab-check "' >> /etc/dracut.conf.d/linuxloops.conf +echo -e 'add_drivers+=" 8250_dw aes amdgpu atkbd btrfs cbc dm-crypt exfat ext4 fuse i8042 i915 intel_lpss intel_lpss_pci loop nouveau nvme quota_v1 quota_v2 serio sha256 surface_aggregator surface_aggregator_registry surface_hid surface_hid_core usbhid xhci_pci "' > /etc/dracut.conf.d/99-linuxloops.conf +echo -e 'install_items+=" /etc/vconsole.conf /usr/bin/bash /usr/sbin/blkid /usr/sbin/cryptsetup /usr/bin/cut /usr/sbin/e2fsck /usr/bin/find /usr/bin/grep /usr/sbin/losetup /usr/bin/lsblk /usr/bin/ntfs-3g /usr/bin/ntfsfix /usr/bin/ps /usr/bin/setfont /usr/bin/setsid /usr/lib/systemd/systemd-sysroot-fstab-check "' >> /etc/dracut.conf.d/99-linuxloops.conf +echo 'hostonly=\"no\"' >> /etc/dracut.conf.d/99-linuxloops.conf rpm-ostree initramfs --enable if [ "${install_type}" == "image" ]; then sed "s#ostree admin instutil grub2-generate#ostree admin instutil grub2-generate | sed 's|linux16 |linux |g' | sed 's|initrd16 |initrd $(if [ "${root_fstype}" == "btrfs" ]; then echo /@boot; fi)/linuxloops/linuxloops.img |g'$(if [ "${root_fstype}" == "btrfs" ]; then echo " | sed 's| /ostree| /@boot/ostree|g'"; fi)#g" /etc/grub.d/15_ostree > /etc/grub.d/15_ostree_linuxloops @@ -16922,6 +16917,8 @@ REINSTALLBOOTLOADER else cat >>/boot/linuxloops/reinstall-bootloader <>/boot/linuxloops/reinstall-bootloader </usr/sbin/grub-install <<'GRUBINSTALL' #!/bin/sh grub-install.real "\\\$@" --bootloader-id="${bootloader_id}" -grub-install.real "\\\$@" --removable +# Do not use removable as Ubuntu will install the live iso version in that case which has a specific GRUB configuration path +grub-install.real "\\\$@" --bootloader-id="BOOT" +rm -f /boot/efi/EFI/BOOT/BOOTX64.EFI +mv /boot/efi/EFI/BOOT/shimx64.efi /boot/efi/EFI/BOOT/BOOTX64.EFI find /boot/efi -type f -iname fbx64.efi -exec rm {} \; find /boot/efi -type f -iname bootx64.csv -exec rm {} \; GRUBINSTALL @@ -19355,7 +19355,7 @@ until false; do done destination=$(gui_launch -m disk -t "Drive selection" -p "${list}" -q "Select the target drive:" | cut -d' ' -f1) if [ -z "${destination}" ]; then exit 1; elif [ "${destination}" == "refresh" ]; then continue; fi - if [ "${destination}" == "return" ]; then break; continue; fi + if [ ! -z "${wsl}" ] && [ "${destination}" == "return" ]; then break; continue 2; elif [ "${destination}" == "return" ]; then break; continue; fi fullpath="${destination}" if [ "${distribution}" == "BlissOS" ] || [ "${distribution}" == "Brunch" ] || [ "${distribution}" == "ChromeOS-Flex" ] || [ "${distribution}" == "Tails" ]; then if [ $(( ($(lsblk -drnbpf -o SIZE ${destination}) / 1024 /1024 / 1024) - 14 )) -eq 0 ]; then @@ -19533,7 +19533,7 @@ else if [ ${return_value} -eq 1 ]; then exit_with_error "Failed to perform the installation of ${distribution} in chroot."; fi grub_config if [ ! -z "${wsl}" ]; then - grubinstall="The ${distribution} disk image has been created at $(echo ${fullpath:5:1} | tr a-z A-Z):\\\\$(echo ${fullpath:7} | sed 's@\/@\\\\@g'). You can either write this disk image to a usb flashdrive / sdcard with a tool like rufus/etcher or boot it directly using Grub2Win.

********************************************************************************************
If you want to boot the image directly using Grub2Win:
The grub config needed to boot ${distribution} has been generated in the file $(echo ${fullpath:5:1} | tr a-z A-Z):\\\\$(echo ${fullpath:7} | sed 's@\/@\\\\@g').grub.txt
You need to install Grub2Win and launch it, click on \"Manage Boot Menu\" -> \"Add a new entry\" -> set \"Type\" as \"Create user section\", open the file $(echo ${fullpath:5:1} | tr a-z A-Z):\\\\$(echo ${fullpath:7} | sed 's@\/@\\\\@g').grub.txt and copy its content in the Grub2Win notepad window, save and close the Grub2Win notepad window then click \"Apply\" and \"OK\".
Please note that ${distribution} will not be bootable and / or stable if you do not perform the below actions (Refer to Windows online resources if needed):
- Ensure that bitlocker is disabled on the drive which contains the ${distribution} image or disable it.
- Disable fast startup.
- Disable hibernation.

Once done, reboot your computer and select ${distribution} from the Grub2Win menu.
********************************************************************************************" + grubinstall="The ${distribution} disk image has been created at $(echo ${fullpath:5:1} | tr a-z A-Z):\\$(echo ${fullpath:7} | sed 's@\/@\\@g'). You can either write this disk image to a usb flashdrive / sdcard with a tool like rufus/etcher or boot it directly using Grub2Win.

********************************************************************************************
If you want to boot the image directly using Grub2Win:
The grub config needed to boot ${distribution} has been generated in the file $(echo ${fullpath:5:1} | tr a-z A-Z):\\$(echo ${fullpath:7} | sed 's@\/@\\@g').grub.txt
You need to install Grub2Win and launch it, click on \"Manage Boot Menu\" -> \"Add a new entry\" -> set \"Type\" as \"Create user section\", open the file $(echo ${fullpath:5:1} | tr a-z A-Z):\\$(echo ${fullpath:7} | sed 's@\/@\\@g').grub.txt and copy its content in the Grub2Win notepad window, save and close the Grub2Win notepad window then click \"Apply\" and \"OK\".
Please note that ${distribution} will not be bootable and / or stable if you do not perform the below actions (Refer to Windows online resources if needed):
- Ensure that bitlocker is disabled on the drive which contains the ${distribution} image or disable it.
- Disable fast startup.
- Disable hibernation.

Once done, reboot your computer and select ${distribution} from the Grub2Win menu.
********************************************************************************************" gui_launch -m finished -t "Grub configuration" -q "${grubinstall}" elif [ ! -z "${brunch}" ]; then grubinstall="The grub config needed to boot ${distribution} has been generated in the file \"${fullpath}.grub.txt\".


Now copy the above grub config, run \"sudo edit-brunch-config -g\" and paste it (lines between stars) at the end of the file.

Once done, press CTRL+X and then ENTER to save, reboot your computer and start ${distribution}"