[ipxe-devel] fdisk -l bin/ipxe.usb

Geert Stappers stappers at stappers.nl
Sun Aug 7 15:41:50 UTC 2022


On Sun, Aug 07, 2022 at 11:20:33AM +0200, Christian Iwata Nilsson wrote:
> On Sun, 7 Aug 2022, 08:47 Adam Baxter, wrote:
> } On Sat, 6 Aug 2022 Geert Stappers, wrote:
> } } A "FAT" partition is what was expected
         ...
> } } I'm asking because I have the unplesant feeling that
> } } the bin/ipxe.usb build process doesn't any more yield a working image.
> } } I'm unable to mount the partitition.
> } } 
> } } I hope this message gets a response like "works for me".
> >
> > Step 9/10 : RUN file bin/ipxe.usb && fdisk -l bin/ipxe.usb
> >  ---> Running in 822f0cd9d87a
> > bin/ipxe.usb: DOS/MBR boot sector; partition 4 : ID=0xeb, active,
> > start-CHS (0x0,1,1), end-CHS (0x1,63,32), startsector 32, 4064 sectors
> > Disk bin/ipxe.usb: 368 KiB, 376832 bytes, 736 sectors
> > Units: sectors of 1 * 512 = 512 bytes
> > Sector size (logical/physical): 512 bytes / 512 bytes
> > I/O size (minimum/optimal): 512 bytes / 512 bytes
> > Disklabel type: dos
> > Disk identifier: 0x00000000
> >
> > Device        Boot Start   End Sectors Size Id Type
> > bin/ipxe.usb4 *       32  4095    4064   2M eb BeOS fs
> > Removing intermediate container 822f0cd9d87a
> >
> > However, I can boot this in qemu just fine

Thank you Adam, for the "works for me".


> > (I don't have a real system to easily test this on right now)

It is the challenge I'm facing   :-)


> >
> 
> iPXE is a binary to be executed, not a filesystem, partition type used is
> to reduce risk of "smart" OSes destroying the data.
> If building ISO the structure is different but there the lkrn format is
> used instead and is not directly executed from pcbios.
> 

Thank you Christian.  It explains why mount fails.


|# mount -t vfat /dev/sda4 /mnt
|mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
|       dmesg(1) may have more information after failed mount system call.
|# dmesg | tail -n 3
|[171350.524030]  sda: sda4
|[171536.161699] FAT-fs (sda4): invalid media value (0x31)
|[171536.161713] FAT-fs (sda4): Can't find a valid FAT filesystem
|#

Now that I know that ipxe.usb should be working,
I shift focus to "Why doesn't it work on my laptop?"


Groeten
Geert Stappers

<screenshot content="mount failure in context">
root at myhost:/home/stappers/src/mailinglists/ipxe/src# cat bin/ipxe.usb > /dev/sda
root at myhost:/home/stappers/src/mailinglists/ipxe/src# /usr/sbin/fdisk -l /dev/sda
Disk /dev/sda: 7,47 GiB, 8019509248 bytes, 15663104 sectors
Disk model: USB Flash Drive 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start   End Sectors Size Id Type
/dev/sda4  *       32  4095    4064   2M eb BeOS fs
root at myhost:/home/stappers/src/mailinglists/ipxe/src# mount /dev/sda4 /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
root at myhost:/home/stappers/src/mailinglists/ipxe/src# dmesg | tail -n 3
[155983.594034]   ... way older dmesg entry ...
[169602.138219]   ... way older dmesg entry ...
[171350.524030]  sda: sda4
root at myhost:/home/stappers/src/mailinglists/ipxe/src# mount -t vfat /dev/sda4 /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
root at myhost:/home/stappers/src/mailinglists/ipxe/src# dmesg | tail -n 3
[171350.524030]  sda: sda4
[171536.161699] FAT-fs (sda4): invalid media value (0x31)
[171536.161713] FAT-fs (sda4): Can't find a valid FAT filesystem
root at myhost:/home/stappers/src/mailinglists/ipxe/src#
</screenshot>
-- 
Silence is hard to parse


More information about the ipxe-devel mailing list