Skip to content
New issue

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

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

Already on GitHub? # to your account

Question: Boot unmodified installer ISO #2

Closed
NN708 opened this issue Jul 5, 2024 · 5 comments
Closed

Question: Boot unmodified installer ISO #2

NN708 opened this issue Jul 5, 2024 · 5 comments

Comments

@NN708
Copy link

NN708 commented Jul 5, 2024

Hello,

I am seeking help in booting an unmodified Alpine Linux ISO using the latest bootloader. This is similar to what has been discussed in inindev/nanopi-r5#2, inindev/nanopi-r5#6 and inindev/nanopi-r5#11.

@sarnold: Honestly, this thing should be able to boot installer ISO in UEFI mode from USB and SDCard and install efi/grub to emmc just like you would expect.

My environment:

Board: NanoPi R5S
Bootloader: U-Boot 2024.07 + GRUB 2.12
OS: Alpine Linux 3.20.1 (Linux 6.6 LTS)

What I have done so far:

  1. Flashed nanopi-r5s_idbloader.img and nanopi-r5s_u-boot.itb into internal eMMC.
  2. Flashed alpine-standard-3.20.1-aarch64.iso into a USB drive.
  3. U-Boot successfully detects the USB drive in UEFI mode and boots up GRUB.
  4. I tried to specify DTB file using the following GRUB command:
    devicetree /boot/dtbs-lts/rockchip/rk3568-nanopi-r5s.dtb
    

However, the Linux boot process still ended in error:

Mounting boot media failed.
initramfs emergency recovery shell launched.

It appears that the OS is unable to detect any storage devices. I would appreciate any guidance on how to address this issue.

@inindev
Copy link
Owner

inindev commented Jul 5, 2024

It sounds like u-boot is correctly bootstrapping Grub which is good news -- this means it is not an issue with u-boot. I do not use Grub and do not have much experience with it. You will want to be sure you have the correct location of initrd.img, the dtb, and the vmlinuz kernel and that Grub is loading these.

@NN708
Copy link
Author

NN708 commented Jul 6, 2024

Hello @inindev,

Thank you for this excellent bootloader! Since the same ISO image works very well in ACPI mode using EDK2, the initrd.img and vmlinuz should be correct. Therefore, it seems more likely that the issue lies with the DTB. Is it normal for U-Boot to work without specific knowledge of the DTB file?

@inindev
Copy link
Owner

inindev commented Jul 6, 2024

u-boot has everything it needs built-in

in the most recent v2024.07 version for the rock-5b, it is at offset 0x128800

wget https://github.com/inindev/uboot-rockchip/releases/download/v2024.07/rock-5b_u-boot.itb

hexdump -Cs 0x128800 rock-5b_u-boot.itb

00128800  d0 0d fe ed 00 01 84 70  00 00 00 38 00 01 66 90  |.......p...8..f.|
00128810  00 00 00 28 00 00 00 11  00 00 00 10 00 00 00 00  |...(............|
00128820  00 00 1d d9 00 01 66 58  00 00 00 00 00 00 00 00  |......fX........|
00128830  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
00128840  00 00 00 03 00 00 00 1e  00 00 00 00 72 61 64 78  |............radx|
00128850  61 2c 72 6f 63 6b 2d 35  62 00 72 6f 63 6b 63 68  |a,rock-5b.rockch|
00128860  69 70 2c 72 6b 33 35 38  38 00 00 00 00 00 00 03  |ip,rk3588.......|
00128870  00 00 00 04 00 00 00 0b  00 00 00 01 00 00 00 03  |................|
00128880  00 00 00 04 00 00 00 1c  00 00 00 02 00 00 00 03  |................|
00128890  00 00 00 04 00 00 00 2b  00 00 00 02 00 00 00 03  |.......+........|
001288a0  00 00 00 15 00 00 00 37  52 61 64 78 61 20 52 4f  |.......7Radxa RO|
001288b0  43 4b 20 35 20 4d 6f 64  65 6c 20 42 00 00 00 00  |CK 5 Model B....|
001288c0  00 00 00 01 61 6c 69 61  73 65 73 00 00 00 00 03  |....aliases.....|
001288d0  00 00 00 17 00 00 00 3d  2f 70 69 6e 63 74 72 6c  |.......=/pinctrl|
001288e0  2f 67 70 69 6f 40 66 64  38 61 30 30 30 30 00 00  |/gpio@fd8a0000..|
001288f0  00 00 00 03 00 00 00 17  00 00 00 43 2f 70 69 6e  |...........C/pin|
00128900  63 74 72 6c 2f 67 70 69  6f 40 66 65 63 32 30 30  |ctrl/gpio@fec200|
00128910  30 30 00 00 00 00 00 03  00 00 00 17 00 00 00 49  |00.............I|
00128920  2f 70 69 6e 63 74 72 6c  2f 67 70 69 6f 40 66 65  |/pinctrl/gpio@fe|
00128930  63 33 30 30 30 30 00 00  00 00 00 03 00 00 00 17  |c30000..........|
00128940  00 00 00 4f 2f 70 69 6e  63 74 72 6c 2f 67 70 69  |...O/pinctrl/gpi|
00128950  6f 40 66 65 63 34 30 30  30 30 00 00 00 00 00 03  |o@fec40000......|
00128960  00 00 00 17 00 00 00 55  2f 70 69 6e 63 74 72 6c  |.......U/pinctrl|
00128970  2f 67 70 69 6f 40 66 65  63 35 30 30 30 30 00 00  |/gpio@fec50000..|

@inindev
Copy link
Owner

inindev commented Jul 6, 2024

@NN708
Copy link
Author

NN708 commented Jul 8, 2024

I tested Fedora Server 40 installer ISO today and found that it worked seamlessly without the need for the devicetree command in GRUB. Maybe a newer kernel solved the problem. Consequently, I’m closing this issue now.

@NN708 NN708 closed this as completed Jul 8, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants