Giter VIP home page Giter VIP logo

Comments (4)

lambdanil avatar lambdanil commented on June 3, 2024

You should be able to chroot into the snapshot, then follow the steps outlined by the Arch wiki (https://wiki.archlinux.org/title/Btrfs#Swap_file).

Personally I recommend using ZRAM instead (https://wiki.archlinux.org/title/Zram).

from astos.

karmakarmeghdip avatar karmakarmeghdip commented on June 3, 2024

You should be able to chroot into the snapshot, then follow the steps outlined by the Arch wiki (https://wiki.archlinux.org/title/Btrfs#Swap_file).

That didn't work, I tried that.... Only the fstab change persisted. Systemd gives me error now when I try to boot my system up.

Also I started to get an error from then on saying that snapshot is locked. After unlocking it and rebooting, it got fixed...

Personally I recommend using ZRAM instead (https://wiki.archlinux.org/title/Zram).

I have just 4GB of RAM so ZRAM is pretty useless for me.....

I think creating a new subvolume causes an issue... Perhaps instead of creating a new subvolume for swap, I create a swapfile in /etc or /var with btrfs filesystem mkswapfile --size 4g --uuid clear /var/swapfile and then mount that swap file.....

Would that work????

from astos.

lambdanil avatar lambdanil commented on June 3, 2024

I have been able to create a swapfile based on the ArchWiki information with a few extra steps.

First mount the system partition like so (do everything as root):

mount /dev/*** /mnt -o subvolid=0

Then you can make the subvolume

btrfs sub create /mnt/\@swap

Then finally create the swapfile

btrfs fi mkswapfile --size 4g --uuid clear /mnt/\@swap/swapfile

At this point you can chroot inside the snapshot, we'll continue from there.

ast chroot <snapshot>

Make the swap path

mkdir /swap

There open up /etc/fstab and add 2 new entries.

UUID="xxx" /swap btrfs subvol=@swap,noatime 0 0 # Here use system partition UUID
/swap/swapfile none swap defaults 0 0

Now you can exit the chroot

exit 0

and deploy.

ast deploy <snapshot>

I think this process could be automated in some way or a part of the installer, or at least it deserves a section in the docs - I'll look at that later.

from astos.

karmakarmeghdip avatar karmakarmeghdip commented on June 3, 2024

Hmm, I figured out a solution to swapfile just a while ago but did it a little differently...

I created a btrfs subvolume using
btrfs subvolume create /var/swap

and then created a swapfile using
btrfs filesystem mkswapfile --size 4g --uuid clear /var/swap/swapfile

and swapon /var/swap/swapfile

also updated fstab from within chroot and exited and deployed the snapshot...
I could make a PR to update the README.md too...

But I am having a lot of other issues like stuff don't make sense to me...
Is ast sync <tree> supposed to update all the packages installed from repos and aur in all the branches, since it wasn't quite doing that for me, if so then what is tree-upgrade for?? Also why was it giving file already exists error for me when I tried to upgrade... also when I upgrade do I need to upgrade for each and every child snapshot, like rebuilding hyprland-git 3 times for 3 children nodes or fetching the same package multiple times?? Also kernel updates were working when I tried to sync... I have a lot of questions about this project and maybe the README can be improved with all the necessary info and better description if you clarify my confusions...

from astos.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.