[BusyBox] can't get freeramdisk to work

Scott Murray scottm at somanetworks.com
Tue Oct 16 08:52:31 UTC 2001


On Tue, 16 Oct 2001, Bene, Martin wrote:

> I just changed setup for my embedded system from ramdisk to tmpfs; switching
> root filesystems with pivot_root works OK but I can't free the space used by
> the initial ramdisk:
>
> [root at martin /root]# umount /initrd
> [root at martin /root]# freeramdisk /dev/ram0
> freeramdisk: failed ioctl on /dev/ram0: Device or resource busy
>
> However, I can't find what's keeping the old root system busy; fuser doesn't
> show anything.
[snip]
> Kernel version is 2.4.9. Any idea why this doesn't work?

You need a one line patch to rd.c that's been in the -ac kernels for
almost a year.  Or, you can upgrade to 2.4.12, which has a massively
rewritten rd.c that also seems to fix the problem.

If you want the rd.c fix to pre-2.4.10 kernels, let me know, and I'll
extract it from our BitKeeper kernel tree.

Scott


-- 
Scott Murray
SOMA Networks, Inc.
Toronto, Ontario
e-mail: scottm at somanetworks.com






More information about the busybox mailing list