Jump to content


  • Posts

  • Joined

  • Last visited

  1. I had the same problem on first boot (buster on HC2). Second boot worked. Didnt find out the reason for failure on first boot (suspectzed an error in ssh config, but that wasnt the case). Did you try a second boot with bullseye? jba
  2. You are right, as my /var/log is less than 75 % full this part of the script is not executed. So, what can I do with my "patch" (I know its trivial but it solves a problem that may exist on a lot of armbian systems)? Can I send it anywhere to get checked? jba
  3. Correct. The cleanup i done in /var/log/journal (at least thats how I understand the statement). Deletion of files is never propagated to /var/log.hdd/journal. In armbian-truncate-jobs maximum size of journal is 5MB. For journald it is defined as 20 MB. And a size of about 20 MB is what I normally see. I would expect it to be the lower value as in armbian-truncate-logs. Why is this not the case? There was a --delete in an older version, but for the complete /var/log. This wouldn't work with the other scripts as they interplay today. The --delete was removed 3 years ago. jba
  4. Now I have a solution that works. The hole thing seems extremely complicated to me. I did not find out all the tricks how logrotate, armbian-ramlog and maybe other functions work together. But the problem I had is now clear to me: Armbian copies current logs ad midnight from /var/log to /var/log.hdd. There they are rotated by logrotate. That works (at least for logs armbian is aware of). However, /var/log/journal (by journald) is not covered by logrotate. It does its own cleaning up in /var/log/journal. So /var/log.hdd/journal is keeping all the old files and gets bigger and bigger. On my system it increases by 10 MB per day. So after some days, /var/log.hdd gets bigger than 50 MB, which is the size of the ramdisk used for /var/log. Which becomes a problem on next reboot because then everything from /var/log.hdd is copied to /var/log which is too small. Therefore not all logs can be copied and get get lost in the end. My proposed solution is to do a second sync in syncToDisk to sync /var/log/journal to /var/log.hdd/journal and uses the --delete option. This way, everything that was deleted in /var/log/journal will also be deleted in /var/log.hdd/journal. Now, /var/log.hdd/journal grows no longer. Here is the patch: jba@lana:/lib/armbian$ diff armbian-ramlog armbian-ramlog.orig 56,62d55 < < # jba 2022-03-15 < ${NoCache} rsync -aXWv \ < --delete \ < --links \ < ${RAM_LOG}journal/ ${HDD_LOG}journal 2>&1 | $LOG_OUTPUT < This works fine on my system. What do you think about it? can it be incorporated in official armbian-ramlog? How can I post a bug report and proposal? jba
  5. I did some testing with overlayfs as described in the link. It worked fine but I also found out, that writing to the lowerdir (in our case the version on the sd) is not permitted by overlayfs. You can do so, it worked in a test, but its no guaranteed to work always. Seems it was designed for ro lowerdirs only: So it is not a good idea to use it this way. What could be done is having to directories on sd. One is used to hold the lowerdir and will not be changed while the ramdisk is mounted as an overlay. The other one (backup) holds the changes and is updated once per day and on shutdown. On next boot all files are copied from the backup to the lowerdir before the overlay is setup. However, the only benefit of this approach to the solution I now use (see below) is that we need a smaller ramdisk (as it only holds the changes) and safe some ram. What I did in the end is modifying armbian-ramlog so that all syncs are done with the option --delete *.gz, *.xz, '*.[0-9] are no longer excluded from the rsync Now log.hdd is an exact copy of log. Therefore the ramdisk needs be somehow bigger. I increased the size to 70 MB which seems to work. Any opinion on that? What about including it in the package? jba
  6. On my odroid hc2 with armbian/bullseye I found some of the logs (both in /var/log and /var/log.hdd) empty, while they should have some contens (i.e. afpd.log, kern.log, user.log, ...). The empty files all have the timestamp of a run of armbian-ramlog at a recent reboot. In armbian-ramlog.log I found this for the run that created the empty files: rsync: [receiver] write failed on "/var/log/journal/0d4b1c13b9a14b6d9c746402b7d7ef6f/user-1000@0005d37f46f9961b-23c015a66b68d086.journal~": No space left on device (28) rsync error: error in file IO (code 11) at receiver.c(378) [receiver=3.2.3] rsync: [sender] write error: Broken pipe (32) Seems that journal has become too big to fit on the log/ramdisk. That is strange, as I defined a maximum of 20MB for the journal and the ramdisk has 50MB. I guess this is what happened: When syncing to sd armbian-ramlog uses rsync without --delete. So if some older files have been already delete by journald (because of the 20 MB limit) on the ramdisk, they will still stay in the log on sd. Therefore the journal on the sd will become bigger and bigger. Which is not a problem because there is plenty of space on the sd. However, when rebooting everything is copied from the sd to the ramdisk. Including the bloated journal. Thus the ramdisk is full and additional files will not fit (see error message from rsync). I think in this case rsync just creates empty files and that is the reason for my empty logs. And on next sync the empty files are copied back to sd so both versions are empty. There is another potential problem I see in the implementation of armbian-ramlog: on reboot only recent files (so no *.gz or *.[0-9]) are copied to ramdisk. After som runtime logrotate will rotate the logs and create new *.gz or *.[0-9]. However, these might already exist on the sd. They will be overwritten when the logs are written back to sd. So you loose old logs. I think both problems are due to the fact that simple rsync is used without --delete and without copying even the old files to the ramdisk. To overcome these problems I see two ways: use rsync --delete and dont exclude *.gz and *.[0-9]. Then the ramdisk holds all logs and when copying to sd nothing is lost. But this may requier a bigger ramdisk dont use rsync but use an overlay fs instead. I found this discussion on the topic. The described solution looks superior to me than what we are using now: https://unix.stackexchange.com/questions/424341/mount-var-logs-as-tmpfs-with-help-of-overlayfs-to-save-changes-sometimes What do you think about it? Would it make sense to use an overlay fs? I am not that deep into linux hacking and therefore are not sure if I would be able to implement it in a nice way. But I would like to support this process and do some tasks. Regards, jba
  7. In my (bullseye) sources.list I have deb http://security.debian.org/ bullseye-security main contrib non-free This works. I cannot tell if your line also works. If its wrong, apt should tell you. Strange that your system still says its buster. Did you do all the steps as described in my post? Any error messages? Whats in /etc/debian version? jba
  8. I now did the update to bullseye. Worked without problem like described by Heisath. Here is what I did in detail: # apt update # apt upgrade # nano /etc/apt/sources.list.d/armbian.list -> comment out the armbian repo # nano /etc/apt/sources.list -> change from buster to bullseye # apt update # apt upgrade --without-new-pkgs # apt full-upgrade # reboot # nano /etc/apt/sources.list.d/armbian.list -> reenable armbian repo # apt update # apt upgrade On my system it was not "armbian-image-* but "linux-image-current-odroidxu4". What took me some time is checking the changes in conf-files. Armbian did some changes and when installing a new version I was asked whether I want to use the new (bullseye) version or the existing ones (armbian changed buster). Normally I want to have a mix: The new config file (there might be some new options), but with all the changes that had been applied to the old one (mostly done by armbian). Would be easier if armbian would mark all the needed changes. But now its done. everything works. jba
  9. Hi Werner, when I select "Odroid HC1 / HC2 / MC1" in Downloads I am directed to a page where Buster is recommended as stable release ("High level of software maturity"). When looking for other boards (e.g. Odroid HC4) bullseye is recommended as stable releases ("High level of software maturity"). If I understand you correctly bullseye should have the same status for both boards. So, is this a mistake on the download page? No need to worry about bullseye status? jba
  10. I read that armbian bullseye for odroid HC2 is still unstable, while it is considered stable for other boards. Can somone explain the reaseon for this? Or point me to a place where this is discussed? If I knew what the reason is and it would be not important for my application, I could switch to bullseye now. Regards, jba
  11. That is my plan. But I was hoping that somebody would share his experience. I do not believe nobody tried this before. I am still unsure how to deal with the kernel. What I will try is freezing it, doing the upgrade/dist-upgrade and the unfreeze the kernel and do a kernel upgrade. As armbian bullseye is not yet stable I will wait until it is. And report how it worked after the upgrade. Hope it works because installing and configuring everything was a lot of work and I don't want to do this with every new debian release. Jürgen
  12. I just installed armbian buster on my NAS (odroid HC2). Everything works perfectly. However, as debian bullseye has become stable and I expect this to happen for armbian also in the near future, I am thinking about how to do the upgrade. This is mainly because all my other boxes run bullseye and administration becomes a lot easier if all systems run the same version. In addition, I will have to do the update anyways at some point in time and therefor I want do it when armbian bullseye becomes stable. Reading through the forum I found out it is not supported. However, I am using debian now since woody and have done a lot of upgrades since then, I think I will try it for armbian also (of course after making a full backup). I already read that i should do a freeze in armbian-config (disable kernel upgrades). Having done this, can I just start upgrading to bullseye the debian way (as it is described in the bullseye release notes). And after finishing this I would disable the freeze, which would allow the kernel update also? Any thoughts on this procedure? Anything else I have to do and that would be different to vanilla debian? Regards, Jürgen
  13. Just started my new odroid HC2 with armbian (Armbian_21.08.1_Odroidxu4_buster_current_5.4.142). However, I could not log in via ssh. I got the message kex_exchange_identification: read: Connection reset by peer Connection reset by port 22 The reason was, that in /etc/sshd_config PubkeyAuthentication was enabled. After commenting out I was able to login via ssh. I think this should be corrected as it makes no sense. Or at least the documentation should be changed (it says you can do your first login via ssh). Jürgen
  • Create New...