diff --git a/stage1/main.iss b/stage1/main.iss index 1ac1db9..974b9a0 100644 --- a/stage1/main.iss +++ b/stage1/main.iss @@ -1,8 +1,8 @@ #pragma include __INCLUDE__ + ";" + "idp\" [Setup] AppName = ra1nstorm -AppVerName = 0.9.3 -AppVersion = 0.9.3 +AppVerName = 0.9.4 +AppVersion = 0.9.4 DefaultDirName = {sd}\ra1nstorm DefaultGroupName = ra1nstorm DisableDirPage = yes @@ -23,7 +23,8 @@ begin CreateDir(ExpandConstant('{localappdata}\ra1nlinux')); idpAddFile('https://github.com/hakuna-m/wubiuefi/releases/download/18042r333/wubi18042r333.exe', ExpandConstant('{localappdata}\ra1nlinux\wubi.exe')); idpAddFile('http://ftp.ussg.iu.edu/linux/xubuntu/18.04/release/xubuntu-18.04.2-desktop-amd64.iso', ExpandConstant('{localappdata}\ra1nlinux\xubuntu-18.04.2-desktop-amd64.iso')); - + idpAddMirror('http://ftp.ussg.iu.edu/linux/xubuntu/18.04/release/xubuntu-18.04.2-desktop-amd64.iso', 'https://mirror.us.leaseweb.net/ubuntu-cdimage/xubuntu/releases/18.04/release/xubuntu-18.04.2-desktop-amd64.iso'); + idpAddMirror('http://ftp.ussg.iu.edu/linux/xubuntu/18.04/release/xubuntu-18.04.2-desktop-amd64.iso', 'https://www.mirrorservice.org/sites/cdimage.ubuntu.com/cdimage/xubuntu/releases/18.04/release/xubuntu-18.04.2-desktop-amd64.iso'); idpDownloadAfter(wpReady); end; diff --git a/stage2/intro.html b/stage2/intro.html index 9ae887a..415b357 100644 --- a/stage2/intro.html +++ b/stage2/intro.html @@ -11,6 +11,10 @@
ra1nstorm is BETA software. Ronsor Labs takes no responsibility for any damages incurred. + Please note Intel VT-d (or AMD SR-IOV) is NOT THE SAME AS THE GENERIC "VIRTUALIZATION TECHNOLOGY." +
++ Official Forum - Homepage & FAQ
checkra1n © 2019 qwertyoruiop, axi0mx, et al. diff --git a/stage2/libzenity.awk b/stage2/libzenity.awk index 614c71c..ba60d9e 100644 --- a/stage2/libzenity.awk +++ b/stage2/libzenity.awk @@ -1,5 +1,13 @@ -function zenity(arg) { - return "zenity " arg +function zenity(arg,\ + usr,usra) { + # Don't run zenity as root anymore + if (ENVIRON["HOME"] ~ /\/home\//) { + split(ENVIRON["HOME"], usra, "/") + usr = usra[3] + } else { + usr = "nobody" + } + return "sudo -u "usr" zenity " arg } function zenity_html(file, title, other) { diff --git a/stage2/main.awk b/stage2/main.awk index 85be512..004d092 100644 --- a/stage2/main.awk +++ b/stage2/main.awk @@ -156,7 +156,7 @@ function wiz_configiommu(\ pciid = "" while (pciid == "") { print "# Locating USB controller..." | h - pciid = find_usb_controller("ipheth") + pciid = new_find_usb_controller("05ac") print "debug! pciid="pciid if (!pciid) { system("sleep 1") @@ -166,7 +166,9 @@ function wiz_configiommu(\ } print "45" | h print "# Patching GRUB..." | h - ok = system("cp /etc/modules /etc/modules.bak && cp /etc/default/grub /etc/default/grub.bak && echo vfio >> /etc/modules && echo vfio_iommu_type1 >> /etc/modules && echo vfio_pci >> /etc/modules && echo vfio_virqfd >> /etc/modules &&" \ + ok = system("cp /etc/modules.bak /etc/modules && cp /etc/default/grub.bak /etc/default/grub &&" \ + "cp /etc/modules /etc/modules.bak && cp /etc/default/grub /etc/default/grub.bak &&" \ + " echo vfio >> /etc/modules && echo vfio_iommu_type1 >> /etc/modules && echo vfio_pci >> /etc/modules && echo vfio_virqfd >> /etc/modules &&" \ "sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=\"/GRUB_CMDLINE_LINUX_DEFAULT=\"iommu=pt amd_iommu=on intel_iommu=on /' /etc/default/grub &&" \ "echo 'options vfio-pci ids=" pciid "' > /etc/modprobe.d/vfio.conf &&" \ "echo 'options vfio_iommu_type1 allow_unsafe_interrupts=1' >> /etc/modprobe.d/vfio.conf &&" \ @@ -251,7 +253,7 @@ function main_menu(\ } BEGIN { - RA1NVER = "0.9.3" + RA1NVER = "0.9.4" gtitle = "ra1nstorm" gzenity = "--width 800 --height 480" split("python qemu uml-utilities virt-manager dmg2img git wget libguestfs-tools", REQPKGS, " ") diff --git a/stage2/usbutil.awk b/stage2/usbutil.awk index cf12a7a..f59742c 100644 --- a/stage2/usbutil.awk +++ b/stage2/usbutil.awk @@ -1,3 +1,20 @@ +# What an innovative name! new_find_usb_controller! +function new_find_usb_controller(vendorid,\ + lscmd,rdlnk,status,devn,fullpath) { + lscmd = "ls /sys/bus/usb/devices/*/idVendor | xargs grep -E '^"vendorid"$' | cut -d ':' -f1 | sed 's,/idVendor,,'" + lscmd | getline devn + status = close(lscmd) + if (status != 0) return "" + if (devn == "") return "" + rdlnk = "readlink -f " devn + rdlnk | getline fullpath + status = close(rdlnk) + if (status != 0) return "" +# /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0 + match(fullpath, /\/[^/]+\/0000:([^/]+)\/usb/, a) + return a[1] +} + function find_usb_controller(driver,\ lscmd,rdlnk,status,devn,fullpath) { lscmd = "ls -d /sys/bus/usb/drivers/" driver "/*:*"