Script to install, config and run QEMU emulator for Raspberry Pi
QEMU doesn't work well with all Raspbian versions. Raspbian Stretch(2017-11-29) is tested and known to work.
This script works for Mac OS and Linux. For Windows, please use: http://www.rpi-emulator.com/
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git xquartz wget
sudo apt update && sudo apt upgrade
sudo apt-get install git wget
git clone https://github.com/alexandremendoncaalvaro/script-raspberrypi-emulator.git && cd script-raspberrypi-emulator && chmod +x *.sh && ./rpi-install-full.sh
After install, to run use:
./rpi-start.sh
On the first use you'll need to configure the partitions
sudo fdisk /dev/sda
Display the partitions using the p command.
Take note of the beginning of the second partition block. For example, my value was 125904. Delete the second partition with the d command then 2. If you again display the partitions it has disappeared.
Create a new partition with n then p then 2. There fdisk provides a value for the starting block (the value that you have identified earlier). The following value is the end block that is the largest possible to fill all the space. If you display the information again you will see that your new partition has a end higher so that means that the partition is larger.
Back up the information with w command. Restart the machine.
Verify current filesytem size:
df -h
Now resize the filesytem:
sudo resize2fs /dev/sda2
Verify if it works:
df -h
You can now log in via ssh as well:
ssh -p 5022 -X pi@localhost
No, I am not. If you find typos, grammar errors or whatever please feel free to PR or tell me.