You are not logged in.

#1 2018-11-30 14:18:13

wolferl1210
Member
Registered: 2018-10-10
Posts: 6

rsync with USB (System) stick

I am a newbie with all the Linux stuff.

Have installed and set up Bunsenlabs Helium with many 'tweaks' for Openbox,
tint2 etc. on a laptop. Several packages had been installed for HamRadio.

In VirtualBox on a Win PC I have installed another complete system
on an 32G USB stick. Runs perfect, if used for boot up, but it's the
basic system.

Tried to 'synchronize' all my settings etc laptop => USB stick, but I
was not sucessful. Is there any possibility to sync those two systems
to have the same settings and installed packages?

greetings

Offline

#2 2018-11-30 15:05:31

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,593

Re: rsync with USB (System) stick

For the packages
https://askubuntu.com/questions/17823/h … d-packages

For the configs, you basically need to copy all the dot files (in $HOME) + $HOME/.config dir and more if you have specific settings in root stuff, like /etc/hosts ...

For some configs (small subsets of stuff) that relate to openbox+friends there are scripts like bloby.

Last edited by brontosaurusrex (2018-11-30 15:07:02)

Offline

#3 2018-12-01 08:21:37

ohnonot
...again
Registered: 2015-09-29
Posts: 3,194
Website

Re: rsync with USB (System) stick

the USB stick should probably be formatted ext4, which is a linux native filesystem.

beyond that, i didn't understand much of your post, wolferl1210, and i think you didn't either.
i think you need some time to figure this out by yourself, and maybe later give a better explanation of what you actually want to do.

Offline

#4 2018-12-01 08:29:15

damo
....moderator....
Registered: 2015-08-20
Posts: 4,378

Re: rsync with USB (System) stick

I think @OP needs to...

  1. Enable persistence on the usb install.

  2. Install the packages required, on the usb.

  3. Copy the dotfiles from the laptop to the usb $USER.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2018-12-01 09:08:46

wolferl1210
Member
Registered: 2018-10-10
Posts: 6

Re: rsync with USB (System) stick

So, thanks for the replies - once more:

- I have a laptop with Bunsenlabs and several installed packages and some
tweaks done in Openbox etc. for the GUI

- I have Bunsenlab installed on a USB stick. It is not a life system,
nothing like persistence, it is a complete fully installed system.
Was done on an VitualBox Machine. The USB stick became the system drive.
I can boot with this USB stick on the above mentioned laptop or any other laptop.

Whenever I do some installs or tweaks on my laptop with Bunsenlabs installed,
I want to have the same configuration / installed packages on the USB stick.
Kind of as mirror or backup system.

Therefore the idea with rsync

Last edited by wolferl1210 (2018-12-01 09:10:15)

Offline

#6 2018-12-01 09:50:11

damo
....moderator....
Registered: 2015-08-20
Posts: 4,378

Re: rsync with USB (System) stick

So why not just use rsync then?

rsync -r source/ destination

Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#7 2018-12-01 13:27:43

wolferl1210
Member
Registered: 2018-10-10
Posts: 6

Re: rsync with USB (System) stick

damo wrote:

So why not just use rsync then?

rsync -r source/ destination

Thanks for the reply.

OK, that's where we started in my first post. Could not get it to work.
Can you please give me an example.  The 'source/' and 'destination' info
is very generic.

My USB is SDB1 - how does the rsync command look in detail please?

Offline

#8 2018-12-01 15:26:56

damo
....moderator....
Registered: 2015-08-20
Posts: 4,378

Re: rsync with USB (System) stick

Could not get it to work

Not very helpful hmm

Without knowing how your partitions and directories and mounts are laid out it isn't possible to give an exact rsync command, which is why you need to replace "source/" and "destination" as appropriate for your setup.

There are many good rsync tutorials and examples if you search. The Arch wiki is a good place to start.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#9 2018-12-01 18:43:06

wolferl1210
Member
Registered: 2018-10-10
Posts: 6

Re: rsync with USB (System) stick

well, I found a solution for my own request, not so complicated at all.

My HD is a standard BunsenLabs Helium, nothing special, no extra partitions,
only sda1 plus a swap partition, no mounting points etc. My USB stick with a
fresh installed BunsenLabs is sdb1

https://www.ostechnix.com/backup-entire … ing-rsync/ had the answer,
but there was an important addition to be done, add "/sdb1/*" to the excludes,
otherwise rsync will run into a recursive loop.

$ sudo mount /dev/sdb1 /mnt

$ sudo rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/sdb1/*"} /mnt

Lost the Grub on the USB stick after this, but this was easy to be repaired.

Now my USB stick holds exactly everything as on HD and is bootable.

Thanks for all the replies!

Last edited by wolferl1210 (2018-12-01 18:43:46)

Offline

#10 2018-12-02 06:32:20

ohnonot
...again
Registered: 2015-09-29
Posts: 3,194
Website

Re: rsync with USB (System) stick

^ so basically you want to mirror the system onto the usb stick everytime you change "something" on the master system?
and then, i guess, you have to adjust /etc/fstab every time, and update grub?
it might boot on the same laptop, but this probably is not very portable.

anyhow, glad you got it solved!

Last edited by ohnonot (2018-12-02 06:33:05)

Offline

Board footer

Powered by FluxBB