hi all, my computer does not have any floppy device so i want to create .iso image to test my own os. so anybody know how could i create an iso image from two files like bsect and sect2.
regards
final.iso insted of flopyboot.img
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: final.iso insted of flopyboot.img
This question and others are answered on the wiki: Bootable CD - please look there first before posting.
Re: final.iso insted of flopyboot.img
so my computer does not create bootable floppy from write.c due to floppy drive doesn't existed so could you help me to create floppy.img from bsect.o and sect2.o files.
regards
regards
Re: final.iso insted of flopyboot.img
If Windows, look into using VFD.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: final.iso insted of flopyboot.img
no i use it in ubuntu 10.4 this part of the code "floppy_desc = open("/dev/sdc1", O_RDWR);" is wrong because my usb floppy is mounted on sdc but code use fd0 so i change write.c to write usb floppy but it isn't working. so i decide to create final.img in order to write it on a floppy disk. but i cant create img file from two files like bsec and sect2. my write.c code is below;
regards
regards
#include <sys/types.h> /* unistd.h needs this */
#include <unistd.h> /* contains read/write */
#include <fcntl.h>
int main()
{
char boot_buf[512];
int floppy_desc, file_desc;
file_desc = open("./bsect", O_RDONLY);
read(file_desc, boot_buf, 510);
close(file_desc);
boot_buf[510] = 0x55;
boot_buf[511] = 0xaa;
floppy_desc = open("/dev/sdc1", O_RDWR);
lseek(floppy_desc, 0, SEEK_SET);
write(floppy_desc, boot_buf, 512);
file_desc = open("./sect2", O_RDONLY);
read(file_desc, boot_buf, 512);
close(file_desc);
lseek(floppy_desc, 512, SEEK_SET);
write(floppy_desc, boot_buf, 512);
close(floppy_desc);
}
Re: final.iso insted of flopyboot.img
Hope this helps: http://ubuntuforums.org/showthread.php?p=2012333
Visit the Montrom user page for more info.
Re: final.iso insted of flopyboot.img
ok i solve it.
thanks for help
thanks for help
Re: final.iso insted of flopyboot.img
so the solution is floppy_desc = open("final.img", O_RDWR); but you have to create final.img before execute the ./write
otherwise floppy_desc equals -1
regards
otherwise floppy_desc equals -1
regards