gn77b
Posts: 9
Joined: Sun Feb 21, 2021 6:32 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Mon Apr 26, 2021 11:41 am

jharris1993 wrote:
Sun Apr 25, 2021 6:50 pm
Oh god no!
I've done that and, invariably, things will go wrong - either now or when you back up.
I beg to differ.

I was able to delete, move and resize partitions without issue and then perform a successful update to one of the OSes from an USB stick. For the record, I'm currently running LIbreELEC 10, LibreELEC 9, Moode Audio and Twister OS. The partitions I deleted were for RPi OS. All OSes still work perfectly. But, I repeat, I needed to update config.txt in the boot partitions and /etc/fstab in the data partitions to reflect the changes (new UUIDs and partition numbers). I'm not saying nothing can or won't go wrong, all I'm saying is that this worked for me. I made a backup image before each critical step but I didn't need to revert back. To be honest I didn't expect this to go so smoothly myself but...

Maybe procount will jump in and clarify the issue.

User avatar
procount
Posts: 2516
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: STICKY: PINN - An enhanced version of NOOBS.

Tue Apr 27, 2021 7:42 am

@gn77b, @jharris1993
In my opinion, you are both right. It depends on your experience, capability and knowledge of the system.
I wouldn't recommend this approach to a beginner, and would guide them through the approach that JIm suggested.
If you know what you are doing and how the system works, you can certainly adapt the system with gparted.
Linux, after all, comprises a toolbox of utilities to help you achieve your goals. PINN is just one utility in your arsenal, but it is not the only one.

Most OSes will just need the cmdline.txt and fstab files updating when partitions move, but others are more complex.
PINN already has the re-run partition script option in the fix up menu to help adapt an OS to its location, but it would need enhancing to cover the situation where OSes have actually moved partitions.

I hope to expand PINN's capabilities to cover more of this sort of scenario in the future as it becomes more necessary. The same for the transfer of SD cards to bigger SSDs. But it is a slow process to adapt the NOOBS architecture to include such things that it was never intended to do.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

THX1182
Posts: 54
Joined: Fri Oct 11, 2019 6:24 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Wed Apr 28, 2021 12:20 pm

Hi procount...

Quick question...

Is it possible to switch from an OS on the SD card to an OS on SDD from within the PINN menu?

I have the latest lineage (konstakang) 18.1 installed on an SD card, and would like to easily switch from SD to SSD.

I was having issues with lineage 17.1 booting from the SSD in PINN.

Is it possible???

Thanks in advance!!!

User avatar
procount
Posts: 2516
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: STICKY: PINN - An enhanced version of NOOBS.

Wed Apr 28, 2021 8:48 pm

Not quite sure what you mean by "switch"
Providing the OS supports it, PINN can install an OS to the SD card or to an SDD. But you can't mix and match. There are just 3 options:
1) PINN and all OSes installed to SD card
2) PINN and all OSes installed to USB/SDD/HDD.
3) PINN and all boot partitions on SD card and rootfs partitions on USB/SDD/HDD.
I assume you have read Konsta's FAQ on how to run LineageOS from USB, as there are some additional steps you need to make.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

gn77b
Posts: 9
Joined: Sun Feb 21, 2021 6:32 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Sun May 02, 2021 3:59 pm

Hi procount

A suggestion this time. Maybe others won't agree, just sayin. Maybe it would be a good idea to allow selection of the OS in the boot menu without the use of a mouse cursor? It's pretty annoying to navigate with the TV remote. I'd use something similar to BerryBoot, simply using the up-down keys to select from the list and maybe add another item in the list for the advanced menu?

User avatar
procount
Posts: 2516
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: STICKY: PINN - An enhanced version of NOOBS.

Sun May 02, 2021 5:24 pm

I'm pretty sure this is supported already. If not, or if it doesn't work for you, just edit cec_keys.json to map 2 keys to the up & down keys.

TV remotes are all different, but the mouse cursor emulation should work on most of them, which is why it is the default.

See my wiki on GitHub for more info on the key mapping.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

gn77b
Posts: 9
Joined: Sun Feb 21, 2021 6:32 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Wed May 05, 2021 10:48 am

OK, got it. I changed the mappings and it works as expected.

jharris1993
Posts: 247
Joined: Sat Oct 05, 2013 10:26 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Fri May 07, 2021 5:30 pm

Procount,

This is a suggestion that you can implement if and when you choose:

Suggestion:
Place in your signature a link that ALWAYS points to whatever the very latest-and-greatest PINN release happens to be.

This way if someone, (like me!), decided to download a shiny, new, and fresh copy of The Latest And Greatest Version of PINN - I don't have to jump all the way back to page 1, post 1. (You do realize that page 1, post 1 is a LONG WAY from here, right?)

If you could make that link, (as well as the link to the PINN sticky that's there), a clickable link, that would be even better.
/Suggestion

P. S.

Did you ever release the version of PINN with all the USB updates you put in there?
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

User avatar
davidcoton
Posts: 6272
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: STICKY: PINN - An enhanced version of NOOBS.

Fri May 07, 2021 6:42 pm

jharris1993 wrote:
Fri May 07, 2021 5:30 pm
Place in your signature a link that ALWAYS points to whatever the very latest-and-greatest PINN release happens to be.

This way if someone, (like me!), decided to download a shiny, new, and fresh copy of The Latest And Greatest Version of PINN - I don't have to jump all the way back to page 1, post 1. (You do realize that page 1, post 1 is a LONG WAY from here, right?)
You do realize, that with the two standard Forum themes, Page 1 is only a single click from here? Then you get the release summary and the download links in the first post!
Location: 345th cell on the right of the 210th row of L2 cache

BRX7
Posts: 93
Joined: Sat Aug 31, 2019 11:07 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Fri May 07, 2021 11:35 pm

Hello @procount
Is there a fresh image of ubuntu as it wont boot for me,
Im going to try build 21 and copy its boot and root manually over the pinn installed ubuntu..

Using rpi4 8gh with latest April eeprom

jharris1993
Posts: 247
Joined: Sat Oct 05, 2013 10:26 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Sat May 08, 2021 10:37 am

BRX7 wrote:
Fri May 07, 2021 11:35 pm
Hello @procount
Is there a fresh image of ubuntu as it wont boot for me,
Im going to try build 21 and copy its boot and root manually over the pinn installed ubuntu..

Using rpi4 8gh with latest April eeprom

Have you tried re-installing the Ubuntu image from online? Sometimes, very seldom but it does happen, you get a bad download.

Try again and see what happens.

Oops!
I just noticed the system - 8 gb pi-4. There are some issues with operating systems not being compatible with the Pi-4 8 gig version. Ubuntu may be one of the operating systems that does not work. There are several that don't.

Test:
1. Download the latest Raspberry Pi O/S and install to an SD card and try that. If that works then:
2. Download and install the latest Ubuntu image and do a direct install to a SD card using a utility like Etcher.

See if that works.
If that doesn't work, then you know that the current version of Ubuntu for the Pi isn't compatible with the 8 gb Raspberry Pi-4, and there's nothing you can do until they release an update that fixes the issue.

If that DOES work, then check the version of Ubuntu against the version PINN has. They might be different.
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

Johanba
Posts: 1
Joined: Sun May 09, 2021 6:56 am

Re: STICKY: PINN - An enhanced version of NOOBS.

Sun May 09, 2021 2:32 pm

Need some advise on the PINN App
Can I load my own OS into one of the project spaces, and if so how would I go about it
I looked at some documentation but could not find the right answer

Thanks for the help
Johan

cleverca22
Posts: 3802
Joined: Sat Aug 18, 2012 2:33 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Sun May 09, 2021 4:58 pm

procount wrote:
Tue Jan 19, 2021 11:16 pm
4. Alternatively, you can create an autoboot.txt file on the PINN partition, which should contain "boot_partition=n" where n is the boot partition to choose. This is actioned by the firmware and will bypass PINN altogether.
i was recently poking around in the firmware binary, and re-discovered boot_partition, and couldnt find it anywhere on the forums (the search sucks, and was turning up "boot partition")

after a bit of testing, i found it had to be in autoboot.txt (hence finding this post)
but i also found something that looks very useful, allowing it to be far more flexible

Code: Select all

[root@system76:~]# cat /mnt/autoboot.txt
gpio=26=ip,pu

[gpio26=0]
boot_partition=2

[gpio26=1]
boot_partition=3
all of the usual conditional statements (that bootcode.bin supports) work in autoboot.txt!
so you could program autoboot.txt to always boot into say raspi-os, on the first boot (skip loading pinn, then rebooting to raspi-os)
but if a given gpio pin is in a certain state, it will instead load pinn

jharris1993
Posts: 247
Joined: Sat Oct 05, 2013 10:26 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Sun May 09, 2021 7:14 pm

all of the usual conditional statements (that bootcode.bin supports) work in autoboot.txt!
so you could program autoboot.txt to always boot into say raspi-os, on the first boot (skip loading pinn, then rebooting to raspi-os)
but if a given gpio pin is in a certain state, it will instead load pinn

. . . . or

Have the default (no GPIO) boot PINN, but boot direct to an OS if a GPIO pin is low. With a configuration like that, you can ALWAYS boot to SOMETHING useful, even if the card is out of the box and sitting on the bench for test. The default boot becomes PINN, and there you can select an OS to boot, or go into PINN's recovery shell if things are totally borked up.

When in the box, and with the GPIO header attached, you can boot direct to whatever you want skipping the 2x boot process.

This would totally obviate the need for a fancy, (and difficult to maintain), pinn_init script.

Cool Beanies!

I'm going to have to try that.
Last edited by jharris1993 on Mon May 10, 2021 8:20 am, edited 1 time in total.
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

User avatar
procount
Posts: 2516
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: STICKY: PINN - An enhanced version of NOOBS.

Sun May 09, 2021 8:18 pm

@cleverca22 - interesting. I never knew that. It will make Jim's project easier. Thanks for posting.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

cleverca22
Posts: 3802
Joined: Sat Aug 18, 2012 2:33 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Sun May 09, 2021 9:20 pm

procount wrote:
Sun May 09, 2021 8:18 pm
@cleverca22 - interesting. I never knew that. It will make Jim's project easier. Thanks for posting.
internally, bootconf.txt (spi flash), config.txt, and autoboot.txt are all ran thru the exact same parsing function, and the only difference is the array detailing what options are valid

jharris1993
Posts: 247
Joined: Sat Oct 05, 2013 10:26 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Mon May 10, 2021 8:26 am

cleverca22 wrote:
Sun May 09, 2021 9:20 pm
procount wrote:
Sun May 09, 2021 8:18 pm
@cleverca22 - interesting. I never knew that. It will make Jim's project easier. Thanks for posting.
internally, bootconf.txt (spi flash), config.txt, and autoboot.txt are all ran thru the exact same parsing function, and the only difference is the array detailing what options are valid

Is it possible to detail what is parsed, on a machine-by machine basis?
(i.e. Pi-1 to Pi-3, Pi-4, Pi-zero, etc.)

I have been trying a strictly copied to root partition method of multi-booting - because I want to become more knowledgeable in all the different boot protocols and methods. One of the huge problems is keeping the config.txt files synchronized across subdirectory boundaries because I don't know what I can exclude.

I am considering returning to a PINN based boot paradigm because it make boot synchronization much easier - especially after an update.
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

cleverca22
Posts: 3802
Joined: Sat Aug 18, 2012 2:33 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Mon May 10, 2021 11:24 am

jharris1993 wrote:
Mon May 10, 2021 8:26 am
Is it possible to detail what is parsed, on a machine-by machine basis?
bcm2711 has 3 classes of options

bootconf.txt options must fall within this list: DHCP_OPTION97, XHCI_DEBUG, NETCONSOLE, ENABLE_SELF_UPDATE, USB_MSD_PWR_OFF_TIME, HDMI_DELAY, SD_BOOT_MAX_RETRIES, BOOT_UART, WAKE_ON_GPIO, POWER_OFF_ON_HALT, NET_BOOT_MAX_RETRIES, USB_DEV_BOOT_MAX_RETRIES, USB_DEV_FILE_TIMEOUT, USB_MSD_DISCOVER_TIMEOUT, USB_MSD_LUN_TIMEOUT, USB_MSD_VID_PID, DHCP_TIMEOUT, DHCP_REQ_TIMEOUT, TFTP_FILE_TIMEOUT, TFTP_IP, PXE_OPTION43, BOOT_ORDER, MAX_RESTARTS, TFTP_PREFIX, TFTP_PREFIX_STR, MAC_ADDRESS, DISABLE_HDMI, CLIENT_IP, SUBNET, GATEWAY, FREEZE_VERSION, VL805

the BOOT_ORDER controls what order it goes thru devices when searching for the initial fat32
once it finds the initial fat32, it will parse autoboot.txt, which only has a single valid option, boot_partition

it will then load config.txt from the boot partition, and parse one of the following options:
bootloader_update, eeprom_write_protect, boot_load_flags, bootcode_delay, gpu_mem, gpu_mem_1024, gpu_mem_512, gpu_mem_256, require_total_mem, total_mem, start_x, start_debug, uart_2ndstage, fixup_file, start_file, sdram_freq


for all 3 files, it supports the usual conditional elements, all, none, pi0w, pi1, pi2, pi3, pi3+, pi4, pi400, cm4, and the special gpio one
all of that, is based on pieeprom.bin from 2021-03-04


for everything before the bcm2711, the code looks very different, but still has the same general features
boot_partition is only valid in autoboot.txt
config.txt can contain: gpu_mem, gpu_mem_256, gpu_mem_512, gpu_mem_1024, total_mem, require_total_mem, startx, start_x, start_debug, legacy_mapping, bootcode_delay, force_pvt, uart_2ndstage, start_file
it appears to support nearly the same range of conditionals, but pi0 joins the list, and all of the pi4 ones leave

jharris1993
Posts: 247
Joined: Sat Oct 05, 2013 10:26 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Mon May 10, 2021 9:21 pm

procount wrote:
Sun May 09, 2021 8:18 pm
@cleverca22 - interesting. I never knew that. It will make Jim's project easier. Thanks for posting.

I just tested this out by creating the following autoboot.txt file and "dotting out", (marking hidden), the pinn_init.conf file:

Code: Select all

#  autoboot.txt file to automatically boot based on a GPIO pin selection

# Setup GPIO pins, set as inputs, (ip), pulled high, (pu).
#
# Pin/dip-switch mapping for GPIO O/S selection:
# Dip-switch   Broadcomm pin   Physical pin
#    1		   21		   40
#    2		   26		   37
#    3		   20		   38
#    4		   19		   35
#    5		   16		   36
#  common	 ground		   39

gpio=21=ip,pu
gpio=26=ip,pu
gpio=20=ip,pu
gpio=19=ip,pu
gpio=16=ip,pu  # reserving this pin for O/S bitness selection

# GPIO pin 16 is tested within the individual O/S config.txt files and enables the 64 bit kernel if low.

[gpio21=0]
# Raspbian for Robots
boot_partition=6
[all]

[gpio26=0]
# GoPiGo O/S
boot_partition=8
[all]

[gpio20=0]
# Raspberry Pi O/S (32 bit)
boot_partition=10
[all]

[gpio19=0]
# Raspberry Pi O/S (64 bit)
boot_partition=12
[all]

Each dip-switch position causes the device to immediately boot to the desired O/S, (no funky boot-delay), and with none selected, it pauses for a few moments, displays the rainbow, and boots into PINN which is my desired "nothing selected" default.

I am jumping up and down!

I hate to sound like I'm spitting on all the work procount and I did with the pinn_init.conf file, but this literally trivializes the process. And I mean it. It takes months of head-banging, hair pulling, and slamming the angst meter against the stop and turns it into a no-brainer that any punter wannabe who can read, (!!), can do in a matter of minutes once the PINN partitions are set up and populated with operating systems.

However, I'm NOT complaining. I learned A LOT, which is the most valuable return on investment I can imagine.

And to be honest with you, given my choice, I'd rather have a solution that any punter wannabe can do instead of something that requires a PhD in Chemistry and Physics to accomplish.

I just hope procount isn't pissed TOO much. . . .

What both procount and I learned about the pinn_init process will be invaluable if I, (or anyone else for that matter!), ever needs to do something in the future where the dip-switch is a binary-weighted value instead of a bunch of select-bits. That is something that cannot be done in the config.txt and/or autoboot.txt - it will require the pinn_init.conf file and the advanced coding it allows to make that happen.

I am still planning on helping procount with the documentation once I feel I know enough about the absolute boot process to speak intelligently to it.

All of these little tips, "gotchas", and such will be valuable information to put in the documentation. . .

I'm still testing. . . .

Thanks Hugely!
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

cleverca22
Posts: 3802
Joined: Sat Aug 18, 2012 2:33 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Mon May 10, 2021 9:30 pm

jharris1993 wrote:
Mon May 10, 2021 9:21 pm
I hate to sound like I'm spitting on all the work procount and I did with the pinn_init.conf file, but this literally trivializes the process.
i think the biggest improvement procount could do, is auto-generate an autoboot.txt like yours, from a GUI
so you just tell pinn what pin should boot into each os, it creates the config for you, and boom your done!

jharris1993
Posts: 247
Joined: Sat Oct 05, 2013 10:26 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Mon May 10, 2021 10:20 pm

cleverca22 wrote:
Mon May 10, 2021 9:30 pm
i think the biggest improvement procount could do, is auto-generate an autoboot.txt like yours, from a GUI
so you just tell pinn what pin should boot into each os, it creates the config for you, and boom your done!

That might be nice, but procount has so much on his plate as it is. You wanna take a crack at it and submit a pull request? ;)
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

