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

Re: Re: Another test image with minor improvements



Hi Adiran,

Yet another 3A6000 (Morefine M700S) owner joins to testing and hope
that you find this message useful.

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.

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

/ Olli


Reply to: