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

Re: Install with dpkg only.



Ringo De Smet <Ringo.DeSmet@advalvas.be> wrote:
>I have an empty harddisk installed, and I want to installing Debian
>packages to create a working Debian system. I have unpacked the dpkg
>package (ar -x and then tar xfz data.tar.gz) on my working RedHat
>system. I now want to install packages using 
>
>dpkg -i --root=/mnt/debianroot <package>
>
>However, most of the packages fail at some point in the preinstall or
>postinstall scripts. For example, the post-install script of dpkg-doc
>can't find the script/program 'install-docs'.

This is in the doc-base package, though the current dpkg-doc package (in
potato) doesn't actually require install-docs to be installed (it will
merely take advantage of it if it is).

>It also looks like the paths used in the script do not take the
>relocation into account. Am I wrong on this?

Yes: this doesn't work the same way as rpm's relocation. The scripts
don't get a choice in the matter (so there's no such thing as a
non-relocatable package); they're run inside chroot(), so as far as
they're concerned /mnt/debianroot/ becomes /. However, *because* they're
run inside chroot(), you need a working system, with all the necessary
libraries, pre-dependencies, etc., in /mnt/debianroot to be able to
install packages this way.

This, however, shouldn't be too difficult. Given what you've described
above, you'll have quite a lot of packages that are unpacked but not
configured, and an unpacked package is likely to at least partly work.
All you should need to do is unpack all packages that have a Priority:
field of required ('dpkg-deb -f package.deb Priority' will show you
this) or that are in the base section, using 'dpkg -i --root' as you've
been doing so far (I see you've done this already); ignore any errors
you see for the time being. This will include installing dpkg on your
Debian filesystem as well as on your Red Hat filesystem, and also make
sure that everything in those packages' Pre-Depends:, Depends:, and
Recommends: fields is installed, just in case.

Then 'chroot /mnt/debianroot' and run 'dpkg --configure -a', which
should set everything up for you. If you get any errors, try running it
again. :) If you still get errors, then you might need a couple more
packages, so lather, rinse, repeat.

I haven't actually tried this myself, but this is roughly the way the
Debian GNU/Hurd installation process works, so it should be OK for you
with fairly minimal tweaking. Good luck!

-- 
Colin Watson                                           [cjw44@cam.ac.uk]


Reply to: