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

Re: Redesign of diskless NFS-root package & apt error



> > I have made most of the changed required for my redesign of diskless.
> > Amazingly, it looks like no changed are required for dpkg. I haven't
> > yet tested anything though, and implementing secure mode might be a bit
> > awkward. Currently I am considering the following:

It appears I may no jumped the gun a bit when I said "no changed required
for dpkg".

apt, for starters is broken:

It can't move files from /var/cache/apt/archives/partial
to /var/cache/apt/archives.

Don't ask me why, but passwd and fileutils are OK, everything
else is a problem no matter how many times I run
apt.

apt generates the following error:

nfs_rename: old dentry partial/ldso_1.9.11-3.deb busy, d_count=2

and further on:

Unable to move file out of partial directory.

Lets conduct a little test here:

cd /var/cache/apt/archives/partial
while true; do sleep 1; echo hi; done > out &
mv out ..

generates the following error:

nfs_rename: old dentry partial/out busy, d_count=2
mv: cannot move `out' to `../out': Device or resource busy

so it looks like, under Linux 2.2.12, it is an illegal
operation to move a file that is currently open.

So the big question is: Why?

Next question: Why do some files work?

Also, I tried the same operation on Ultrix, and it worked fine.

Next question: What should I do for my diskless package?
Tell people to move the files manually?

BTW, if I replace the mv above, with
ln out ../out
rm out

it works. Perhaps I should file a bug against apt asking it to do the
same thing. From memory, programs that use Maildir also use this trick,
too. Just don't try and delete the partial directory, before the file is
closed... (not a problem with apt)

I haven't yet properly tested dpkg. It seemed Ok for installing
ssmtpd(??). If dpkg fails, I will have to recommend that all packages be
installed on the server using a chroot environment. In this case, beware
of packages whose postinst directly interacts with the hardware of the
computer!

Now on to the next problem: finding out why certain files, eg libc6 2.1
cannot be found on my local Debian mirror...
-- 
Brian May <bam@snoopy.apana.org.au>


Reply to: