10 ms·
And it causes me endless frustration. Because after a power outage the pi will boot and look for somewhere to boot mere seconds after power is back. But my rou
by tjoff 5y ago
And it causes me endless frustration. Because after a power outage the pi will boot and look for somewhere to boot mere seconds after power is back.
But my router supplying DHCP and with info about where it should look takes guessing 3 minutes. And the NAS containing the actual files that the Pi should load is in a virtual machine that takes, guessing, 8 minutes for the hypervisor and VM to start.
So by then the Pi will have timed out and sit there, doing nothing for all eternity.
Fix? An extremely elaborate scheme of Ikea trådfri outlet controlled by the same server taking 8 minutes to boot to power-cycle the pi after it gets up (and notices that the pi doesn't answer to pings).
Has this been fixed yet? Is it even considered a bug?
Not sure about the rationale of giving up booting... Especially when this ought to be an extremely common scenario.
- mysterydip 5y agoCould you get a small UPS for the router? I would imagine it's not sucking down a lot of watts, should take care of momentary blips and anything less than an hour fairly easily.
- moffkalast 5y agoOr you know, just insert a $5 SD card like a normal person?
- pmarreck 5y agoIf you have a bunch of them, you cannot centrally manage them this way without a lot more work. Also, if they log to disk, it will wear down the SD card quickly. Netbooting wears down 0 SD cards.
- jthrowsitaway 5y agoSD cards are less than optimal in Pis for general computing usage, but you could put something like iPXE on the card. That's how I'd work around the issue originally described in this thread. https://en.m.wikipedia.org/wiki/IPXE https://en.m.wikipedia.org/wiki/IPXE
- adastra22 5y agoAt the tech lab I managed IT for back in college we had our own implementation of the preboot environment hacked together from Python and shell scripts on top of a nearly bare linux initrd filesystem. It would poll the router until it got an assignment, then fetch the appropriate files and boot the proper OS. We had to roll our own stuff because it was actually rsync'ing Windows hard drive images and would refresh the drive to clean state before booting every time the power cycled each morning. But you wouldn't need any of that and could probably hack together a solution that does what you want with iPXE.
- tjoff 5y agoEven the thought of having an aging battery isn't worth it to me. And not sure if it would help either. What I have now works for this case, but it definitely put me off using it for other projects.
- turbinerneiter 5y agoHow often do you have power outages? Can't remember one in the last 10 years.
- jerrysievert 5y ago10-15 times/year where I live now (suburb of major city) when you count the brownouts. even though power here is underground, there's enough aboveground that it still goes out or blinks often enough to have a UPS. when I lived on a mountain, quite a few more for sometimes days at a time. when I lived downtown in the major city in a high-rise, 2-3 times/year when you counted brownouts/blips. a slack I'm on for the area had outages throughout the city. so, if you only get it once in the last 10 years, count yourself lucky. I'm on the west coast, not Texas, and there is quite a bit of power generation nearby.
- turbinerneiter 5y agoI'm pretty sure I hadn't a single one since I'm in Munich (2009). I remember some planned outages as kid at my parents place, and occasionally we tripped the circuit breakers. I guess Munich has a really good grid. Everything underground and safe from natural disasters.
- mschuster91 5y ago> Everything underground and safe from natural disasters. Well, until stuff gets digged out for construction... I was affected by the arson attack in Berg am Laim last year, took about twelve hours for power to get back.
- jerrysievert 5y agoWind, snow, and ice affect anything above ground. Doesn’t matter if 90% is buried if 10% isn’t.
- jerrysievert 5y agoDowntown core, everything underground, fire in the vault. That was the last outage I was living there for. Since there were 2 grid operators, I had power after about 6 hours, others across the street went days without.
- joosters 5y agoChange the boot order, so that network boot is after USB / SD card, or disable it completely?
- blibble 5y agothe new rom is supposed to have fixed this if it's a pi 4 you can upgrade the rom to the latest if it's a pi 3 you will have to put the rom on an sdcard (no eeprom on the board)
- deleted 5y ago[deleted]
- tjoff 5y agoCan't find anything about it, do you have more information?
- blibble 5y agoI think it was this one: https://github.com/raspberrypi/rpi-eeprom/blob/master/firmware/release-notes.md#2020-09-14-promote-the-2020-09-03-release-to-be-the-default-eeprom-images https://github.com/raspberrypi/rpi-eeprom/blob/master/firmwa... I had the same problem as you, updated my eeprom and the problem was fixed
- tjoff 5y agoThanks! I'll make sure to retry when I get a chance.
- bombcar 5y agoCan you get something that responds very quickly, even if only to tell it to reboot? Strange that it stops trying network boot; most of the systems I have will sit there and retry PXE boot if everything else fails.
- bartread 5y agoHow long are your power outages typically? Is it short enough you put the router and NAS on a UPS? Maybe have a backup generator for core services? I'm not saying this would work for you but for some people, like me, a down and dirty solution might work fine. I live in a village and short power outages (a few seconds to a couple of minutes) are relatively frequent, so a UPS covers many of my needs... for a short period of time, which is most of the time. For out of the ordinary scenarios, such as the recent Storm Eustice, I just bought a 2.8kW petrol powered backup generator (not a particularly expensive one: equivalent of about US$500). I don't have an automatic failover yet, but that may be the next stage. Still, enough to run fridge/freezer, router, my computer, and possibly my central heating pumps (still need to investigate that). The problem with UPSs is that they aren't necessarily quiet, and this pisses me off. I don't need loads of fan noise and beeping: I need some batteries in a box that will output a pure sine wave at 230V AC without making a big fuss about it, which is doable, but I'd also like it not to cost an arm and a leg.
- ClumsyPilot 5y ago"Is it short enough you put the router and NAS on a UPS? Maybe have a backup generator for core services?" Sometimes you donts want to have tons of equipment hanging around - for example I keep all my mit in a small closet to avoid unhappy wife syndrome.
- bartread 5y agoThis is fair. You need to have somewhere to put it. My generator lives in a small shed outside so that wasn't too hard, and you can get some pretty small UPSs, but if you need to keep things up for longer, or have a lot of kit to hook in they get pretty bulky.
- nsteel 5y agocan you use this option? https://www.raspberrypi.com/documentation/computers/config_txt.html#bootcode_delay https://www.raspberrypi.com/documentation/computers/config_t...
- Damogran6 5y agoIf your power is sketchy, get a UPS…I have one that powers the NAS, cable modem, switch and WiFi. (And pi hole. )
- jthrowsitaway 5y agoUntil this is "fixed" by the Pi project (indeed, most PCs will boot loop if no boot devices succeed), I'd try something like iPXE (loaded onto SD or USB.) That should be able to loop properly. https://github.com/ipxe/pipxe https://github.com/ipxe/pipxe
- shoo 5y agowhat i'm hearing is that you have insufficient pi. if the dhcp were a pi and the nas were a pi, then they'd be ready before your doing-stuff pi timed out
- Terry_Roll 5y ago> But my router supplying DHCP and with info about where it should look takes guessing 3 minutes. And the NAS containing the actual files that the Pi should load is in a virtual machine that takes, guessing, 8 minutes for the hypervisor and VM to start. And thats why people get paid to manage networked devices, if a contingency event occurs and the network doesnt come up properly, then its not setup properly. Logical thinking is one of the things the RPi makes people engage in, not superstition.
- tjoff 5y agoReally nothing wrong with the setup. Everything on the network handles it fine except for the pi. I'm curious what you think is wrong with it.
- zh3 5y agoI've been netbooting Pi's since the very early days and have been running networked sound since then (replacing earlier PC-based setup). Still running on the same old Pi 2's with Wolfson/Cirrus cards. SD cards are write-locked and all they do is load the kernel; as soon as the system boots, the root FS is mounted off the server (looping on failure, e.g. server not back up yet). Zero reason for the SD cards to wear out (no writes), the Pi's always come back after power fails (and we get plenty of them).
- sokoloff 5y agoWhat software are you using for networked sound? I’ve got three echo dots serving a whole house audio amp, but they’re a little clunky to use and I’ve piles of old RPis sitting around
- zh3 5y agoIcecast driven by mpd on the server; 'mpd' output is also captured as raw PCM and sent over the network to anything that wants to play it back (playback software is just a hack that reads the data and dumps into the soundcard, basically it's pretty much a C program that implements 'netcat | alsa').