The Script and RPI 3 Update

Having started putting together “the script” a long time ago, long before the Raspberry Pi 3 came out – and having developed it to handle a wide range of boards and scenarios including of course the Pi3, I found it interesting to return today to installing “the script” on the Raspberry Pi 3 – and of course I wanted to ensure that nothing had changed recently which might stop others doing the same.

Oh! While I’m on – the ESP8266 code – just updated it – got LOTS of RAM back, added in a message on power up to indicate why the board is starting… and re-thought a power up message that wrote to FLASH (and hence could have worn the FLASH out after long periods of using deep-sleep restarts. All updated and OTA available.

Right – where was I… yes… Raspberry Pi 3

From a convenience perspective, most of the small boards I’ve dealt with lately have SSH enabled at start as well as root access. The Pi3 setup (Raspbian) currently has neither. So in order to install “the script” easily,  I found myself having to plug in a monitor and keyboard and use the desktop to enable I2c and enable SSH. Simple enough.

I then used Mobaxterm (could have used WinSCP) to access the board from my PC – I find that easier than messing around with a small keyboard on the actual PI and swapping screens over etc. At that point I realised that remote ROOT access was disabled. I know there are those who will say this is a security issue but personally I’d be happier with (as happens elsewhere) initial access and THEN an offer on first setup – to disable it unless instructed otherwise.

Anyway, off I went to sudo nano /etc/ssh/sshd_config to place/update an entry “PermitRootLogin yes” then reboot to ensure I could remote in as root and then change the password for both pi and root.

I then found “apt-get update” failing miserably because the guys at Raspberry Pi seem to have decided to use IPV6 without a fall-back position.  Adding “ipv6.disable=1” to the first line of /boot/cmdline.txt file seemed to fix that. I took the opportunity to remove the serial debug entry while I was on.

I know, IPV6 etc is long overdue etc. etc. but I’m certainly not about to spend hours adjusting my router and talking to my WIFI provider just for one project that insists on IPV6. Life is short and I simply wanted to install some software and not get side-tracked – no other board I know of currently presents this challenge.

So two reboots later I was on my way to installing “the script” which has operated flawlessly on just about every other setup for some time now.

Now, the script started up just fine (installing as root, only to be quickly told to run again as user Pi – this is deliberate as this is handy for those systems which initially don’t have a PI user which needs to be set up with a range of group access permissions and we want to keep things consistent).

While installing Node-Red I noted a whole boatload of warnings (not errors) to do with the serialport – you would think that on the most popular of boards on the latest operating system setup, this would have been resolved a while ago – not that deprecation warnings do a lot of good except look awful. Unless you want to get into obtaining the source and fixing it (hence turning an evening’s project into a day’s project) for not much apparent benefit, all these warnings seem to serve little purpose but to confuse the beginner.

Facebooktwittergoogle_pluspinterestlinkedin

12 thoughts on “The Script and RPI 3 Update

  1. just for reference: no need for keyboard and monitor... just open the config.txt in the partition you see from windows just after flashing the sdcard, and add these lines:

    dtparam=i2c_arm=on
    dtparam=spi=on
    dtparam=i2s=on

    you can even add multiple parameters in a single line:

    dtparam=i2c_arm=on,spi=on,i2s=on

    while for ssh, just create an empty "ssh" file in that same partition, when you boot you'll have ssh activated

    and about root login, the script will activate it when you run it first time, so you just need to do
    sudo -s -H to become root, giving PI password, then
    bash script.sh

      1. non addable to script as they're needed before running it, but you can make them before even starting, with a notepad 🙂
        just remember to enclose "ssh" in quotes when saving, otherwise notepad will add .txt to the name...
        which maybe works anyway, but i never tested this way...

  2. Hello Peter,

    I'm just a new user of your script and I used it the first time today, didn't notice any errors when installing BUT when using it afterwards I didn't have Webmin (It's in the list when you browse to the ip adress of the Raspberry Pi 3, but it didn't work).
    I used an image of Raspbian Stretch

    Second thing I noticed was when I tried to follow a video of Andreas Spiess (I believe 126), I tried to use his flow.txt(found it on github) and when importing it in node red (I am also new to this things so maybe I do something wrong) Node Red complained that it missed 2 nodes, both with sqlite, I then removed the 'node-red-node-sqlite' node via manage palette and re-installed it, this gave me a new node in the sidebar called 'sqlite' (I attached a screenshot). I then used node red for several hours but then node red complained again that it was missing the sqlite node.

    Regards,
    Dirk

    1. Webmin is turned off by default as it takes WAY too long to load and is of limited value, so you have to TICK if you want Webmin. Just did Raspberry Pi 3 yesterday - see blog you HAVE to disable IPV6 - everything installed for me...

        1. MrShark, that was me that updated NPM (via the checkbox at the beginning of the script) but you and Peter set me straight on that one. And in that case, it wasn't SQLite that was having problems, it was that NR would crash after trying to load any new module after initial boot.

          And one additional side rant:
          The IPV6 thing sounds peculiar that there would be no fallback. Surely i'm not that out of touch to have missed some tipping point where the technical world has now accepted IPV6 as the default (and certainly not for a consumer targeted device like an RPI)...

          1. i know, but we have to see why all of the sudden the raspberries (usually with the original raspbian) seem to decide to go for ipv6 for naming resolution: which SHOULD work, but instead we had many problems with and miserably fails almost everytime it goes that path... could even and probably be an ISP issue, of course... maybe their dns cannot resolve in ipv6, but for now, the safest path to have all working is just disabling ipv6, with no appreciable consequences...

  3. If you put an empty file in the boot partition with the name "ssh" it will start ssh automatically. And if you create a valid wpa_supplicant.conf file and put it in the root of the /boot partition it too will get your rPi onto the local WiFi network.

    I wrote a script which runs in a bootable Ubuntu ISO which handles all that and even punches in a changed hostname so it isn't just another "raspberrypi" host on your network.

    The hostname stuff needs to have access to the EXT filesystem and therefore it's easiest to do a bootable Ubuntu ISO to handle all that. I did this for the DIYRoboCar project.

  4. Hi there,

    I used the script now first time on Pi 3 with an image maybe older because of the touch screen implemented (aliexpress). For the tool i select all except the password change. It works great!
    All what I can in the moment not regonize are the login credentials for the node red ui desktop. The try of pi, root or admin doesn't bring me forward.
    Some suggestions from your side?

    Great job, Jb

Leave a Reply

Your email address will not be published. Required fields are marked *