On Thursday 26 July 2018 03:06:31 Mark Morgan Lloyd wrote:

> On 25/07/18 21:30, Gene Heskett wrote:
> > On Wednesday 25 July 2018 16:15:03 Mark Morgan Lloyd wrote:
> >> There are still ways of working round that sort of problem. For
> >> example, you can copy an entire device using dd to capture boot
> >> segments and partition layout, inspect and recreate the filesystems
> >> using mkfs, then use [something] to copy files one at a time into
> >> the new filesystems taking care that some bootloaders need a wakeup
> >> call when a file moves.
> >>
> >> As far as "something" is concerned:
> >>
> >> dd: Sector-by-sector copy between devices and files.
> >> tar: Good ol' archiver, with directory-exclude etc. options.
> >> netpipes: Do a tar or dd over the LAN.
> >> rsync: File-by-file copy over LAN.
> >> rdist: Ditto, less well-known but with some good points.
> >
> > I'll have to look at that. I need dd like copies, but I don't
> > want /media/slash to be anything but an empty dir in the image it
> > makes.
>
> dd to a file, then use  losetup -f -P  to make the partitions in that
> file mountable, mount the appropriate one and delete the stuff you
> don't want.

Wouldn't the file, if put on /media/slash, it seems dd would 
include /media/slash in that file, and the result even if it didn't get 
into a recursion forever loop, would still be around 10GB bigger than 
media//slash, and it already has some stuff  on it: 
pi@picnc:~ $ df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/root       30387788 10165868  20189152  34% /
devtmpfs          468264        0    468264   0% /dev
tmpfs             472584        0    472584   0% /dev/shm
tmpfs             472584     6548    466036   2% /run
tmpfs               5120        4      5116   1% /run/lock
tmpfs             472584        0    472584   0% /sys/fs/cgroup
/dev/mmcblk0p1     41322    32253      9070  79% /boot
/dev/sda3       50132520  3064328  44545348   7% /media/slash
/dev/sda1        1079216        4   1079212   1% /media/boot
tmpfs              94520        4     94516   1% /run/user/1000
That totals quite a bit more than the 50GB available on that SSD.

I need dd like to preserve the file addresses in /boot as I've read they 
are expected to be at fixed addresses with this boot method.

Maybe it would be best if I used the resize utility to resize the / to 
just over whats used. I've made a copy of /home/pi/linuxcnc, so I at 
least have the codes I've already written backed up locally.

And I've not been able to find, but haven't looked online, a man page for 
rdist. Now have, but bears a re-read, its nothing like a dd.

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply via email to