Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Oct 2008 13:25:45 +0200
From:      Markus Hitter <mah@jump-ing.de>
To:        freebsd-embedded@freebsd.org
Subject:   Fill a partition entirely
Message-ID:  <8DCB3D53-4C5E-43FD-A437-C551A36003DE@jump-ing.de>

next in thread | raw e-mail | index | archive | help

Hello all,

recently I received such a GEODE-based diskless desktop PC and now  
I'm attepting to get a minimum system onto it using (a heftily  
tweaked) tinyBSD. The plan is to put a memory based, read-only root  
file system onto a pen drive and to use the remaining part of the pen  
drive for user data.

In principle everything works, but when trying to optimise, I can't  
get this root file system to fill up to more tham about 60%, no  
matter how I set inode count, root reserved space and fragment size.  
This is the snippet for creating the partition:

   PART_ONE_SIZE=`du -s ${WORKDIR} | cut -f 1`
   # Fix: let PART_ONE_SIZE=${PART_ONE_SIZE}*2
   LABELFILE=`mktemp -t tinybsd`
   echo "a: ${PART_ONE_SIZE} * 4.2BSD"  > ${LABELFILE}
   echo "b: *                * 4.2BSD" >> ${LABELFILE}
   bsdlabel -R -B /dev/${MD} ${LABELFILE}
   rm -f ${LABELFILE}
   newfs -m 0 -n /dev/${MD}a

   mount /dev/${MD}a ${IMGMNT}

   tar -C ${WORKDIR} -cf- --exclude kernel . | \
     tar -C ${IMGMNT} -xf-

For some reason I can't imagine, the later "tar" starts complaining  
"No space left on device" half the way and the situation ends up with  
("df -i"):

Filesystem 1K-blocks Used Avail Capacity iused ifree %iused  Mounted on
/dev/md1a       6778 4596  2182    68%      22  1000    2%   /tmp/ 
tinybsd.HhlvvDXC


To me, this doesn't look like "No space left on device" at all. What  
is missing here, how can I shrink the partition to just hold the  
needed files?


Thanks,
MarKus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8DCB3D53-4C5E-43FD-A437-C551A36003DE>