Boot sequence issues / improvements
Jeffrey Lee (213) 6048 posts |
I’m interested in trying to collect together a list of all the different problems or potential areas of improvement with the boot sequence, so that some brave soul may attempt to find solutions to them (whether that’s by patching them up one-by-one or making more drastic sweeping changes to the OS/boot sequence). Topics I can think of include:
|
John Williams (567) 768 posts |
Some observations on that: Modules such as ! NoError exist to cancel such error boxes after a short (pre-set) period – useful on headless/unattended machines. The application WimpLog (which I see I have in Tasks itself – does it need to be earlier? Perhaps add-a-pling?) permits SysLog to record Wimp error messages – but can SysLog itself be invoked early enough – mine is in Resources? Need to study sequence of booting! Now where is that chart showing it all? |
Dave Higton (1515) 3534 posts |
One small contributor to a solution might be to add the facility for a multi-tasking Wimp error box. The concept has been suggested and discussed before. The Wimp would have to own these error boxes AFAICS because whatever raised them would likely no longer exist. |
Rick Murray (539) 13850 posts |
Repeat ideally needs to be replaced with something that can report/log the error and then carry on. This was one of the main points behind Harinezumi – to go through replacing the behaviour of BootLoad/BootRun logging as it did so.
No. No matter how serious the error, the reality is that the boot sequence is a hodge-podge of barely interacting things. It’s just a load of “do this at the start” activities. There may be things which depend upon earlier stuff having worked, one would expect these to error out in the case that the earlier part failed.
Yes. One should consider a boot error to be an important error that the user should be notified about. There are utilities to make error boxes go away – I think I emailed a copy of my NoError clone “ErrorCancel” (that also sends the error text to DADebug) to the code submissions (did I? or did I mean to? hmmm…!) If anybody is interested, I’ve dropped a copy of the source here: http://heyrick.ddns.net/files/errorcancel.txt
Pick up Service_WimpReportError. Registers R4+ are the same as those passed to Wimp_ReportError (R0→R4 etc) so you can pick up the message text from there. See above source. Tested in all versions of RISC OS that I have back to 3.50.
This is why Harinezumi logs everything and not just errors. It’s fairly clear what is going on if you know how the boot is supposed to run so can match up log to “things to do”. But if not, well, then you probably ought to leave it alone.
If it is breakable, users will find a way. ;-)
In response, I would offer:
That’s why I use static IP here. After a power cut (or power up after a thunderstorm), the Pi is ready in around 15 seconds. The Livebox takes at least ten times that.
I have an RTC on my main machine, but that is indeed a very important problem. I’m not sure how best to deal with it, either, given the problem that RISC OS boots stupid-fast and domestic home routers, not so much…
Can’t RISC OS boot from ShareFS? One extra spanner to throw in the works – ROLtd bodged their boot sequence to support multiple users. I have no such version of Select/Adjust so I don’t know how it works and therefore Harinezumi simply doesn’t support such machines. |
Rick Murray (539) 13850 posts |
What if there were multiple boot errors? |
Dave Higton (1515) 3534 posts |
Sorry, perhaps I should have made it clear that I expect the Wimp to be able to display lots, like ordinary multi-tasking windows. When the error box is single-tasking, there’s no question, because, while one is displayed, no other Wimp task runs and therefore no other Wimp task can cause an error box to be displayed until the existing one has been dismissed. This limitation disappears as soon as the thing is defined as multi-tasking. The only disadvantage I can see is that you might not know which came first. How important that is, I don’t know. |
Steve Pampling (1551) 8172 posts |
Apologies to anyone that gets bored or loses the will to live before the end of this.
Wrong viewpoint. Record the error then pop up a wimp message (if required – config option)
Option 1 and 3 seem prime changes. Option – store in ROM would have to go hand in hand with option 3 so that you’re looking at System boot vs. User boot
Perhaps set a process identifier before running each process and print that identifier at the start of each recorded event (who said we only wanted to record the errors?)
No argument there, but I think updating the whole network stack is a bit of mountain to move and probably doesn’t fit well with the probable need for multiple iterations of alteration of the boot before it is satisfactory. You just know it won’t be perfect first time.
Indeed, but possibly something to do as the next on the list after the boot changes
Two consequences of alteration so it triggers of a network link detect:
That and forgetting to connect your network cable doesn’t require you to reboot to pick up a working IP connection and Rick can have his router reboot and cause the Pi to initialise the network stack when the router decides to offer a live port.
Two things:
Don’t block, it’s a pain in various ways. Check for the network viability and default to a fallback value of last recorded time plus small margin. DO record the event as “probable date time inaccuracy” or “NTP time established” in our Boot SysLog
Again, that’s more a network stack item. i.e. after the !boot has been amended to a more resilient form then it’s time to look at the network stack. Really speaking network booting is two things:
If you move the system boot into ROM then the logical thing to do is check for a CMOS setting for use of the PXE boot you have also embedded in the ROM (or possibly utilise U-boot facilities which I think include a network boot option) At this point I realise that perhaps a PXE boot is something that would be useful in the process of developing a new boot sequence. It may however be a bit of a long development (unless the U-boot / NetBSD port PXE is a quick option) ###############
Now you know Zap is broken :)
The code in WimpLog pushes the text of the error to SysLog. Since SysLog has an archiving facility and control over the level of verbosity of the logged events I would say it is the way the bootlogs should be handled. |
Steve Pampling (1551) 8172 posts |
Record it via SysLog then pop up the message. If the sequence is important then the sequence is recorded in SysLog. |
John Williams (567) 768 posts |
So we incorporate SysLog in ROM to get it active from the very start? Seems logical. |
Chris Mahoney (1684) 2165 posts |
I tried to write a module once that would issue a new DHCP request when you connected the cable. I don’t remember the specifics, but the documented service call for connecting a cable didn’t actually happen so there was no event to listen for. Fixing that would be useful! Although that has nothing to do with cleaning up Boot. I’m in favour of putting at least some of it into ROM. Once it’s in ROM there’s no need for it to be universal, so some of the “Hook” directories can disappear. I’d even question whether the disc-based Hooks need to be separated by OS anymore; if Boot isn’t universal then just dump everything into a single Hook directory rather than trying to separate it out by supported OS. Ideally a given module would terminate cleanly if it doesn’t work on the current OS anyway. What is Boot.Library? I’ve never customised this but Rick said he had in one of the other threads. |
Andrew Conroy (370) 740 posts |
I have a BASIC app which I use to do this, makes life much simpler. Not all Ether modules follow the spec, you’re right, I had to use various exceptions for different Ether modules. |
David Feugey (2125) 2709 posts |
There is pre-Wimp (all that is needed to boot to Wimp) and Wimp (all that is post Wimp launch, and so will not block it). IMHO, everything that is Wimp could be individual components (!Configure, !Desktop, !Fonts, !Trash, !Scrap, !Modules, etc.) placed in a !System directory, separated from the initial !Boot. When, all these components could get their own lifecycle. !Boot could be in ROM or not, but will be very simple. And not user configurable. |
Dave Higton (1515) 3534 posts |
The other way that should have been obvious to me, but only occurred to me a few hours ago, is for there to be still only one multi-tasking error box, but to store all the info for all of the requests to open it in a list. So when you ack a box, it re-opens with the next message. |
Steve Pampling (1551) 8172 posts |
You mean a GUI reader for SysLog recorded messages. I think most people would like a record of the messages for later use so record it and read it later. Later being a flexible interval after the event. |
Dave Higton (1515) 3534 posts |
No – I want to see the messages happen (if they do) when they happen, although it makes perfect sense to have them logged too. |
Steve Pampling (1551) 8172 posts |
As I said earlier, wrong viewpoint. It isn’t a case of log it too. The logging isn’t an afterthought or option, the real time display is an option. |
Martin Avison (27) 1494 posts |
Reporter can log any errors raised during boot, and optionally all commands issued, without affecting them in any way. When the desktop is reached, the messages can all be displayed in a scrollable (and searchable) window with various colours used to aid readability. Messages are simply written to memory, so the overhead is minimised. Reporter can also:
Does this help at all? |
Steve Pampling (1551) 8172 posts |
If you’re offering the source code so that Jeffrey or someone can incorporate, some or all of, the features in the standard boot then it probably helps a lot. If SysLog (not necessarily the existing 0.20) is in the ROM, or its functionality is in the ROM, then logging is available from that point onward. It strikes me that an upload site for compressed error logs might be handy. Ticket based so it doesn’t present a site security hole or spam dump (Andrew H may care to comment on the viability of that) If this is done, it’s probably best done with a means of making error logs available to developers for bug tracing without filling the forum with large log files. |
Alan Adams (2486) 1149 posts |
Include the current time as part of the message. |