CentOS Linux to a New Chassis

Sometimes you may need to move a CentOS Linux to a new house, either because of the old hardware failing or because of this hardware being simply too old and needing upgrading for performance reasons.

If it is the later of the two, you will most likely have a different hardware in the new chassis, which will probably cause linux to die with kernel panic message that informs you that it could not find the specific drive that is housing your “/” partition during a process called pivotroot.

This is caused by the fact that on your old system linux kernel needed different modules to operate properly and to see the drives for example.

We can easily fix that.

First, boot from the CentOS install CD. When it prompts you to type “linux” at the beginning, type “linux rescue” instead. This will take you to the rescue environment, small linux OS with some tools to fix problems.

It will ask you if you want to search for previous installations and mount them. You should choose default there.

After this process you will be dropped to the command prompt. Run the following:

mount /proc /mnt/sysimage/proc -o bind chroot /mnt/sysimage/

Now you are in the old system and you can do few things there, like change the password, or generate a new boot image. The second one is what we need and want to do now.

Generating a new boot image is a simple command, but may require finding a few things first.

The command itself should look like this:

mkinitrd initrd-2.6.18.img 2.6.18

We need to know a more accurate kernel version number. This can be done in two ways: We can use the following to find what versions are available:

 ls -l /lib/modules

Another option is to look into GRUB config file:

cat /etc/grub.conf | egrep ‘default|initrd’

The full mkinitrd command may look like that :

mkinitrd -f -v /boot/initrd-2.6.18-194.11.3.img 2.6.18-194.11.3

the “f” and “v” are for force overwriting of the image file and for verbosity.

If there are no issues with this command, you are ready to boot using new image.

If you used a currently active image name, you should only need reboot. Incase you used a non-active or non-existing name, you would need to edit GRUB parameters to boot from it.

It is possible to add another entry for your new image to the /etc/grub.conf file, or edit them at boot time in GRUB menu (hit escape to be presented with many, ethn use “e” to edit and “b” to boot after making changes.)

 

Linux Amazon Web Services Instance recovery

Sometimes a Linux instance can become unreachable; most often, the reason is that a boot script does something to make the system non-functional, or that someone made a networking change that caused the instance to be inaccessible. A common network settings issue is when someone sets a static IP address, which Amazon EC2 ignores per AWS policy.

In this exercise, you will create a problem in a Linux instance by setting a static IP address, and then fix that issue. This technique only works forAmazon EBS-backed instances because there is no way to temporarily stop an Amazon S3 instance.

The basic technique is to mount the problem server’s root file system as an ordinary data drive on a second, functional server. After it is mounted as a data drive, you can access that “data” drive and edit the files that control the behavior of the server.

The steps that follow assume an intermediate level of computer skill. The instuctions initially walk you thru the steps and commands to launch and access a server. However when steps get repeated, these instructions assume that repeat screen shots are not needed because you have enopugh experience to figure out the repeated steps on your own.

Read more or Call Reconnix

Linux Support : Remote Rebuild

Until now the rebuild of a server meant burning the disc or preparing a USB stick and going for a trip to wherever the machine was hosted. Now we can rebuild remotely a (working and ssh’able!!) machine, things are about to change.

As mentioned just above this way of rebuilding works only for servers that are already accessible – this is due to need of using SSH to reconfigure GRUB/Kernel options.

Preparation.

  1. Locate one of the Centos/Red Hat mirrors that could be used to network install – in my example I’ll install Centos 6.3 and use this mirror: http://mirror.stshosting.co.uk/centos/6.3/os/x86_64/
  2. Login to the machine that needs rebuilding
  3. 3. Enter /boot/ folder/partition
    cd /boot/
  4. Download installation copy of initrd.img and rename it to initrd.img-install, run:
    wget -O 'initrd.img-install' http://mirror.stshosting.co.uk/centos/6.3/os/x86_64/isolinux/initrd.img
  5. Download installation copy of vmlinuz and rename it to vmlinuz-install, run:
    wget -O 'vmlinuz-install' http://mirror.stshosting.co.uk/centos/6.3/os/x86_64/isolinux/vmlinuz</li>
  6. Just to be on the safe side copy the current version of grub.conf – this may be useful when you decide last minute that you don’t want to rebuild it but recover the machine to previous state, run:
    /boot/grub/grub.conf /boot/grub/grub.conf-original
  7. And finally create new grub.conf with:

cat > /boot/grub/grub.conf << "EOF"
default=0
timeout=0
hiddenmenu

title Install Centos 6.3
root (hd0,0)
kernel /vmlinuz-install ip=192.168.1.50 netmask=255.255.255.0 gateway=192.168.1.254 dns=8.8.8.8 repo=http://mirror.stshosting.co.uk/centos/6.3/os/x86_64/ vnc vncpassword=C3nt0S lang=en_US keymap=uk sshd
initrd /initrd.img-install
EOF

DON’T FORGET TO ADJUST KERNEL OPTIONS TO MATCH YOUR ENVIRONMENT – the machine will not be usable if after reboot Anaconda won’t be able to connect to internet.

Once you made sure all the network setting are OK restart the machine – it will boot into installer and Anaconda starting the installation to which you’ll be able to connect to with VNC client using the ip (in my case it would be 192.168.1.50 and port number 5901. Give it few minutes before you try to connect – graphical installer won’t be the first thing started after reboot.

For explanation of the options used with kernel please visit following links:

https://fedoraproject.org/wiki/Anaconda_Boot_Options?rd=Anaconda/Options 
http://www.linuxtopia.org/online_books/rhel6/rhel_6_installation/rhel_6_installation_sn-medialess-editing-grub-conf.html

When browsing through kernel/anaconda options you may notice that there is ‘vncport’ which should allow to specify your own port for VNC connection. However, this one doesn’t get recognized in Anaconda version used for Centos 6.3 installation and the installation fails leaving you with unreachable machine.

For Linux Support contact Reconnix.

Linux Support: rescue tools for Windows, Linux and Mac’s

Linux Support: rescue tools for Windows, Linux and Mac’s
From corrupt partition tables to severely infected machines, Linux Support tools come in handy when the host system won’t boot. So here are a list of some of the most common tools used that might be useful to you:

1: Knoppix

Knoppix is one of the better tools for rescuing data from sick machines. It’s a full-blown live Linux distribution with a strong, user-friendly GUI that will allow you to easily mount a drive and then copy the data to an external source. Knoppix comes with the full arsenal of Linux commands, which place just about everything you need at your fingertips.

2: SystemRescueCd

SystemRescueCd is another live Linux rescue CD that offers numerous tools to handle numerous tasks, including partition manipulation, file recovery, hard disk testing, ftp, and disk formatting. You can place this on CD or USB stick.

3: Ubuntu Rescue Remix

Ubuntu Rescue Remix it includes an outstanding GUI that can help you handle tasks other tools can’t handle. You can recover and rescue Mac files/filesystems, recover data from nonstandard external drives, recover deleted files, and more. The one thing URR is missing is antivirus tools.

4: F-Secure Rescue CD

F-Secure Rescue CD is based on Knoppix and allows you to check the integrity of your installed applications. It also allows advanced data repair and recovery, as well as recovery malware.

5: Linux rescue mode

This is the only entry on the list that isn’t a downloadable tool. Linux rescue mode is a mode booted with the help of a Linux boot CD, allowing you to repair a broken system. From rescue mode, you can recover a root password, repair or reinstall the boot loader, and more. When you boot into rescue mode, it will typically mount your installed system into /mnt/sysimage, where you can take care of any business necessary.

6: Call Reconnix

Reconnix is a UK technology services company specialising in providing Open Source Eco-Systems, Digital Delivery, Cloud and Managed Hosting solutions to Public and Private sector Enterprises.

Reducing Cloud Costs

Steve Nice, CTO of Reconnix, talks about reducing the costs of cloud for CloudPro.

Making the move to public cloud can be more expensive than you realise, how can you cut prices without cutting service?

Making the move to the cloud can sometimes be more expensive than you realise, so how can you cut prices without cutting service?

Read the rest of the article CloudPro

Linux Support: Latest Amazon Linux AMI

Max Spevack of the AWS Kernel and Operating Systems (KaOS) team brings news of the latest Amazon Linux AMI. From Amazon Web Services Blog.

It’s been another six months, so it’s time for a fresh release of the Amazon Linux AMI.  Today, we are pleased to announce that the Amazon Linux AMI 2013.09 is available.

This release marks the two year anniversary of the public Amazon Linux AMI GA.  As always, our roadmap and new features are heavily driven by customer requests, so please continue to let us know how we can improve the Amazon Linux AMI for your needs and workloads.

Our 2013.09 release contains several new features that are detailed below.  Our release notes contain additional release information, including more detailed lists of new and updated packages.

  • Kernel 3.4.62 - We have upgraded the kernel to version 3.4.62, which follows the long-term release 3.4.x kernel series that we introduced in the 2013.03 AMI.
  • AWS Command Line Interface 1.1 - The AWS Command Line Interface has celebrated its GA release in the interval since we introduced the Developer Preview version in the 2013.03 Amazon Linux AMI. We provide the latest version of this python-based interface to AWS, including command-line completion for bash andzsh.  The tool is pre-installed on the Amazon Linux AMI as the aws-cli package.
  • GPT partitioning on HVM AMIs - The root device of the Amazon Linux HVM AMI is now partitioned using the GPT format, where previous releases used the MBR format. The partition table can be manipulated by GPT-aware tools such as partedand gdisk.
  • Improved Ruby 1.9 Support - We’ve improved the Ruby 1.9 experience on the Amazon Linux AMI, including the latest patch level (ruby19-1.9.3-448).  Our Ruby 1.9 packages fix several other bugs, including a load issue with rake, and a fixed bigdecimal so that Ruby on Rails is easier to install.  Furthermore, Ruby now has alternatives support in the Amazon Linux AMI. You can switch between Ruby 1.8 and 1.9 with one command.
  • RPM 4.11.1 and Yum 3.4.3 - The core components of RPM and Yum have been updated to newer versions, with RPM 4.11 and Yum 3.4.3 being featured in this release. Both of these updates provide numerous bug fixes, performance improvements, and new features.
  • R 3.0 - Last year we added R to the Amazon Linux AMI repositories based on your requests.  With this release, we have updated R to 3.0.1, following the upstream release of R 3.0.
  • Nginx 1.4.2 - Based on your requests, we have upgraded to Nginx 1.4.2.  This replaces the 1.2.x Nginx packages that we had previously delivered in the Amazon Linux AMI repositories.

The Amazon Linux AMI 2013.09 is available for launch in all regions.

The Amazon Linux AMI is a rolling release, configured to deliver a continuous flow of updates that allow you to move from one version of the Amazon Linux AMI to the next.  In other words, Amazon Linux AMIs are treated as snapshots in time, with a repository and update structure that gives you the latest packages that we have built and pushed into the repository.  If you prefer to lock your Amazon Linux AMI instances to a particular version, please see the Amazon Linux AMI FAQ for instructions

As always, if you need any help with the Amazon Linux AMI, don’t hesitate to post on the EC2 forum, and someone from the team will be happy to assist you.

Open-source platform gains popularity in government

So popular has a little-known open-source program become within federal government agencies that there is now a shortage of expertise in Canberra.

Federal government chief technology officer John Sheridan said two factors were combining to drive the popularity of the Drupal content management system at the expense of proprietary software: the emergence of commercial entities able to give government the confidence to use open source, and the increasing cost and complexity of proprietary software.

Addressing a Forrester Research CIO Summit in Sydney recently, Sheridan said previous resistance to open source was gone.

”When people asked me why we were not using more open source I would say, imagine fronting Senate estimates to explain why your system failed and having to say: ‘I was just relying on help by posting to the bulletin board on the internet and nobody came back to me fast enough.’ Now the development of companies that provide support to those open-source solutions changes what we can do.”

Advertisement

Sheridan said the emergence of one such company, PreviousNext, had been responsible for a surge in popularity of Drupal in government.

”[It] has a free Drupal open-source distribution that supports the particular requirements governments have in terms of accessibility, security and related matters. So popular is Drupal in Canberra at the moment that we are starting to see challenges in getting properly qualified staff because there is such high demand.”

He said the avoidance of lock-in associated with proprietary software was also contributing to the popularity of open source.

”Often it is the most advanced features of proprietary solutions that make a really big difference to the business, but they require so much investment of time and are so hard to get people to do, that they became prohibitively expensive or impossible to get out of once you got in.”

PreviousNext is a partner of Acquia, a US-based company. Acquia’s regional director, Chris Harrop, told IT Pro that the company’s product, aGov, had been downloaded more than 3600 times since its launch last year.

”What PreviousNext did was to take all the requirements from government tenders and build those into a Drupal distribution that meets all government requirements for web accessibility.”

He said the program’s popularity was spreading.

”A lot of federal government agencies are starting to build websites using Drupal and we are seeing that replicated at a state level. The NSW government’s new portal service is built on Drupal. SBS is planning to shift everything onto Drupal.”

It is one of the top three open-source content management systems, the others being WordPress and Joomla.

”Numerically WordPress dominates, but many WordPress sites are blogging sites or things where security is not a priority,” Harrop said.

”If you focus down onto the top 10,000 sites, Drupal then becomes the dominant player because enterprises are very concerned about security and scalability and WordPress and Joomla don’t offer those.”

http://www.theage.com.au/it-pro/government-it/opensource-platform-gains-popularity-in-government-20130924-hv1sj.html