Tar files for restoring Porta-Switch MR23

Created by Nicolas Bondier on 2011-12-07
Updated on 2011-12-07 by Nicolas Bondier

2011, Switzernet

Table of Contents

1.      Files locations. 1

1.1.       Http location on Switzernet.com: 1

1.2.       SSH location on xxx.xxx.xxx.108: 2

2.      Restoring notes. 2

1.1         Configured network at first boot. 2

1.1.1          Correctly configure network scripts. 2

1.1.2          Script for moving ifcfg-eth0.bak file to ifcfg-eth0. 4

 

1.     Files locations

1.1.  Http location on Switzernet.com:

 

billing1 xxx.xxx.xxx.106 Configurator

billing2 xxx.xxx.xxx.101 Billing Master

billing3 xxx.xxx.xxx.102 Billing Slave (web)

billing4 xxx.xxx.xxx.104 SIP Server

Boot

billing1,boot.tar.bzip2

(5.6M)

billing2,boot.tar.bzip2 (5.6M)

billing3,boot.tar.bzip2 (5.6M)

billing4,boot.tar.bzip2 (5.6M)

Porta

billing1,porta.tar.bzip2 (5.1M)

billing2,porta.tar.bzip2 (33M)

billing3,porta.tar.bzip2 (20M)

billing4,porta.tar.bzip2 (9.9M)

Root #1

billing1,root1.tar.bzip2 (656M)

billing2,root1.tar.bzip2 (680M)

billing3,root1.tar.bzip2 (664M)

billing4,root1.tar.bzip2 (659M)

Root #2

billing1,root2.tar.bzip2 (135)

billing2,root2.tar.bzip2 (138)

billing3,root2.tar.bzip2 (142)

billing4,root2.tar.bzip2 (144)

Md5

111202,md5sum-localhost,billing1.txt

111202,md5sum-localhost,billing2.txt

111202,md5sum-localhost,billing3.txt

111202,md5sum-localhost,billing4.txt

1.2.  SSH location on xxx.xxx.xxx.108:

 

billing1 xxx.xxx.xxx.106

 Configurator

billing2 xxx.xxx.xxx.101

Billing Master

billing3 xxx.xxx.xxx.102

Billing Slave (web)

billing4 xxx.xxx.xxx.104

SIP Server

Boot

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing1,boot.tar.bzip2

(5.6M)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing2,boot.tar.bzip2

(5.5M)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing3,boot.tar.bzip2

(5.5M)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing4,boot.tar.bzip2

(5.5M)

Porta

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing1,porta.tar.bzip2

(5.1M)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing2,porta.tar.bzip2

(32.9M)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing3,porta.tar.bzip2

(19.5M)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing4,porta.tar.bzip2

(9.9M)

Root #1

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing1,root1.tar.bzip2

(655.1M)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing2,root1.tar.bzip2

(679.8M)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing3,root1.tar.bzip2

(663.5M)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing4,root1.tar.bzip2

(659.0M)

Root #2

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing1,root2.tar.bzip2

(135)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing2,root2.tar.bzip2

(138)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing3,root2.tar.bzip2

(142)

/share/MD0_DATA/porta-billing-mr23/tar/111202,1810,billing4,root2.tar.bzip2

(144)

Md5

/share/MD0_DATA/porta-billing-mr23/tar/111202,md5sum-localhost,billing1.txt

(283)

/share/MD0_DATA/porta-billing-mr23/tar/111202,md5sum-localhost,billing2.txt

(283)

/share/MD0_DATA/porta-billing-mr23/tar/111202,md5sum-localhost,billing3.txt

(283)

/share/MD0_DATA/porta-billing-mr23/tar/111202,md5sum-localhost,billing4.txt

(283)

 

2.     Restoring notes

1.1       Configured network at first boot

RedHat and Fedora use some files to configure the network at first boot. These files are located under “/etc/sysconfig/network-scripts/”.

At first boot of any of these servers after the restoration from tar files [link], the “ifcfg-ethX” configuration files are moved to a new file called ifcfg-ethX.bak, even if you have previously changed the hardware address of the corresponding NIC (Network Interface Controller) in the file.

This issue is not important in case of you can physically access the machine to rename back the “ifcfg-ethX.bak” file to “ifcfg-ethX”. But in our case, we will not be able to access the machine physically, and we will not be able to remotely access it until the network is configured.

This is why this step has to be done with high priority, otherwise we will never know if the machine booted and access it.

 

1.1.1       Correctly configure network scripts

After having untar all files in the new created partitions from your running Fedora or Debian distribution and before rebooting on the new partitions, configure the network scripts for the new system you just installed.

1.1.1.1       Get all data from ifconfig (including the VLANs if you have. If you are restoring on OVH, you HAVE to configure VLANs on your running distribution.

# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:15:F2:5D:DE:9F

          inet addr:xxx.xxx.xxx.99  Bcast:xxx.xxx.xxx.255  Mask:255.255.255.0

          inet6 addr: fe80::215:f2ff:fe5d:de9f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1388083 errors:0 dropped:6591 overruns:0 frame:0

          TX packets:563878 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:166230900 (158.5 MiB)  TX bytes:81559393 (77.7 MiB)

          Interrupt:23 Base address:0x2400

     

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:10884 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10884 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1226832 (1.1 MiB)  TX bytes:1226832 (1.1 MiB)

 

vlan5     Link encap:Ethernet  HWaddr 00:15:F2:5D:DE:9F

          inet addr:xxx.xxx.xxx.86  Bcast:xxx.xxx.xxx.86  Mask:255.255.255.255

          inet6 addr: fe80::215:f2ff:fe5d:de9f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:804 (804.0 b)

 

vlan6     Link encap:Ethernet  HWaddr 00:15:F2:5D:DE:9F

          inet addr: xxx.xxx.xxx.62  Bcast:xxx.xxx.xxx.62  Mask:255.255.255.255

          inet6 addr: fe80::215:f2ff:fe5d:de9f/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:804 (804.0 b)

 

1.1.1.2       And past them into the configuration files of the “/etc/sysconfig/network-scripts/” of the mounted new partitions.

# vi /mnt/root1/etc/sysconfig/network-scripts/ifcfg-eth0

--------------------------------------------------------

DEVICE=eth0

BOOTPROTO=static

BROADCAST=xxx.xxx.xxx.255

IPADDR=xxx.xxx.xxx.99

HWADDR=00:15:F2:5D:DE:9F

NETMASK=255.255.255.0

NETWORK=xxx.xxx.xxx.0

ONBOOT=yes

TYPE=Ethernet

 

# vi /mnt/root1/etc/sysconfig/network-scripts/ifcfg-vlan5

--------------------------------------------------------

VLAN=yes

VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD

DEVICE=vlan5

PHYSDEV=eth0

BOOTPROTO=static

ONBOOT=yes

TYPE=Ethernet

IPADDR=xxx.xxx.xxx.86

NETMASK=255.255.255.255

 

# vi /mnt/root1/etc/sysconfig/network-scripts/ifcfg-vlan6

--------------------------------------------------------

VLAN=yes

VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD

DEVICE=vlan6

PHYSDEV=eth0

BOOTPROTO=static

ONBOOT=yes

TYPE=Ethernet

IPADDR=xxx.xxx.xxx.62

NETMASK=255.255.255.255

1.1.2       Script for moving ifcfg-eth0.bak file to ifcfg-eth0

1.1.2.1       Create the script in order to move “ifcfg-eth0.bak” to “ifcfg-eth0”.

# vi /mnt/root1/root/network-reconf-first-boot.sh

--------------------------------------------------------

#!/bin/bash

 

if [ -f /etc/sysconfig/network-scripts/ifcfg-eth0.bak ]

then

        mv /etc/sysconfig/network-scripts/ifcfg-eth0.bak /etc/sysconfig/network-scripts/ifcfg-eth0

        /etc/init.d/network restart

fi

exit 0

 

1.1.2.2       Program the script to be launched at booting

# chmod +x /mnt/root1/root/network-reconf-first-boot.sh

# vi /mnt/root1/etc/rc.d/rc.local

--------------------------------------------------------

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

 

touch /var/lock/subsys/local

/root/network-reconf-first-boot.sh

 

Then you can reboot on hard disk.

If you’re installation is local, plug the RJ45 into the trunked Cisco port.

 

*             *             *

Description: Switzernet logo

Copyright © 2011 by Switzernet