View previous topic :: View next topic |
Author |
Message |
dbishop Tux's lil' helper
Joined: 08 Dec 2007 Posts: 107
|
Posted: Mon Jan 18, 2021 5:47 pm Post subject: Re-pack rp4b genpi64 image to include updates |
|
|
I have a nice updated version of genpi64 running on a RP4B and a 32GB sdcard. I would like to deploy this to a few others, using 128GB sdcards, and one 16GB sdcard.
I would like create a new image based on this fully updated one, so that I can install on other sdcards that is independent of sdcard size (like the original genpi64 image I started with)
What are the steps to do this, starting from the updated filesystem on sdcard image? I can mount the sdcard in a desktop running gentoo.
I plan to make a number of pi4b's from this image. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Mon Jan 18, 2021 6:25 pm Post subject: |
|
|
dbishop,
You need to make a disk image in a file so that that file becomes your image.
Some bits of this image, like the partition table, are outside of filesystem space, so copying/tarring filesystems won't do it.
The trivial way to make a disk image in a file is to use dd to make a block by block copy of the device. That won't quite work for you as you have both smaller and larger SD cards to install the image on.
You need to make an image that is smaller than the smallest SD card you want to install on then include Sakais scripts that resize root, which must be the last partition in the image.
Those scripts are in Sakakis genpi64 overlay. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
dbishop Tux's lil' helper
Joined: 08 Dec 2007 Posts: 107
|
Posted: Mon Jan 18, 2021 7:37 pm Post subject: |
|
|
My first thought was to use fsarchiver, but as you say, that doesn't help the sdcard root.
I have no idea what sakaki's scripts are called or how to use them or where to find them. Hence the question.
I did actually do this with fsarchiver -- installed sakaki's image, ran it to resize to the sdcard extents, then used fsarchiver restfs to replace the original fs.
sdcards in my experience are a little unpredictable regarding exact space, even from the same product from the same manufacturer, making dd a particularly bad choice imho. I also did by manually extending the partition.
I was hoping for something more elegant.
I also get this when trying to sync portage:
Quote: | ~ # eix-sync
* Syncing all portage overlays
* Fetching remote list...
* Fetch Ok
* Syncing selected overlay(s)...
* Running emerge --sync
>>> Syncing repository 'gentoo' into '/var/db/repos/gentoo'...
* Using keys from /usr/share/openpgp-keys/gentoo-release.asc
* Refreshing keys via WKD ... [ !! ]
* Refreshing keys from keyserver hkps://keys.gentoo.org ... [ ok ]
!!! getaddrinfo failed for 'isshoni.org': [Errno -3] Temporary failure in name resolution
>>> Starting rsync with rsync://isshoni.org/gentoo-portage-pi64-gem...
>>> Checking server timestamp ...
rsync: getaddrinfo: isshoni.org 873: Temporary failure in name resolution
rsync error: error in socket IO (code 10) at clientserver.c(137) [Receiver=3.2.3]
>>> Retrying...
!!! Exhausted addresses for isshoni.org
>>> Syncing repository 'genpi64' into '/var/db/repos/genpi64'...
>>> Syncing repository 'sakaki-tools' into '/var/db/repos/sakaki-tools'...
/usr/bin/git fetch origin
/usr/bin/git fetch origin
Already up to date.
=== Sync completed for genpi64
Already up to date.
=== Sync completed for sakaki-tools
* IMPORTANT: 1 news items need reading for repository 'genpi64'.
* IMPORTANT: 1 news items need reading for repository 'sakaki-tools'.
* IMPORTANT: 2 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
Action: sync for repo: gentoo, returned code = 1
Action: sync for repo: genpi64, returned code = 0
Action: sync for repo: sakaki-tools, returned code = 0
* emerge --sync failed
* Time statistics:
44 seconds for syncing
47 seconds total
|
Not sure at all what to do about that |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Mon Jan 18, 2021 8:56 pm Post subject: |
|
|
dbishop,
Look at Sakakis Overlay
Code: | sys-apps/rpi-onetime-startup
sys-apps/rpi3-expand-swap
sys-apps/rpi3-init-scripts | all look interesting.
That's what you get an Sakakis image. They self destruct after use as they intended to be used only once.
I agree that dd is a bad idea.
Determine how much space you need. Make an empty file a bit bigger than that.
Run Code: | fdisk /path/to/empty_file | and make partitions, set the bootable flag on the first partition.
Use Code: | losetup -p /path/to/empty_file | To create /dev/loop* devices for the partitions.
Format the partitions as you would any other block device. The first partition must be vfat.
Mount the now formatted root partition somewhere It will be /dev/loopMpN, where M is the loop device number and N is the partition.
Copy over your SD card root filesystem. Mount the boot loopback partition
Copy over your SD card boot filesystem.
Don't forget to mkswap if you have a swap partition in the image.
Now you are only missing the one time scripts.
I've not looked at them but I suspect if you emerge them and don't boot again, all the bits will be in the right places to justwork.
There may be an rc service to add to a runlevel to kick it all of.
Unmount your image, one partition at a time.
Put it onto an SD card, using dd to test.
If it helps clear your mind, everything is Linux is a file.
Treating a file as a block device just works because of that.
Even /dev/sda1 and friends are files.
Your kernel will need loopback device support. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
dbishop Tux's lil' helper
Joined: 08 Dec 2007 Posts: 107
|
Posted: Thu Jan 21, 2021 2:58 am Post subject: |
|
|
Despite doing eix-sync's I keep getting this error when trying to emrge any packages:
Code: | Last emerge --sync was 106d 17h 26m 22s ago. |
Not sure what to do about that. Any suggestions?
and also this:
Code: | !!! Error fetching binhost package info from 'https://isshoni.org/pi64pie'
!!! <urlopen error [Errno -3] Temporary failure in name resolution> |
Any suggestions with that?
I am bout to try the suggestions with the updated image saving, but I am trying to get everything up-to-date first. |
|
Back to top |
|
|
ShorTie Tux's lil' helper
Joined: 12 Feb 2006 Posts: 101
|
Posted: Sun Jan 24, 2021 10:24 am Post subject: |
|
|
That is because 'https://isshoni.org/pi64pie' is like dead.
Might as well just remove it. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Sun Jan 24, 2021 11:07 am Post subject: |
|
|
ShorTie,
https://isshoni.org/pi64pie/ works for me. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Sun Jan 24, 2021 11:13 am Post subject: |
|
|
dbishop,
Code: | Last emerge --sync was 106d 17h 26m 22s ago. | would be about right if you use the ::gentoo repo fro sakakis repo.
To use sakakis binaries, you need a copy of the repo and overlay(s) that they were generated from.
Temporary failure in name resolution is either because something your end cannot resolve isshoni.org to an IP address.
It may not be your end. You depend on a whole chain of recursive DNS.
Your end is the only non-redundant bit though. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
dbishop Tux's lil' helper
Joined: 08 Dec 2007 Posts: 107
|
Posted: Sun Jan 24, 2021 3:44 pm Post subject: |
|
|
Looks like DNS is breaking through my wireless router, I fixed that, thanks for the help there.
I have the following repos configured:
genpi64.conf gentoo.conf layman.conf rpi4-overlay.conf sakaki-tools.conf
gentoo is not needed?
I now see this message:
Code: | * Manifest is over 24 days old, this is suspicious!
* You may want to try using another mirror and/or reporting this one:
* rsync://isshoni.org/gentoo-portage-pi64-gem
*
* Manifest timestamp: 2020-10-06 09:08:37 UTC
* Valid OpenPGP signature found:
* - primary key: DCD05B71EAB94199527F44ACDB6B8C1F96D8BF6D
* - subkey: E1D6ABB63BFCFB4BA02FDF1CEC590EEAC9189250
* - timestamp: 2020-10-06 09:08:37 UTC
|
fwiw |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Sun Jan 24, 2021 5:14 pm Post subject: |
|
|
dbishop,
If you have updated packages that came from the ::gentoo repo, you will need the ::gentoo repo too.
Newer versions from ::gentoo will be preferred over older versions from other repos.
Its not quite that simple either as several people have merged some of sakakis repo into Gentoo and there have been some name changes along the way too.
You may find git the git log and the readme from NeddySeagoon/genpi64-overlay useful.
ffmpeg there is broken. I was trying to do a version bump and the work is not complete. The OpenELEC patches do not apply.
Code: | * Manifest is over 24 days old, this is suspicious!
* You may want to try using another mirror and/or reporting this one:
* rsync://isshoni.org/gentoo-portage-pi64-gem | Thats expected. Sakakis binhost has not been updated since she retired. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
ShorTie Tux's lil' helper
Joined: 12 Feb 2006 Posts: 101
|
Posted: Sun Jan 24, 2021 6:17 pm Post subject: |
|
|
Quote: | Thats expected. Sakakis binhost has not been updated since she retired. |
That is why I said like Dead !!
it's never gonna be up dated, so why even bother ?? |
|
Back to top |
|
|
ShorTie Tux's lil' helper
Joined: 12 Feb 2006 Posts: 101
|
Posted: Sun Jan 24, 2021 6:26 pm Post subject: |
|
|
Quote: | The OpenELEC patches do not apply. |
I like playing patches, maybe poke me with some more info. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Sun Jan 24, 2021 6:54 pm Post subject: |
|
|
ShorTie,
Clone my repo and make ffmpeg work.
I've done the simple version bump stuff but the olh OpenELEC patches no longer apply. I ran out of time.
The patches are, or were required for hardware video decoding on the Pi. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22695
|
Posted: Sun Jan 24, 2021 7:22 pm Post subject: |
|
|
ShorTie wrote: | Quote: | Thats expected. Sakakis binhost has not been updated since she retired. |
That is why I said like Dead !!
it's never gonna be up dated, so why even bother ?? | The person to which you were responding above had reported both that it was outdated and that its name could not be resolved. You said it was dead, and it was ambiguous whether you meant that it was offline or online-but-outdated. Neddy stated that it was online for him, and confirmed that the lack of recent updates is expected.
It is not guaranteed not to receive updates. Sakaki might find a job that allows her the time and interest to resume work on this. She might transfer the domain to someone else who will take up work on it. She might be able to grant access to the existing server to someone who will take up work on it. |
|
Back to top |
|
|
ShorTie Tux's lil' helper
Joined: 12 Feb 2006 Posts: 101
|
|
Back to top |
|
|
|