[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: file mounted after debootstrap + udev



zferentz@gmail.com writes:

> Hi,
>
> I've been using debootstrap to produce my  live linux based on debian
> 2.6.18 .
> At first, my system was built with devfs and everything was fine .
> Recently, i moved to udev (i added kernel support + udev package) and
> although the live linux works just fine , after the "build process" -
> there are mounted files that i cannot remove from my development
> machine.
>
> If i try to delete my "working directory", i got the following error:
>
>   /bin/rm: cannot remove directory `working_dir/dev/.static/dev':
> Device or resource busy
>
> I've found out the following facts:
> 1. my build process installs an apache server
> 2. before running the build process , i had NO apache running
> 3. after running the build process , i an apache process is running
> 4. if i kill the apache process, umount the file , i can remove the
> directory
>
> My questions:
> - How come the build process starts an apache ? i thought it should
> just install it...
> - where should i look for the mount or apache installation scripts ?
>   (it's not my scripts...so i have no idea... i'm kinda a newbie in
> this
>   area...)
> - am i doing something wrong ? how can i prevent this behaviour ?
> - what's the "standard procedure" for building/installing a live
> linux   with apache ?
>
> tnx,
> zferentz

For this specific case see the other mails. But generally you need to
do the following (or at least check them unneccessary):

1. check for any processes left running in the chroot. Check the
/proc/root link of each pid and hope you have to fork bomb like
process in the chroot.

2. check for any filesystems left mounted below the chroot. Use
/proc/mounts and not /etc/mtab (or mount output) as that may be
incorrect.

3. remove working_dir

If any step fails you have to abort.

MfG
        Goswin



Reply to: