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

Re: Créeer un root file system avec dpkg et co.



>>>> "FG" == Fabrice Gautier <gautier@email.enst.fr> writes:

FG> Bonjour,

Bonsoir,

FG> Je voudrais savoir si il est possible d'installer des paquets debian sur
FG> une autre partition racine.

FG> C'est a dire, je voudrais pouvoir faire un truc du genre:

FG> dpkg -i bash --root=/mnt/autre-root 

FG> et ensuite bash serait installe dans /mnt/autre-root/usr/bin/bash 

Il suffit de faire un chroot juste avant (j'ai essayé donc ça marche)

chroot /mnt/autre-root /bin/bash (ou un autre shell)
dpkg -i bash

Il faut bien sur que le package soit accessible depuis le nouvel
environnement.

Je vois dans man dpkg :-)

--root=dir | --admindir=dir | --instdir=dir
              Change default directories.  admindir  defaults  to
              /var/lib/dpkg  and  contains  many  files that give
              information about  status  of  installed  or  unin­
              stalled  packages,  etc.  instdir defaults to / and
              refers to the directory where packages  are  to  be
              installed.  instdir is also the directory passed to
              chroot(2)  before  running  package's  installation
              scripts,  which  means that the scripts see instdir
              as a root directory.  Changing root changes instdir
              to dir and admindir to dir/var/lib/dpkg.

Pas essayé mais ça doit marcher.

Christian



Reply to: