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

Re: dpkg database rebuild

Derek Broughton wrote:
> Brian Kimball wrote:
> > Ritesh Raj Sarraf wrote:
> >> If I copy the whole filesystem to another hard drive and rebuild
> >> the dpkg database, will it work ? Will dpkg be able to understand
> >> all the packages installed ?
> >
> > Yes, and you don't have to rebuild anything.  Forget all that
> > discussion about dpkg --get-selections and --set-selections. 
> > Totally unnecessary.
> It _is_ totally unnecessary if he just has a single file system. 
> What happens if he has separate /, /usr, and /var systems?

Totally irrelevant.   We're copying files, not filesystems.

> The dpkg database is on /var.   The expanded files are on / & /usr.
> Don't even think about copying just a single one.

Well duh.  I usually copy each directory in / one by one, excluding 
obvious ones like /proc and /dev (since I use udev).

> It's much safer to 
> reinstall everything.  

No.  Just don't be so absentminded that you'll forget /usr or /var. :-)

Reply to: