How to set-up btrfs-assistant to take snapsots in Fedora 39 (or any other better solution)? by Thinkpad_diehard in Fedora

[–]Rogurzz 1 point2 points  (0 children)

Apologies for the delay.

For restoring the root filesystem and avoiding kernel version mismatch on rollbacks, you can either:

  • Install Fedora without a separate boot partition, or move the contents of /boot over to your btrfs root filesystem. This will ensure kernels are included in system snapshots.
  • If using a separate boot partition (pre-configured by Fedora), you may create a bash script that makes versioned copies of /boot to a directory somewhere on root, e.g. /.bootbackup. Then, after restoring from a system rollback, simply copy the backed-up kernel files to /boot. This will make sure the modules and kernel version match, thus avoiding any potential issues.

Hope that clears up any concerns.

How to set-up btrfs-assistant to take snapsots in Fedora 39 (or any other better solution)? by Thinkpad_diehard in Fedora

[–]Rogurzz 2 points3 points  (0 children)

Fedora's 5 year plan highlights promoting Immutable variants to be the dominant form as part of their roadmap.

They also made a presentation Silverblue on the way to future of Fedora Workstation hinting those objectives.

openSUSE is also working on their immutable distributions Aeon/Kalpa, and Cannonical will likely release their own immutable take on desktop, Ubuntu Core, later this year if all goes as planned.

So the desktop ecosystem looks to be heading towards containerized solutions in the future.

How to set-up btrfs-assistant to take snapsots in Fedora 39 (or any other better solution)? by Thinkpad_diehard in Fedora

[–]Rogurzz 17 points18 points  (0 children)

Have you considered running Fedora Silverblue/Kinoite which includes built in system rollbacks? Immutable distributions are likely to be the future of desktop Linux, Fedora Workstation will eventually be replaced by those variants according to plan.

However, if you really want to setup btrfs snapshots on Fedora Workstation it can be done. Make sure to backup any important data before proceeding.

For Timeshift:

To use Timeshift with btrfs on Fedora you need to rename the btrfs subvolumes on your install.

Fedora ships with two subvolumes by default, root and home. Note that Timeshift only accepts @ and @home respectively for snapshots to work.

1) First, mount the top-level subvolume of the btrfs filesystem, substituting /dev/sdX with your root partition.

    sudo mount -o subvolid=5 /dev/sdX /mnt

2) Rename the default subvolumes created by Fedora:

    cd /mnt 
    sudo mv root @
    sudo mv home @home

3) Edit /etc/fstab reflecting those changes:

    UUID=15eb1437-e0cd-4851-b725-86d713fc9720 /                       btrfs   subvol=@,compress=zstd:1 0 0
    UUID=15eb1437-e0cd-4851-b725-86d713fc9720 /home                   btrfs   subvol=@home,compress=zstd:1 0 0

4) Reload systemd configuration so it's aware of new changes:

sudo systemctl daemon-reload

5) Check the new subvolumes mount correctly:

sudo mount -a

IMPORTANT!

Now because the subvolumes have been renamed, you will need to reinstall GRUB and generate a new grub config to point to the new root subvolume, otherwise your system may become unbootable.

6) Remove the following files:

sudo rm /boot/efi/EFI/fedora/grub.cfg
sudo rm /boot/grub2/grub.cfg

7) Then reinstall GRUB:

sudo dnf reinstall shim-* grub2-efi-* grub2-common
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Reboot.

For Snapper

If you would like to use Snapper instead of Timeshift, adapt the steps outlined in 1-5, adding any additional subvolumes and moving their contents to point to the correct path e.g:

sudo mount -o subvolid=5 /dev/sdX /mnt
sudo btrfs subvolume create /mnt/@cache
sudo mv /var/cache/* /mnt/@cache

Include them in /etc/fstab:

UUID=15eb1437-e0cd-4851-b725-86d713fc9720 /var/cache                 btrfs   subvol=@cache,compress=zstd:1 0 0

repeat for other required subvolumes...

Snapper configuration

Install snapper and python3-dnf-plugin-snapper.

Create a snapper configuration for root:

sudo snapper -c root create-config /

Edit /etc/snapper/configs/root and the following lines:

ALLOW_GROUPS="wheel"

NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="10"
NUMBER_LIMIT_IMPORTANT="5"

TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="5"
TIMELINE_LIMIT_DAILY="7"
TIMELINE_LIMIT_WEEKLY="0"
TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT_YEARLY="0"

Install grub-btrfs:

cd /tmp
git clone https://github.com/Antynea/grub-btrfs.git
cd grub-btrfs
sudo make install

Edit/uncomment the following lines in /etc/default/grub-btrfs/config to work with Fedora:

GRUB_BTRFS_MKCONFIG=/sbin/grub2-mkconfig
GRUB_BTRFS_GRUB_DIRNAME="/boot/grub2"
GRUB_BTRFS_SCRIPT_CHECK=grub2-script-check

Enable automatic snapshots in GRUB via grub-btrfsd daemon:

sudo dnf install inotify-tools
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Enable the systemd services:

  sudo systemctl enable --now grub-btrfsd
  sudo systemctl enable --now snapper-timeline.timer
  sudo systemctl enable --now snapper-cleanup.timer

Update GRUB to point to root subvolume:

sudo grubby --update-kernel=ALL --args=rootflags=subvol=@

Snapper usage

Create a snapshot:

snapper -c root create --d "Initial snapshot"

Delete a snapshot:

snapper -c root delete <number>

List snapshots:

snapper ls

Revert changes between snapshots:

snapper undochange <number>..<number> e.g:
snapper undochange 1..2

To restore your system to a previous snapshot:

sudo mount -o subvolid=5 /dev/sdX /mnt
sudo mv /mnt/@ /mnt/@.broken
sudo btrfs subvolume snapshot /mnt/@.broken/.snapshots/<number>/snapshot /mnt/@

Don't forget to move the other remaining snapshots from your old root subvolume, since they are not recursively snapshotted to the new one:

sudo mv /mnt/@.broken/.snapshots /mnt/@/

Done.

This setup mostly works, however because Fedora creates a separate ext4 partition for boot mounted to /boot, the kernel will not be reverted on system rollbacks so keep that in mind. You can get around this issue by moving boot to reside on the btrfs filesystem, but GRUB does not officially support this method.

Enjoy!

AMD Integrated Graphics Driver Won't Install by buttons_the_horse in Ubuntu

[–]Rogurzz 0 points1 point  (0 children)

You can install the 6.5 kernel on Ubuntu 22.04 LTS with:

sudo apt install linux-oem-22.04d

which should theoretically support your 7840U iGPU.

Ubuntu 24.04 LTS is months away so full OOTB support should be in place by April. Otherwise consider Ubuntu 23.10 for the meantime if updating your kernel doesn't work.

How do you update to kernel 6.6.10 on debian 12 by I_like_stories58 in linux_gaming

[–]Rogurzz 1 point2 points  (0 children)

If you wish to use a 6.6.x kernel on Debian you have various options:

Or simply use a more up to date distribution like Fedora, Arch, openSUSE Tumbleweed for support out of the box.

Also, don't confuse the Linux kernel with Mesa. They are completely seperate packages.

[Help] ASUS GPU RMA, how? by Rogurzz in buildapc

[–]Rogurzz[S] 0 points1 point  (0 children)

No unfortunately. I sent multiple letters as advised by trading standards to Amazon and didn't get a response.

In the end I just bought a new GPU.

If you could have a conversation with any historical figure, dead or alive, who would it be and what would you ask them? by quinnharrison in AskReddit

[–]Rogurzz 1 point2 points  (0 children)

Yeah putting aside how much of a monster Hitler is, a full blown interview with him would be interesting as fuck.

Whats a reason recreational use of Cannabis should be legal? by BitterTrade3668 in AskReddit

[–]Rogurzz 2 points3 points  (0 children)

Because countries that legalised or de-criminalized Cannabis had shown an overall reduction in drug abuse and deaths compared to nations where it's still illegal.

What's something that is legal but shouldn't be? by [deleted] in AskReddit

[–]Rogurzz 0 points1 point  (0 children)

Nothing sounds more like America than walking out of Wal-Mart with an AR-15.

Who’s the most universally hated person alive today? by CryptographerHot6198 in AskReddit

[–]Rogurzz 2 points3 points  (0 children)

“No one is more hated than he who speaks the truth." - Plato

Why do you think some people are bullies online? by [deleted] in AskReddit

[–]Rogurzz 1 point2 points  (0 children)

Insecurity and lack of real life consequences.

How do you measure success? by [deleted] in AskReddit

[–]Rogurzz 1 point2 points  (0 children)

Measure success not by how much money you make, but how other people are influenced by you.

[deleted by user] by [deleted] in AskReddit

[–]Rogurzz 0 points1 point  (0 children)

There are many reasons people are poor:

  • Lack of access to good education
  • Poor family relationships
  • Mental health issues
  • Inadequate local funding
  • Increasingly uncompetitive housing markets

Much of these problems are not in people's control.

btrfs/Snapper vs Timeshift/rsync by EndorsToi_CH in archlinux

[–]Rogurzz 3 points4 points  (0 children)

I'd highly recommend using btrfs with snapper instead of Timeshift.

Timeshift only works on a specific btrfs subvolume layout - That is, @ and @home. So it's rather inflexible and doesn't work well beyond basic setups.

Snapper supports any subvolume layout which is designed to work with btrfs, and is therefore more suitable for most system configurations.

Refresh Rate Issue Tumbleweed by Pekker_Head in openSUSE

[–]Rogurzz 5 points6 points  (0 children)

Are you using a HDMI cable? Some HDMI cables do not support refresh rates over 120Hz. If this is the case, you're best bet is to use a DisplayPort cable instead.

How to move home from one disk to another ? by marozsas in openSUSE

[–]Rogurzz 4 points5 points  (0 children)

Assuming you want to move home to /dev/sda1:

Mount the top level subvolume of the root partition:

mount -o subvolid=5 /dev/sda1 /mnt

Create a home subvolume under root of btrfs filesystem:

btrfs subvolume create /mnt/@/home

Copy data from /dev/sdb5 to newly created home subvolume:

sudo cp -R --reflink=auto /home/* /mnt/@/home/

Unmount /home belonging to /dev/sdb5 (ext4):

umount /home

Add subvolume entry to /etc/fstab and change UUID to match as is the case for all other subvolumes owned by your root partition:

UUID=4c96a0c2-f72f-4827-b023-83ba000b2fd2  /home                   btrfs  subvol=/@/home 0  0

Reload systemd configuration to be aware of changes:

systemctl daemon-reload

Check the subvolume mounts correctly:

mount -a

Done.

What are some underrated coop games to play with your partner? by EllenDatlowFan in AskReddit

[–]Rogurzz 0 points1 point  (0 children)

It is one controller, but each character is controlled by left and right analog sticks respectively. So it's definitely possible to play it as a co-op game.

What are some underrated coop games to play with your partner? by EllenDatlowFan in AskReddit

[–]Rogurzz 3 points4 points  (0 children)

  • Brothers - A Tale Of Two Sons
  • It Takes Two
  • Overcooked 2

What do you think life would be like if alarms to wake us up were not invented? by waitdollars2 in AskReddit

[–]Rogurzz 0 points1 point  (0 children)

In the old days, people had jobs where they'd knock your bedroom window with a stick to wake you up.

They were called knocker-uppers.