Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Assembly 我自己的引导加载程序出现问题,从.bin到.iso的文件转换失败_Assembly_Operating System_Virtual Machine_Nasm_Bootloader - Fatal编程技术网

Assembly 我自己的引导加载程序出现问题,从.bin到.iso的文件转换失败

Assembly 我自己的引导加载程序出现问题,从.bin到.iso的文件转换失败,assembly,operating-system,virtual-machine,nasm,bootloader,Assembly,Operating System,Virtual Machine,Nasm,Bootloader,目前,我试图用nasm编写自己的引导程序,但并没有真正成功 问题是,我想将.bin文件转换为.iso或其他图像文件,以便VM识别它 但是我的转换程序说文件坏了 My.bin文件是在Linux下使用NASM编译器编译的,大小正好为512字节 nasm boot.asm -f bin -o boot.bin 我希望任何人都能帮助我= 先谢谢你 请向.iso致以最良好的敬意,因为这是一个过度的.iso,引导加载程序的填充使.bin与软盘扇区大小相同,因此请使用软盘映像: #Prepare an em

目前,我试图用nasm编写自己的引导程序,但并没有真正成功

问题是,我想将.bin文件转换为.iso或其他图像文件,以便VM识别它

但是我的转换程序说文件坏了

My.bin文件是在Linux下使用NASM编译器编译的,大小正好为512字节

nasm boot.asm -f bin -o boot.bin
我希望任何人都能帮助我=

先谢谢你

请向.iso致以最良好的敬意,因为这是一个过度的.iso,引导加载程序的填充使.bin与软盘扇区大小相同,因此请使用软盘映像:

#Prepare an empty image, this is the maximum size of a floppy disk
dd if=/dev/zero of=boot.img bs=1024 count=1440
#Insert your .bin to the first sector of the floppy disk
dd if=boot.bin of=boot.img conv=notrunc 
运行此命令将生成可引导软盘映像boot.img


有关更多信息,请参阅此答案:

您应该显示如何转换它以及收到的错误消息。感谢您的回答。我尝试了两种不同的工具,但都给了我一个错误。linux下的包iat映像已损坏,并且扇区0处出现ccd2iso错误。该扇区不包含完整的数据。扇区大小必须为2352,而实际读取的数据为512
#Prepare an empty image, this is the maximum size of a floppy disk
dd if=/dev/zero of=boot.img bs=1024 count=1440
#Insert your .bin to the first sector of the floppy disk
dd if=boot.bin of=boot.img conv=notrunc