![]() |
A Few Notes about the Raspberry Pi Imager - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: A Few Notes about the Raspberry Pi Imager (/showthread.php?tid=5468) |
A Few Notes about the Raspberry Pi Imager - TheOldPresbyope - 03-27-2023 So you've read Tim's announcement that moOde is now a first-class citizen among the OSes offered by the Raspberry Pi Imager (as one of the media player OSes). Neat. While the GUI-based tool is easy to use, some of us like to know what's happening under the covers. The actual code is named rpi-imager (on Linux-like systems) or rpi-imager.exe (on you know what) and can be invoked from the command line. I recommend reading the rpi-imager man page included in the install (at least in Linux). As well, the source is maintained in a Raspberry Pi repo and the README.md file there makes for good reading. There's lots of tricks available from the command line for advanced users. A few things I've noticed-
Regards, Kent RE: A Few Notes about the Raspberry Pi Imager - Nutul - 03-27-2023 This is very nice, indeed. It would be fantastic if it also allowed the whole configuration from the command line... ;-) RE: A Few Notes about the Raspberry Pi Imager - TheOldPresbyope - 03-27-2023 (03-27-2023, 06:14 PM)Nutul Wrote: This is very nice, indeed. I get that...but AFAICT tell it's complicated. Maybe if I were proficient in C++ I would think otherwise. Check the github issues log for some related discussion. The Imager creates a firstrun.sh file in the /boot directory and all the magic about the first user/pw and its home directory, as well as SSH, WiFi, etc., gets done by it during, you guessed it, first boot. Then it deletes itself. This isn't all that different from what traditionally happened with the moodecfg.ini file, if present. Obviously, though, firstrun.sh is executed directly in the shell. To an extent they overlap in functionality. If the .ini file is present at first boot now, settings in it may supersede some settings made by firstrun.sh---notably hostname and WiFi configuration. Still, I continue to add in moodecfg.ini because it gives me more control over moOde as opposed to just Raspberry Pi OS. I'm thinking that for my own use I may cobble together a solution of my own strictly for moOde which would flash a new player where all my "standard" settings remain the same except for the hostname (and renderer names based on it)---but I sure wouldn't want to offer it up and then have to support it ![]() Regards, Kent PS - Boy does it get boring watching the progress bar creep forward as I repeatedly flash uSD cards to test what's going on. I need to get myself some super-fast cards. RE: A Few Notes about the Raspberry Pi Imager - Nutul - 03-27-2023 (03-27-2023, 08:35 PM)TheOldPresbyope Wrote:(03-27-2023, 06:14 PM)Nutul Wrote: This is very nice, indeed. Hi Kent, thank you for taking the time looking into its source code. The fact it creates a shell script (well, what else would you do on a Linux machine, actually???) makes things very easy - download the image / patch it / flash it. But I'll have a look at it tomorrow afternoon. RE: A Few Notes about the Raspberry Pi Imager - TheOldPresbyope - 03-27-2023 Quote:download the image / patch it / flash it. What I have in mind, skip Imager cuz I don't need a universal tool, just a little script so my fingers don't have to leave my hands, as an old joke used to go. RE: A Few Notes about the Raspberry Pi Imager - Nutul - 03-27-2023 (03-27-2023, 09:45 PM)TheOldPresbyope Wrote:Quote:download the image / patch it / flash it. Yes, that's my final idea too. We have dd, right? :-) RE: A Few Notes about the Raspberry Pi Imager - Tim Curtis - 03-27-2023 (03-27-2023, 09:45 PM)TheOldPresbyope Wrote:Quote:download the image / patch it / flash it. Just an FYI but placing a moodecfg.ini or moodebackup.zip file in the /boot directory still works just as before because these files get processed much later in the startup sequence than the Imager generated firstrun.sh file. IIRC some of the issues in the Imager repo discuss adding an option that would allow a custom script to run but I'm not sure that would be useful for moOde. What would be useful would be an option that displayed a File chooser that placed the selected file in the /boot directory. RE: A Few Notes about the Raspberry Pi Imager - TheOldPresbyope - 03-27-2023 Ah, yes, the backup file. Sorry I didn't mention it. Typically, though, my heaviest usage is in flashing new players (constantly popping out "virgin" players to test one user issue or another) rather than bringing forward a backed-up system. Different strokes for different folks! Regards, Kent RE: A Few Notes about the Raspberry Pi Imager - Nutul - 03-28-2023 (03-27-2023, 10:47 PM)TheOldPresbyope Wrote: Ah, yes, the backup file. Sorry I didn't mention it. The main thing being the user creation and SSH activation, only throwing that bash script in will do. The backup, of course, will take care of restoring all the player-specific configurations. |