This number: 0x00f00000 is used at least twice in creating an encrypted root
$this->bbcode_second_pass_code('', '
Step 9
Edit /boot/config.txt and add to the end:
initramfs initrd 0x00f00000
')
$this->bbcode_second_pass_code('', '
Step 10
Edit the kernel command line, leave whatever is there alone, add or modify the following (file is /boot/cmdline.txt):
cryptdevice=/dev/mmcblk0p3:root:allow-discards root=/dev/mapper/root initrd=0x00f00000
Up to you if you want allow-discards or not, your choice.
Be sure to leave the "ro" option there.
Now add the following to fstab, edit /mnt/etc/fstab and ensure:
/dev/mmcblk0p1 /boot vfat defaults 0 0
/dev/mapper/root / ext4 defaults,discard,commit=120 0 1
')
$this->bbcode_second_pass_code('', 'ls -al /boot')
$this->bbcode_second_pass_code('', '
total 22404
drwxr-xr-x 3 root root 16384 Oct 9 21:13 .
drwxr-xr-x 18 root root 4096 Oct 8 17:05 ..
-rwxr-xr-x 1 root root 14010 Sep 30 21:06 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root 14273 Sep 30 21:06 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root 13964 Sep 30 21:06 bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root 17932 Oct 4 20:28 bootcode.bin
-rwxr-xr-x 1 root root 240 Oct 9 21:32 cmdline.txt
-rwxr-xr-x 1 root root 149 Oct 9 21:30 config.txt
-rwxr-xr-x 1 root root 2532 Oct 4 20:28 fixup_cd.dat
-rwxr-xr-x 1 root root 6504 Oct 4 20:28 fixup.dat
-rwxr-xr-x 1 root root 9744 Oct 4 20:28 fixup_db.dat
-rwxr-xr-x 1 root root 9740 Oct 4 20:28 fixup_x.dat
-rwxr-xr-x 1 root root 4789167 Oct 9 21:13 initrd
-rwxr-xr-x 1 root root 5780324 Sep 30 21:06 kernel.img
drwxr-xr-x 2 root root 8192 Sep 30 21:06 overlays
-rwxr-xr-x 1 root root 633252 Oct 4 20:28 start_cd.elf
-rwxr-xr-x 1 root root 4944996 Oct 4 20:28 start_db.elf
-rwxr-xr-x 1 root root 2763940 Oct 4 20:28 start.elf
-rwxr-xr-x 1 root root 3895396 Oct 4 20:28 start_x.elf
')
How from this:
$this->bbcode_second_pass_code('', '
-rwxr-xr-x 1 root root 4789167 Oct 9 21:13 initrd
')
do I get this:
$this->bbcode_second_pass_code('', '
0x00f00000
')
How do I get the size of a file in hex?