Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Unable to create files inside mounted root filesystem
@ 2008-10-27 13:08 Adam McLaurin
  2008-10-27 13:15 ` Roberto A. Foglietta
  2008-10-27 13:22 ` Peter Korsgaard
  0 siblings, 2 replies; 7+ messages in thread
From: Adam McLaurin @ 2008-10-27 13:08 UTC (permalink / raw)
  To: buildroot

Hi all,

I hope this is a typical newbie question. I was finally able to create a
root filesystem (ext2) with buildroot, and I can mount (-o loop) and
chroot into it with no problems.

The trouble is that I cannot create any files in the mounted filesystem:
/ # touch foo
touch: foo: No space left on device

Strangely, when I mount/chroot into one of the pre-built root
filesystems available from the uclibc website, I can create files
without any problems.

I'm trying to figure out what I did differently creating my root
filesystem that would cause this problem, but at the moment I'm out of
ideas.

Any advice?

Thanks,
Adam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Unable to create files inside mounted root filesystem
  2008-10-27 13:08 [Buildroot] Unable to create files inside mounted root filesystem Adam McLaurin
@ 2008-10-27 13:15 ` Roberto A. Foglietta
  2008-10-27 13:21   ` Adam McLaurin
  2008-10-27 13:22 ` Peter Korsgaard
  1 sibling, 1 reply; 7+ messages in thread
From: Roberto A. Foglietta @ 2008-10-27 13:15 UTC (permalink / raw)
  To: buildroot

2008/10/27 Adam McLaurin <buildroot@irotas.net>:
> Hi all,
>
> I hope this is a typical newbie question. I was finally able to create a
> root filesystem (ext2) with buildroot, and I can mount (-o loop) and
> chroot into it with no problems.
>
> The trouble is that I cannot create any files in the mounted filesystem:
> / # touch foo
> touch: foo: No space left on device
>
> Strangely, when I mount/chroot into one of the pre-built root
> filesystems available from the uclibc website, I can create files
> without any problems.
>
> I'm trying to figure out what I did differently creating my root
> filesystem that would cause this problem, but at the moment I'm out of
> ideas.
>
> Any advice?
>

 Welcome, I am newbie in buildroot me too, try this:

 mount -o remount,rw /

 It was useful in my bootable iso9660 from buildroot

 Cheers,
-- 
/roberto

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Unable to create files inside mounted root filesystem
  2008-10-27 13:15 ` Roberto A. Foglietta
@ 2008-10-27 13:21   ` Adam McLaurin
  0 siblings, 0 replies; 7+ messages in thread
From: Adam McLaurin @ 2008-10-27 13:21 UTC (permalink / raw)
  To: buildroot

On Mon, 27 Oct 2008 14:15:12 +0100, "Roberto A. Foglietta"
<roberto.foglietta@gmail.com> said:
> 2008/10/27 Adam McLaurin <buildroot@irotas.net>:
>  Welcome, I am newbie in buildroot me too, try this:
> 
>  mount -o remount,rw /
> 
>  It was useful in my bootable iso9660 from buildroot
> 
>  Cheers,


Thanks for the advice. I tried what you suggested, but no luck:
/ # mount -o remount,rw /
mount: cannot read /proc/mounts: No such file or directory

Indeed, /proc is entirely empty. However, it is also empty when I mount
the pre-built filesystem (from uclibc's website), so I don't think
that's a problem.

-Adam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Unable to create files inside mounted root filesystem
  2008-10-27 13:08 [Buildroot] Unable to create files inside mounted root filesystem Adam McLaurin
  2008-10-27 13:15 ` Roberto A. Foglietta
@ 2008-10-27 13:22 ` Peter Korsgaard
  2008-10-27 14:07   ` Adam McLaurin
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2008-10-27 13:22 UTC (permalink / raw)
  To: buildroot

>>>>> "Adam" == Adam McLaurin <buildroot@irotas.net> writes:

Hi,


 Adam> I hope this is a typical newbie question. I was finally able to
 Adam> create a root filesystem (ext2) with buildroot, and I can mount
 Adam> (-o loop) and chroot into it with no problems.

 Adam> The trouble is that I cannot create any files in the mounted
 Adam> filesystem: / # touch foo touch: foo: No space left on device

That's because genext2fs only creates the file system exactly big
enough for the buildroot files. If you want to have room for more
stuff take a look at the BR2_TARGET_ROOTFS_EXT2_BLOCKS/INODES options:

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Unable to create files inside mounted root filesystem
  2008-10-27 13:22 ` Peter Korsgaard
@ 2008-10-27 14:07   ` Adam McLaurin
  2008-10-27 14:28     ` Peter Korsgaard
  0 siblings, 1 reply; 7+ messages in thread
From: Adam McLaurin @ 2008-10-27 14:07 UTC (permalink / raw)
  To: buildroot

On Mon, 27 Oct 2008 14:22:41 +0100, "Peter Korsgaard"
<jacmet@uclibc.org> said:
> That's because genext2fs only creates the file system exactly big
> enough for the buildroot files. If you want to have room for more
> stuff take a look at the BR2_TARGET_ROOTFS_EXT2_BLOCKS/INODES options:
> 
> From target/ext2/Config.in:
> 
> config BR2_TARGET_ROOTFS_EXT2_BLOCKS
>         int "size in blocks (leave at 0 for auto calculation)"
>         depends on BR2_TARGET_ROOTFS_EXT2
>         default 0
> 
> config BR2_TARGET_ROOTFS_EXT2_INODES
>         int "inodes (leave at 0 for auto calculation)"
>         depends on BR2_TARGET_ROOTFS_EXT2
>         default 0

Yep, that was indeed the problem. However, it's not really clear to me
how the block size is computed by genext2fs, so it's hard to know
exactly how many blocks to allocate. I took a guess at 204088 blocks and
100000 inodes, which is probably overkill but seems to work.

Anyway, thanks for the advice!

-Adam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Unable to create files inside mounted root filesystem
  2008-10-27 14:07   ` Adam McLaurin
@ 2008-10-27 14:28     ` Peter Korsgaard
  2008-10-27 15:55       ` Adam McLaurin
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2008-10-27 14:28 UTC (permalink / raw)
  To: buildroot

>>>>> "Adam" == Adam McLaurin <buildroot@irotas.net> writes:

Hi,

 >> config BR2_TARGET_ROOTFS_EXT2_BLOCKS
 >> int "size in blocks (leave at 0 for auto calculation)"
 >> depends on BR2_TARGET_ROOTFS_EXT2
 >> default 0
 >> 
 >> config BR2_TARGET_ROOTFS_EXT2_INODES
 >> int "inodes (leave at 0 for auto calculation)"
 >> depends on BR2_TARGET_ROOTFS_EXT2
 >> default 0

 Adam> Yep, that was indeed the problem. However, it's not really
 Adam> clear to me how the block size is computed by genext2fs, so
 Adam> it's hard to know exactly how many blocks to allocate. I took a
 Adam> guess at 204088 blocks and 100000 inodes, which is probably
 Adam> overkill but seems to work.

True. Those options are forwarded directly to genext2fs (-b and -N
options), so have a look at the man page of genext2fs for details.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Unable to create files inside mounted root filesystem
  2008-10-27 14:28     ` Peter Korsgaard
@ 2008-10-27 15:55       ` Adam McLaurin
  0 siblings, 0 replies; 7+ messages in thread
From: Adam McLaurin @ 2008-10-27 15:55 UTC (permalink / raw)
  To: buildroot

On Mon, 27 Oct 2008 15:28:10 +0100, "Peter Korsgaard"
<jacmet@uclibc.org> said:
> True. Those options are forwarded directly to genext2fs (-b and -N
> options), so have a look at the man page of genext2fs for details.

Well the documentation doesn't even mention block size, but fortunately
the source code is more revealing:
#define BLOCKSIZE         1024

-Adam

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-27 15:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-27 13:08 [Buildroot] Unable to create files inside mounted root filesystem Adam McLaurin
2008-10-27 13:15 ` Roberto A. Foglietta
2008-10-27 13:21   ` Adam McLaurin
2008-10-27 13:22 ` Peter Korsgaard
2008-10-27 14:07   ` Adam McLaurin
2008-10-27 14:28     ` Peter Korsgaard
2008-10-27 15:55       ` Adam McLaurin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox