Copy installation of 2008.1 to another computer. - Mandriva

This is a discussion on Copy installation of 2008.1 to another computer. - Mandriva ; I have a bunch of machines onto which I want to install 2008.1 I decided that I would install onto one machine and then use rsync to copy that installation to another machine-- a spare partition on that machine. The ...

+ Reply to Thread
Results 1 to 13 of 13

Thread: Copy installation of 2008.1 to another computer.

  1. Copy installation of 2008.1 to another computer.

    I have a bunch of machines onto which I want to install 2008.1 I decided
    that I would install onto one machine and then use rsync to copy that
    installation to another machine-- a spare partition on that machine. The
    first one was an older on on which the hard drivers were ATA ( /dev/hda)
    while on the second they were SATA.
    I changed the things I thought needed to be changed (
    /etc/sysconfig/{network,network-script/ifcfg-eth0}, /etc/fstab,
    /etc/modprobe.conf ) to make the new machine have a new identity, reran
    lilo on the new partition (
    image=/mnt/hd/boot/vmlinux-desktop-2.6.24.7-1mdv
    label="20081"
    initrd="/mnt/hd/boot/initrd-desktop-2.6.24.7-1mdv"
    root=/dev/sda7
    append="resume=/dev/sda5 splash=silent"
    ) and ran lilo, without error.
    But when I tried to boot up, it could not find /dev/sda7 or /dev/sda5.
    I suspected something to do with initrd. I think it thought I had /dev/hda1
    as the target partition when it was really /dev/sda7. Of course I could not run mkinitrd
    from the old 2007.0 installation because the kernel needed a newer one, and
    I could not install the newer one because it required about 1000 new
    packages from the 2008.1 distro. ( an even if I could I would have no idea
    what arguments to give mkinitrd).

    I felt so so close, and yet so so far from making this work. It seems
    idiotic that I have to wait hours, to install the distro again and have
    all of the reinstallation/ updating etc which I had already done. But I
    could see no way to get this to work-- to boot.

    Is it really impossible to do what I wanted to do?



  2. Re: Copy installation of 2008.1 to another computer.

    On Wed, 17 Sep 2008 07:54:09 GMT, Unruh wrote:
    > I have a bunch of machines onto which I want to install 2008.1 I decided
    > that I would install onto one machine and then use rsync to copy that
    > installation to another machine-- a spare partition on that machine. The
    > first one was an older on on which the hard drivers were ATA ( /dev/hda)
    > while on the second they were SATA.
    > I changed the things I thought needed to be changed (
    > /etc/sysconfig/{network,network-script/ifcfg-eth0}, /etc/fstab,
    > /etc/modprobe.conf ) to make the new machine have a new identity, reran
    > lilo on the new partition (
    > image=/mnt/hd/boot/vmlinux-desktop-2.6.24.7-1mdv
    > label="20081"
    > initrd="/mnt/hd/boot/initrd-desktop-2.6.24.7-1mdv"
    > root=/dev/sda7
    > append="resume=/dev/sda5 splash=silent"
    > ) and ran lilo, without error.
    > But when I tried to boot up, it could not find /dev/sda7 or /dev/sda5.
    > I suspected something to do with initrd. I think it thought I had /dev/hda1
    > as the target partition when it was really /dev/sda7.


    I assume you have swap on /dev/sda5, if not, fix lilo.

    It is either /dev/hda1 or /dev/sda7, you have to figure out which is correct.
    Boot a rescue cd/diskette

    mkdir /junk
    mount -t -auto /dev/sda7 /junk
    cd /junk/boot
    where you would see something like
    # ls -al | grep 2.6.24.7 | grep -v \>
    -rw-r--r-- 1 root root 88670 2008-07-28 14:13 config-2.6.24.7-desktop-1mnb
    -rw------- 1 root root 3062720 2008-08-12 21:44 initrd-2.6.24.7-desktop-1mnb.img
    -rw-r--r-- 1 root root 1493 2008-09-14 23:58 kernel.h-2.6.24.7-desktop-1mnb
    -rw-r--r-- 1 root root 795447 2008-07-28 14:13 System.map-2.6.24.7-desktop-1mnb
    -rw-r--r-- 1 root root 1787480 2008-07-28 14:13 vmlinuz-2.6.24.7-desktop-1mnb

    If so, I would have expected lilo -v to work. If so, then it should
    be able to boot 2.6.24.7-1mdv. It would look at /etc/fstab on
    /dev/sda7 and use whatever / was set to run from. I assume something like

    # grep sda7 /junk/etc/fstab
    /dev/sda7 / ext3 relatime 1 1

    > Of course I could not run mkinitrd


    I have copied distributions from one partition to another and never had
    to execute mkinitrd


  3. Re: Copy installation of 2008.1 to another computer.

    Unruh wrote:

    > I have a bunch of machines onto which I want to install 2008.1 I decided
    > that I would install onto one machine and then use rsync to copy that
    > installation to another machine-- a spare partition on that machine. The
    > first one was an older on on which the hard drivers were ATA ( /dev/hda)
    > while on the second they were SATA.
    > I changed the things I thought needed to be changed (
    > /etc/sysconfig/{network,network-script/ifcfg-eth0}, /etc/fstab,
    > /etc/modprobe.conf ) to make the new machine have a new identity, reran
    > lilo on the new partition (
    > image=/mnt/hd/boot/vmlinux-desktop-2.6.24.7-1mdv
    > label="20081"
    > initrd="/mnt/hd/boot/initrd-desktop-2.6.24.7-1mdv"
    > root=/dev/sda7
    > append="resume=/dev/sda5 splash=silent"
    > ) and ran lilo, without error.
    > But when I tried to boot up, it could not find /dev/sda7 or /dev/sda5.
    > I suspected something to do with initrd. I think it thought I had
    > /dev/hda1
    > as the target partition when it was really /dev/sda7. Of course I could
    > not run mkinitrd from the old 2007.0 installation because the kernel
    > needed a newer one, and I could not install the newer one because it
    > required about 1000 new packages from the 2008.1 distro. ( an even if I
    > could I would have no idea what arguments to give mkinitrd).
    >
    > I felt so so close, and yet so so far from making this work. It seems
    > idiotic that I have to wait hours, to install the distro again and have
    > all of the reinstallation/ updating etc which I had already done. But I
    > could see no way to get this to work-- to boot.
    >
    > Is it really impossible to do what I wanted to do?


    FWIW, the manual for Mondo Rescue says that it is virtually impossible to
    have identical restores to different machines.

    My computer has /dev/sda for the SATA drive and /dev/hda for the IDE drive,
    Although the SATA drive is the primary one, the Mandriva installer always
    went to the IDE drive first. In the end, I took the IDE drive out and put
    it in a USB case. /dev/hda is now my CD-ROM drive.

    Others can probably take this further.

    Doug.
    --
    "Vista's special security feature: you can't hack an OS that's been put back
    in the cardboard box." Comment at http://www.theregister.co.uk/

  4. Re: Copy installation of 2008.1 to another computer.

    Bit Twister writes:

    >On Wed, 17 Sep 2008 07:54:09 GMT, Unruh wrote:
    >> I have a bunch of machines onto which I want to install 2008.1 I decided
    >> that I would install onto one machine and then use rsync to copy that
    >> installation to another machine-- a spare partition on that machine. The
    >> first one was an older on on which the hard drivers were ATA ( /dev/hda)
    >> while on the second they were SATA.
    >> I changed the things I thought needed to be changed (
    >> /etc/sysconfig/{network,network-script/ifcfg-eth0}, /etc/fstab,
    >> /etc/modprobe.conf ) to make the new machine have a new identity, reran
    >> lilo on the new partition (
    >> image=/mnt/hd/boot/vmlinux-desktop-2.6.24.7-1mdv
    >> label="20081"
    >> initrd="/mnt/hd/boot/initrd-desktop-2.6.24.7-1mdv"
    >> root=/dev/sda7
    >> append="resume=/dev/sda5 splash=silent"
    >> ) and ran lilo, without error.
    >> But when I tried to boot up, it could not find /dev/sda7 or /dev/sda5.
    >> I suspected something to do with initrd. I think it thought I had /dev/hda1
    >> as the target partition when it was really /dev/sda7.


    >I assume you have swap on /dev/sda5, if not, fix lilo.


    Yes, I do.

    >It is either /dev/hda1 or /dev/sda7, you have to figure out which is correct.
    >Boot a rescue cd/diskette


    The root directory is /dev/hda1 on the original machine on which I installed 2008.1 and
    /dev/sda7 on the machine to which I tried to copy the installation.


    >mkdir /junk
    >mount -t -auto /dev/sda7 /junk
    >cd /junk/boot
    >where you would see something like
    ># ls -al | grep 2.6.24.7 | grep -v \>
    >-rw-r--r-- 1 root root 88670 2008-07-28 14:13 config-2.6.24.7-desktop-1mnb
    >-rw------- 1 root root 3062720 2008-08-12 21:44 initrd-2.6.24.7-desktop-1mnb.img
    >-rw-r--r-- 1 root root 1493 2008-09-14 23:58 kernel.h-2.6.24.7-desktop-1mnb
    >-rw-r--r-- 1 root root 795447 2008-07-28 14:13 System.map-2.6.24.7-desktop-1mnb
    >-rw-r--r-- 1 root root 1787480 2008-07-28 14:13 vmlinuz-2.6.24.7-desktop-1mnb


    >If so, I would have expected lilo -v to work. If so, then it should
    >be able to boot 2.6.24.7-1mdv. It would look at /etc/fstab on
    >/dev/sda7 and use whatever / was set to run from. I assume something like


    Yup that was what I thought as well. It does not.
    It boots ( ie it reads in the kernel) but has trouble with finding the
    rescue partition, and then dies when it cannot find /dev/sda7 to make as
    the root partition. It seems as though initrd has a /dev/ partition on it
    which is copied from the original machine and has only /dev/hd* and not
    /dev/sd* in it, or something.



    ># grep sda7 /junk/etc/fstab
    >/dev/sda7 / ext3 relatime 1 1


    >> Of course I could not run mkinitrd


    >I have copied distributions from one partition to another and never had
    >to execute mkinitrd


    It is from one machine to the other that seems to cause the problem.



  5. Re: Copy installation of 2008.1 to another computer.

    Doug Laidlaw writes:

    >Unruh wrote:


    >> I have a bunch of machines onto which I want to install 2008.1 I decided
    >> that I would install onto one machine and then use rsync to copy that
    >> installation to another machine-- a spare partition on that machine. The
    >> first one was an older on on which the hard drivers were ATA ( /dev/hda)
    >> while on the second they were SATA.
    >> I changed the things I thought needed to be changed (
    >> /etc/sysconfig/{network,network-script/ifcfg-eth0}, /etc/fstab,
    >> /etc/modprobe.conf ) to make the new machine have a new identity, reran
    >> lilo on the new partition (
    >> image=/mnt/hd/boot/vmlinux-desktop-2.6.24.7-1mdv
    >> label="20081"
    >> initrd="/mnt/hd/boot/initrd-desktop-2.6.24.7-1mdv"
    >> root=/dev/sda7
    >> append="resume=/dev/sda5 splash=silent"
    >> ) and ran lilo, without error.
    >> But when I tried to boot up, it could not find /dev/sda7 or /dev/sda5.
    >> I suspected something to do with initrd. I think it thought I had
    >> /dev/hda1
    >> as the target partition when it was really /dev/sda7. Of course I could
    >> not run mkinitrd from the old 2007.0 installation because the kernel
    >> needed a newer one, and I could not install the newer one because it
    >> required about 1000 new packages from the 2008.1 distro. ( an even if I
    >> could I would have no idea what arguments to give mkinitrd).
    >>
    >> I felt so so close, and yet so so far from making this work. It seems
    >> idiotic that I have to wait hours, to install the distro again and have
    >> all of the reinstallation/ updating etc which I had already done. But I
    >> could see no way to get this to work-- to boot.
    >>
    >> Is it really impossible to do what I wanted to do?


    >FWIW, the manual for Mondo Rescue says that it is virtually impossible to
    >have identical restores to different machines.


    Identical no-- as I said there are a bunch of files which have to change to
    identify the machine. But this is not even finishing the boot.

    >My computer has /dev/sda for the SATA drive and /dev/hda for the IDE drive,
    >Although the SATA drive is the primary one, the Mandriva installer always
    >went to the IDE drive first. In the end, I took the IDE drive out and put
    >it in a USB case. /dev/hda is now my CD-ROM drive.


    >Others can probably take this further.


    >Doug.
    >--
    >"Vista's special security feature: you can't hack an OS that's been put back
    >in the cardboard box." Comment at http://www.theregister.co.uk/


  6. Re: Copy installation of 2008.1 to another computer.

    On Wed, 17 Sep 2008 03:54:09 -0400, Unruh wrote:

    > I suspected something to do with initrd. I think it thought I had /dev/hda1
    > as the target partition when it was really /dev/sda7. Of course I could not run mkinitrd
    > from the old 2007.0 installation because the kernel needed a newer one, and
    > I could not install the newer one because it required about 1000 new
    > packages from the 2008.1 distro. ( an even if I could I would have no idea
    > what arguments to give mkinitrd).


    That's similar to the problem I ran into when I changed the root filesystem
    type in http://groups.google.ca/group/alt.os...d692db1cd48b20

    First, make sure fstab, and lilo are using either device names, or lables, not
    uuids.

    Make sure you have the kernel rpm package available. Let the Mandriva kernel
    install procedure handle the mkinitrd. Then fix lilo.

    Boot a 2008.1 cd/dvd and mount the new 2008.1 filesystem(s). Use chroot to
    make the new 2008.1 filesystem the root filesystem. Backup the lilo.conf
    file. As the Mandriva kernel install procedure will not overwrite an existing
    initrd, for the same kernel, you'll have to manually delete the /boot/vmlinuz-2.6....
    and /boot/initrd-2.6... files. Reinstall the kernel with
    "rpm -i --force kernel-desktop...". This will fix the initrd, but, as /proc is
    empty in the chroot environment, you'll have to manually fix the device entries
    in lilo.conf, or restore it from your backup, and then run lilo. Should be
    ready to boot, the new install, at that point.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  7. Re: Copy installation of 2008.1 to another computer.

    "David W. Hodgins" writes:

    >On Wed, 17 Sep 2008 03:54:09 -0400, Unruh wrote:


    >> I suspected something to do with initrd. I think it thought I had /dev/hda1
    >> as the target partition when it was really /dev/sda7. Of course I could not run mkinitrd
    >> from the old 2007.0 installation because the kernel needed a newer one, and
    >> I could not install the newer one because it required about 1000 new
    >> packages from the 2008.1 distro. ( an even if I could I would have no idea
    >> what arguments to give mkinitrd).


    >That's similar to the problem I ran into when I changed the root filesystem
    >type in http://groups.google.ca/group/alt.os...d692db1cd48b20


    >First, make sure fstab, and lilo are using either device names, or lables, not
    >uuids.


    Yup. I hate uuids Not at all sure why anyone thought that a string of 20
    unintelligible letters was an advance on anything.



    >Make sure you have the kernel rpm package available. Let the Mandriva kernel
    >install procedure handle the mkinitrd. Then fix lilo.



    Tried that. Got the same problem. Now I only tried it once before I gave up
    and reinstalled on that system, so I might have screwed up something.


    >Boot a 2008.1 cd/dvd and mount the new 2008.1 filesystem(s). Use chroot to
    >make the new 2008.1 filesystem the root filesystem. Backup the lilo.conf
    >file. As the Mandriva kernel install procedure will not overwrite an existing
    >initrd, for the same kernel, you'll have to manually delete the /boot/vmlinuz-2.6....
    >and /boot/initrd-2.6... files. Reinstall the kernel with
    >"rpm -i --force kernel-desktop...". This will fix the initrd, but, as /proc is
    >empty in the chroot environment, you'll have to manually fix the device entries
    >in lilo.conf, or restore it from your backup, and then run lilo. Should be
    >ready to boot, the new install, at that point.


    OK, will try on some of my other machines.

    Sheesh. Initrd I thought was supposed to be a help, and it acts mainly as a
    hinderance. Does the system boot without an initrd (assuming ext3 is in the
    kernel)?


  8. Re: Copy installation of 2008.1 to another computer.

    On Wednesday 17 September 2008 18:58, someone identifying as *Unruh* wrote
    in /alt.os.linux.mandriva:/

    > "David W. Hodgins" writes:
    >
    >> First, make sure fstab, and lilo are using either device names, or
    >> lables, not uuids.

    >
    > Yup. I hate uuids Not at all sure why anyone thought that a string of 20
    > unintelligible letters was an advance on anything.


    Their length is tedious, but at the same time it's a much more reliable way
    of uniquely identifying filesystems within the same machine, which might be
    a significant help in maintaining machines with loads of hard disks or hard
    disk arrays, as is the case in datacenters.

    Disk or filesystem labels are not necessarily unique, and device special
    files might change names because of the quirks of /udev,/ but UUIDs are
    normally unique and invariable (unless you reformat the filesystem, of
    course).

    > Sheesh. Initrd I thought was supposed to be a help, and it acts mainly as
    > a hinderance. Does the system boot without an initrd (assuming ext3 is in
    > the kernel)?


    Only if the filesystem driver(s) for the root filesystem - and */boot,* if
    applicable - are compiled inline into the kernel, and the same applies to
    the controller for the device that the root filesystem and */boot* are on.

    --
    *Aragorn*
    (registered GNU/Linux user #223157)

  9. Re: Copy installation of 2008.1 to another computer.

    Unruh wrote:

    .....
    > Sheesh. Initrd I thought was supposed to be a help, and it acts mainly as
    > a hinderance. Does the system boot without an initrd (assuming ext3 is in
    > the kernel)?


    You'd have to compile a kernel first, which must contain all basic
    filesystem modules and the chipset/ide/sata harddisk and cdrom drivers of
    all the different systems you need that kernel to boot on, plus all the
    generic ide/scsi/libata modules - but compiled in, not as modules. Of
    course, you may get some rather big kernel.

  10. Re: Copy installation of 2008.1 to another computer.

    On Wed, 17 Sep 2008 12:13:44 -0400, David W. Hodgins wrote:

    > This will fix the initrd, but, as /proc is empty in the chroot
    > environment, you'll have to manually fix the device entries in
    > lilo.conf, or restore it from your backup, and then run lilo.


    Before you do the chroot, you can mount /proc, like so:

    mount -t whatever /dev/xxx /mnt
    mount -t proc none /mnt/proc
    chroot /mnt

    This makes /proc available from within the chroot environment.

    --
    Bill Mullen
    RLU #270075

    "Give a man a fish, and you'll feed him for a day. Teach a man to fish,
    and he'll buy a funny hat. Talk to a hungry man about fish, and you're
    a consultant." -- Scott Adams

  11. Re: Copy installation of 2008.1 to another computer.

    Aragorn writes:

    >On Wednesday 17 September 2008 18:58, someone identifying as *Unruh* wrote
    >in /alt.os.linux.mandriva:/


    >> "David W. Hodgins" writes:
    >>
    >>> First, make sure fstab, and lilo are using either device names, or
    >>> lables, not uuids.

    >>
    >> Yup. I hate uuids Not at all sure why anyone thought that a string of 20
    >> unintelligible letters was an advance on anything.


    >Their length is tedious, but at the same time it's a much more reliable way
    >of uniquely identifying filesystems within the same machine, which might be
    >a significant help in maintaining machines with loads of hard disks or hard
    >disk arrays, as is the case in datacenters.


    >Disk or filesystem labels are not necessarily unique, and device special
    >files might change names because of the quirks of /udev,/ but UUIDs are
    >normally unique and invariable (unless you reformat the filesystem, of
    >course).


    >> Sheesh. Initrd I thought was supposed to be a help, and it acts mainly as
    >> a hinderance. Does the system boot without an initrd (assuming ext3 is in
    >> the kernel)?


    >Only if the filesystem driver(s) for the root filesystem - and */boot,* if
    >applicable - are compiled inline into the kernel, and the same applies to
    >the controller for the device that the root filesystem and */boot* are on.


    Hmm. While I am pretty sure that all kernels have ext3 in the kernel, the
    controller might be a different matter. ARe there that many different ATA
    or SATA drivers that they might not be in the kernel?



  12. Re: Copy installation of 2008.1 to another computer.

    On Thursday 18 September 2008 06:45, someone identifying as *Unruh* wrote
    in /alt.os.linux.mandriva:/

    > Aragorn writes:
    >
    >> On Wednesday 17 September 2008 18:58, someone identifying as *Unruh*
    >> wrote in /alt.os.linux.mandriva:/
    >>
    >>> Sheesh. Initrd I thought was supposed to be a help, and it acts mainly
    >>> as a hinderance. Does the system boot without an initrd (assuming ext3
    >>> is in the kernel)?

    >
    >> Only if the filesystem driver(s) for the root filesystem - and */boot,*
    >> if applicable - are compiled inline into the kernel, and the same applies
    >> to the controller for the device that the root filesystem and */boot* are
    >> on.

    >
    > Hmm. While I am pretty sure that all kernels have ext3 in the kernel, the
    > controller might be a different matter. ARe there that many different ATA
    > or SATA drivers that they might not be in the kernel?


    It's been a while since I've looked at any recent kernels, but as far as I
    can remember, there are two different angles to this kind of support. The
    first is the generic ATA support, and the second is the controller-specific
    support. And yes, there are quite a bit of controllers out there. Most of
    the onboard stuff will be supported, but it might be through loadable
    modules instead of inline with the kernel.

    I'm not sure on how things work with SATA, but I believe this also requires
    the generic SCSI layer to be loaded.

    As I'm quite a SCSI user myself, I typically don't pay much attention to the
    ATA stuff. This machine here has a PATA hard disk, but then again it's
    also running a stock Mandrake kernel.

    I guess you could try by simply adding an extra stanza to your bootloader
    configuration which boots the same kernel image but without an /initrd./

    --
    *Aragorn*
    (registered GNU/Linux user #223157)

  13. Re: Copy installation of 2008.1 to another computer.

    On Thu, 18 Sep 2008 00:45:04 -0400, Unruh wrote:

    > Hmm. While I am pretty sure that all kernels have ext3 in the kernel, the
    > controller might be a different matter. ARe there that many different ATA
    > or SATA drivers that they might not be in the kernel?


    $ ll /lib/modules/2.6.24.7-desktop-1mnb/kernel/drivers/ata/|wc -l
    64

    How many of those you need depends on the equipment in use.

    Regards, Dave hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

+ Reply to Thread