Hi i create a script that if this log file that the script creates is not in /var/log then press the enter button to start raspi-config.
You can call this script firstboot
Then put this in the script
Code: Select all
#!/bin/bash
boot="/var/log/firstboot-startup.log"
if [ ! -f $boot ]; then
echo ""
echo ""
echo "This is the first boot."
echo "Running raspi-config. Please expand your file system and change any other settings you need to."
echo "After you are done. DO NOT reboot from raspi-config. Just select FINISH or NO if it ask you to reboot. That way this script can finish running."
echo "It will create a log to stop this script from looping and reboot afterwords."
read -p "Press the [Enter] key to start raspi-config."
sudo raspi-config
#the next line creates an empty file so it won't run the next boot
sudo touch $boot
sudo reboot
else
startx
fi
Then put the script in .bashrc
By thinking like an engineer you can create a raspberry pi.
Michael Jackson enthusiast.
I got the PI model B, B+ and PI 2 model B.
When will I get the A? I don't know.