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

2022-08-07 Thread Geert Stappers
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: 0x
> >
> > DeviceBoot Start   End Sectors Size Id Type
> > bin/ipxe.usb4 *   32  40954064   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


root@myhost:/home/stappers/src/mailinglists/ipxe/src# cat bin/ipxe.usb > 
/dev/sda
root@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: 0x

Device Boot Start   End Sectors Size Id Type
/dev/sda4  *   32  40954064   2M eb BeOS fs
root@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@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@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@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@myhost:/home/stappers/src/mailinglists/ipxe/src#

-- 
Silence is hard to parse
___
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel


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

2022-08-07 Thread Christian Iwata Nilsson
On Sun, 7 Aug 2022, 08:47 Adam Baxter,  wrote:

>
> > I get
> > 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.
> > I haven't tested it, but I think that's more along the lines of what
> > you might expect.
> >
>
>
> Apologies Geert: you're correct:
>
> 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: 0x
>
> DeviceBoot Start   End Sectors Size Id Type
> bin/ipxe.usb4 *   32  40954064   2M eb BeOS fs
> Removing intermediate container 822f0cd9d87a
>
> However, I can boot this in qemu just fine (I don't have a real system to
> easily test this on right now)
>
>
> --Adam
> ___
> ipxe-devel mailing list
> ipxe-devel@lists.ipxe.org
> https://lists.ipxe.org/mailman/listinfo/ipxe-devel


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.

/Christian
___
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel


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

2022-08-06 Thread Adam Baxter


> I get
> 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. 
> I haven't tested it, but I think that's more along the lines of what 
> you might expect.
>


Apologies Geert: you're correct:

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: 0x

DeviceBoot Start   End Sectors Size Id Type
bin/ipxe.usb4 *   32  40954064   2M eb BeOS fs
Removing intermediate container 822f0cd9d87a

However, I can boot this in qemu just fine (I don't have a real system to 
easily test this on right now)


--Adam
___
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel


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

2022-08-06 Thread Adam Baxter
On Sun, 7 Aug 2022, at 00:19, Geert Stappers wrote:
> On Sat, Aug 06, 2022 at 12:53:52AM +0200, Geert Stappers wrote:
>> Hi,
>> 
>> Having done `make bin/ipxe.usb` and copying that to an
>> USB-memory-device, I had NOT a bootable  iPXE.
>> 
>> While researching what went wrong, I saw an unexpected partion type:
>> 
>>   Be OS
>> 
>
> A "FAT" partition is what was expected.

Using iPXE from Git d3c8944d5c3ab262826ed33b16f3fc4dd43bc304 and the following 
Dockerfile:

FROM debian:sid
RUN apt update && apt -y install make gcc-10 git file liblzma-dev
RUN update-alternatives --install /usr/bin/gcc gcc "/usr/bin/gcc-10" 1
RUN mkdir /src
WORKDIR /src
RUN git clone https://github.com/ipxe/ipxe
WORKDIR /src/ipxe/src
RUN make -j8 bin/ipxe.usb
RUN file bin/ipxe.usb


I get
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. 
I haven't tested it, but I think that's more along the lines of what you might 
expect.


--Adam
___
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel


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

2022-08-06 Thread Geert Stappers
On Sat, Aug 06, 2022 at 12:53:52AM +0200, Geert Stappers wrote:
> Hi,
> 
> Having done `make bin/ipxe.usb` and copying that to an
> USB-memory-device, I had NOT a bootable  iPXE.
> 
> While researching what went wrong, I saw an unexpected partion type:
> 
>   Be OS
> 

A "FAT" partition is what was expected.


> |$ sudo fdisk -l bin/ipxe.usb
> |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: 0x
> |
> |DeviceBoot Start   End Sectors Size Id Type
> |bin/ipxe.usb4 *   32  40954064   2M eb BeOS fs
> |$
> 
> 
> By whom is that reproducable?

All who execute these commands:

cd /tmp
wget --quiet https://boot.ipxe.org/ipxe.usb
file ipxe.usb
/usr/sbin/fdisk -l ipxe.usb


stappers@myhost:~
$ cd /tmp
stappers@myhost:/tmp
$ wget --quiet https://boot.ipxe.org/ipxe.usb
stappers@myhost:/tmp
$ file ipxe.usb
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
stappers@myhost:/tmp
$ /usr/sbin/fdisk -l ipxe.usb
Disk 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: 0x

Device Boot Start   End Sectors Size Id Type
ipxe.usb4  *   32  40954064   2M eb BeOS fs
stappers@myhost:/tmp
$ 

 
> On a known working "bin/ipxe.usb", which partition type has it?
 
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".



Groeten
Geert Stappers
-- 
Silence is hard to parse
___
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel