OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Sep 25, 2018 5:16 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Size of boot image is 4 sectors -> genisoimage[solved]
PostPosted: Mon Sep 03, 2018 12:45 pm 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 62
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?


Last edited by Klakap on Tue Sep 04, 2018 10:29 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Size of boot image is 4 sectors -> genisoimage: Error
PostPosted: Mon Sep 03, 2018 2:27 pm 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 175
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).


Top
 Profile  
 
 Post subject: Re: Size of boot image is 4 sectors -> genisoimage: Error
PostPosted: Tue Sep 04, 2018 7:12 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 62
os.img is my bootloader with size 113 bytes.


Top
 Profile  
 
 Post subject: Re: Size of boot image is 4 sectors -> genisoimage: Error
PostPosted: Tue Sep 04, 2018 10:18 am 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 175
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.


Top
 Profile  
 
 Post subject: Re: Size of boot image is 4 sectors -> genisoimage: Error
PostPosted: Tue Sep 04, 2018 10:28 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 62
Very thanks, it works perfectly!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group