PINE64
Rock64 Debian 11 (Bullseye) install problem - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88)
+--- Thread: Rock64 Debian 11 (Bullseye) install problem (/showthread.php?tid=16951)

Pages: 1 2


Rock64 Debian 11 (Bullseye) install problem - jbize - 07-03-2022

I have a Rock64-2GB (V3.0).  Following these instructions (https://wiki.pine64.org/wiki/ROCK64_Software_Releases#Debian), I downloaded and burned a Debian 11 (Bullseye) installer to a microSd.

I don't have eMMC, so I installed a blank microSD into a USB3 adapter, and with the installer in the microSD slot and the target in the USB3 slot, I ran the installer, selecting sda as the target.

It took a while, but when it finished and started to reboot, I powered off, removed the installer, and put the newly installed microSD in the microSD slot.

It didn't boot.  I even tried using an HDMI head, but to no avail.

To temporarily continue with my work, I am running Armian (Bullseye), but that has it's own issues and I need to get the stock Debian working.

Can anyone offer help or suggestions?


RE: Rock64 Debian 11 (Bullseye) install problem - as365n4 - 07-04-2022

If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".


RE: Rock64 Debian 11 (Bullseye) install problem - jbize - 07-04-2022

(07-04-2022, 07:05 AM)as365n4 Wrote: If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".

Wow, I was so close.  Thanks for your reply.

So I have a fully built microSD that won't boot.  Can you tell me how I can "apt install u-boot-rockchip" on it?

Is there a "boot-to" program that I can run from my Armian microSD to boot the USB3 (SDA) image?


RE: Rock64 Debian 11 (Bullseye) install problem - jbize - 07-04-2022

Well, I spent half a day on this and in the end found several solutions.

The solution that worked best for me in the end was:
  • Download, burn, and install Armbian_21.08.1_Rock64_bullseye_current_5.10.60.img.xz to a microSD as a "rescue image".
  • Insert the newly installed/created (but not yet bootable) Debian 11 microSD into a USB adapter and inert in Rock64.
  • Power up and boot Armbian "rescue image."
  • Log in as root and:
  •     apt install -y u-boot-rockchip
  •     u-boot-install-rockchip /dev/sda
That's it.  The new Debian 11 microSD in the USB adapter is now bootable.  Move it to the microSD slot and reboot.

There are also some "side-boot", what I referred to as "boot to" (and flashing) programs available:
  • apt install -y python3-pip rkflashtool
  • pip3 install pyamlboot

Thanks as365n4 for pointing me to the u-boot-install-rockchip package.

The main issue I was having was either booting my new image, or booting an image I could use to write the u-boot partition.


RE: Rock64 Debian 11 (Bullseye) install problem - t4_4t - 07-05-2022

Rockchip's 'u-boot' requires 16MB of free space at the top of the media for installation.
On the other hand, the 'partitioning-tools' included with 'debian-installer' does not take any of the above requirements into account.
As with a standard x86-PC, only 1MB of space is allocated at the top of the media.

Allocation of 'u-boot' space must be done intentionally by the user at the time of partitioning.

----
In short, unless you do something about it, you will end up with a partition allocation that has no space for the 'u-boot' installation.
If the 'u-boot' installation operation is performed on media configured as described above, the original data will of course be destroyed.

As an example, 'debian-installer' or 'Armbian' or 'Other-distribution' are all partitioned with the first 16MB of free space on the media.
We recommend that you compare this with the image you have created.


RE: Rock64 Debian 11 (Bullseye) install problem - jbize - 07-06-2022

(07-05-2022, 04:46 PM)t4_4t Wrote: Rockchip's 'u-boot' requires 16MB of free space at the top of the media for installation.
On the other hand, the 'partitioning-tools' included with 'debian-installer' does not take any of the above requirements into account.
As with a standard x86-PC, only 1MB of space is allocated at the top of the media.

Allocation of 'u-boot' space must be done intentionally by the user at the time of partitioning.

----
In short, unless you do something about it, you will end up with a partition allocation that has no space for the 'u-boot' installation.
If the 'u-boot' installation operation is performed on media configured as described above, the original data will of course be destroyed.

As an example, 'debian-installer' or 'Armbian' or 'Other-distribution' are all partitioned with the first 16MB of free space on the media.
We recommend that you compare this with the image you have created.


Thanks for the info.  I used the (Debian Bulseye) debian-installer and apparently only 1MB precedes the /boot partition.

It seems to boot and run fine; what do you suggest?

My partition info:
Code:
# fdisk -l
Disk /dev/mmcblk1: 29.11 GiB, 31255953408 bytes, 61046784 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: 296D4F2A-EF97-4DC6-B59D-80AFCF64E47A

Device            Start      End  Sectors  Size Type
/dev/mmcblk1p1    2048  999423  997376  487M Linux filesystem
/dev/mmcblk1p2  999424 59043839 58044416 27.7G Linux filesystem
/dev/mmcblk1p3 59043840 61044735  2000896  977M Linux swap

(07-05-2022, 04:46 PM)t4_4t Wrote: Rockchip's 'u-boot' requires 16MB of free space at the top of the media for installation.
On the other hand, the 'partitioning-tools' included with 'debian-installer' does not take any of the above requirements into account.
As with a standard x86-PC, only 1MB of space is allocated at the top of the media.

Allocation of 'u-boot' space must be done intentionally by the user at the time of partitioning.

----
In short, unless you do something about it, you will end up with a partition allocation that has no space for the 'u-boot' installation.
If the 'u-boot' installation operation is performed on media configured as described above, the original data will of course be destroyed.

As an example, 'debian-installer' or 'Armbian' or 'Other-distribution' are all partitioned with the first 16MB of free space on the media.
We recommend that you compare this with the image you have created.

I went back and examined what u-boot-install-rockchip does on my Rock64.  And it does indeed require at least the first 8,467,720 bytes.

So it looks like I'm starting over from scratch.  Thanks for bringing this to my attention.


RE: Rock64 Debian 11 (Bullseye) install problem - eran - 07-09-2022

(07-04-2022, 06:35 PM)jbize Wrote: Well, I spent half a day on this and in the end found several solutions.

The solution that worked best for me in the end was:
  • Download, burn, and install Armbian_21.08.1_Rock64_bullseye_current_5.10.60.img.xz to a microSD as a "rescue image".
  • Insert the newly installed/created (but not yet bootable) Debian 11 microSD into a USB adapter and inert in Rock64.
  • Power up and boot Armbian "rescue image."
  • Log in as root and:
  •     apt install -y u-boot-rockchip
  •     u-boot-install-rockchip /dev/sda
That's it.  The new Debian 11 microSD in the USB adapter is now bootable.  Move it to the microSD slot and reboot.

There are also some "side-boot", what I referred to as "boot to" (and flashing) programs available:
  • apt install -y python3-pip rkflashtool
  • pip3 install pyamlboot

Thanks as365n4 for pointing me to the u-boot-install-rockchip package.

The main issue I was having was either booting my new image, or booting an image I could use to write the u-boot partition.


I inserted the "rescue" image but I cannot see the screen (I use HDMI to connect to my display) What am I doing wrong?



RE: Rock64 Debian 11 (Bullseye) install problem - ju0n - 09-04-2022

(07-04-2022, 07:05 AM)as365n4 Wrote: If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".

Hi,
I'm stuck just in this place. Can you help me to make my debian SD card bootable? I'm newbie and dont konw how to proceed with  two options you suggest.
Thanks in avance



RE: Rock64 Debian 11 (Bullseye) install problem - as365n4 - 11-25-2022

(09-04-2022, 11:48 AM)ju0n Wrote:
(07-04-2022, 07:05 AM)as365n4 Wrote: If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".

Hi,
I'm stuck just in this place. Can you help me to make my debian SD card bootable? I'm newbie and dont konw how to proceed with  two options you suggest.
Thanks in avance

a bit late but hope it will help others who searched for a solution...

As pointed out above the Debian Installer is kind of broken as it does not install u-boot and also does not partition the target correctly.
There are several options build your own image as decribed here
Or use an image from a different Distro and partition the target and install u-boot and then use the Debian Installer without reformating the drive, as others suggested.

Myself as I had no luck with the Debian Installer, I always build my own image if I have to flash a Rock64 or H64B.
Also worth a note, the Debian Installer offers a shell which one could access and do comand line work, but the included BusyBox has a very limited amount of comands available.

With regards to partitioning the first 32767 sectors of the SD-Card or eMMC-Module are reserved for u-boot on any Rockchip based Board!
Your partitions need to start after or on sector 32768, otherwise you will end up with a brocken partition as the u-boot flash does not care about your partitions and may overwrite your data if you used any sector before 32767.


RE: Rock64 Debian 11 (Bullseye) install problem - ju0n - 11-27-2022

(11-25-2022, 09:02 AM)as365n4 Wrote:
(09-04-2022, 11:48 AM)ju0n Wrote:
(07-04-2022, 07:05 AM)as365n4 Wrote: If you used the Debian Installer, you won't have U-Boot installed. Because the Installer is generic for all supported Boards, they do not install board specific U-Boot.
You have to install U-Boot in order to get Debian working.
Two options, either build U-Boot on device after Installer has finished and flash the SD-Card with U-Boot or use the files Debian provides:

/usr/lib/u-boot/rock64-rk3328/u-boot.bin
/usr/lib/u-boot/rock64-rk3328/idbloader.img

they are part of the package "u-boot-rockchip".

Hi,
I'm stuck just in this place. Can you help me to make my debian SD card bootable? I'm newbie and dont konw how to proceed with  two options you suggest.
Thanks in avance

a bit late but hope it will help others who searched for a solution...

As pointed out above the Debian Installer is kind of broken as it does not install u-boot and also does not partition the target correctly.
There are several options build your own image as decribed here
Or use an image from a different Distro and partition the target and install u-boot and then use the Debian Installer without reformating the drive, as others suggested.

Myself as I had no luck with the Debian Installer, I always build my own image if I have to flash a Rock64 or H64B.
Also worth a note, the Debian Installer offers a shell which one could access and do comand line work, but the included BusyBox has a very limited amount of comands available.

With regards to partitioning the first 32767 sectors of the SD-Card or eMMC-Module are reserved for u-boot on any Rockchip based Board!
Your partitions need to start after or on sector 32768, otherwise you will end up with a brocken partition as the u-boot flash does not care about your partitions and may overwrite your data if you used any sector before 32767.

Thanks!
It looks like some complicated  to me, but i'll try to  build my own debian  image next time.
Hopefully i've get a working debian  image with a simpler  aproach:
I've used  debian  installer, then using gparted i did move all partitions freeing the device first 16 mb and finally write u-boot this way https://forum.pine64.org/showthread.php?tid=8174
Hope it can help