📝 Made general notes on backing up system
This commit is contained in:
parent
af8c9b5541
commit
4ade12e45c
2 changed files with 126 additions and 3 deletions
124
artix_backup.md
Normal file
124
artix_backup.md
Normal file
|
|
@ -0,0 +1,124 @@
|
||||||
|
# Backing Up On Artix
|
||||||
|
|
||||||
|
## Backing Up:
|
||||||
|
|
||||||
|
Plug in your backup drive:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mount /dev/sda1 /mnt/media/usb-drive
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo rsync -aHAXS --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home/brian/Videos/*","/home/brian/Documents/books/*","/home/brian/Downloads/*","/home/brian/Music/*","/home/brian/Pictures/*"} /* /mnt/media/usb-drive/backup
|
||||||
|
```
|
||||||
|
|
||||||
|
## Restoring:
|
||||||
|
|
||||||
|
Plug in the Artix base ISO (runit):
|
||||||
|
|
||||||
|
```
|
||||||
|
artixiso login: root
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
fdisk /dev/nvme0n1
|
||||||
|
```
|
||||||
|
|
||||||
|
#### boot
|
||||||
|
|
||||||
|
```
|
||||||
|
g (!! removes all disk partitions and creates a new GPT disklabel !!)
|
||||||
|
|
||||||
|
n (new partition)
|
||||||
|
t (select type of partition)
|
||||||
|
1 (mark the partition as an EFI system partition)
|
||||||
|
p (partition number)
|
||||||
|
Partition number (1 - 128, default 1): 1
|
||||||
|
First sector: (leave blank for default)
|
||||||
|
Last sector: +300M
|
||||||
|
|
||||||
|
n (new partition)
|
||||||
|
p (partition number) 2
|
||||||
|
default
|
||||||
|
default
|
||||||
|
|
||||||
|
w
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mkfs.fat -F 32 /dev/nvme0n1p1
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mkfs.ext4 /dev/nvme0n1p2
|
||||||
|
```
|
||||||
|
|
||||||
|
Now here is where we deviate from the installation:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mount /dev/nvme0n1p2 /mnt
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mkdir /mnt/boot
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mount /dev/nvme0n1p1 /mnt/boot
|
||||||
|
```
|
||||||
|
|
||||||
|
And run the rsync backup script:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
rsync -aHAXS --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt/media/usb-drive/backup/* /mnt
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, to ensure that GRUB + mkinitcpio work:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mount --bind /dev /mnt/dev
|
||||||
|
mount --bind /proc /mnt/proc
|
||||||
|
mount --bind /sys /mnt/sys
|
||||||
|
mount --bind /run /mnt/run
|
||||||
|
```
|
||||||
|
|
||||||
|
Now chroot into the restored system:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
artix-chroot /mnt
|
||||||
|
```
|
||||||
|
|
||||||
|
And regenerate grub:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure to regenerate the initramfs (important!):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mkinitcpio -P
|
||||||
|
```
|
||||||
|
|
||||||
|
And exit and reboot:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
umount -R /mnt
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
## If all went well...
|
||||||
|
|
||||||
|
If all went well, you'll boot into a standard arch install, but with no Videos
|
||||||
|
(too large, pick the ones you want from your backup).
|
||||||
|
|
@ -93,9 +93,8 @@ cat /etc/fstab
|
||||||
|
|
||||||
## General Notes
|
## General Notes
|
||||||
|
|
||||||
A general speedrun guide to installing gentoo can be found at:
|
Here is a
|
||||||
|
[general speedrun guide to installing gentoo](https://www.reddit.com/r/Gentoo/comments/td684v/need_help_for_first_time_setting_up_a_virtual/)
|
||||||
https://www.reddit.com/r/Gentoo/comments/td684v/need_help_for_first_time_setting_up_a_virtual/
|
|
||||||
|
|
||||||
Install a basic distribution-bin kernel first, then you can:
|
Install a basic distribution-bin kernel first, then you can:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue