Trouble booting in Gentoo
#1
Hello all!



I'm currently running Manjaro ARM (as the PBP was shipped with), and I have been trying to install Gentoo onto an sd card for my PBP, following Jannik2099's guide as well as Gentoo's AMD64 handbook. Here are my main 3 sources of information:

https://forum.pine64.org/showthread.php?tid=8765

https://github.com/Jannik2099/gentoo-pinebookpro

https://wiki.gentoo.org/wiki/Handbook:AMD64



I have tried installing it twice now onto my 64GB sd card. I encounter no errors or problems during the installation process. But when I reboot the laptop, I am left with a boot loop. I know that /boot/extlinux/extlinux.conf (on the sd card) is being read upon boot, because if I modify it and change the line

Code:
...
timeout 50
...
to

Code:
timeout 500
or something else, the time the laptop is powered on changes according to the timeout value. But either way, it still powers on, waits some time (as per the timeout), and then reboots, and repeats.



I've tried installing 2 times now, each with different partitioning.



Here are the partitions from my first install. I didn't copy it down unfortunately, so this is merely a guess. I think the only values that will be wrong are the sectors (start, end, & size), but they will still be close approximates.

Code:
root # parted /dev/mmcblk1 u S p

Partition Table: msdos

Number  Start     End         Size        Type      File system     Flags
1       2048s     526335s     524288s     primary   fat32           lba
2       526336    8914942     8388608s    primary   swap
3       8914943   123473886s  114558944s  primary   btrfs


Here are the partitions from my second (and current) install. I used this as a reference for my partitioning.

Code:
root # parted /dev/mmcblk1 u S p

Partition Table: gpt

Number  Start     End         Size        File system     Name               Flags
2      64s       16383s      16320s                      IDBLoader
3      16384s    24575s      8192s                       U-Boot
4      24576s    32767s      8192s                       TrustedFirmware-A
1      32768s    557055s     524288s     fat32           GENT-BOOT
5      557056s   8945663s    8388608s    linux-swap(v1)  GENT-SWAP          swap
6      8945664s  123473886s  114528223s  f2fs            GENT-ROOT




Most of the installation process probably did not play into my boot problems but I will quickly go through the steps I took on each installation:

1. Partioned SD card

2. Mounted root partion to /mnt/gentoo and boot partition to /mnt/gentoo/boot

3. Extracted stage3 archive.

4. Git cloned Jannik2099's repository (link at the top of this post)

5. Coppied DNS info and mounted the necessary filesystems exactly as the AMD64 handbook did.

6. Chrooted into /mnt/gentoo

7. Modified make.conf as such:

Code:
COMMON_FLAGS="-march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

CHOST="aarch64-unknown-linux-gnu"

MAKEOPTS="-j6 -l8"
EMERGE_DEFAULT_OPTS="--jobs 6 --load-average 8"
FEATURES="parallel-install"

LC_MESSAGES=C

ACCEPT_LICENSE="*"
USE=""


8. Ran Jannik2099's script (prepare.sh)

9. Selected the default profile (default/linux/arm64/17.0 (stable)) and updated @world set

10. Set timezone and locale stuff

11. Emerged sys-kernel/pinebookpro-manjaro-sources sys-kernel/genkernel sys-boot/extlinux sys-boot/u-boot

12. Installed U-Boot as such:

Code:
#FIRST INSTALLATION
dd if=/usr/share/u-boot/idbloader.img of=/dev/mmcblk1 seek=64 conv=notrunc
dd if=/usr/share/u-boot/u-boot.itb of=/dev/mmcblk1 seek=16384 conv=notrunc

#SECOND INSTALLATION
dd if=/usr/share/u-boot/idbloader.img of=/dev/mmcblk1p2
dd if=/usr/share/u-boot/u-boot.itb of=/dev/mmcblk1p3
13. Updated /etc/fstab for boot entry:

Code:
/dev/mmcblk1p1   /boot  vfat   defaults  0 2
14. eselected kernel and ran genkernel all
15. Went to /usr/src/linux and ran:

Code:
make dtbs && make dtbs_install
16. Ran u-boot-update

17. Updated fstab to:

Code:
#first entry of each line was different on both of my installations, but everything else was the same. On my first
installation I used both device names (i.e. /dev/mmcblk1p1) and UUIDs.

LABEL=GENT-BOOT         /boot           vfat            defaults,noatime        0 2
LABEL=GENT-SWAP         none            swap            sw                      0 0
LABEL=GENT-ROOT         /               f2fs            noatime                 0 1
18. Exited chroot environment and unmounted everything necessary and rebooted.

19. Boot loop Sad



Here is some other relevant information:



Code:
# /boot/extlinux/extlinux.conf

default l0
menu title U-Boot menu
prompt 0
timeout 50


label l0
        menu label Gentoo Linux 5.11.16-pinebookpro-arm64
        linux /vmlinuz-5.11.16-pinebookpro-arm64

        append  initrd=/initramfs-5.11.16-pinebookpro-arm64.img root=LABEL=GENT-ROOT console=tty1 rw video=eDP-1:1920x1080@60

label l0r
        menu label Gentoo Linux 5.11.16-pinebookpro-arm64 (rescue target)
        linux /vmlinuz-5.11.16-pinebookpro-arm64

        append initrd=/initramfs-5.11.16-pinebookpro-arm64.img root=LABEL=GENT-ROOT console=tty1 rw video=eDP-1:1920x1080@60 systemd.unit=rescue.target
Code:
# /etc/default/u-boot

U_BOOT_UPDATE="true"

U_BOOT_ALTERNATIVES="default recovery"
U_BOOT_DEFAULT="l0"
U_BOOT_ENTRIES="all"
U_BOOT_MENU_LABEL="Gentoo Linux"
U_BOOT_PARAMETERS="console=tty1 rw video=eDP-1:1920x1080@60"
U_BOOT_ROOT=""
U_BOOT_TIMEOUT="50"
U_BOOT_FDT="rockchip/rk3399-pinebook-pro.dtb"
U_BOOT_FDT_DIR="dtbs"
Code:
root # ls -l /boot

drwxr-xr-x 3 root root      512 Jul 15 19:59 dtbs
drwxr-xr-x 2 root root      512 Jul 16 16:19 extlinux
-rwxr-xr-x 1 root root  9865720 Jul 16 14:05 initramfs-5.11.16-pinebookpro-arm64.img
-rwxr-xr-x 1 root root  5130930 Jul 16 14:05 System.map-5.11.16-pinebookpro-arm64
-rwxr-xr-x 1 root root 26708480 Jul 16 14:05 vmlinuz-5.11.16-pinebookpro-arm64


I have also updated my Manjaro system and updated u-boot on it as well.



I've been at this for several days now and I feel like I am going to lose my mind trying to figure out what's wrong! I have scoured the internet and so far there hasn't been much helpful information.



I would sincerely appreciate any help my issues. Thank you!
  Reply


Messages In This Thread
Trouble booting in Gentoo - by tdiggitydog - 07-16-2021, 04:28 PM
RE: Trouble booting in Gentoo - by 33YN2 - 07-18-2021, 01:00 PM
RE: Trouble booting in Gentoo - by wdt - 07-18-2021, 03:40 PM
RE: Trouble booting in Gentoo - by tdiggitydog - 07-19-2021, 03:09 PM
RE: Trouble booting in Gentoo - by wdt - 07-19-2021, 04:18 PM
RE: Trouble booting in Gentoo - by tdiggitydog - 07-19-2021, 04:42 PM
RE: Trouble booting in Gentoo - by moonwalkers - 07-19-2021, 08:41 PM
RE: Trouble booting in Gentoo - by wdt - 07-19-2021, 05:39 PM
RE: Trouble booting in Gentoo - by tdiggitydog - 07-20-2021, 01:37 PM
RE: Trouble booting in Gentoo - by wdt - 07-19-2021, 10:58 PM
RE: Trouble booting in Gentoo - by moonwalkers - 07-20-2021, 10:16 PM
RE: Trouble booting in Gentoo - by Arwen - 07-20-2021, 08:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Gentoo on Pinebook Pro RELEASE jannik2099 54 103,585 12-08-2023, 11:25 PM
Last Post: tllim
  Issue with booting Manjaro from encrypted NVMe drive on pbp Cs137 1 1,367 08-18-2023, 01:58 AM
Last Post: juliamenendez
  Fix for Armbian not booting on PBP from eMMC agreenbhm 7 5,289 04-01-2023, 02:58 PM
Last Post: TRS-80
  Booting Arch from USB lorebett 6 4,166 09-18-2022, 11:35 AM
Last Post: lorebett
  pinebook pro not booting cricket 1 1,540 08-17-2022, 04:38 PM
Last Post: cricket
  PBP not booting anymore jsch 5 3,821 04-21-2022, 11:24 AM
Last Post: tophneal
  Problems installing/ booting a different Linux on PinebookPro v-man 3 3,725 03-22-2022, 06:37 PM
Last Post: pentamassiv
  trouble switching window managers junefish 0 1,196 01-23-2022, 03:57 PM
Last Post: junefish
  NVMe timeout when booting from eMMC but not SD satwell 5 6,667 10-29-2021, 07:41 AM
Last Post: psstoev
  Migrating from glibc to musl on Gentoo pkubaj 6 6,201 07-24-2021, 05:00 PM
Last Post: pkubaj

Forum Jump:


Users browsing this thread: 2 Guest(s)