[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Another test image with minor improvements



Hi Olli,

On Sun, 2025-01-19 at 19:42 +0100, Olli Janatuinen wrote:
> Yet another 3A6000 (Morefine M700S) owner joins to testing and hope
> that you find this message useful.

Sure ;-).

> On Fri, 15 Nov 2024 20:09:36 +0100, John Paul Adrian Glaubitz wrote:
> > What surprises me though is that the image boots fine on QEMU with the Tiano EFI firmware
> 
> As far I was able to found the challenge here is that TianoCore based
> firmware does not implement all same limitations than actual Loongson
> firmwares does.
> 
> Most importantly:
> - EFI only mode should be used meaning that "-append_partition 2 0xef
> ..." parameter should not be defined for xorriso.
> - EFI load path "EFI/BOOT/BOOTLOONGARCH64.EFI" is case-sensitive when
> ISO 9660 file system is used but it is case-insensitive when FAT/FAT32
> file system is used.

Thanks, good to know.

> Because of that it depends which method user uses to write that iso
> file to USB drive:
> - If you create USB drive with MBR and single bootable FAT32 partition
> and simply extract this iso file to there then boot works file.
> - But you write it with "dd" then boot does not work.
> - Additionally Rufus which we Windows users often use does not detect
> this iso correctly and it enforces "dd mode" to be used.
> 
> So here is commands how to recreate iso file in way that it does not
> matter which method user uses:
> # Extract from iso file
> mount -o loop debian-12.0.0-loong64-NETINST-1.iso /mnt
> mkdir ~/temp/
> cp -rv /mnt/* ~/temp/
> cp -rv /mnt/.disk ~/temp/
> umount /mnt
> 
> # Correct file name to all caps
> mkdir ~/temp/EFI/BOOT
> mv ~/temp/EFI/boot/bootloongarch64.efi ~/temp/EFI/BOOT/BOOTLOONGARCH64.EFI
> rm -rf ~/temp/EFI/boot/
> 
> # Fix Rufus compatibility (based on method with Deepin uses)
> mount -o loop ~/temp/boot/grub/efi.img /mnt
> mv /mnt/efi/boot/bootloongarch64.efi /mnt/efi/boot/bootx64.efi
> umount /mnt
> 
> # Create new iso file
> xorriso -as mkisofs \
>   -o debian-12.0.0-loong64-NETINST-fixed.iso \
>   -r -J -l \
>   -eltorito-alt-boot \
>   -e boot/grub/efi.img \
>   -no-emul-boot \
>   ~/temp
> 
> 
> In additionally after installation I needed rename and move EFI file
> before boot from hard disk worked and that issue I did see also in
> TianoCore:
> mkdir /boot/efi/EFI/boot
> mv /boot/efi/EFI/debian/grubloongarch64.efi
> /boot/efi/EFI/boot/bootloongarch64.efi

So, if I understand you correctly, dropping "-append_partition 2 0xef" from
xorriso should be enough to fix this issue? It's currently present in the
CD image create script [1].

FWIW, Loongson has said they would improve their 3A6000 firmware in this regard,
but this hasn't happened yet, unfortunately.

Adrian

> [1] https://salsa.debian.org/images-team/debian-cd/-/blob/master/tools/boot/trixie/boot-loong64?ref_type=heads#L123

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: