# [solved] errors of "no space left on device" during boot

## mel_82

I'm trying to install a gentoo 2008.0 on an acer travelmate 202t, an old coppermine laptop from the 20th century..

Machine specifications, if needed. Mine has 64mb of ram and 4gb of hd. (well, my pda has both more ram and more space  :Razz:  !!)

Now, the machine works, but I get this message at boot when starting the freenet6 service (I need that 'cause I'm in a fastweb network, behind a nat):

```
/lib/rcscripts/sh/rc-daemon.sh: line 419: /var/lib/init.d/daemons/gw6c: No space left on device

[cut: other similar errors on other lines]

ln: creating symbolic link '/var/lib/init.d/started/gw6c': no space left on device
```

then every service started from this moment on crashes with a similar message.

The first one after freenet6 is D-BUS, with:

```
* Starting D-BUS system messagebus ...

Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": No space left on device
```

and so on.

A df -h command shows

```
fisherprice ~ # df -h

Filesystem:      size    used   avail   use%   mounted on

/dev/hda6        4.2G    2.8G    1.2G    71%   /

udev             10M     176K    9.9M     2%   /dev

shm              30M        0     30M     0%   /dev/shm
```

Just for information, I have a 256mb boot partition, not mounted automatically, and a 256mb swap partition.

So, i think this may be caused from the limited amount of ram (64mb).. How can I avoid this without having to search in fairs for addiction ram?

----------

## richard.scott

Have you configured any swap space?? 

I'm not sure if /dev/shm would swap into that if it needs more memory??

----------

## mel_82

these are the lines in my fstab about swap and shm:

```
/dev/hda5   none   swap   sw   0 0

shm   /dev/shm   tmpfs    nodev,nosuid,noexec   0 0
```

/dev/hda5 is 256MB

It's been a long time since the last time I had a linux machine.. 

I apologize for my ignorance, but I don't know if I had to set the swap elsewhere other than in fstab..

ps: I'm sorry for my spaghetti-english, by the way  :Razz: 

----------

## bastibasti

what is the output of mount? maybe the FS is ro?

try "touch /var/run/dbus/system_bus_socket" and see whether you can create a file.

----------

## mel_82

"/var/run/dbus/system_bus_socket" already esists.

I've tried "touch /var/run/dbus/iamafile" and it works, the directory seems to be writable..

----------

## bastibasti

well end the dbus process and move the file to another directory for backup

----------

## Janne Pikkarainen

What does df -i report? Maybe your root filesystem has run out of inodes.

----------

## skellr

One thing you could do is put /usr/portage in a file and mount it via loop device. This way you won't need to repartition. You will need to set DISTDIR and PKGDIR in make.conf so your distfiles/packages will be somewhere else as the file for portage doesn't need to be that big and would fill up fast. delete /usr/portage to free up some inodes and grab a portage snapshot. Or move the distfiles if you care to keep them.

http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2

```

dd if=/dev/zero of=/mnt/portage count=600000

losetup /dev/loop1 /mnt/portage

mke2fs -j -m0 -b1024 -i2048 /dev/loop1

mount /dev/loop1 /usr/portage

tar xjf portage-latest.tar.bz2 -C /usr
```

```
/mnt/portage /usr/portage ext3 defaults,noatime,nodiratime,loop 0 0
```

The loop module never seems to autoload for me so it might need modprobe and an entry in autoload if it's built as a module. I use '0 0' in fstab so fsck won't complain as root is still read only when it wants to check the file. reiserfs is also nice for /usr/portage.

----------

## i92guboj

 *mel_82 wrote:*   

> 
> 
> ```
> * Starting D-BUS system messagebus ...
> 
> ...

 

Yep, but, df -i?

Maybe you're running out of i-nodes on that partition.

----------

## mel_82

```
fisherprice ~ # df -i

Filesystem:    Inodes   IUsed   IFree  Iuse%   mounted on

/dev/hda6     274176  274159      17   100%   /
```

Ok, that's the problem. This is the first time I see that. 

How can I solve it? The partition is ext3, maybe changing to another fs? (backup is not a problem, the whole disk is 4GB)

----------

## i92guboj

 *mel_82 wrote:*   

> 
> 
> ```
> fisherprice ~ # df -i
> 
> ...

 

Yep, or, look at the mkfs.ext3 man page, -b and -i options might help, the default is 4096, if you set it to 1024 you will have much more i-nodes to index files. In any case, you will need to reformat.

----------

## mel_82

Ok, thanks to you all   :Cool: 

I'll format with smaller inodes and the the problem is solved.

----------

## skellr

Heh, It's /usr/portage that really loves your inodes. 126794 and counting.   :Wink: 

----------

## mel_82

I've made a tar of the whole disk, reformatted, then undone the tar.

Everything is working fine now, and a "df -i" shows less than 10% of the inodes are now used  :Smile: 

Thank you again  :Very Happy: 

----------

