Create a normal floppy with dd?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
ThisMayWork
Member
Member
Posts: 65
Joined: Sat Mar 22, 2014 1:14 pm
Location: /bin

Create a normal floppy with dd?

Post by ThisMayWork »

I am trying to create a normal in size floppy disk with dd using the following

Code: Select all

dd if=/dev/zero of=os.img count=1440 bs=512
	dd if=boot.bin of=os.img bs=512 count=1
	dd if=kernel.bin of=os.img bs=512 seek=1
However, the resulting floppy is only 6Kb in size, which Virtual Box won't accept. Any ideas?
Thanks in advance!
"Programming is an art form that fights back."
-Kudzu
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: Create a normal floppy with dd?

Post by Nable »

Oh...
man dd wrote:

Code: Select all

       conv=CONVS
              convert the file as per the comma separated symbol list
[...]

       Each CONV symbol may be:
[...]
       notrunc
              do not truncate the output file
tl;dr: by default dd truncates output file, so you should specify conv=notrunc option.
User avatar
ThisMayWork
Member
Member
Posts: 65
Joined: Sat Mar 22, 2014 1:14 pm
Location: /bin

Re: Create a normal floppy with dd?

Post by ThisMayWork »

Thank you, worked like a charm! :)
"Programming is an art form that fights back."
-Kudzu
Post Reply