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

Re: dpkg database rebuild



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Iain Georgeson wrote:

> "Derek Broughton" <news@pointerstop.ca> writes:
>> Brian Kimball wrote:
>>> 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?  The dpkg database
>> is
>> on /var.   The expanded files are on / & /usr.  Don't even think about
>> copying just a single one.   It's much safer to reinstall everything.
> 
> No, it's dead easy. I've migrated installs to a completely different
> partition scheme on new hardware using this method, and it's so much
> simpler than a reinstall.
> 
> You /do/ want to use a boot disk (your Debian boot CD is fine),
> though.
> 
> Mount all your existing partitions in their correct places under one
> root, and then do the same with your destination partitions.
> 
> cp -a
> 
> Have a coffee.
> 
> Fiddle grub and fstab on the new filesystem.
> 

That's right.

This is what I've decided to go with.

dpkg --set/get selections are not my choice because I'm not interested in
"reconfiguring" those 100's of configuration files which I've customized to
my taste.

Even having /, /var/, /usr/ on different partitions is not a problem. I've
done that earlier and it doesn't break unless you really do something
stupid.

Theoretically I was sure what me and some of you thought would work but was
a little scared because all my data is on this laptop. That's why I wrote
this down to have some comments. :-)
My main motto is to switch my HDD to LVM.

This is what I concluded during my discussion on another list:
==
Thaths wrote:

> 6. Remove hda1, reboot, keep fingers crossed.

But I want to restore the whole setup back on to the HDD after setting up
LVM on it. On the USB HDD I'm not interested in setting up anything. That's
just to help store my data while I migrate.

This is what I thought,

1) Boot using a Live Distro which would detect both the HDD and the USB HDD
2) Move all data from HDD to USB HDD.
3) Create LVM setup on HDD.
4) Create same partition structure as it was on HDD earlier.
4) Restore all data from USB HDD to HDD (excluding LVM specific settings)

Now, questions:
1) I use udev, so do I need to backup and restore dev ?
2) I doubt if LVM and VG creation happens without the OS on the HDD. The
metadata is stored on the partition table or is part of the OS ? Can
someone who has experience with LVM confirm this ?
If it was plain HDD to HDD migration, it would have been very trivial.

But personally I think this should work.


Regards,

rrs
==

My main motto is to switch my partition structure to LVM. And I don't think
of any technical reason why it shouldn't work.

Thanks a lot to all of you for your replies.

Regards,

rrs
- -- 
Ritesh Raj Sarraf
RESEARCHUT -- http://www.researchut.com
Gnupg Key ID: 04F130BC
"Stealing logic from one person is plagiarism, stealing from many is
research."
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDJxsO4Rhi6gTxMLwRAtbHAJ9xRoNqF/AmuCYFNFRTn0KE3OekCACfT2VV
IlUGzXxvQhuua7fcbwJijZY=
=WiWe
-----END PGP SIGNATURE-----



Reply to: