Good day,
I wanted to do make .iso file with genisoimage. My bootloader has a size of 113 bytes(it is not yet completely finished), but genisoimage gives me the error
Size of boot image is 4 sectors -> genisoimage: Error - boot image 'images/os. img' has not an allowable size.
Please what should I do?
Size of boot image is 4 sectors -> genisoimage[solved]
Size of boot image is 4 sectors -> genisoimage[solved]
Last edited by Klakap on Tue Sep 04, 2018 10:29 am, edited 1 time in total.
-
- Member
- Posts: 799
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re: Size of boot image is 4 sectors -> genisoimage: Error
what is the size of os.img ? It should be the size of a floppy (ie 1440*1024=1474560 bytes would be a 1.44MB).
Re: Size of boot image is 4 sectors -> genisoimage: Error
os.img is my bootloader with size 113 bytes.
-
- Member
- Posts: 799
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re: Size of boot image is 4 sectors -> genisoimage: Error
That is why. Your OS iage has to be the size of an established disk size. Try placing your kernel binary file inside a file that is the size of a 1.44MB disk image.You can do that with DD:
The first command creates an image file (os.img) the size of a 1.44MB floppy (1474560 bytes).The second command takes the name of your binary kernel (kernel.bin is whatever name you used to save your binary kernel file as) and places it starting at the beginning of the image without truncating the image file. This should produce a disk with your kernel inside what appears to be a 1.44MB disk image.
Code: Select all
dd if=/dev/zero of=os.img bs=1024 count=1440
dd if=kernel.bin of=os.img conv=notrunc seek=0
Re: Size of boot image is 4 sectors -> genisoimage: Error
Very thanks, it works perfectly!