Jump to content

bedna

Members
  • Posts

    116
  • Joined

  • Last visited

Other groups

Long-term editor

Contact Methods

  • Website URL
    https://github.com/UnconnectedBedna/shrink-backup

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @Biasio95 Wait, I'm an idiot, the kernel parameter disables zSWAP, not zram. sry. Try "swapoff /dev/zram0" (or whatever the dev is named) and then remove the module with "modprobe -r zram" "echo 'blacklist zram' >> /etc/modprobe.d/blacklist.conf", add another swap and reboot. Or you could disable the zram-generator with the kernel parameter "systemd.zram=0", that way no zram should be able to be created. One of the methods should work, but I have not actually tried it on armbian, so there might be configs that can throw errors if you just remove the module, IDK. If not, read: https://docs.kernel.org/admin-guide/blockdev/zram.html#add-remove-zram-devices and remove the device in /sys/class/zram-control/hot_remove, I would assume that would stick. I assume you know how to setup a "normal" swap partition, because running without swap altogether is prob not a good idea.
  2. Theoretically no, because the game won't occupy all the ram, so when you start to fill it up, the kernel should start compressing and move other stuff to zram, but theory is not always how it works in practicality. As for how to disable zram, add zswap.enabled=0 to your kernel parameters and it won't be available after a reboot. To stop zram during operation, IIRC, stop (not disable) systemd-zram-setup@zram0.service. If it's not you should be able to figure out what to stop by listing relevant unit files with systemctl --type swap
  3. The post is from nov 2022, and OP reported it worked 2 weeks later... But good advice non the less... xD
  4. I think what you want to ask is "Can I use u-boot to boot Guix system", and the answer to THAT is probably yes, but that has nothing to do with armbian. What eselarm wrote above is what you have to learn/do and understand. IE, you would need to build Guix system using u-boot, and this forum is not the correct place to ask that question. Maybe ask in the IRC chat here https://guix.gnu.org/en/help/ and see if you can find someone that is willing to help out. Or maybe on the reddit: https://www.reddit.com/r/GUIX/ L1tech forum is pretty popular, maybe ask there: https://forum.level1techs.com/c/software/linux/27
  5. Maybe I am misunderstanding your question but: Armbian is one operating system, and Guix system is another operating system, so no. It's the equivalent of asking "can I install debian but boot NixOS from debian on another storage device". Unless it's a virtual machine you are talking about, you might be able to run a Guix system as a virtual machine in armian, but I don't think that is what you are asking. If you want to run Guix system, you need to boot Guix system. If it's just the package manager Guix you are talking about, then afaik also no (if you are talking about the guile scheme), for that to work you need to run Guix system, just like you need to use NixOS to run nix package manager. But I could be incorrect.
  6. I made this to work on sbc:s both with or without a boot partition: https://github.com/UnconnectedBedna/shrink-backup Uses rsync so it's way faster than a dd. Creates an img file at minimum size. Autoexpansion on restore available for Armbian. Also contains a systemd-nspawn utility if you want to make changes to the img file itself.
  7. @MMGen Thank you. But if you recreate the partitions, why would it matter? The new gpt partition will overwrite/ignore the mbr stuff... I'm just trying to understand here. I actually had that problem with missing backup table, but fixed it with rewriting the tables with gdisk. But I don't recreate the partition in that situation, because when I do recreate the partition the problem with missing backup table did not happen, that's why I'm confused. But I will do some testing if not copying the first 32k will actually fix that issue (or rather, if I dd /dev/zero to clear it), even though it sounds very strange to me because the backup table on gpt is on the LAST blocks, only for mbr/hybrid are they on the first.
  8. @MMGen yeah, that's where mbr keeps its stuff. I guess my question is why skip copying the first 32KiB even if it's empty? In form of time saving, we are talking microseconds. Even if it were to be mbr that you convert into gpt, the conversion would remove the first 32KiB turning it into zeroes and put the gpt partition table on the last 34 x 512k blocks... Is there any other reason to skip it? Is it due to the encryption? Would this process not work if I don't skip the first 64x512 blocks?
  9. I again apologize, even though I can not see what was "hostile" in what I wrote. I simply misunderstood and apologized for that, even though I think you are the passive aggressive one here. I am so sorry. (I will add you to ignore list so I will never accidentally interact with you again, so no need to leave the community if it is due to me)
  10. It's ARMv7 so it could potentially run 64bit instructions. https://developer.arm.com/documentation/den0013/0400/Introduction-to-Assembly-Language/The-ARM-instruction-sets I recall reading that opi pc is running 64-bit from someone here on armbian forums now that I think about it, but don't remember where. It could also be a Mandela effect and I am completely wrong. If so, I'm sorry, did not mean to make you upset. Not hard to miss at all, or you think everybody has every single board memorized? 😉 If you included that you think it should run 32 bit instructions and has a 32bit kernel, I would have asked you to provide "uname -m" to confirm, no need to be nasty. 🙃 Kinda strange that you could get the system running with su in 64bit with a 32bit kernel though.
  11. Yes, applications are compiled into binaries, su is not a script. This is on for example Arch: $ file $(which su) /usr/bin/su: setuid ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d47af40eeb87fea42d555df0d1385bc9a4b4df2c, for GNU/Linux 4.4.0, stripped Ok? So it's compiled with rust instead of C, still a binary. I find that extremely hard impossible to believe. https://www.reddit.com/r/learnprogramming/comments/lyw9gf/can_someone_explain_what_people_mean_by_binaries
  12. First of all, spamming balance on an SSD will significantly lower the lifespan of it. What you do is ask btrfs to relocate data-chunks that are occupying the % of a block, so that 1 goes fast is because they are very small (1%), but when you ask it to scan and look for a position to move chunks that occupy +50% it WILL take a long time, a veeeeery long time, not to mention 95%. You are basically just moving around data slowly killing your SSD. Read here: https://btrfs.readthedocs.io/en/latest/Balance.html#compact-under-used-chunks Btrfs will do this automatically in the background constantly when your computer is having extra cycles to do so. The only time it will be useful is if you remove massive amounts of data, then you can notice neither data nor metadata freeing up space. It can also be useful if you are using RAID because then it can move data between the disks. IIRC -susage is irrelevant for most users, what you want to move is the data and metadata, ie -musage & -dusage. If ever run a balance, it's when I remove big, and I mean BIG chunks of data, like 25% of the drive, and when I do, I start with 5, increment by 5 up to 35, NEVER more. But it is ONLY if I actually need the space immediately for something else, otherwise I just wait and let btrfs handle it by itself. So, with what you are doing with your cron running every day is literally killing your ssd... You should probably stop, IMMEDIATELY. With a --full-balance, you rewrite ALL DATA on the ENTIRE DRIVE! Better to have a scrub running once per month or every second week or so to know that your drive is in healthy condition... So what you are experiencing is not a bug, it's how it works, and in worst case scenario it might be your ssd about to give up... This link, albeit reddit describes it pretty good: https://www.reddit.com/r/btrfs/comments/hfpot9/what_does_balance_actually_balance BTW, you can check what it is doing while running by typing: sudo watch -n1 'btrfs balance status /path' But again, I HIGHLY discourage you do balance unless you ABSOLUTELY need to. Edit I missed that the filesystem has become read only when responding to this at 4am so lets edit this with a bit more info. Well, I'm sorry, it looks like you killed your drive, or at least the filesystem. The best you can do is try to copy all files on it to another drive (probably not worth trying to save the filesystem), format this one and pray that it's only your filesystem that became corrupt. But after reading how you treated that drive I think you should be prepared for it being damaged beyond a reformat, or that if you manage to format it, it will become corrupted pretty soon again, so I would not rely on that drive for backups... I have found SMART to not be reliable when it comes to health. If you like btrfs, I would recommend buying a rpi, a 6TB spinning drive, a hd case and run urbackup on that. That is what I use (rpi4 8gb, which is overkill, it never utilizes more than 2-3G memory on it, even though I use it as a backup server, nfs network drive AND is running a plex server on it) and it has been running flawlessly for years. (that reminds me, I might want to install something newer than rpi os bullseye on it, maybe armbian xD) I only make file backups, no images. Not very fast, but what does that matter when you only use it for backups. (I run the NFS network drive from another storage device, but that is beside the point) If you also use btrfs on the system you backup from, it creates a snapshot at runtime that it transfers files from, so there is no risk of corrupting files while the backup is running due to files changing during the backup. You would probably get all that for the same price as one ssd, or at least close to, spinning dives cost close to nothing. I have 5 clients connected to that backup solution, with 4 backups daily saved for about 2,5 months (one backup every 5hrs and backups paused between 3am-7am), and one archived every month to save for three years. ie 240 incremental backups per device. One of the clients backing up 1.13T (the others are smaller, between 100-350G each) but all of it only taking up about 5.5TB, and backups runs fast af, only copying changed data due btrfs and de-duplication (COW). I have NEVER had to run a balance on that device (only done it once before for testing). But since it is getting close to the threshold, let's make an experiment and run a balance on it with chunks up to 30%. There are 987 snapshots on that device (not all 5 clients has reached 240 backups due to not being constantly turned on, my laptop and my installed "fallback" os for example) $ sudo btrfs subvol list /media/backup | wc -l 987 This is before balancing: $ sudo btrfs fi df --si /media/backup Data, single: total=5.60TB, used=5.60TB System, DUP: total=33.55MB, used=606.21kB Metadata, DUP: total=31.14GB, used=27.71GB GlobalReserve, single: total=536.87MB, used=0.00B The balance up to 20% took about 5 seconds, then on 25 and 30 it took a while, about 10 minutes (I forgot to run it with time so this is an estimate with me looking at the clock when starting and when saw it had it ended) It only moved a minimum amount of chunks $ sudo bin/btrfs-balance.sh --backup If balancing takes a long time, open another terminal and run: sudo watch -n1 'btrfs balance status /path' btrfs balance will run on /media/backup Do you want to continue? [y/n] y Dumping filters: flags 0x6, state 0x0, force is off METADATA (flags 0x2): balancing, usage=5 SYSTEM (flags 0x2): balancing, usage=5 Done, had to relocate 1 out of 5253 chunks Dumping filters: flags 0x1, state 0x0, force is off DATA (flags 0x2): balancing, usage=5 Done, had to relocate 0 out of 5253 chunks Dumping filters: flags 0x6, state 0x0, force is off METADATA (flags 0x2): balancing, usage=10 SYSTEM (flags 0x2): balancing, usage=10 Done, had to relocate 1 out of 5253 chunks Dumping filters: flags 0x1, state 0x0, force is off DATA (flags 0x2): balancing, usage=10 Done, had to relocate 0 out of 5253 chunks Dumping filters: flags 0x6, state 0x0, force is off METADATA (flags 0x2): balancing, usage=15 SYSTEM (flags 0x2): balancing, usage=15 Done, had to relocate 1 out of 5253 chunks Dumping filters: flags 0x1, state 0x0, force is off DATA (flags 0x2): balancing, usage=15 Done, had to relocate 0 out of 5253 chunks Dumping filters: flags 0x6, state 0x0, force is off METADATA (flags 0x2): balancing, usage=20 SYSTEM (flags 0x2): balancing, usage=20 Done, had to relocate 1 out of 5253 chunks Dumping filters: flags 0x1, state 0x0, force is off DATA (flags 0x2): balancing, usage=20 Done, had to relocate 0 out of 5253 chunks Dumping filters: flags 0x6, state 0x0, force is off METADATA (flags 0x2): balancing, usage=25 SYSTEM (flags 0x2): balancing, usage=25 Done, had to relocate 1 out of 5253 chunks Dumping filters: flags 0x1, state 0x0, force is off DATA (flags 0x2): balancing, usage=25 Done, had to relocate 1 out of 5253 chunks Dumping filters: flags 0x6, state 0x0, force is off METADATA (flags 0x2): balancing, usage=30 SYSTEM (flags 0x2): balancing, usage=30 Done, had to relocate 1 out of 5252 chunks Dumping filters: flags 0x1, state 0x0, force is off DATA (flags 0x2): balancing, usage=30 Done, had to relocate 0 out of 5252 chunks Dumping filters: flags 0x6, state 0x0, force is off METADATA (flags 0x2): balancing, usage=30 SYSTEM (flags 0x2): balancing, usage=30 Done, had to relocate 1 out of 5252 chunks Dumping filters: flags 0x1, state 0x0, force is off DATA (flags 0x2): balancing, usage=30 Done, had to relocate 0 out of 5252 chunks This is after balancing: $ sudo btrfs fi df --si /media/backup Data, single: total=5.60TB, used=5.60TB System, DUP: total=33.55MB, used=606.21kB Metadata, DUP: total=31.14GB, used=27.71GB GlobalReserve, single: total=536.87MB, used=0.00B As you can see, no change whatsoever because btrfs does this in the background all by itself. And running higher % would not save any space, only take a ton of time, I'm pretty sure of that. If you want the script I used, here you go: (I have two btrfs filesystems on that rpi, modify to your liking if adopting) !/usr/bin/env bash # Check if script is run as root if [ "$EUID" != 0 ]; then echo 'THIS SCRIPT MUST BE RUN AS ROOT! (WITH SUDO)' exit 1 fi if [ "$1" == '--backup' ]; then METHOD='/media/backup' elif [ "$1" == '--usr' ]; then METHOD='/media/usr' else METHOD='all' fi echo 'If balancing takes a long time, open another terminal and run:' echo -e "sudo watch -n1 'btrfs balance status /path'\n" echo "btrfs balance will run on $METHOD" read -p "Do you want to continue? [y/n] " -n 1 -r if ! [[ "$REPLY" =~ ^[Yy]$ ]]; then echo '' echo 'Aborting...' exit 4 fi echo '' if [ "$METHOD" == '/media/usr' ] || [ "$METHOD" == 'all' ]; then btrfs balance start -v -musage=5 /media/usr btrfs balance start -v -dusage=5 /media/usr btrfs balance start -v -musage=10 /media/usr btrfs balance start -v -dusage=10 /media/usr btrfs balance start -v -musage=15 /media/usr btrfs balance start -v -dusage=15 /media/usr btrfs balance start -v -musage=20 /media/usr btrfs balance start -v -dusage=20 /media/usr btrfs balance start -v -musage=25 /media/usr btrfs balance start -v -dusage=25 /media/usr btrfs balance start -v -musage=30 /media/usr btrfs balance start -v -dusage=30 /media/usr btrfs balance start -v -musage=35 /media/usr btrfs balance start -v -dusage=35 /media/usr fi if [ "$METHOD" == '/media/backup' ] || [ "$METHOD" == 'all' ]; then btrfs balance start -v -musage=5 /media/backup btrfs balance start -v -dusage=5 /media/backup btrfs balance start -v -musage=10 /media/backup btrfs balance start -v -dusage=10 /media/backup btrfs balance start -v -musage=15 /media/backup btrfs balance start -v -dusage=15 /media/backup btrfs balance start -v -musage=20 /media/backup btrfs balance start -v -dusage=20 /media/backup btrfs balance start -v -musage=25 /media/backup btrfs balance start -v -dusage=25 /media/backup btrfs balance start -v -musage=30 /media/backup btrfs balance start -v -dusage=30 /media/backup btrfs balance start -v -musage=30 /media/backup btrfs balance start -v -dusage=30 /media/backup fi exit 0 This probably means I should manually remove some snapshots, because I did make a few massive changes that caused a lot of new data to be created, I do NOT want it to become filled. Conclusion: Don't run btrfs balance unless absolutely necessary, especially on SSD:s!
  13. I assume you are talking about local connection here, not from the internet, so it's ngiinx webserver you are talking about, not nginx-reverse-proxy? Can you at least ping the ip of the server? Syncing apps might not connect over http or https (or rather, they probably don't), which your browser does. Are you sure letsencrypt works properly and it's not just your browsers refusing to connect over https due to missing/miss-configured ssl certificates? Does forcing http connection at least give you some response? As for using wget to test: "wget --spider <url>" should get you some info. It should look something like this for correct setup using https: (enter url without http or https, I have redacted url and ip for obvious privacy reasons) $ wget --spider <your_url_here> Prepended http:// to '<redacted>' URL transformed to HTTPS due to an HSTS policy Spider mode enabled. Check if remote file exists. --2026-05-23 14:48:27-- https://<redacted> Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt' Resolving <redacted> (<redacted>)... xxx.xxx.xxx.xxx Connecting to <redacted> (<redacted>)|xxx.xxx.xxx.xxx|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 0 Remote file exists and could contain further links, but recursion is disabled -- not retrieving. But as eselarm said above, we need way more information to be able to help.
  14. For mate IIRC they use gnome's gnome-language-selector (start it in a terminal if you are missing the icon in settings), but it was a while since I used that desktop-env so I could be wrong. My old notes says the setting should be in: System > Control Center > Language Support For your information (as a fellow Swedish person): there is a locale called en_DK.UTF-8 that you might want to use instead. That way you get the correct settings for Scandinavian (like date/clock format for example) but the language is English. Or you can probably do it in terminal altogether: sudo dpkg-reconfigure locales # select en_DK.UTF-8 here, or whatever locale you want to use, I will use the dk version in this example localectl set-locale LANG=en_DK.UTF-8 sed -i "s/sv_SE/en_DK/" ~/.dmrc
  15. Really? You changed the network config, installed a massive application AND enabled apparmor in the same boot... Cmon dude... It probably does, if you don't also change the network.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines