LinHES Forums
http://forum.linhes.org/

To install .deb, dpkg status area must not be read only
http://forum.linhes.org/viewtopic.php?f=14&t=10802
Page 1 of 1

Author:  sigger [ Thu Jul 13, 2006 1:28 am ]
Post subject:  To install .deb, dpkg status area must not be read only

I'm running a front end off the livecd. I'm trying to install a particular .deb file, however I am getting an error message from dpkg that the status area is read only.

Certainly many places in a livecd distro are ro, so I've made /etc/apt/ and /var/cache/apt stuff rw, however it hasn't solved the problem.

Anyone tell me what area dpkg might mean?

Author:  nermander [ Thu Jul 13, 2006 2:09 am ]
Post subject: 

Are you doing the install as root?

And dpkg status is (as far as I know) in /var/lib/dpkg.

Author:  sigger [ Thu Jul 13, 2006 9:18 am ]
Post subject: 

Thanks, yeah doing it as root.

I successfully converted /usr/lib/dpkg/status to rw (by replacing the symlinks with actual copies of the files that were linked to).

Next problem is that dpkg needs to install the lib to /usr/lib/libdvdwhatever, but it can't because /usr is a symlink. /usr is much larger than the little stuff I have replaced so I am concerned for mem space/inode count.

Since I keep having this issue with livecds (which I am so attached to) I need to find or write something like desymlink (http://www.splode.com/~friedman/software/scripts/src/desymlink). There's actually a bunch of little places that might need to be desymlinked for a livecd install - e.g. nx server.

Hopefully that works and there's enough mem. Will post.

Author:  sigger [ Thu Jul 13, 2006 8:16 pm ]
Post subject: 

Well I did write a basic de-symlinker (echoed commands rather than executed until more fully vetted):
#!/bin/bash
# desym.sh

# Replace symlink with either real dir or real copy of file.
# Doesn't take target with shell expansion, e.g. lib*.

# If no args then complain.

if [ $# -eq 0 ]
then
echo "Need an argument. Give me a symlink."
exit 0
else
target=$1
fi

if [ ! -L $target ]
then
echo "Need symlink as an argument"
else
source=`readlink $1`
fi

if [ -d "$source" ]
then
echo "source is dir \"$source\""
type="d"
echo "rm -f $target"
echo "mkdir $target"
echo "ln -s $source/* $target"
elif [ -f "$source" ]
then
echo "source is file \"$source\""
type="f"
echo "rm -f $target"
echo "cp $source$file $target"
else
echo "\"$source\" is of unknown type"
exit 0
fi

However the problem is that one of the dirs that needs to be de-symlinked is /usr/lib/dpkg/status. Well of course once you remove the /usr/lib symlink in order to replace it with the actual, the OS ceases to cooperate.

Any ideas?

Author:  cesman [ Fri Jul 14, 2006 12:44 am ]
Post subject: 

The live cd isn't meant for software installation. The only possible way to do this would be for me to add UnionFS. Ssorry, not happening at this point in space time, you can try remastering..

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/