Use systemback to backup and restore ubuntu system

I like to use the Raspberry Pi before because the hardware is the same, and the tf card can be directly copied to other cards. This makes it easy to share things. However, the performance of the Raspberry Pi is limited, the lte base station cannot run, and the power supply is also limited. It is easy to cause problems when using the portapack. So now I have found a way to make ubuntu livecd. This method can be used to install the things on my computer into your USB flash drive, which can be run directly on the USB flash drive, or it can be installed into your computer hard disk (some m2 hard disk interface Computer does not support).

1. Backup

Refer to this article:

https://www.linuxidc.com/Linux/2019-07/159276.htm 

sudo add-apt-repository "deb http://ppa.launchpad.net/nemh/systemback/ubuntu xenial main"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 382003C2C8B7B4AB813E915B14E4942973C62A1B
sudo apt update
sudo apt install systemback

For graphic operations, please refer to the article.

2. Sometimes it is impossible to write directly to the USB disk, you can use unetbootin

Reference: https://www.kutu66.com//ubuntu/article_160132

sudo add-apt-repository ppa:gezakovacs/ppa
sudo apt-get update
sudo apt-get install unetbootin

In this way, you can use livecd to start Ubuntu in the u disk

3. Install on the hard drive

Reference: https://cloud.tencent.com/developer/article/1432135

Cannot automatically partition, you must manually delete the original partition, and then re-create the partition.

Pay attention to partitioning, there must be a small vfat partition, several hundred megabytes in size, and then mount it to /boot/efi. Only then can choose to install grub2 boot.

For the remaining space, you can create an ext4 partition and mount it under /. The swap partition and /home partition are not necessary.

Refer to the article for other steps.

4. Copy files

Some files will not be copied to the newly installed system. At this time, you can start Livecd with u disk to find those files.

Then find the hard disk (in the livecd system, the hard disk looks like a USB flash drive). Then copy those files to the corresponding location.

 

 

wifi hotspot:

nm-connection-editor

headless power off:

sudo nano /etc/acpi/events/powerbtn

# /etc/acpi/events/powerbtn
# This is called when the user presses the power button and calls
# /etc/acpi/powerbtn.sh for further processing.

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

# We need to react on "button power.*" and "button/power.*" because
# of kernel changes.

event=button[ /]power
action=/etc/acpi/powerbtn.sh

sudo nano /etc/acpi/powerbtn.sh

#!/bin/sh

/sbin/shutdown -h now "Power button pressed"

 

 

Guess you like

Origin blog.csdn.net/shukebeta008/article/details/105877332