OSDev.org https://forum.osdev.org/ |
|
Size of boot image is 4 sectors -> genisoimage[solved] https://forum.osdev.org/viewtopic.php?f=1&t=33158 |
Page 1 of 1 |
Author: | Klakap [ Mon Sep 03, 2018 12:45 pm ] |
Post subject: | Size of boot image is 4 sectors -> genisoimage[solved] |
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? |
Author: | MichaelPetch [ Mon Sep 03, 2018 2:27 pm ] |
Post subject: | 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). |
Author: | Klakap [ Tue Sep 04, 2018 7:12 am ] |
Post subject: | Re: Size of boot image is 4 sectors -> genisoimage: Error |
os.img is my bootloader with size 113 bytes. |
Author: | MichaelPetch [ Tue Sep 04, 2018 10:18 am ] |
Post subject: | 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: Code: dd if=/dev/zero of=os.img bs=1024 count=1440 dd if=kernel.bin of=os.img conv=notrunc seek=0 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. |
Author: | Klakap [ Tue Sep 04, 2018 10:28 am ] |
Post subject: | Re: Size of boot image is 4 sectors -> genisoimage: Error |
Very thanks, it works perfectly! |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |