SCIENTIFIC-LINUX-USERS Archives

January 2005

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dashamir Hoxha <[log in to unmask]>
Reply To:
Date:
Tue, 18 Jan 2005 11:59:57 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (165 lines)
I think that this is a usefull howto. Maybe it can be added in the list
of SL howto-s. I also upgraded recently a RH9 server to SL303,
and if I had seen this earlier, it could have helped me to make it
more easy.

What I did is this:
1- Installed SL303 in the new machine, trying to use anaconda-ks.cfg
   from the old server. I noticed that SL303 does not have some
   usefull packages, the most important one being iptraf.
2- Backed up the configuration files that I had modified, data files, log
    files etc. from the old machine and restored them in the new system.
3- Fixed by hand any changes in config files etc.

If I had thought earlier about upgrading from RH9 to SL303 by yum
or apt, then I would have done it like this:
1- Clone the system of the old machine in the new machine.
2- Upgrade using yum or apt-get.
(Clonning would come first because the old machine didn't have
enough disc space for using yum.)

By clonning I mean copying the system from the old machine
to the new one. I know how to do it because I have already done it
once sucsessfully with a workstation. This is how it can be done
(maybe it is trivial, but anyway...):

1 - Create one (or more) partitions in the new machine. Partitions
     can be created by booting a rescue CD or a LiveCD (like Knoppix,
     Gnoppix, etc.) and then using 'parted'. You need the same number
     of partitions that are used by the system in the old machine (including
     a swap and a root partition). The new partitions doesn't have to be
     the same size as the old partitions.

2 - I am assuming that the new machine has more disk space than the old one,
    that they are both connected in a network, and that Gnoppix is booted in
    the new machine. Then do the following:
    1. Open a root terminal in Gnoppix and configure the network interface
        (if it is not already configured by dhcp etc.):
          # ip help
          # ip link set dev eth0 up
          # ip address add 192.168.0.10/24 dev eth0
          # ip route add default via 192.168.0.1
          # ip address ls
          # ip route ls

    2. Export a directory by NFS:
          # cat "/mnt/hda1  192.168.0.5(rw,no_root_squash)" >> /etc/exports
          # /etc/init.d/nfs start
          # /etc/init.d/iptables stop

    3. In the old machine, mount the exported directory:
          # mkdir new_machine/
          # mount  192.168.0.10:/mnt/hda1  new_machine/

    4. Archive the system in the nfs mounted directory:
          # tar cz --preserve --atime-preserve --one-file-system \
                      --file=new_machine/root.tgz /
       Do the same also for any other partitions, --one-file-system
       option tells tar to archive only the contents of one partition,
       skiping any mounted filesystems.

    5. Extract the archives in the new machine:
          # tar xz --file=/mnt/hda1/root.tgz --directory=/mnt/hda1
          # tar xz --file=/mnt/hda1/var.tgz --directory=/mnt/hda2
          etc.

    6. Fix /etc/fstab, /boot/grub/grub.conf, etc.

    7. Fix /etc/X11/XF86Config, or use any X configuration tool,
        or copy it from some other machine with the same graphic
        card and the same system.

3 - Reboot. The 'kudzu' will automatically reckognize any hardware
     changes and will prompt for removal or configuration.

--Dashamir

On Monday 17 January 2005 10:55, Joakim Sernbrant wrote:
> Here is how I upgraded from RH9 to SL3.0.3. I read the 7.2 to 3.0.3
> Upgrade how-to but didn't understand the autorpm stuff so I just used
> yum upgrade.
>
> System info:
>
> VIA EPIA Mini-ITX Eden 533Mhz
> 60GB HD
> 10Mbit internet
> Fixed LAN IP
> RedHat 9 with custom built kernel (see below, part 2). No --forced rpms
> as far as I remember.
>
> $ uname -a
> Linux host 2.4.20-27.9custom #4 Fri Dec 26 18:55:18 CET 2003 i686 i686
> i386 GNU/Linux
>
> $ cat /etc/redhat-release
> Red Hat Linux release 9 (Shrike)
>
> You should have at least 500M free on /var/cache/yum before attempting
> this...
>
> --- part one, upgrade ---
>
> $ rpm -e up2date
> $ rpm --import
> ftp://ftp.scientificlinux.org/linux/scientific/303/i386/RPM-GPG-KEYs/RPM
> -GPG-KEY-csieh
> $ rpm --import
> ftp://ftp.scientificlinux.org/linux/scientific/303/i386/RPM-GPG-KEYs/RPM
> -GPG-KEY-dawson
> $ rpm --import
> ftp://ftp.scientificlinux.org/linux/scientific/303/i386/RPM-GPG-KEYs/RPM
> -GPG-KEY-jpolok
> $ rpm -i
> ftp://ftp.scientificlinux.org/linux/scientific/303/i386/SL/RPMS/yum-2.0.
> 7-7.SL.noarch.rpm
> $ rpm -i
> ftp://ftp.scientificlinux.org/linux/scientific/303/i386/SL/RPMS/yum-conf
> -303-2.SL.noarch.rpm
>
> [edit /etc/yum.conf if you want to use a mirror from
> https://www.scientificlinux.org/download/]
>
> $ yum upgrade # this took about 30 minutes
> $ rpm -e lilo
> $ yum install sl-release
>
> [I think the kernel would have been upgraded if were a stock RH9 kernel,
> edit /etc/grub.conf as needed]
>
> $ reboot
>
> --- end of part one ---
>
> --- part two, build kernel ---
>
> The EL.i686 kernel does not work on the VIA EPIA Eden CPU so we have to
> build our own.
>
> References:
>
> http://www.mini-itx.com/faq.asp
> http://www3.sympatico.ca/howlettfamily/epia/epia_howto/x881.html
>
> Ok, here goes. This will take several hours...
>
> $ cd /usr/src/linux # verify that this points to the new kernel source
>
> $ make clean
> $ make mrproper
> $ make menuconfig # select Processor CyrixIII/VIA-C3
> $ make dep
> $ make clean
> $ make bzImage
> $ make modules
> $ make modules_install
> $ make install
>
> [edit /etc/grub.conf as needed]
>
> $ reboot
>
> --- end of part two --
>
> /// jocke

ATOM RSS1 RSS2