Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel flags for apparmor #275

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

dashaub
Copy link

@dashaub dashaub commented Jan 8, 2021

#274

Kernel 5.10.4 builds fine, but installing the deb fails. Issue might be unrelated.

Setting up prawnos-linux-image-armhf (5.10.4-1-2) ...
/etc/prawnos/kernel/FlashKernelPartition.sh: line 39: syntax error near unexpect
ed token `;;'
/etc/prawnos/kernel/FlashKernelPartition.sh: line 39: `        echo "Unknown dev
ice! can't determine emmc devname. Please file an issue with the output of fdisk
 -l if you get this on a supported device"; exit 1;;'
dpkg: error processing package prawnos-linux-image-armhf (--configure):
 installed prawnos-linux-image-armhf package post-installation script subprocess
 returned error exit status 2
Errors were encountered while processing:
 prawnos-linux-image-armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)

Boot on /dev/mmcblk2 seems fine

Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
The primary GPT table is corrupt, but the backup appears OK, so that will be used.


Disk /dev/mmcblk2: 14.68 GiB, 15762194432 bytes, 30785536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 97D882F4-50AD-11EB-A78A-4723418FC9BD

Device         Start      End  Sectors  Size Type
/dev/mmcblk2p1 20480    86015    65536   32M ChromeOS kernel
/dev/mmcblk2p2 86016 30785501 30699486 14.6G Microsoft basic data


Disk /dev/mapper/luksroot: 14.62 GiB, 15701359616 bytes, 30666718 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

@dashaub
Copy link
Author

dashaub commented Jan 8, 2021

Shellcheck doesn't like this. Same occurrences in other script locations that I'm changing for now. DRY principle suggests these functions could be pulled out in a refactor.

$ shellcheck scripts/InstallScripts/InstallPackages.sh 

In scripts/InstallScripts/InstallPackages.sh line 36:
get_emmc_devname() {
                   ^-- SC1009: The mentioned syntax error was in this brace group.


In scripts/InstallScripts/InstallPackages.sh line 38:
    if [ -z "$devname" ]
    ^-- SC1046: Couldn't find 'fi' for this 'if'.
    ^-- SC1073: Couldn't parse this if expression. Fix to allow more checks.


In scripts/InstallScripts/InstallPackages.sh line 40:
        echo "Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"; exit 1;;
                                                                                                                                                           ^-- SC1047: Expected 'fi' matching previously mentioned 'if'.
                                                                                                                                                             ^-- SC1072: Unexpected . Fix any mentioned problems and try again.

@SolidHal
Copy link
Owner

@dashaub apologies for getting to this so late, could you clarify the use case for apparmor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants