flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Problem to use generated iso Goto page 1, 2 Next |
Author |
|
Fulgurance 26 Apr 2022, 16:17
Hello, from a long time, I use a bash script to generate an iso to boot my custom OS with the generated EFI file by fasmg. Normally it was working at the moment I programmed that. But today when I try it with virtualbox, the virtual machine don't boot the iso image.
It's my small OS repository: https://github.com/Fulgurance/OS My make_prokect file is like this: Code: #!/bin/bash fasmg BOOTX64.fasm && mv BOOTX64.exe BOOTX64.efi && cp BOOTX64.efi ISO/EFI/BOOT/ && mkisofs -o Test.iso ISO It generate normally my iso. To be honest I'm not really good to generate an ISO file.[/code] (don't pay attention about the missing ISO directory in my repository, it's not like that locally on my laptop) |
|||
26 Apr 2022, 16:17 |
|
Fulgurance 27 Apr 2022, 08:11
Oh yes sorry I wasn’t clear .
No it’s just my ISO don’t boot. I just go to the UEFI shell when my virtual machine start Nothing |
|||
27 Apr 2022, 08:11 |
|
revolution 27 Apr 2022, 08:17
Erm, I'm still not sure ...
Are you reporting a problem with fasmg? Or mkisofs? Or the BOOTX64.fasm source? Or VirtualBox? When you say "don't boot" does it crash, or give an error message, or something else? |
|||
27 Apr 2022, 08:17 |
|
Fulgurance 27 Apr 2022, 08:51
I use fasmg. But the code run normally (it’s a save I made before )
You think the problem come from mkisofs? Do you need a screenshot ? |
|||
27 Apr 2022, 08:51 |
|
revolution 27 Apr 2022, 09:10
Fulgurance wrote: You think the problem come from mkisofs? What do you mean by "don't boot"? Please give the specific results that you experience. BTW: You don't need to use mv. Code: fasmg BOOTX64.fasm BOOTX64.efi && ... Code: format ... as 'efi' |
|||
27 Apr 2022, 09:10 |
|
Fulgurance 27 Apr 2022, 09:31
I think something is wrong with the ISO format, because the ISO isn't detected at all. If I start with the ISO or without the ISO, the result is the same, the UEFI shell don't detect any ISO
This is the result of my generator: Code: zohran master ~ Documents Programmation OS 2 ./make_project flat assembler version g.jmhx 2 passes, 0.1 seconds, 10240 bytes. Setting input-charset to 'UTF-8' from locale. Total translation table size: 0 Total rockridge attributes bytes: 0 Total directory bytes: 4096 Path table size(bytes): 34 Max brk space used 0 181 extents written (0 MB) You mean like this ? Code: format pe64 as 'efi' I have an error Code: zohran master ~ Documents Programmation OS ./make_project flat assembler version g.jmhx BOOTX64.fasm [5]: format pe64 as 'efi' macro format?.PE64? [53] Custom error: invalid argument. [ble: exit 2]
|
||||||||||
27 Apr 2022, 09:31 |
|
revolution 27 Apr 2022, 09:43
Oh, I guess that only fasm supports the "... as 'ext'" syntax.
In that case you can use the second command line argument instead of mv. |
|||
27 Apr 2022, 09:43 |
|
Fulgurance 27 Apr 2022, 09:57
Okay I changed what you said, but the same result, the ISO file isn't detected at all by VirtualBox, I can add my ISO, but not detected by the UEFI of the virtual machine. Maybe the generated ISO is generated bad.
I made an archive of my save for you, if you want to have a look (joined to my message)
|
|||||||||||
27 Apr 2022, 09:57 |
|
bitRAKE 28 Apr 2022, 00:40
Prior to booting, if you push ESC for BIOS config, select "Boot Manager" and you should be able to see the QEMU DVD-ROM item. If you can see it then QEMU has loaded the image but it is not bootable.
That's my best guess as to why there is no error message - because it boots into EFI Shell. Next the EFI Shell can be removed from the boot options, and then you should be able to see an error: Code: BdsDxe: failed to load Boot0001 "UEFI QEMU DVD-ROM ... BdsDxe: No bootable option or device was found. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
28 Apr 2022, 00:40 |
|
bitRAKE 28 Apr 2022, 00:49
Looking at the source code, it looks like UEFI is expecting an El Torito ISO.
|
|||
28 Apr 2022, 00:49 |
|
Fulgurance 28 Apr 2022, 09:50
How do you normally make an iso with your own system/ bootable UEFI application ?
|
|||
28 Apr 2022, 09:50 |
|
bitRAKE 28 Apr 2022, 10:20
I don't create image files or use virtual drive images - the development cycle is too slow. It's faster to use QEMU's virtio to make a folder act as a drive. I compile directly into folder, run QEMU - no image file.
Even testing on real hardware, I have a FAT32 formatted USB stick. Just copy files - no image. When I get further in development, I can compile into network directory and boot other machine off network - no USB stick. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
28 Apr 2022, 10:20 |
|
Fulgurance 28 Apr 2022, 11:53
Can you explain me quickly how you do that with qemu please ? I'm not familiar enough with qemu, but I'm interested in ! (one example please)
|
|||
28 Apr 2022, 11:53 |
|
bitRAKE 28 Apr 2022, 12:10
Relevant section of documentation:
https://www.qemu.org/docs/master/system/images.html#virtual-fat-disk-images This is the command line option in Windows (where %1 is the directory name): Code: -drive file=fat:rw:%1,media=disk,if=virtio,format=raw https://github.com/bitRAKE/UEFI_playground The source code of the driver is at (epic innovation right here): https://github.com/qemu/qemu/blob/master/block/vvfat.c It can seem buggy in Windows because we need to fight the OS that doesn't want to share the files -- often it seems read only, or like it's in snapshot mode. Don't try FAT32 - it will probably crash QEMU: Code: -drive file=fat:32:rw:%1,media=disk,if=virtio,format=raw The network configuration is more flexible, but also more configuration. I have done some research, and will provide an example in the future. It is definitely the way forward as QEMU can virtio the network folder as well. Research PXE booting to learn more. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
28 Apr 2022, 12:10 |
|
Fulgurance 28 Apr 2022, 12:59
I will be annoying again But, when you said the Window command line, is it the same with Linux ? (I use Linux). I will try that after my japanese lesson.
|
|||
28 Apr 2022, 12:59 |
|
bitRAKE 28 Apr 2022, 13:25
Oh, easy mode then - the documentation is all directed at linux implementation.
Code: -hdb fat:/my_directory |
|||
28 Apr 2022, 13:25 |
|
Fulgurance 28 Apr 2022, 14:08
Like this ? I had an error, I think I missed something:
Code: zohran master ~ Documents Programmation OS 1 qemu-system-x86_64 -hdb fat:/home/zohran/Documents/Programmation/OS/ISO/ WARNING: Image format was not specified for 'json:{"fat-type": 0, "dir": "/home/zohran/Documents/Programmation/OS/ISO/", "driver": "vvfat", "floppy": false, "rw": false}' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. qemu-system-x86_64: Block node is read-only [ble: exit 1] zohran master ~ Documents Programmation OS 1 ls ISO EFI zohran master ~ Documents Programmation OS tree ISO ISO └── EFI └── BOOT └── BOOTX64.efi 2 directories, 1 file If I link directly the .efi file, I have "Could not read directory error". Maybe I have to use sudo for that ? |
|||
28 Apr 2022, 14:08 |
|
bitRAKE 28 Apr 2022, 14:19
The error can be removed by using the more verbose command:
(it is just a warning really) Code: -drive file=fat:16:rw:/home/zohran/Documents/Programmation/OS/ISO/,media=disk,if=virtio,format=raw _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
28 Apr 2022, 14:19 |
|
Fulgurance 28 Apr 2022, 14:41
The screen stay with the message: "Booting from hardisk".
I have to link normally just where is my efi file, isn't it ? |
|||
28 Apr 2022, 14:41 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.