Monday, May 30, 2011

Upgrade to Fedora 14 using Preupgrade

Few days back Fedora folks released Fedora 15, however I was still running Fedora 13 on my work laptop. So it was good time to upgrade before Fedora 13 become unsupported version.

Backup Backup Backup
Its recommended to backup your important stuff before going for online upgrade using preupgrade or yum to avoid any data loose in case of system goes to its knees :P

The Upgrade
Preupgrade is a nice tool for upgrading Fedora from one version to another, it can be run from GUI and also from CLI.

# preupgrade-cli "Fedora 14 (Laughlin)"

Depends on your Internet pipe it will takes quite some time to download all the required Fedora 14 packages, once packages successfully downloaded reboot is required to boot the system into Fedora 14 and complete the installation process of the packages.

Go get cup of tea while the installation process running. Once installation finished a final reboot and you will find your box booted into shiny Fedora 14.

Its was a clean upgrade, everything working fine after upgrade. Thumbs up for Fedora folks.

For detail please refer to Preupgrade wiki.

Note: I prefer not to go for Fedora 15 at this time due to the fuse around the Gnome 3, but will wait until the community find some solid solutions. I do not want to loose my desktop icons and application launchers ;)

Friday, May 27, 2011

Inserting colon after every 2nd digit using sed

Sometime while working with the MAC address from BRAS I need to convert the MAC address into colon delimited. Here is how to insert colon after every second digit

Contents of mac.txt

00e04dc540fe
00e04dc541f6
00e04dc54366
00e04dc5452e
00e04dc543f6
00e04dc5473a
00e04dc54852
00e04dc54a9e
c8d5fe1fd02c
c8d5fe1fa69c

The command:
$ sed 's/../&:/g; s/:$//' < mac.txt

Result:
00:e0:4d:c5:40:fe
00:e0:4d:c5:41:f6
00:e0:4d:c5:43:66
00:e0:4d:c5:45:2e
00:e0:4d:c5:43:f6
00:e0:4d:c5:47:3a
00:e0:4d:c5:48:52
00:e0:4d:c5:4a:9e
c8:d5:fe:1f:d0:2c
c8:d5:fe:1f:a6:9c