November 27th, 2010, 08:28 AM
Hi, i hope i am posting in the correct forum.
I am working on a personal project and, have written a small hello world bootloader in ASM. however I have two small questions,
When i use dd (ubuntu) to write my bootloader to the first sector of my usbdrive, the drive becomes unreadable (i need to format it before i can use it again). what am i doing wrong that it destroys the partition table,
the command I use for this is: sudo dd if='/home/account/boot.bin' of='/dev/sdb1' (location of my usb-mounting point).
Is there a way to create an ISO image where I put the boot.bin in the bootsection??
Hope to hear from anyone soon,
November 27th, 2010, 08:43 AM
November 27th, 2010, 08:48 AM
that would indeed be usefull if I wanted to create a Windows or DOS bootdisk, i want to run my self-written bootloader.
November 27th, 2010, 04:40 PM
1. You only have one block (whose size varies) to fit your bootloader. If you go beyond that you'll overwrite important stuff. Figure out the block size and restrict dd to that amount (like with bs=1234 count=1).
2. Yeah. Create an ISO/IMG of whatever you want and write your bootloader into it instead of the USB itself.