cleverca22
Posts: 3802
Joined: Sat Aug 18, 2012 2:33 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Mon May 10, 2021 10:28 pm

jharris1993 wrote:
Mon May 10, 2021 10:20 pm
That might be nice, but procount has so much on his plate as it is. You wanna take a crack at it and submit a pull request?
if i touch the pinn codebase, i may not stop until ive written it to skip a firmware stage!

in theory, pinn could be in a start(4).elf file, and skip the arm core entirely, making it boot even faster

jharris1993
Posts: 247
Joined: Sat Oct 05, 2013 10:26 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Tue May 11, 2021 1:17 pm

Different topic, functional question:

When PINNifying a file, the directions say to use BSD tar because of some particular advantage it has over the regular, plain-vanilla GNU tar, and these advantages are, apparently critical to making a good PINNified package. So critical in fact that procount actually suggests downloading a specific version of BSD tar and compiling from source to get the version he wants you to use.

However, looking at the way PINN handles backups and restores, it appears that the operating system files are packaged using GNU tar, not BSD tar.

This leads to the following musical questions:
1. Why doesn't the backup/restore process use BSD tar if the use of BSD tar is so critical for packaging the files?
2. If GNU tar is sufficient, why do we have to use BSD tar to create the PINNified installer package?

Thanks!
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

User avatar
procount
Posts: 2516
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: STICKY: PINN - An enhanced version of NOOBS.

Tue May 11, 2021 9:31 pm

If you really want to go down this rabbit hole, you can have a read of these posts at https://github.com/raspberrypi/noobs/issues?q=bsdtar, starting at the bottom and working your way up.
Like most things, it's a compromise and no single tool will cope with all the variety of OSes I cater for these days.
You may find that GNU tar will work for YOUR OSes, but I think bsdtar will work for a wider range.
PINN cannot backup all OSes (e.g. due to the limitations of using uClibc, or the file system, like in XBian), which is one reason for the disclaimer to test all backups, but I try hard to backup as many as possible.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

jharris1993
Posts: 247
Joined: Sat Oct 05, 2013 10:26 pm

Re: STICKY: PINN - An enhanced version of NOOBS.

Wed May 12, 2021 10:25 am

OK. I get it.

BSD tar handles a wider range of attributes and permissions than the "stock" GNU tar does, and it's needed to package the more escoteric distributions. (This was mentioned in the packaging instructions, BTW.)

But that still doesn't answer the question of why you used GNU tar for the backups?

Maybe I don't understand something, but it seems to me that if program [x] is needed to package the file in the first place, then it makes sense that the same program [x] should be required to re-package it for the backup process.

Maybe this is the reason for some of the strange behaviors I sometimes experience with restored copies of my Raspbian re-spins? (Like when Raspbian 64 bit restored with messed up permissions in some directories.)

What am I missing here?

P.S.

Apologies if I am being a pain.

I'm not trying to bust chops - I genuinely want to understand the logic behind this beast of a program!

In fact, I would like to become somthing of a "subject matter expert" on PINN so that when I start working on documentation I can explain ALL the parts needed for effective use.
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

Return to “General discussion”