Jump to content

"No space left on device" when building image with large rootfs file.


Go to solution Solved by ahphone,

Recommended Posts

Posted (edited)

Hello everyone,

 

I encountered a "No space left on device (28)" issue while compiling custom firmware and would like to seek your help.

 

The firmware compilation process works fine under normal circumstances. However, after using the customize-image.sh script to install my own applications, the rootfs size became 3285 MiB, and I encountered the "No space left on device (28)" error during compilation.

 

I modified FIXED_IMAGE_SIZE to 6G and recompiled, but the same issue persisted.  After mounting the raw file, I confirmed that no additional files could be added.

 

I suspect there’s some parameter restricting this, but I’m not sure what it is.

 

Can anyone provide some hints? Thank you!

 

The compile log:

Quote

Install finish...
[ o.k. ] No longer needed packages [ purge ]
[ o.k. ] Unmounting [ /root/project/LinuxBox/.tmp/rootfs-103db15b-42b5-4d1e-af52-fe8057653090 ]
[ o.k. ] Preparing image file for rootfs [ jethubj100 jammy ]
[ o.k. ] Current rootfs size [ 3285 MiB ]
[ o.k. ] Using user-defined image size [ 6144 MiB ]
[ o.k. ] Creating blank image for rootfs [ 6144 MiB ]
[ o.k. ] Creating partitions [ root: ext4 ]
[ .... ] Creating rootfs [ ext4 on /dev/loop15p1 ]
[ .... ] Copying files to [ / ]
[ .... ] Copying files to [ /boot ]
rsync: [generator] symlink "/root/project/LinuxBox/.tmp/mount-103db15b-42b5-4d1e-af52-fe8057653090/boot/Image" -> "vmlinuz-5.1                                0.230-meson64" failed: No space left on device (28)
rsync: [generator] symlink "/root/project/LinuxBox/.tmp/mount-103db15b-42b5-4d1e-af52-fe8057653090/boot/dtb" -> "dtb-5.10.230-                                meson64" failed: No space left on device (28)
rsync: [generator] recv_generator: mkdir "/root/project/LinuxBox/.tmp/mount-103db15b-42b5-4d1e-af52-fe8057653090/boot/dtb-5.10                                .230-meson64" failed: No space left on device (28)
 

 

 

Mount 

Quote

# fdisk -l rootfs-103db15b-42b5-4d1e-af52-fe8057653090.raw
Disk rootfs-103db15b-42b5-4d1e-af52-fe8057653090.raw: 6 GiB, 6442450944 bytes, 12582912 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd8e66e6b

Device                                           Boot  Start      End  Sectors  Size Id Type
rootfs-103db15b-42b5-4d1e-af52-fe8057653090.raw1      258048 12582911 12324864  5.9G 83 Linux


# sudo losetup -P /dev/loop1 rootfs-103db15b-42b5-4d1e-af52-fe8057653090.raw
# ls /dev/loop1*
/dev/loop1  /dev/loop10  /dev/loop11  /dev/loop12  /dev/loop13  /dev/loop14  /dev/loop15  /dev/loop1p1


# sudo mount /dev/loop1p1 /mnt
# df -h /mnt
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop1p1    5.8G  3.1G  2.6G  55% /mnt
 

 

 

Quote

# file rootfs-103db15b-42b5-4d1e-af52-fe8057653090.raw
rootfs-103db15b-42b5-4d1e-af52-fe8057653090.raw: DOS/MBR boot sector; partition 1 : ID=0x83, start-CHS (0x10,16,1), end-CHS (0x3f,63,48), startsector 258048, 12324864 sectors, extended partition table (last)
 

 

 

 

 

 

 

 

Edited by ahphone
Posted

At the end of each build, regardless if successful,  there is a curl command which uploads the build log to a paste service. Use it and provide us the url.

  • Solution
Posted

Hello everyone, I discovered the issue and resolved it myself. The disk space was sufficient, but the inodes were exhausted. Adjusting the number of inodes during the mkfs process fixed the problem.

 

Quote

# df -i /root/project/LinuxBox/.tmp/mount-0a979ae0-20fc-439b-be5d-c4ab062ff8af
Filesystem     Inodes  IUsed IFree IUse% Mounted on
/dev/loop3p1   131440 131440     0  100% /root/project/LinuxBox/.tmp/mount-0a979ae0-20fc-439b-be5d-c4ab062ff8af
 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines