___ ____ _ _____ ___ _ _____ _____ ____ | \/ (_) (_) |____ | / | (_)|____ | _ | / ___| | . . |_ _ __ ___ __ / / / /| | _ / /\ V / / /___ | |\/| | | '_ \| \ \/ / \ \/ /_| | | | \ \/ _ \ | ___ \ | | | | | | | | |> < .___/ /\___ | | |.___/ / |_| || \_/ | \_| |_/_|_| |_|_/_/\_\ \____(_) |_/ |_|\____/\_____/\_____/ # Minix3.4 on M1/M2 (ARM64) Qemu HOWTO --------------------------------------------------------------- # Create a working directory to hold our files mkdir $HOME/minix3 cd $HOME/minix3 # Download the latest development snapshot (from 2017) wget http://download.minix3.org/iso/snapshot/minix_R3.4.0rc6-d5e4fc0.iso.bz2 bunzip2 minix_R3.4.0rc6-d5e4fc0.iso.bz2 mv minix_R3.4.0rc6-d5e4fc0.iso minix34.iso qemu-img create -f qcow2 disk.img 10G # Run this installer script qemu-system-i386 \ -m 256 \ -accel tcg \ -net nic,model=virtio \ -net user,hostfwd=tcp::2222-:22 \ -cdrom minix34.iso \ -hda disk.img \ -boot d # It takes some time to boot on the M2 MacBook Air so please be # patient it can take as long as 60 seconds or sometimes even more # Once it boots, login as root (no password) # And initiate the installation procedure by running setup # more info is available here https://wiki.minix3.org/doku.php?id=usersguide:doinginstallation#runningsetup setup #You can use the AUTO setup features and choose the default values, or customize # Network setup choose vio0 (1) # Autimaticaly using DHCP (IPv4 only) (2) # Quit # in the shell run to shut down the system shutdown -p now #Now we run the Minix3 with this script qemu-system-i386 \ -m 256 \ -accel tcg \ -net nic,model=virtio \ -net user,hostfwd=tcp::2222-:22 \ -cdrom minix34.iso \ -hda disk.img \ -boot c # Login as root (no password) # Setup a password for root # # More info https://wiki.minix3.org/doku.php?id=usersguide:postinstallation passwd # Create a local user useradd -m user usermod -G users,wheel user pkgin update pkgin install openssh cp /usr/pkg/etc/rc.d/sshd /etc/rc.d/ printf 'sshd=YES\n' >> /etc/rc.conf /etc/rc.d/sshd start # Then we can SSH to the Minix from our MacOS as follows (to enable X11 forwarding as well) ssh -XC -p 2222 user@localhost # X11 ----- # Following xorg.conf works well on my M2 MacBook Air # Save it as /etc/X11/xorg.conf Section "ServerLayout" Identifier "X.org Configured" Screen 0 "Screen0" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" EndSection Section "Files" ModulePath "/usr/X11R7/lib/modules" FontPath "/usr/X11R7/lib/X11/fonts/misc/" FontPath "/usr/X11R7/lib/X11/fonts/TTF/" FontPath "/usr/X11R7/lib/X11/fonts/Type1/" FontPath "/usr/X11R7/lib/X11/fonts/75dpi/" FontPath "/usr/X11R7/lib/X11/fonts/100dpi/" EndSection Section "Module" Load "dbe" Load "dri" Load "dri2" Load "extmod" Load "glx" Load "record" Load "shadow" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "kbd" Option "Protocol" "mxkbd" Option "Device" "/dev/kbdmux" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/mousemux" Option "ZAxisMapping" "4 5 6 7" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model" EndSection Section "Device" ### Available Driver options are:- ### Values: : integer, : float, : "True"/"False", ### : "String", : " Hz/kHz/MHz", ### : "%" ### [arg]: arg optional #Option "ShadowFB" # [] #Option "DefaultRefresh" # [] #Option "ModeSetClearScreen" # [] Identifier "Card0" Driver "vesa" BusID "PCI:0:2:0" EndSection Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" SubSection "Display" Viewport 0 0 Depth 1 EndSubSection SubSection "Display" Viewport 0 0 Depth 4 EndSubSection SubSection "Display" Viewport 0 0 Depth 8 Modes "1024x768" EndSubSection SubSection "Display" Viewport 0 0 Depth 15 Modes "1024x768" EndSubSection SubSection "Display" Viewport 0 0 Depth 16 Modes "1024x768" EndSubSection SubSection "Display" Viewport 0 0 Depth 24 Modes "1024x768" EndSubSection EndSection # I dont like the default TWM so install fluxbox instead pkgin install fluxbox # then add this to your users $HOME/.xinitrc exec /usr/pkg/bin/startfluxbox # then you can run startx under your user to get a X11 desktop # modify $HOME/.fluxbox/menu accordingly to suite your needs