LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-26-2022, 01:16 PM   #1
nadirvanthielen
LQ Newbie
 
Registered: Jul 2022
Posts: 3

Rep: Reputation: 0
Question mformat


I have a make file :
buildimg:
dd if=/dev/zero of=$(BUILDDIR)/$(OSNAME).img bs=512 count=93750
mformat -i $(BUILDDIR)/$(OSNAME).img -f 1440 ::
mmd -i $(BUILDDIR)/$(OSNAME).img ::/EFI
mmd -i $(BUILDDIR)/$(OSNAME).img ::/EFI/BOOT
mcopy -i $(BUILDDIR)/$(OSNAME).img $(BOOTEFI) ::/EFI/BOOT
mcopy -i $(BUILDDIR)/$(OSNAME).img startup.nsh ::
mcopy -i $(BUILDDIR)/$(OSNAME).img $(BUILDDIR)/kernel.elf :

but get e error running it.

[sudo] password for nvthielen:
dd if=/dev/zero of=bin/CustomOS.img bs=512 count=93750
93750+0 records in
93750+0 records out
48000000 bytes (48 MB, 46 MiB) copied, 0.661928 s, 72.5 MB/s
mformat -i bin/CustomOS.img -f 1440 ::
mformat: mformat.c:367: check_fs_params_and_set_fat: Assertion `clusters_fit_into_fat(Fs)' failed.
make: *** [Makefile:42: buildimg] Aborted (core dumped)

any help is welcome tnx
 
Old 07-26-2022, 02:10 PM   #2
nadirvanthielen
LQ Newbie
 
Registered: Jul 2022
Posts: 3

Original Poster
Rep: Reputation: 0
is ok now (Fix)

mformat -i $(BUILDDIR)/$(OSNAME).img ::

whit out the -f flag.
 
Old 07-26-2022, 02:27 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,770

Rep: Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933
The commands work for me on a debian 11 system but you are creating a 48MB image file and trying to format it with a 1.44MB filesystem. A FAT12 filesystem is limited to <=32MB. Without the -f it uses a FAT16 which limits at 2GB

Last edited by michaelk; 07-26-2022 at 02:30 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mformat jdtiede Linux - Hardware 2 05-11-2010 03:48 PM
mformat in fedora 9? bmxp Linux - Newbie 1 05-28-2008 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration