如何制作可启动 iso(不是 CD 或闪存驱动器)来测试您自己的启动加载程序?
我正在尝试编写一个引导加载程序(hello world sort)。我正在使用 Bochs 进行模拟(平台 Linux-Ubuntu)。但我无法为我的二进制文件制作可启动的 iso。虽然教程中使用了VFD(虚拟软盘),但它是针对Windows平台的。这是我的引导加载程序代码(仅用于测试),
;*********************************************
; Boot1.asm
; - A Simple Bootloader for testing if cd is booting or not
;
; Operating Systems Development Tutorial
;*********************************************
[BITS 16] ;tell the assembler that its a 16 bit code
[ORG 0x7C00] ;Origin, tell the assembler that where the code will
Start:
cli ; Clear all Interrupts
hlt ; halt the system
times 510 - ($-$$) db 0 ; We have to be 512 bytes. Clear the rest of the bytes with 0
dw 0xAA55 ; Boot Signature
我在 Ubuntu 上尝试了 master ISO。它将二进制文件转换为 ISO,但不转换为可启动 ISO。 Bochs 显示错误“cd 不是 eltorito”,我在 google 上搜索并发现它是可启动 ISO 的标准。我还需要添加哪些其他内容才能使其可启动。我已经在最后添加了启动签名。 谁能推荐一个可靠的应用程序来在 Ubuntu 上制作可启动的 ISO? 我的工作因此陷入困境...... 或者 我敢肯定很多人一定参与过Linux平台上的操作系统开发。大家都是怎么测试的呢?
我已经使用 Unetbootin 和我的引导加载程序的 iso 制作了一个可引导闪存驱动器。 切换到虚拟盒并稍微扭转一下以从随身碟启动,但仍然显示它不可启动。 我认为有人说得对,在操作系统开发中需要很大的耐心。
:唷,我的引导加载程序终于运行了...
我使用虚拟软盘映像在虚拟盒上启动我的程序。如果有人遇到困难,可以采取以下步骤。
1.创建boot.asm,其中包含您的引导加载程序。
2.使用nasm编译。 nasm -f bin boot.asm -o boot.bin。
3.sudo mkfs.msdos -C /home/用户名/floppy.img 1440
4.sudo chown 用户名 ./floppy.img。 链接文本
5.用dd复制。 dd if=./boot.bin of=./floppy.img.
6.运行 VirtualBox 并选择 floppy.img 作为新虚拟机的启动设备。
PS:您还可以将 floppy.img 连接到设备“循环”并像真正的软盘一样安装它。
i am trying to write a boot loader(hello world sort). i am using Bochs for simulation (platform Linux-Ubuntu). But i am unable to make an bootable iso for my binary file. Though in tutorial VFD(virtual floppy disk) is used but it is for windows platform. Here is my code for bootloader ( just for testing)
;*********************************************
; Boot1.asm
; - A Simple Bootloader for testing if cd is booting or not
;
; Operating Systems Development Tutorial
;*********************************************
[BITS 16] ;tell the assembler that its a 16 bit code
[ORG 0x7C00] ;Origin, tell the assembler that where the code will
Start:
cli ; Clear all Interrupts
hlt ; halt the system
times 510 - ($-$) db 0 ; We have to be 512 bytes. Clear the rest of the bytes with 0
dw 0xAA55 ; Boot Signature
i tried master ISO on Ubuntu. It is converting the binary file to ISO but not to bootable ISO. Bochs is showing error "cd is not eltorito" which i googled and found to be standard for bootable ISO.What additional things i have to add to it to make it bootable. i have already added boot signature in the end.
Can anyone suggest a reliable application to make a bootable ISO on Ubuntu?
My work is stuck due to this....
OR
i am pretty sure a lot of people must be involved in OS development on Linux platform. How do you people test?
I have made a bootable flash-drive with Unetbootin with the iso of my bootloader program.
switched to Virtual-box and twisted a bit to boot from pendrive, but still its showing it to be non-bootable.
I think someone said it correctly that u need a lot of patience in OS development.
:phew finally my bootloader program ran...
I used virtual floppy image to boot my program on Virtual box. Here are the steps in case somebody is struggling with it.
1.Create boot.asm which have your bootloader program.
2.Compile with nasm. nasm -f bin boot.asm -o boot.bin.
3.sudo mkfs.msdos -C /home/username/floppy.img 1440
4.sudo chown username ./floppy.img. link text
5.Copy with dd. dd if=./boot.bin of=./floppy.img.
6.Run VirtualBox and select floppy.img as booting device in your new virtual machine.
PS: you can also attach floppy.img to device "loop" and mount it just as a real floppy disk.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在所有存储位置/检索方法中,CD-ROM/El-Torito 是奇怪的(并且不要让我开始讨论 Mac CDROM 文件系统混合)
使用软盘、硬盘/USB 或 PXE-TFTP,只需编写目标代码到第一个扇区,或者在 tftp 的情况下,只需下载并执行。有了这些就再简单不过了。
Amongst all the storage locations/methods of retrieval, CD-ROM/El-Torito is the oddball (and don't get me started on Mac CDROM filesystem hybrids)
With Floppy, Harddisk/USB or PXE-TFTP, it suffices to write the object code to the first sector, or in case of tftp, just download-and-execute. It can't get any easier with these.
一个非常简单的脚本将在 Linux 中执行此操作,如下所示:-
软盘驱动器的制作如下:-
然后
您就拥有了文件系统
如果您需要 Windows 的帮助,请告诉我:)
a very simple script will do this in linux as below :-
The floppy drive is made as below :-
and
and then you have the file system
If you ned help for windows , let me know :)
尝试一下 WinISO,它非常适合我。
Try WinISO, it works perfect for me.