It occurs to me that essentially a copy of the contents of the two PI partitions would be enough, together with an install of Raspios,
followed by a copy back to the fresh SD, to clone a setup.
It seems too easy. What am I missing?
On 9/17/23 04:19, The Natural Philosopher wrote:
It occurs to me that essentially a copy of the contents of the two PI
partitions would be enough, together with an install of Raspios,
followed by a copy back to the fresh SD, to clone a setup.
It seems too easy. What am I missing?
Raspberry -> Accessories -> SD Card Copier
"The Natural Philosopher" <tnp@invalid.invalid> wrote
| > Raspberry -> Accessories -> SD Card Copier
| >
| What has a raspberry to do with this?
|
Start menu. The raspberry icon in lower left.
You didn't say which Pi you have, so you may not
have that icon or the copier software.
"The Natural Philosopher" <tnp@invalid.invalid> wrote
| > |
| > Start menu. The raspberry icon in lower left.
|
| ??? Icon? On a headless Pi Zero?
|
Ah. You might have said that in the first place. It
doesn't make much sense to ask for help and then
be difficult with people who try to help. I gather you
only posted to argue.
No. I am trying to establish whether one can, in essence, make a
bootable PI SD card by taking a raw card, creating the two partitions on
it and loading it up with files,
The Natural Philosopher <tnp@invalid.invalid> wrote:
No. I am trying to establish whether one can, in essence, make a
bootable PI SD card by taking a raw card, creating the two partitions on
it and loading it up with files,
Yes. In fact if you set the OS up from scratch you don't even need
two partitions, just one FAT32 parition with the boot files
required by the Pi.
I set up a Linux system to boot off the FAT32 parition then run in
a tmpfs. So instead of an image file there's just a ZIP archive
which needs to be unpacked to the root of a FAT32-formatted SD
card. No image writer tool required, and no worries about partition
sizes.
The Pi doesn't need anything like a boot sector. The firmware is
smart enough to find the boot files on the filesystem, provided
it's FAT32.
On 19/09/2023 03:15, Newyana2 wrote:
"The Natural Philosopher" <tnp@invalid.invalid> wroteNo. I am trying to establish whether one can, in essence, make a
| > |
| > Start menu. The raspberry icon in lower left. |
| ??? Icon? On a headless Pi Zero?
|
Ah. You might have said that in the first place. It
doesn't make much sense to ask for help and then be difficult with
people who try to help. I gather you only posted to argue.
bootable PI SD card by taking a raw card, creating the two partitions on
it and loading it up with files, or whether there is the equivalent of a
boot sector which would mandate the use of e.g. dd to create it
Naturally all the documentation assumes a windows numpty and shows you
how to stamp the SD card with an image.
You assumed I wanted to clone the card. I don't. I want to back one up without using DD because, as the concurrent thread has identified, the
PI expands the file system to the whole card and that makes for a big
image.
I'd rather back it up as files if possible.
If at some future date I need to recreate it, instead of dd-ing the
image, I would prefer to create the two partitions and populate them
from the tarball.
On 19/09/2023 10:11, Computer Nerd Kev wrote:
The Natural Philosopher <tnp@invalid.invalid> wrote:I suppose that needs to be the first partition?
No. I am trying to establish whether one can, in essence, make a
bootable PI SD card by taking a raw card, creating the two partitions
on it and loading it up with files,
Yes. In fact if you set the OS up from scratch you don't even need two
partitions, just one FAT32 parition with the boot files required by the
Pi.
I set up a Linux system to boot off the FAT32 parition then run in a
tmpfs. So instead of an image file there's just a ZIP archive which
needs to be unpacked to the root of a FAT32-formatted SD card. No image
writer tool required, and no worries about partition sizes.
The Pi doesn't need anything like a boot sector. The firmware is smart
enough to find the boot files on the filesystem, provided it's FAT32.
So putatively one might back up everything in / except /run, /proc &
/sys, including /boot, plonk a shiny new SD card in a host computer,
create a VFAT partition of say 256MB, and the rest as ext4, untar the
archive into the ext4 partition and move the entire contents of /boot
onto the VFAT, shove the card in a pi , apply power, and Robert should
be a relative?
On Tue, 19 Sep 2023 08:15:03 +0100, The Natural Philosopher wrote:
No. I am trying to establish whether one can, in essence, make a
bootable PI SD card by taking a raw card, creating the two partitions on
it and loading it up with files, or whether there is the equivalent of a
boot sector which would mandate the use of e.g. dd to create it
Take a look at 'rsync' - its my go-to tool for backing up complete Linux filing systems, specific partitions or lists of files and partitions to as
a named directory structure on a backup disk.
It is designed make the backup directory structure identical to the
current list of files and directories you ask it to back up, IOW, if you rerun the sa,me command a week later it will remove any files and
directories from the previous backup session, replace any files and directories that have been changed and add any new files and directories.
Consequently, subsequent runs will usually be much faster than the initial backup.
/sys, /proc, /run would seem to be created by the machine at boot time,
and shouldn't be created as subdirs of the root partition...or should
the directories be created, but empty?
So putatively one might back up everything in / except /run, /proc &
/sys, including /boot, plonk a shiny new SD card in a host computer,
create a VFAT partition of say 256MB, and the rest as ext4, untar the
archive into the ext4 partition and move the entire contents of /boot
onto the VFAT, shove the card in a pi , apply power, and Robert should
be a relative?
The vfat partition will get mounted on the (now empty) /boot mount
point, and everything else will be where it ought to be, and /run /sys
and /proc will get generated by the boot process?
What about /dev? Is that dynamically created or not?
On 19/09/2023 10:11, Computer Nerd Kev wrote:
The Natural Philosopher <tnp@invalid.invalid> wrote:
The Pi doesn't need anything like a boot sector. The firmware is
smart enough to find the boot files on the filesystem, provided
it's FAT32.
I suppose that needs to be the first partition?
The other question why always gets me on backups is how many of the directories in the root partition can safely be ignored?
/sys, /proc, /run would seem to be created by the machine at boot time,
and shouldn't be created as subdirs of the root partition...or should
the directories be created, but empty?
So putatively one might back up everything in / except /run, /proc &
/sys, including /boot, plonk a shiny new SD card in a host computer,
create a VFAT partition of say 256MB, and the rest as ext4, untar the
archive into the ext4 partition and move the entire contents of /boot
onto the VFAT, shove the card in a pi , apply power, and Robert should
be a relative?
The vfat partition will get mounted on the (now empty) /boot mount
point, and everything else will be where it ought to be, and /run /sys
and /proc will get generated by the boot process?
What about /dev? Is that dynamically created or not?
"The Natural Philosopher" <tnp@invalid.invalid> wrote
Start menu. The raspberry icon in lower left.
??? Icon? On a headless Pi Zero?
Ah. You might have said that in the first place.
It doesn't make much sense to ask for help and then
be difficult with people who try to help. I gather
you only posted to argue.
On 2023-09-19, Newyana2 <Newyana2@invalid.nospam> wrote:
"The Natural Philosopher" <tnp@invalid.invalid> wrote
Start menu. The raspberry icon in lower left.
??? Icon? On a headless Pi Zero?
Ah. You might have said that in the first place.
It doesn't make much sense to ask for help and then
be difficult with people who try to help. I gather
you only posted to argue.
This is totally off topic, but I'm curious: did you
once post under the name "Mayayana"? If so, I'd like
to thank you for the quote in my .sig below.
The other question why always gets me on backups is how many of the directories in the root partition can safely be ignored?
Here's the rsync options I used to backup the partitions, firstly the
FAT partition which accounts for the lower resolution of timestamps
rsync -vax --stats --modify-window=2 --delete /boot/ <boot_backup_dir>
And the main partition with the exclusions to prevent pseudo filing
systems and temporary stuff being included when backing up live systems,
some of it shouldn't be necessary but turns out is needed
rsync -vaxHAX --stats --numeric-ids --delete --delete-excluded --exclude=/tmp/*
--exclude=/run/*
--include=/var/lock
--exclude=/var/run
--exclude=/var/swap
--exclude=/var/cache/*
--exclude=/var/tmp/*
--exclude=/var/lib/machines/*/var/cache/
--exclude=/var/lib/mlocate/*
--exclude=/var/lib/nginx/fastcgi/*
--exclude=/var/log/journal/*
--exclude=/var/log/Xorg.*
--exclude=/lost+found/*
--exclude=*/.cache
--exclude=*/__pycache__
--exclude=*/chromium/hyphen-data/
--exclude=*/.config/chromium/*Cache*/*
/ <root_backup_dir>
On 2023-09-19, druck <news@druck.org.uk> wrote:
Here's the rsync options I used to backup the partitions, firstly the
FAT partition which accounts for the lower resolution of timestamps
rsync -vax --stats --modify-window=2 --delete /boot/ <boot_backup_dir>
And the main partition with the exclusions to prevent pseudo filing
systems and temporary stuff being included when backing up live systems,
some of it shouldn't be necessary but turns out is needed
rsync -vaxHAX --stats --numeric-ids --delete --delete-excluded
--exclude=/tmp/*
--exclude=/run/*
--include=/var/lock
--exclude=/var/run
--exclude=/var/swap
--exclude=/var/cache/*
--exclude=/var/tmp/*
--exclude=/var/lib/machines/*/var/cache/
--exclude=/var/lib/mlocate/*
--exclude=/var/lib/nginx/fastcgi/*
--exclude=/var/log/journal/*
--exclude=/var/log/Xorg.*
--exclude=/lost+found/*
--exclude=*/.cache
--exclude=*/__pycache__
--exclude=*/chromium/hyphen-data/
--exclude=*/.config/chromium/*Cache*/*
/ <root_backup_dir>
I use very similar options. I add -u and I add the --delete-after
option. Oh and --numeric-ids . I've been bitten by backing up to a
system where some of the system uids (<1000) were different and on backup
got mangled. At least with numeric-only they go back as they were.
Sysop: | Coz |
---|---|
Location: | Anoka, MN |
Users: | 2 |
Nodes: | 4 (0 / 4) |
Uptime: | 190:45:12 |
Calls: | 184 |
Calls today: | 1 |
Files: | 5,413 |
Messages: | 222,750 |