Skip to content

Instantly share code, notes, and snippets.

@neolao
Last active February 17, 2022 11:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neolao/c246544659c2769b3c486c88dcc82213 to your computer and use it in GitHub Desktop.
Save neolao/c246544659c2769b3c486c88dcc82213 to your computer and use it in GitHub Desktop.
apt-get install qemu qemu-user qemu-user-static binfmt-support debootstrap binutils
sudo debootstrap --foreign --arch i386 stretch  ./chroot-stretch-i386/ http://deb.debian.org/debian/
mount -t sysfs /sys ./chroot-stretch-i386/sys/
mount -t proc /proc ./chroot-stretch-i386/proc/
mount –-bind /dev ./chroot-stretch-i386/dev/
mount –-bind /dev/pts ./chroot-stretch-i386/dev/pts/
mount –-bind /dev/shm ./chroot-stretch-i386/dev/shm/

sudo cp /usr/bin/qemu-i386-static ./chroot-buster-i386/usr/bin/
sudo chroot ./chroot-stretch-i38/ ./debootstrap/debootstrap --second-stage
sudo chroot ./chroot-stretch-i386/ /bin/bash --login -i
vim.tiny /root/.bashrc
export LANGUAGE="C"
export LC_ALL="C"
export DISPLAY=:0
adduser --uid 1000 pi
exit
sudo chroot ./chroot-stretch-i386/ /bin/su --login -i

https://www.playonlinux.com/wine/binaries/linux-x86/

wget --no-check-certificate https://www.playonlinux.com/wine/binaries/linux-x86/PlayOnLinux-wine-3.9-linux-x86.pol
apt install bzip2
tar -jxf ./PlayOnLinux-wine-3.9-linux-x86.pol --strip-components=1
cd 3.9/bin
mv wine-preloader wine-preloader.renamed
cd ~
mv 3.9 /opt/wine-3.9
echo PATH=/opt/wine-3.9/bin/:$PATH >> .bashrc
exit
sudo chroot ./chroot-stretch-i386/ /bin/su --login pi
echo PATH=/opt/wine-3.9/bin/:$PATH >> .bashrc
exit
sudo chroot ./chroot-stretch-i386/ /bin/bash --login root
apt install xterm leafpad
exit
sudo mkdir /opt/chrootscript
sudo vim.tiny /opt/chrootscript/chrootmount
#!/bin/bash

mount -t sysfs /sys/ /home/pi/chroot-stretch-i386/sys/
mount -t proc /proc/ /home/pi/chroot-stretch-i386/proc/
mount –-bind /dev /home/pi/chroot-stretch-i386/dev/
mount –-bind /dev/pts /home/pi/chroot-stretch-i386/dev/pts/
mount –-bind /dev/shm /home/pi/chroot-stretch-i386/dev/shm/
sudo chmod +x /opt/chrootscript/chrootmount
sudo vim.tiny /etc/systemd/system/chrootmount.service
[Unit]
Description = mounts chroot on boot

[Service]
Type=one-shot
ExecStart=/opt/chrootscript/chrootmount

[Install]
WantedBy=multi-user.target
sudo systemctl enable chrootmount.service
sudo vim.tiny /opt/chrootscript/start_x86_user
#!/bin/sh

/usr/sbin/chroot /home/pi/chroot-stretch-i386/ /bin/su --login pi
sudo chmod +x /opt/chrootscript/start_x86_user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment