Tiny Core Base > Raspberry Pi
update picore release without mastering image
Rich:
Hi meninblek
--- Quote from: meninblek on July 30, 2024, 02:45:17 AM --- ... what about mbr? i need to change first 512 byte or no? ...
--- End quote ---
The MBR includes start and end location as well as size of each
partition, so it should be copied too.
There is no guarantee partition 1 won't change size from version to version.
You'll want to expand partition 2 so that the size of P1 + P2 is slightly smaller
than what's on your remote device. I think P1 starts on a 1 Megabyte
boundary, so maybe leave 2 Megabytes of un-allocated space at the end of
your remotes storage device so you don't fall off of the end when accessing it.
Paul_123:
Partition sizes could change. It would best to read the partition table from the image, then deal with it appropriately.
meninblek:
Sorry, I correct myself: i meant PBR, not MBR.
MBR store partition size and flash ( boot partitone, ecc), I don’t think there’s any reason to change it: my remote device is the same,I want just delete older files and copy newer ones, i don’t want dd-ing whole partition.
The PBR of /dev/mmcblk0p1 store bootloader and my question was about it:bootloader could change? It could be load new kernel and new image?
Paul_123:
Raspi updates the bootloader often and it can be kernel specific changes, that's why I said everything on partition 1 needs to be copied.
CentralWare:
@Rich already has a partial answer posted at: https://forum.tinycorelinux.net/index.php/topic,24063.msg151721.html#msg151721
Here is what I would do:
* Mount the primary partition of 15.x (all of the RasPi files)
* Delete /mnt/mmcblk0p1/(everything) and copy the above mounted content into mmcblk0p1
* The device is now upgraded to 15.x but the extensions are not
* Mount the second partition of 15.x (the TCE content)
* Delete all files found in /etc/sysconfig/tcedir/optional
* Rename /etc/sysconfig/tcedir/onboot.lst to onboot.old
* Copy [your 15.x mount]/tce/optional to /etc/sysconfig/tcedir/optional
* Copy [your 15.x mount]/tce/onboot.lst to /etc/sysconfig/tcedir/optional/onboot.lst
* Reboot
Your RasPi should now be running 15.x with its default setup and extensions. If you have a backup file from 14.x with custom /opt or similar, you may experience errors if it tries to find extensions which only existed in your 14.x install. To help correct this you could install at least most of them by using your onboot.old file:
--- Code: ---while read -r line
do
echo "${YELLOW}
tce-load -wi $line
done < /etc/sysconfig/tcedir/onboot.old
--- End code ---
Pay attention to any entries which fail as they'll have to be done manually.
@Paul_123: For x86 and x64 there's 15.x/x86/release/distribution_files which contains the boot files for 80x86 releases. What is your opinion of having a similar resource directory for RasPi on the repo?
On our end, this is how we do it:
--- Code: ---14.x
\__ armv7
\__ releases
\__ distribution_files
\__ mmcblk0p1.tar.gz
__ mmcblk0p2.tar.gz
__ raw
\__ mmcblk0p1 (all the files from mmcblk0p1.tar.gz)
\__ mmcblk0p2 (all the files from mmcblk0p2.tar.gz)
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version