Go to advanced search

by ephestione
Tue Dec 28, 2021 10:12 am
Forum: Advanced users
Topic: Setup Btrfs RAID1 with LUKs encryption and remote unlocking via SSH with Dropbear
Replies: 0
Views: 75

Setup Btrfs RAID1 with LUKs encryption and remote unlocking via SSH with Dropbear

I can successfully boot a Btrfs RAID1 Pi4 on two SSD's by following https://www.ephestione.it/booting-btrfs-root-partition-on-raspberri-pi/ I intend to upgrade it to use system encryption, and be able to unlock it at boot via a dropbear console; I don't need to preserve the current system as this is...
by ephestione
Sun Sep 12, 2021 7:58 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

Yes, it didn't get left off the paste, but rather I edited the post and this forum deletes the $1 and $2 for some reason when you open an existing post to edit it
by ephestione
Sun Sep 12, 2021 4:32 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

Tested, and it works!
by ephestione
Sun Sep 12, 2021 3:56 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

if [ "x$2" != "x/boot/kernel8.img" ]; then exit 0 fi or similar should do it. The 'x's are traditional to handle the case of empty variables and old (read: prehistoric) shells which don't have /bin/test as a builtin. dang too late reading once again! I was missing a "fi&quo...
by ephestione
Sun Sep 12, 2021 3:55 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

Maybe this:

Code: Select all

#!/bin/bash
if [ "$2" == "/boot/kernel8.img" ]; then 
echo ============ UPDATE INITRAMFS ==============
mkinitramfs -o /boot/initramfs-btrfs.gz $1
echo ============ UPDATE COMPLETED ==============
testing again....
by ephestione
Sun Sep 12, 2021 3:00 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

Er, yeah: https://www.raspberrypi.org/forums/viewtopic.php?p=1912488#p1912488 lol, I must have written another reply before seeing yours, because I went to the hassle of checking the source of those scripts and then noticed you already told me :| Let's go and make YET ANOTHER test! yay! Possible fi...
by ephestione
Sun Sep 12, 2021 1:22 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

[quote=dickon post_id=1912492 time=1631452795 user_id=45367 That will break if the compression method is ever changed. Better to use the parameter the script is passed. [/quote] I don't understand, is there a kernel version value that I can address from inside the script when it's called by the hook...
by ephestione
Sun Sep 12, 2021 1:01 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

Final (?) version of my automatic update script: #!/bin/bash echo ============ UPDATE INITRAMFS ============== cd /boot # Please change the line below to kernel.img, kernel7.img, kernel7l.img # or kernel8.img depending on the model of Pi and whether you are # running in 32 or 64-bit mode. kfile=kern...
by ephestione
Sun Sep 12, 2021 12:52 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

I hacked a script to get the latest kernel's version from the post linked above: kfile=kernel8.img pos=`hexdump -ve '"%_ad " 1/1 "%02x\n"' $kfile | grep -B1 '8b' | grep -m1 '1f' | awk '{print $1}'` vers=`dd if=$kfile skip=$pos iflag=skip_bytes | gunzip | strings | grep -iPm1 'Lin...
by ephestione
Sun Sep 12, 2021 12:39 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

EDIT: FOUND IT!

I needed to run:
sudo mkinitramfs -o /boot/initramfs-btrfs.gz 5.10.60-v8+

manually in the cli,an initramfs succeeded, otherwise either in the hook script or manually on CLI, I get the same error messages.
Now, how do I parametrize the newest kernel folder in the hook script?
by ephestione
Sun Sep 12, 2021 12:33 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

Ok, I'mofficially lost. I spent time and effort to hack together everything: flashed latest 64bit image to usb stick, had it booted, followed guide by feldspaten linked in OP to convert and boot from a btrfs root partition, all fine. Then I created the file /etc/kernel/postinst.d/btrfs-update, chmod...
by ephestione
Sun Sep 12, 2021 10:11 am
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

Using latest 64bit build on a raspi4 8GB, intending to create a RAID1 with two SSD's. I followed this guide: https://feldspaten.org/2019/07/05/raspbian-and-btrfs/ and I could boot off btrfs no problem, but I despise the idea of having to remember to re-issue mkinitramfs each time I update kernel BE...
by ephestione
Sun Sep 12, 2021 9:42 am
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

is visible difference between working rpios on btrfs and ext4 ? on desktop computer btrfs compression boosts boot time on slow disks compared to ext4. compression ratio is about 2 I didn't test compression,and have not previous data on this system to make a comparison, my real reason for favouring ...
by ephestione
Sun Sep 12, 2021 7:37 am
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

Great news, this simplified the matter very much... I should test the hook on a vanilla install off the unmodified 64bit image, migrate to btrfs right away, then trigger apt full-upgrade to have the kernel updated, and see if it can still boot without my intervention :idea:
by ephestione
Sat Sep 11, 2021 6:19 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

Re: btrfs support in kernel, yes or maybe?

Thank you all for the numerous and fast replies! I indeed had noticed other threads elsewhere than these forums, where there was a reference to hooks to be exploited for this usage, the actual scope of which is way beyond my level, as the only thing I understand for my specific use case, is that, af...
by ephestione
Sat Sep 11, 2021 4:17 pm
Forum: Advanced users
Topic: btrfs support in kernel, yes or maybe?
Replies: 26
Views: 1642

btrfs support in kernel, yes or maybe?

Using latest 64bit build on a raspi4 8GB, intending to create a RAID1 with two SSD's. I followed this guide: https://feldspaten.org/2019/07/05/raspbian-and-btrfs/ and I could boot off btrfs no problem, but I despise the idea of having to remember to re-issue mkinitramfs each time I update kernel BEF...
by ephestione
Wed Jan 27, 2021 6:20 pm
Forum: Troubleshooting
Topic: Errors with apt update, and then dist-upgrade goes bonkers
Replies: 1
Views: 141

Errors with apt update, and then dist-upgrade goes bonkers

I understand the title of the topic is too generic, but I couldn't make it more detailed without running out of space very soon. So here goes. This is a raspi3 with USB boot to a partitioned SSD, running stretch, no SD in it. System was runninng for 40 days straight, no problems. I decide to run sud...
by ephestione
Sun Sep 29, 2019 3:20 pm
Forum: Beginners
Topic: Backup and recovery solution I use (recovery image)
Replies: 1
Views: 3093

Re: Backup and recovery solution I use (recovery image)

Thank you for sharing! I was excited when I started reading, and kept being excited while reading, because your solution was so complex that to me it looked very sexy :mrgreen: Until finally my brain wrapped it up towards the end, and I was like "uhm, okay, it's very sexy, but how is it actuall...
by ephestione
Sun Sep 15, 2019 2:12 pm
Forum: Troubleshooting
Topic: Decoding "vcgencmd get_throttled"
Replies: 2
Views: 1741

Re: Decoding "vcgencmd get_throttled"

Holeeee sheeeet I just did another one and only now I found yours :mrgreen:

Well, I used PHP anyway, so to each his own:
http://www.ephestione.it/decode-vcgencm ... hp-script/
by ephestione
Sat Sep 14, 2019 7:49 pm
Forum: Beginners
Topic: Format the output of vcgencmd measure_clock arm to human readable value
Replies: 5
Views: 2141

Re: Format the output of vcgencmd measure_clock arm to human readable value

I created the file $HOME/.byobu/bin/5_clk file with the following contents: #!/bin/bash vcgencmd measure_clock arm | awk ' BEGIN { FS="=" } ; { printf("#[fg=#ffffff,bg=cyan]%.1fGHz#[default]\n", $2 / 1000000000) } ' enabled the "custom" value inside the notification tog...
by ephestione
Sat Sep 14, 2019 7:22 pm
Forum: Beginners
Topic: Format the output of vcgencmd measure_clock arm to human readable value
Replies: 5
Views: 2141

Re: Format the output of vcgencmd measure_clock arm to human readable value

Thank you all! I wasn't expecting such fast comebacks! I think I will go with @trejan solution, since it gives exactly what I need, even if it's a little slower (something less than double the time to execute) than @jbudd 's first suggestion, which alas truncates the result :( His second suggestion ...
by ephestione
Sat Sep 14, 2019 7:10 pm
Forum: Beginners
Topic: Uninstall older versions of packages that still exist after newer versions have been installed?
Replies: 6
Views: 1190

Re: Uninstall older versions of packages that still exist after newer versions have been installed?

Thank you for the feedback :) This is an update: dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n does output the existence of a mariadb-server-10.1 package together with mariadb-server-10.3 package, the older being even larger, at about 70MB, than the newer. But when I issue sudo apt sear...
by ephestione
Sat Sep 14, 2019 6:12 pm
Forum: Beginners
Topic: Format the output of vcgencmd measure_clock arm to human readable value
Replies: 5
Views: 2141

Format the output of vcgencmd measure_clock arm to human readable value

I want to display a custom value on byobu status bar, which is the real CPU clock (currently it seems to be displaying the contents of /sys/devices/​system/cpu/cpu0/cpufreq/scaling_cur_freq, which is not necessarily the correct value), so I want to follow this guide: http://blog.dustinkirkland.com/2...
by ephestione
Sat Sep 14, 2019 1:47 pm
Forum: Beginners
Topic: Uninstall older versions of packages that still exist after newer versions have been installed?
Replies: 6
Views: 1190

Re: Uninstall older versions of packages that still exist after newer versions have been installed?

Thank you scruss, using autoclean and autoremove with apt was the first thing I did, what remains is what apt deems "still necessary". I will definitely remove the 10.1 versions of mariadb, I've decided against apt judgement :D I wondered if there's something that does it automagically. Af...
by ephestione
Sat Sep 14, 2019 1:25 pm
Forum: Beginners
Topic: Uninstall older versions of packages that still exist after newer versions have been installed?
Replies: 6
Views: 1190

Uninstall older versions of packages that still exist after newer versions have been installed?

Just upgraded from stretch to buster before swapping the 3b+ to a 4, and the upgrade process, other than excruciatingly slow, left a lot less space on the root partition. I use a 32GB pendrive, where I limited root to 4GB since that's always been way more than enough, and I was surprised that a simp...

Go to advanced search