Description of problem: Live media hangs on BIOS computers when booting from USB stick. rdsosreport.txt contains messages: [ ] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ ] print_req_error: I/O error, dev loop0, sector 0 flags 0 [ ] SQUASHFS error: squashfs_read_data failed to read block 0x0 [ ] squashfs: SQUASHFS error: unable to read squashfs_super_block [ ] print_req_error: I/O error, dev loop0, sector 0 flags 0 [ ] SQUASHFS error: squashfs_read_data failed to read block 0x0 [ ] squashfs: SQUASHFS error: unable to read squashfs_super_block [ ] dracut Warning: /sysroot has no proper rootfs layout, ignoring and removing offending mount hook [ ] dracut Warning: Can't mount root filesystem Version-Release number of selected component (if applicable): Mageia-7.1-Live-Xfce-i586.iso How reproducible: Every time when booting from bootable USB Stick. Steps to Reproduce: 1. Write hybrid ISO image Mageia-7.1-Live-Xfce-i586.iso to an USB stick. 2. Choose BIOS setup boot source: Hard Drive -> USB stick 3. Boot the computer The trouble is: Hybrid ISO image Mageia-7.1-Live-Xfce-i586.iso MBR contains wrong first partition OS code: 0x17 instead 0x0. How to fix: Solution #1. Use "fdisk Mageia-7.1-Live-Xfce-i586.iso" to replace partition #1 OS code to 0. Solution #2. Execute the Python 3 program (provided bellow) to the Mageia-7.1-Live-Xfce-i586.iso image: #mageia-iso-fix.py import sys, os if len (sys.argv) != 2: print (" Mageia hybrid ISO image MBR patching utility.") print (" Usage:") print ("python3 mageia-iso-fix.py Mageia-...-i586.iso") else: IsoFileName = sys.argv[1] FirstPartTypeOffset = 450 MbrSignatureOffset = 510 if not os.path.isfile (IsoFileName): print ("Error:", IsoFileName, "isn't a file name.") else: f = open (IsoFileName, "r+b") sector = bytearray (f.read (512)) if sector[MbrSignatureOffset] != 0x55 or sector[MbrSignatureOffset + 1] != 0xAA: print ("Error:", IsoFileName, "doesn't have MBR.") elif sector[FirstPartTypeOffset] == 0: print (IsoFileName, "doesn't need to be patched.") else: print ("Patching", IsoFileName, " MBR:") print ("First partition code is:", hex (sector[FirstPartTypeOffset])) sector[FirstPartTypeOffset] = 0 print ("First partition code changed to:", hex (sector[FirstPartTypeOffset])) f.seek (0) f.write (sector) print (IsoFileName, "is patched now.") f.close ()
Sorry for the trouble you are having. Be assured that both 32-bit ISOs do get tested for booting from USB as well as DVD; and they are almost always BIOS/MBR systems. Can we assume you did checksum the .iso file? Can you say how you created the bootable USB stick? Are you able to try from DVD? ------ I hope you will excuse me for assigning this to you, Martin; but it looks up your street for comment. Especially: > The trouble is: > Hybrid ISO image Mageia-7.1-Live-Xfce-i586.iso MBR contains wrong first > partition OS code: 0x17 instead 0x0. I recall seeing something similar previously - complaints about the squash FS; but cannot find exactly that. "dracut Warning: Can't mount root filesystem" appears in other bugs, but not for the same reason.
Assignee: bugsquad => mageiaCC: (none) => lewyssmith
Yes, squashfs errors like that always means either a broken iso download, or some failures when creating the usb from the iso
CC: (none) => tmb
> Can we assume you did checksum the .iso file? Yes, I've calculated checksum MD5 of Mageia-7.1-Live-Xfce-i586.iso using fciv utility: // // File Checksum Integrity Verifier version 2.05. // 80ee334223a87d97212d8bcec1ce16d8 mageia-7.1-live-xfce-i586.iso > Can you say how you created the bootable USB stick? I've used "Win32 Disk Imager - 1.0" > Are you able to try from DVD? I've successfully installed VirtualBox VM using this ISO image as DVD image. But the trouble was appear when I've tried to boot up hardware computer (AMD 690G chipset based) using USB Stick.
Created attachment 11418 [details] Python3 program to fix Mageia-7.1 hybrid ISO MBR
P.S. I see some correlation my issue with the Bug #23431.
Changing the partition code to 0x00 would stop it working on other machines. The fact that it failed at the point of mounting the squashfs filesystem means you have successfully booted and read from the iso9660 filesystem, so I don't understand how changing the partition code could make any difference. Could you change it back, boot, save a copy of the rdsosreport.txt, and attach that here. You should be able to manually mount another filesystem from the dracut prompt - either on your hard disk or on another USB stick.
> The fact that it failed at the point of mounting the squashfs filesystem > means you have successfully booted and read from the iso9660 filesystem, so > I don't understand how changing the partition code could make any > difference. _GRUB2_ successfully booted and read kernel and initrd.img from iso9660 filesystem . But this base system can't mount partition that contains squashfs filesystem.
The squashfs filesystem is a file contained in the iso9660 filesystem. It's mounted using a loopback. The first partition is a protective partition only, and should never be mounted or accessed.
Keywords: (none) => NEEDINFO
Created attachment 11424 [details] rdsosreport.txt, 1st partition OS code = 0x17, system hang
Created attachment 11425 [details] rdsosreport.txt, 1st partition OS code = 0x00, system boot
This is strange. On your machine blkid is returning a PART_UUID for the hidden partition. This doesn't happen on any machine I own. I'm really surprised blkid gives different results depending on what machine it is run on. As already mentioned, we use code 0x17 because code 0x00 causes problems with some older BIOSs. So I'll have to try a different fix.
Keywords: NEEDINFO => FOR_ERRATA7Target Milestone: --- => Mageia 8Summary: Live media Mageia-7.1-Live-Xfce-i586.iso hangs on BIOS computers when booting from USB stick => Mageia-7.1-Live-Xfce-i586.iso hangs on some BIOS computers when booting from USB stick
(In reply to Martin Whitaker from comment #11) > This is strange. On your machine blkid is returning a PART_UUID for the > hidden partition. This doesn't happen on any machine I own. I'm really > surprised blkid gives different results depending on what machine it is run > on. I'm not sure the "Win32 Disk Imager" is capable of properly processing our hybrid isos. If you want a tool on Windows, I suggest Rufus (from https://rufus.ie/), as it when it detects our hybrid, suggests to switch to dd and creates a working iso
> I'm not sure the "Win32 Disk Imager" is capable of properly processing our > hybrid isos. "Win32 Disk Imager" is nice GUI tool that does the same things as "dd" Unix utility.
> This is strange. On your machine blkid is returning a PART_UUID for the > hidden partition. This doesn't happen on any machine I own. I'm really > surprised blkid gives different results depending on what machine it is run > on. I'm glad to provide new information. > As already mentioned, we use code 0x17 because code 0x00 causes problems > with some older BIOSs. So I'll have to try a different fix. Understood. It was just simplest way to solve my personal trouble. Thank you!
I've pushed a change to the dracut mgalive module in cauldron, which should fix this for Mageia 8.
(In reply to Martin Whitaker from comment #15) > I've pushed a change to the dracut mgalive module in cauldron, which should > fix this for Mageia 8. Great!
Gosh! What a buzz of activity. Thanks to Martin for jumping in with the usual expertise. Surprised a fix was needed (for M8). Does the bug have to remain open until then, or can it be closed fixed? Is the Classic 32-bit ISO affected? @Ihar: did you try that? (Should have asked this before).
> Is the Classic 32-bit ISO affected? > @Ihar: did you try that? (Should have asked this before). The Mageia-7.1-i586.iso image works on that PC well, it doesn't need any modification. The another trouble with Mageia-7.1-Live-Xfce-i586.iso is that it doesn't boot up on AMD-64 hardware in UEFI mode. It displays a black screen only. After I placed bootx64.efi in the EFI partition it displays GRUB starting menu. But when I select some menu item and press [Enter], the black screen appears and nothing happened. I don't know is it bug or a feature?
@Lewis, the bug should remain open. I can't verify the fix, as the bug does not manifest on any of my hardware. @Ihar, yes, the 32-bit media only support 32-bit UEFI boot.
Created attachment 11436 [details] Python3 program to fix Mageia-7.1 hybrid ISO MBR (2nd edition) I found another workaround to make bootable USB stick for my PC. It is to replace first MBR partition record with the second one and zeroing second partition record. I assume this way will be acceptable for all PCs that boots for now. Yes, we've lost the data protection. But this protection has matter when using partitioning tools only. I think nobody uses fdisk or GPartEd for the live USB media.
Attachment 11418 is obsolete: 0 => 1
(In reply to Martin Whitaker from comment #19) > @Lewis, the bug should remain open. I can't verify the fix, as the bug does > not manifest on any of my hardware. We shall have to remember to ask Ihar to test it - on the box which gave the trouble. So Ihar please keep it!
(In reply to Lewis Smith from comment #21) > We shall have to remember to ask Ihar to test it - on the box which gave the > trouble. So Ihar please keep it! Hello again! I'm happy to confirm that the trouble of this ticket is solved with the release "Mageia 8 alpha". I've tested "Mageia-8-alpha1-Live-Xfce-i586.iso" image and it boots correctly on my hardware without any modifications. So you may close this ticket. @Martin, @Lewis - thank you very much!
Thanks for remembering to test this Ihar!
Status: NEW => RESOLVEDResolution: (none) => FIXED
I second that. It really helps when users report back.
commit 0cee55d5a1b60cc67a623f0b107a950633ed72fc Author: Jybz <j.biernacki@...> Date: Sat Apr 20 22:22:14 2024 +0200 Updated to support encrypted persistent partition and fix mga#25924. - origin: https://svnweb.mageia.org/packages/cauldron/dracut/current/SOURCES/0511-mgalive-A-module-to-mount-Mageia-Live-media.patch?r1=1368035&r2=1469756 - mgalive: support encrypted persistent partitions (mga#25191) - mgalive: fix boot failure on some machines (mga#25924) --- Commit Link: https://gitweb.mageia.org/software/mageia-dracut-conf/commit/?id=0cee55d5a1b60cc67a623f0b107a950633ed72fc Bug links: Mageia https://bugs.mageia.org/25191 https://bugs.mageia.org/25924