flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Problem to use generated iso

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 4016
Location: vpcmpistri
bitRAKE 28 Apr 2022, 14:57
I don't understand that. "Link normally" is ambiguous.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 28 Apr 2022, 14:57
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4016
Location: vpcmpistri
bitRAKE 28 Apr 2022, 15:03
Linux has much more powerful drivers for mapping a directory as a block device:
https://wiki.qemu.org/Documentation/9psetup

No need to use the half working vvfat.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 28 Apr 2022, 15:03
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 276
Fulgurance 29 Apr 2022, 09:16
Fulgurance wrote:
The screen stay with the message: "Booting from hardisk".

I have to link normally just where is my efi file, isn't it ?


Sorry, I was meaning to specify where is my efi file
Post 29 Apr 2022, 09:16
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4016
Location: vpcmpistri
bitRAKE 12 May 2022, 21:48
https://gitlab.com/bztsrc/bootboot/-/tree/master/mkbootimg
Fulgurance wrote:
How do you normally make an iso with your own system/ bootable UEFI application ?
Just remembered about this useful tool - if you still want to make ISOs. bzt is on the board - he just doesn't make it by here frequently.

Virtual Box has a VISO feature to create an ISO in memory, but I can't get it to boot UEFI from it. Reading through bzt's source I think I understand why it doesn't work.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 12 May 2022, 21:48
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 276
Fulgurance 16 Sep 2022, 09:09
Sorry, long time no see Laughing

I checked what is wrong, definitely, something is wrong when I generated the iso, because QEMU as well isn't able to execute my ISO file.

When I performed a
Code:
qemu-system-x86_64 -bios /usr/share/edk2-ovmf/OVMF_CODE.fd -cdrom Test.iso    
, I have an error:

Code:
failed to load Boot00001 "UEFI QEMU DVD-ROM QM00003" from PciRoot (0x0) /Pci (0x1, 0x1) / Ata (Secondary,Master,0x0) : Not Found    
Post 16 Sep 2022, 09:09
View user's profile Send private message Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 276
Fulgurance 02 Oct 2022, 11:59
Nobody?
Post 02 Oct 2022, 11:59
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2493
Furs 02 Oct 2022, 14:24
AFAIK you need UDF 1.02 as the only filesystem on it, and also it doesn't seem to have any boot info? Not sure if that's needed for UEFI though, but it is for BIOS obviously.
Post 02 Oct 2022, 14:24
View user's profile Send private message Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 276
Fulgurance 09 Oct 2022, 06:49
Why you say UDF, normally the uefi partition need to be formatted with FAT isn't it ?
Post 09 Oct 2022, 06:49
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2493
Furs 09 Oct 2022, 13:35
Well not on an optical drive, which is read-only. .iso is an image for optical media/disc.
Post 09 Oct 2022, 13:35
View user's profile Send private message Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 276
Fulgurance 04 Nov 2022, 18:38
So what I'm suppose to do now ?
Post 04 Nov 2022, 18:38
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2493
Furs 05 Nov 2022, 15:07
Did you try what I suggested? I don't use mkisofs, but try -udf option?
Post 05 Nov 2022, 15:07
View user's profile Send private message Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 276
Fulgurance 05 Nov 2022, 16:57
I didn't understand you asked me to try the -udf option. With the udf option, finally my iso is recognized correctly !

The only problem I have now is, I have to go to mounted iso with the uefi shell to exec the BOOTX64.efi. How when I generate my iso can I set it with the boot flag for efi ?
Post 05 Nov 2022, 16:57
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2493
Furs 06 Nov 2022, 19:31
Fulgurance wrote:
I didn't understand you asked me to try the -udf option. With the udf option, finally my iso is recognized correctly !
Well, an .iso image can have multiple filesystems on it. It's kind of complicated, but UEFI needs the UDF filesystem apparently, it's what it expects, like it expects FAT32 on other disks. (note that these filesystems share the same file data, so it's not duplicated, because it is read only so that works easily).

Fulgurance wrote:
The only problem I have now is, I have to go to mounted iso with the uefi shell to exec the BOOTX64.efi. How when I generate my iso can I set it with the boot flag for efi ?
Do you mean to have it run automatically? Honestly not really sure about this one. Unless it's an UEFI setting (but probably not in a VM), if you find out how, share please, I'd like to know too.
Post 06 Nov 2022, 19:31
View user's profile Send private message Reply with quote
bzt



Joined: 09 Nov 2018
Posts: 77
bzt 08 Nov 2022, 16:50
bitRAKE wrote:
https://gitlab.com/bztsrc/bootboot/-/tree/master/mkbootimg
Fulgurance wrote:
How do you normally make an iso with your own system/ bootable UEFI application ?
Just remembered about this useful tool - if you still want to make ISOs. bzt is on the board - he just doesn't make it by here frequently.
Yeah, I don't come here often, sorry.

In short, in theory EFI supposed to handle the ISO9660 file system, but in practice it does not. The issue here is, the spec says "EFI interprets the [El Torito] “no emulation” image as an EFI system partition.", and most firmware implementations (TianoCore included) only accepts FAT for EFI system partition, nothing else (not ISO9960 nor UDF). Again, according to the spec it should, but in practice only FAT works. So what my mkbootimg tool does, it creates one FAT image, it places that into the disk image, and then it records the start position in the GPT as well as in the El Torito Boot Catalog. The source doing this is here (note: the boot catalog points to a FAT file system image, and not to the ISO9660 file system. That latter only has one text file, that's all).

FYI, one of my other projects, POSIX-UEFI has a simpler tool to create such bootable EFI images, efidsk.c. I believe you might find more suitable this for your needs than mkbootimg, as it uses the contents of a directory, pretty much the same way as mkisofs does. The resulting ESP image is wrapped in a GPT, so that the image is bootable under UEFI right away (as a disk or USB storage, but if you really want to use the obsolete and buggy EFI CD-ROM way, I can add El Torito Boot Catalog too into the image in no time, just ask). The efidsk tool is totally dependency-free, you won't need any EFI header or any third-party library to compile it, It Just Works(TM) sucklessly.

Hope this helps,
bzt
Post 08 Nov 2022, 16:50
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.