Kali Linux for Pinebook Pro - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114) +--- Thread: Kali Linux for Pinebook Pro (/showthread.php?tid=8838) |
RE: Kali Linux for Pinebook Pro - chaoskampf - 06-10-2020 kali image: Code: parted -m kali-linux-2020.2-pinebook-pro.img print | tail -n +3 | awk -F ":" '{print $(NF-2)}' kali on sd: Code: file -sL /dev/mmcblk1p1 edited: There is no extlinux.conf (there are boot.txt and boot.src) in this Kali image and I was not able to boot from sd after flashing kali to emmc without reflashing e.g. manjaro to emmc. RE: Kali Linux for Pinebook Pro - wdt - 06-10-2020 Well, there clearly is not room in the image for idbloader & friends So it must rely on the uboot on emmc So, when you flash the emmc, there is no more a uboot...anywhere Personally, I would hack the image, then test by disabling emmc As so 15Mblank + kali + 1M blank,, fdisk image,, dd mrfixit idbloader, uboot, ATF to image Try boot with working then non-working emmc Maybe boot.txt need editing (&recompile) As I said,, it must not have been tested, so I have little confidence OR, if you can't do it right, why bother RE: Kali Linux for Pinebook Pro - chaoskampf - 06-10-2020 As far as I know need to edit boot.txt to match kali on emmc (root=UID) and generate boot.src with command smth like the following. Code: mkimage -A arm64 -T script -O linux -d boot.txt boot.scr RE: Kali Linux for Pinebook Pro - granstr0m - 06-10-2020 (06-10-2020, 07:31 AM)wdt Wrote: Well, there clearly is not room in the image for idbloader & friends Perhaps one should look into if someone is working on an emmc installer image. It seems not that easy doing this by hand. It could have been a bit easier if Kali kept their /boot on a separate partition, but no. Damn I really want to use this computer with Kali installed on. the emmc. (06-10-2020, 09:19 AM)granstr0m Wrote:(06-10-2020, 07:31 AM)wdt Wrote: Well, there clearly is not room in the image for idbloader & friends RE: Kali Linux for Pinebook Pro - granstr0m - 06-10-2020 I did a quick check of the buildscript and it seems there is a bug. In the beginning it sets up the partition 2048 sectors in to the device: parted ${imagename}.img --script -- mkpart primary ext3 2048s 100% At the end of the script it writes the idbloader and u-boot 64 sectors in and 16384 sectors in: dd if="${basedir}"/../misc/pbp/idbloader.img of=${loopdevice} seek=64 conv=notrunc dd if="${basedir}"/../misc/pbp/u-boot.itb of=${loopdevice} seek=16384 conv=notrunc 16384 obviously is far beyond the 2048 (if the default sector size is the same). This must be wrong. So if you could change the line in the beginning to: parted ${imagename}.img --script -- mkpart primary ext3 32768s 100% and then build a new image perhaps it could be used to install with dd. That is if there's no other configuration pointing at 2048 that needs to be changed??? I could give it a try though it will possibly take me some time to get the crosscompiler going... I have reported our problems to the developers of the build script for Kali images. https://gitlab.com/kalilinux/build-scripts/kali-arm/-/issues/189 RE: Kali Linux for Pinebook Pro - chaoskampf - 06-10-2020 I will try smth like bellow to move existing and configured Kali installation from SD to eMMC. Steps: 1. Boot from kali on sd 2. Write u-boot and friends to eMMC: Code: dd if=idbloader.img of=/dev/mmcblk2 bs=32k seek=1 conv=fsync Code: (parted) mkpart primary ext3 32768s -1s 5. Code: cd /mnt Code: mkdir dev proc sys mnt Code: rsync -aHxv --numeric-ids --progress /* /mnt --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/mnt Code: chroot /mnt 10. Code: mkimage -A arm64 -T script -O linux -d boot.txt boot.scr Any suggestions and comments are appreciated. (edited) RE: Kali Linux for Pinebook Pro - granstr0m - 06-10-2020 Is this right: root=/dev/mmcblk1p1 I think mmcblk2 is always the emmc even if no sd is inserted. RE: Kali Linux for Pinebook Pro - chaoskampf - 06-10-2020 (06-10-2020, 02:30 PM)granstr0m Wrote: Is this right: Yeah, you're right. RE: Kali Linux for Pinebook Pro - granstr0m - 06-11-2020 (06-10-2020, 01:11 PM)chaoskampf Wrote: I will try smth like bellow to move existing and configured Kali installation from SD to eMMC. I followed your guide and it works!!! Thankyou!!!!!! I actually had Manjaro installed so I skipped step 2 and just deleted p1 and p2 since the boot stuff was already there. Added a few code steps that might not be obvious to everyone: 1. Boot from kali on sd 2. Write u-boot and friends to eMMC: Code: dd if=idbloader.img of=/dev/mmcblk2 bs=32k seek=1 conv=fsync dd if=uboot.img of=/dev/mmcblk2 bs=64k seek=128 conv=fsync dd if=trust.img of=/dev/mmcblk2 bs=64k seek=192 conv=fsync 3. Create partition on eMMC (starting at 32768 sector) Code: parted /dev/mmcblk2 (parted) mkpart primary ext3 32768s -1s mkfs.ext3 /dev/mmcblk2p1 4. Mount the partition in /mnt mount -t ext3 /dev/mmcblk2p1 /mnt 5. Code: cd /mnt 6. Code: mkdir dev proc sys mnt 7. Code: apt update sudo apt install rsync rsync -aHxv --numeric-ids --progress /* /mnt --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/mnt 8. Code: chroot /mnt 9. Edit boot.txt and change "root=PARTUUID=${uuid}" to "root=/dev/mmcblk2p1" cd /boot vi boot.txt 10. Code: mkimage -A arm64 -T script -O linux -d boot.txt boot.scr 11. reboot (without sd) RE: Kali Linux for Pinebook Pro - chaoskampf - 06-11-2020 (06-11-2020, 01:07 AM)granstr0m Wrote:(06-10-2020, 01:11 PM)chaoskampf Wrote: I will try smth like bellow to move existing and configured Kali installation from SD to eMMC. It's my pleasure. Code: fdisk -l Code: lsblk |