public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Install Migration
@ 2007-06-04 21:52 Randy Barlow
  2007-06-04 23:08 ` Richard Cox
  2007-06-05  7:33 ` Alan McKinnon
  0 siblings, 2 replies; 7+ messages in thread
From: Randy Barlow @ 2007-06-04 21:52 UTC (permalink / raw
  To: gentoo-user

I've set up my desktop machine using LVM over software raid, and 
although I like it I'm getting weary of the complication of the setup 
for a simple desktop system.  What I would like to do is get the same 
install (packages, config files, etc) as are currently used, but have it 
all on one file system for simplicity.  I know I can use DD to copy a 
filesystem, but I don't think that will work in this case.  I was 
thinking of doing a fresh install and then using my backup of /etc to 
try and get the same setup.  If I copy the world file from the previous 
system and emerge -e world, will that get all the packages I currently 
have?  Afterwards I would just copy the rest of /etc into place and go 
about on my merry way.  Are there any problems with this approach?

R
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-user] Install Migration
@ 2007-06-04 21:58 Randy Barlow
  0 siblings, 0 replies; 7+ messages in thread
From: Randy Barlow @ 2007-06-04 21:58 UTC (permalink / raw
  To: gentoo-user

I've set up my desktop machine using LVM over software raid, and
although I like it I'm getting weary of the complication of the setup
for a simple desktop system.  What I would like to do is get the same
install (packages, config files, etc) as are currently used, but have it
all on one file system for simplicity.  I know I can use DD to copy a
filesystem, but I don't think that will work in this case.  I was
thinking of doing a fresh install and then using my backup of /etc to
try and get the same setup.  If I copy the world file from the previous
system and emerge -e world, will that get all the packages I currently
have?  Afterwards I would just copy the rest of /etc into place and go
about on my merry way.  Are there any problems with this approach?

R

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Install Migration
  2007-06-04 21:52 Randy Barlow
@ 2007-06-04 23:08 ` Richard Cox
  2007-06-05  0:39   ` Rumen Yotov
  2007-06-05  7:33 ` Alan McKinnon
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Cox @ 2007-06-04 23:08 UTC (permalink / raw
  To: gentoo-user

On Mon, Jun 04, 2007 at 04:52:26PM -0500, Randy Barlow wrote:
> I've set up my desktop machine using LVM over software raid, and 
> although I like it I'm getting weary of the complication of the setup 
> for a simple desktop system.  What I would like to do is get the same 
> install (packages, config files, etc) as are currently used, but have it 
> all on one file system for simplicity.  I know I can use DD to copy a 
> filesystem, but I don't think that will work in this case.  I was 
> thinking of doing a fresh install and then using my backup of /etc to 
> try and get the same setup.  If I copy the world file from the previous 
> system and emerge -e world, will that get all the packages I currently 
> have?  Afterwards I would just copy the rest of /etc into place and go 
> about on my merry way.  Are there any problems with this approach?
> 
> R
> -- 
> gentoo-user@gentoo.org mailing list


Normally I just use the dump and restore utilites for this.
Forgive me if the syntax is a bit off, I haven't had to do this for a little while.

I usually do this from a seperate machine on the network:
On the machine you don't want to reformat do:
ssh root@oldmachine dump 0fz9 - /dev/device_to_backup > backup.image

That will do a full dump of the filesystem to your other machine that you will restore later.  When you restore that, it won't care about partitions or filesystem so you can change them however you want.

Wipe / format you old machine how you want it, and boot a gentoo install cd or some other live cd (unless the gentoo cd has changed recently it won't have restore on it tho).  Then on that old machine that you just wiped mount the new fresh filesystem (should be completely empty, no stage install or anything).  cd to that directory you just mounted and do:

ssh user@machine_with_backup cat /path_to/backup.image | restore -xf -

That'll cat the file back to restore on the old machine and should do a restore into the current directory.

>From there chroot in and reinstall your bootloader / edit fstab if you need, etc etc.  :)

-Rick
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Install Migration
  2007-06-04 23:08 ` Richard Cox
@ 2007-06-05  0:39   ` Rumen Yotov
  0 siblings, 0 replies; 7+ messages in thread
From: Rumen Yotov @ 2007-06-05  0:39 UTC (permalink / raw
  To: gentoo-user

Richard Cox wrote:
> On Mon, Jun 04, 2007 at 04:52:26PM -0500, Randy Barlow wrote:
>> I've set up my desktop machine using LVM over software raid, and 
>> although I like it I'm getting weary of the complication of the setup 
>> for a simple desktop system.  What I would like to do is get the same 
>> install (packages, config files, etc) as are currently used, but have it 
>> all on one file system for simplicity.  I know I can use DD to copy a 
>> filesystem, but I don't think that will work in this case.  I was 
>> thinking of doing a fresh install and then using my backup of /etc to 
>> try and get the same setup.  If I copy the world file from the previous 
>> system and emerge -e world, will that get all the packages I currently 
>> have?  Afterwards I would just copy the rest of /etc into place and go 
>> about on my merry way.  Are there any problems with this approach?
>>
>> R
>> -- 
>> gentoo-user@gentoo.org mailing list
> 
> 
> Normally I just use the dump and restore utilites for this.
> Forgive me if the syntax is a bit off, I haven't had to do this for a little while.
> 
> I usually do this from a seperate machine on the network:
> On the machine you don't want to reformat do:
> ssh root@oldmachine dump 0fz9 - /dev/device_to_backup > backup.image
> 
> That will do a full dump of the filesystem to your other machine that you will restore later.  When you restore that, it won't care about partitions or filesystem so you can change them however you want.
> 
> Wipe / format you old machine how you want it, and boot a gentoo install cd or some other live cd (unless the gentoo cd has changed recently it won't have restore on it tho).  Then on that old machine that you just wiped mount the new fresh filesystem (should be completely empty, no stage install or anything).  cd to that directory you just mounted and do:
> 
> ssh user@machine_with_backup cat /path_to/backup.image | restore -xf -
> 
> That'll cat the file back to restore on the old machine and should do a restore into the current directory.
> 
> From there chroot in and reinstall your bootloader / edit fstab if you need, etc etc.  :)
> 
> -Rick
Hi,
Nice info, thanks (i'm not the OP)
Could recommend "mkstage4.sh" script (search gentoo-wiki.com)
Works for me.
HTH, Rumen
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Install Migration
  2007-06-04 21:52 Randy Barlow
  2007-06-04 23:08 ` Richard Cox
@ 2007-06-05  7:33 ` Alan McKinnon
  2007-06-05 11:54   ` Randy Barlow
  1 sibling, 1 reply; 7+ messages in thread
From: Alan McKinnon @ 2007-06-05  7:33 UTC (permalink / raw
  To: gentoo-user

On Monday 04 June 2007, Randy Barlow wrote:
> I've set up my desktop machine using LVM over software raid, and
> although I like it I'm getting weary of the complication of the setup
> for a simple desktop system.  What I would like to do is get the same
> install (packages, config files, etc) as are currently used, but have
> it all on one file system for simplicity.  I know I can use DD to
> copy a filesystem, but I don't think that will work in this case.  I
> was thinking of doing a fresh install and then using my backup of
> /etc to try and get the same setup.  If I copy the world file from
> the previous system and emerge -e world, will that get all the
> packages I currently have?  Afterwards I would just copy the rest of
> /etc into place and go about on my merry way.  Are there any problems
> with this approach?

No need to reinstall, you just need to shuffle some stuff around. But 
first, what is your setup?

Post the results of 'df -h', {pv,vg,lv}display and fdisk -l so I can see 
how big etc your partitions and volumes are. Also fstab

alan



-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Install Migration
  2007-06-05  7:33 ` Alan McKinnon
@ 2007-06-05 11:54   ` Randy Barlow
  2007-06-05 16:00     ` Alan McKinnon
  0 siblings, 1 reply; 7+ messages in thread
From: Randy Barlow @ 2007-06-05 11:54 UTC (permalink / raw
  To: gentoo-user

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

Alan McKinnon wrote:
> No need to reinstall, you just need to shuffle some stuff around. But 
> first, what is your setup?
> 
> Post the results of 'df -h', {pv,vg,lv}display and fdisk -l so I can see 
> how big etc your partitions and volumes are. Also fstab

I've thought about that too, but I was wondering what would truly be
easier.  The dump/restore option sounds good, except that I don't have
another machine with a large enough harddrive to do the job (and am a
poor grad student with no cash for another HD :( )  I do, however, have
another machine running a full backup of this machine using backuppc
with nice compression/pooling, and so that was why my original plan was
just to reinstall and then try to re-emerge everything.


rpbarlow@booty ~ $ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md/3             1.9G  139M  1.7G   8% /
udev                  252M  2.7M  250M   2% /dev
/dev/mapper/vg-usr     11G  5.1G  4.5G  53% /usr
/dev/mapper/vg-portage
                      2.6G  236M  2.2G  10% /usr/portage
/dev/mapper/vg-distfiles
                      5.2G  3.1G  1.9G  62% /usr/portage/distfiles
/dev/mapper/vg-home    15G   12G  2.3G  84% /home
/dev/mapper/vg-opt    5.1G  360M  4.5G   8% /opt
/dev/mapper/vg-tmp    2.6G  1.3G  1.2G  54% /tmp
/dev/mapper/vg-var    5.1G  1.1G  3.7G  24% /var
/dev/mapper/vg-vartmp
                      6.0G  126M  5.6G   3% /var/tmp
/dev/hdc6             120G  105G  8.5G  93% /data
shm                   252M     0  252M   0% /dev/shm
/dev/hdb3             7.4G  759M  6.7G  11% /mnt/booty2
/dev/hdb1              30M  383K   29M   2% /mnt/booty2/boot

booty ~ # pvdisplay
  --- Physical volume ---
  PV Name               /dev/md4
  VG Name               vg
  PV Size               51.03 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              13064
  Free PE               4
  Allocated PE          13060
  PV UUID               ajDnLH-cbNy-EZo1-edmB-RkkK-BZDT-65gfLz

booty ~ # lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg/usr
  VG Name                vg
  LV UUID                QzY1iS-pVFF-Gr3j-aTu2-zDnj-1PWp-g97XsY
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                10.20 GB
  Current LE             2612
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           252:0

  --- Logical volume ---
  LV Name                /dev/vg/portage
  VG Name                vg
  LV UUID                j0R66U-Lun6-F0Zl-6cS3-ZgGE-sqgj-6XDFh3
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.55 GB
  Current LE             653
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           252:1

  --- Logical volume ---
  LV Name                /dev/vg/distfiles
  VG Name                vg
  LV UUID                b0JvKE-J348-ao6k-tM2h-RKbL-YRx9-b35Ty2
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                5.10 GB
  Current LE             1306
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           252:2

  --- Logical volume ---
  LV Name                /dev/vg/home
  VG Name                vg
  LV UUID                2o07Si-JMMs-1W69-1kpn-kz1J-nzG8-HHfK0K
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                14.31 GB
  Current LE             3664
  Segments               4
  Allocation             inherit
  Read ahead sectors     0
  Block device           252:3

  --- Logical volume ---
  LV Name                /dev/vg/opt
  VG Name                vg
  LV UUID                3TelAZ-BHjb-qJrb-Jb4a-gObM-9r0P-wrRQGm
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                5.10 GB
  Current LE             1306
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           252:4

  --- Logical volume ---
  LV Name                /dev/vg/var
  VG Name                vg
  LV UUID                3nU2sz-ZF9b-DhKg-YK6O-mrOS-pt6t-9RJ23z
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                5.10 GB
  Current LE             1306
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           252:5

  --- Logical volume ---
  LV Name                /dev/vg/vartmp
  VG Name                vg
  LV UUID                H6l8FG-gI1g-0KAI-GofU-3YdX-9ZNH-KRO2d2
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                6.09 GB
  Current LE             1560
  Segments               2
  Allocation             inherit
  Read ahead sectors     0
  Block device           252:6

  --- Logical volume ---
  LV Name                /dev/vg/tmp
  VG Name                vg
  LV UUID                RiU9xV-Cf5u-H2OX-LaJP-xPmO-vRgR-K1Tllq
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.55 GB
  Current LE             653
  Segments               4
  Allocation             inherit
  Read ahead sectors     0
  Block device           252:7

booty ~ # vgdisplay
  --- Volume group ---
  VG Name               vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  18
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                8
  Open LV               8
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               51.03 GB
  PE Size               4.00 MB
  Total PE              13064
  Alloc PE / Size       13060 / 51.02 GB
  Free  PE / Size       4 / 16.00 MB
  VG UUID               Gwjy6V-GEMM-lnrI-01uj-DFvL-oK1a-Y1iENk

booty ~ # fdisk -l

Disk /dev/hda: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1           5       40131   fd  Linux raid
autodetect
/dev/hda2               6          68      506047+  82  Linux swap / Solaris
/dev/hda3              69         318     2008125   fd  Linux raid
autodetect
/dev/hda4             319        3649    26756257+  fd  Linux raid
autodetect

Disk /dev/hdb: 10.0 GB, 10005037056 bytes
16 heads, 63 sectors/track, 19386 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1          63       31720+  83  Linux
/dev/hdb2              64        4032     2000376   82  Linux swap / Solaris
/dev/hdb3            4033       19386     7738416   83  Linux

Disk /dev/hdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1           5       40131   fd  Linux raid
autodetect
/dev/hdc2               6          68      506047+  82  Linux swap / Solaris
/dev/hdc3              69         318     2008125   fd  Linux raid
autodetect
/dev/hdc4             319       19457   153734017+   5  Extended
/dev/hdc5             319        3649    26756226   fd  Linux raid
autodetect
/dev/hdc6            3650       19457   126977728+  83  Linux

Disk /dev/md4: 54.7 GB, 54796615680 bytes
2 heads, 4 sectors/track, 13378080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md4 doesn't contain a valid partition table

Disk /dev/md3: 2056 MB, 2056192000 bytes
2 heads, 4 sectors/track, 502000 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn't contain a valid partition table

Disk /dev/md1: 41 MB, 41025536 bytes
2 heads, 4 sectors/track, 10016 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

and fstab:

/dev/md1                /boot           ext2            noauto,noatime  1 2
/dev/md3                /               ext3            noatime         0 1
/dev/hda2               none            swap            sw,pri=1        0 0
/dev/hdc2               none            swap            sw,pri=1        0 0
/dev/vg/usr             /usr            ext3            noatime         1 2
/dev/vg/portage         /usr/portage    ext2            noatime         1 2
/dev/vg/distfiles       /usr/portage/distfiles  ext2    noatime         1 2
/dev/vg/home            /home           ext3            noatime         1 2
/dev/vg/opt             /opt            ext3            noatime         1 2
/dev/vg/tmp             /tmp            ext2            noatime         1 2
/dev/vg/var             /var            ext3            noatime         1 2
/dev/vg/vartmp          /var/tmp        ext2            noatime         1 2
/dev/hdd                /mnt/cdrom      iso9660         noauto,ro,user  0 0
/dev/hdc6               /data           ext3            noatime         1 2
#/dev/fd0               /mnt/floppy     auto            noauto          0 0
/dev/sda2               /mnt/ipod       auto            noauto,user     0 0
proc                    /proc           proc            defaults        0 0
shm                     /dev/shm        tmpfs
nodev,nosuid,noexec     0 0

- --
Randy Barlow
http://electronsweatshop.com

But you are a chosen race, a royal priesthood, a holy nation, a people
for his
own possession, that you may proclaim the excellencies of him who called you
out of darkness into his marvelous light. Once you were not a people, but
now you are God's people; once you had not received mercy, but now you have
received mercy. ~1 Peter 2:9-10
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZU8O7So1xaF/eR8RAodaAKCmRsjfdHXCcbCTtaAF6Fq6mo3ECACfZD/4
r+mhfjp95MscnXABshV192c=
=BmIU
-----END PGP SIGNATURE-----
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Install Migration
  2007-06-05 11:54   ` Randy Barlow
@ 2007-06-05 16:00     ` Alan McKinnon
  0 siblings, 0 replies; 7+ messages in thread
From: Alan McKinnon @ 2007-06-05 16:00 UTC (permalink / raw
  To: gentoo-user

On Tuesday 05 June 2007, Randy Barlow wrote:
> Alan McKinnon wrote:
> > No need to reinstall, you just need to shuffle some stuff around.
> > But first, what is your setup?
> >
> > Post the results of 'df -h', {pv,vg,lv}display and fdisk -l so I
> > can see how big etc your partitions and volumes are. Also fstab
>
> I've thought about that too, but I was wondering what would truly be
> easier.  The dump/restore option sounds good, except that I don't
> have another machine with a large enough harddrive to do the job (and
> am a poor grad student with no cash for another HD :( )  I do,
> however, have another machine running a full backup of this machine
> using backuppc with nice compression/pooling, and so that was why my
> original plan was just to reinstall and then try to re-emerge
> everything.

Well, with a *full* backup on another machine, there's really no need to 
remerge everything. That will take around 48 hours, and a full copy 
back will take no more than say 3 hours. Boot off a LiveCD, delete and 
redo as you need to, and copy the backup back. All the files go back in 
their proper dirs, but on the volumes you have now newly created

alan


-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-06-05 16:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-04 21:58 [gentoo-user] Install Migration Randy Barlow
  -- strict thread matches above, loose matches on Subject: below --
2007-06-04 21:52 Randy Barlow
2007-06-04 23:08 ` Richard Cox
2007-06-05  0:39   ` Rumen Yotov
2007-06-05  7:33 ` Alan McKinnon
2007-06-05 11:54   ` Randy Barlow
2007-06-05 16:00     ` Alan McKinnon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox