Re: grub2 BIOS booting iso and code

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

 



Hi,

Dominik 'Rathann' Mierzejewski wrote:
> Looks like it's a common issue with USB stick booting on these old Dell
> XPS 15s:
> https://askubuntu.com/questions/611135/operation-system-not-found-during-usb-boot
> https://askubuntu.com/questions/451931/operation-system-not-found-dell-xps-15z-l511z
> https://www.dell.com/community/Laptops-General-Read-Only/Operation-System-Not-Found-not-a-typo/td-p/5177162
> https://www.dell.com/community/SupportAssist-Enterprise/Trying-to-boot-from-USB-but-getting-quot-Operation-system-not/td-p/5966292

These look like the problem we face. But no remedy to see.


> https://bbs.archlinux.org/viewtopic.php?id=226003

This was probably a problem with the MBR on hard disk which wanted to hop
on a PMBR but was directed to the wrong partition by the boot/active flag.


Whatever, from the boot success of the old Fedora ISO we know that the
problem can be avoided. The riddle is to find out what does the trick.

Building something nearer to the old ISO layout:

  new_iso=test_mjgappended.iso

  # Extract the EFI partition
  dd if=boot-grub2-f36.iso bs=512 skip=1313268 count=20288 of=test_efi.img

  # Extract the MBR code
  dd if=boot-grub2-f36.iso bs=1 count=446 of=test_mbr.img

  # Pad MBR up to 32768 bytes, so that it overwrites the loaded system area
  dd if=/dev/zero bs=1 count=32322 >>test_mbr.img

  # xorriso in its native mode does not truncate -outdev
  test -e "$new_iso" && rm "$new_iso"

  # The boot lures need to be thoroughly re-arranged.
  # To avoid the need for being superuser let xorriso load the file tree
  # of the original ISO. (Not only mounting but also reading the file
  # -rwx------ /mountpoint/EFI/BOOT/BOOTIA32.EFI would need root rights.)
  xorriso \
    -indev boot-grub2-f36.iso \
    -outdev "$new_iso" \
    -as mkisofs \
      -iso_mbr_part_type 0x83 \
      --grub2-mbr test_mbr.img \
      -append_partition 2 0xef test_efi.img \
      -part_like_isohybrid \
      --boot-catalog-hide \
      -b /images/eltorito.img \
        -no-emul-boot -boot-load-size 4 -boot-info-table \
        --grub2-boot-info \
      -eltorito-alt-boot \
      -e '--interval:appended_partition_2:all::' \
        -no-emul-boot -isohybrid-gpt-basdat \
      -R -J \
    -- \
    -padding included \
    -changes_pending yes \
    -stdio_sync off

The resulting ISO is MBR partitioned:

  $ /sbin/fdisk -l test_mjgappended.iso
  ...
  Disklabel type: dos
  ...
  Device                Boot   Start     End Sectors   Size Id Type
  test_mjgappended.iso1 *          0 1313135 1313136 641.2M 83 Linux
  test_mjgappended.iso2      1313136 1333423   20288   9.9M ef EFI (FAT-12/16/32)

but has the inofficial smell of GPT by bearing a GPT header and a GPT
partition slot which marks the EFI partition (not by the EFI type GUUID).
Quite like the current Fedora ISOs do.

----------------------------------------------------------------------

If above boots on the Dell XPS 15 L502X, we should confirm that the MBR
boot/active trick is really, really not the decisive difference to
boot-grub2-f36.iso.
I.e. whether the resulting ISO from this repack run does _not_ work:

  new_iso=test_bootactive.iso

  # xorriso in its native mode does not truncate -outdev
  test -e "$new_iso" && rm "$new_iso"

  # The original boot layout can be reused with one little adjustment
  xorriso -indev boot-grub2-f36.iso \
          -outdev "$new_iso" \
          -boot_image any replay \
          -boot_image any mbr_force_bootable=on \
          -padding included \
          -changes_pending yes \
          -stdio_sync off

----------------------------------------------------------------------


Have a nice day :)

Thomas
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux