DeVO's thoughts 서마이의 생각들을 담는 곳입니다…

20Apr/110

Booting from External CD/DVD on X200

During this beautiful holiday, I have tried to upgrade my Fedora13 laptop to Fedora15.

Even though I had 200M for my /boot, F15 upgrade using "preupgrade" needed more than 200M to do upgrade.

I have used up all my resources such as deleting old kernels, deleting unnecessary files from /boot.
This didn't work, so as my last resort, I have deleted current kernel's initrd hoping that, upgrade will install the new kernel and I wouldn't need the old kernel. But it required my old kernel.. sigh...
I'll talk about the above in more details later on, but to fix the issue.
I needed to run my laptop in "rescue" mode, but x200 doesn't have CD/DVD rom.

I had to borrow an external CD/DVD rom from a friend of mine.
Next problem is that It wouldn't read the external CD/DVD, and realized that during the boot, only one USB port works.

For X200, there are two(2) USB ports on the left hand side of the machine and one(1) on the other. The working USB port is the left hand side's front one. I never thought, it would be this picky to boot from a DVD

Tagged as: , , , , No Comments
15Apr/110

# multipath -ll output info

I have seen a lot of "multipath -ll" output, but outside of few things, I never paid that much attention till today, since someone actually asked me what these specifically meant for, so here we go :)

# multipath -ll output

# multipath -ll output

27Oct/100

Red Hat Enterprise Linux Updates dates

Due to the fact that I work as a Red Hat Consultant, knowing Red Hat Enterprise Linux (RHEL)'s update dates, comes very handy.

http://www.redhat.com/security/updates/notes/

 

Editorial:

After Red Hat's website redesign, the above URL is not valid anymore.
Now, I refer to below URL:
http://en.wikipedia.org/wiki/RHEL#Version_history

30Sep/101

vncpasswd in a script

During a customer engagement, I had to implement vnc environment to all the servers that I was building.

I thought it would be quite easy using kickstart + postcript.
However, what I didn't realized was that vncpasswd doesn't take stdin for passwd.

After bit of googling, I found that "spawn" and "expect" are my friends;



#!/usr/bin/expect --
spawn vncpasswd
expect "Password: "
send "$argv\r"
expect "Verify: "
send "$argv\r"
expect "$"

This works like a charm :)

27Sep/100

Digital TV firmware upgrade so easy~

For about a month, without any reason, I didn't have about 3 channels' sound.
Due to my laziness, I didn't follow it up till this morning.
Wow, it was due to frequency changes in recent reconfigurations of couple of broadcasting companies. So the software upgrade fixes it. VERY NICE!!!!

For LG LCD TV users in AUSTRALIA, here is the link that you can use..

http://www.lg.com/au/support/faqs/support-faq.jsp

So easy to do and it was done within 5 mins.

Once again, I have sound~

12Aug/100

Rule of Thumb on debugging a SSL related issue

To save the time, short story, CHECK YOUR SYSTEM TIME and MAKE SURE THEY ARE SYNC'ED!!!!!!

Yes, I am rather feeling stupid today, since I spent good 3 hours trying to figure out what is going on with an automated installation that I was doing...

2 identical hardwares, with two identical setup except the fact that one is booting from SAN and the other one is booting from Local HDD. All the software installations and configurations and scripts... everything was identical.

BUT one would register to the satellite that I kicked off the installation from, and the other one won't

Error log was suggesting that there were SSL verification failure.
Tried to install again about 3 times with exactly the same issue.. Copied the SSL file from the one which is working to the none working... Still didn't work... argh argh argh.....

And out of curiosity I checked the system time...
It says 2009........ WHAT? 2009..................................................
If the Bios setting was never set correctly, and the installation won't be finished correctly....

So the answer is...
CHECK THE SYSTEM TIME!!!!!!!!!!

11Aug/101

To get the IP Addresse off ifconfig using one line script

Because I work on a lot of automated installation, there are times when I need to grab the ip address off ifconfig then use it as a part of script.
As all other scripts do, there would be a thousand ways to script it, but since I am lazy, don't want to rethink again and again, so keeping it here so I won't lose :)

IP=`ifconfig ppp0 | grep "inet addr" | awk '{ print $2 }' | awk 'BEGIN { FS=":" } { print $2 }'`

1Aug/100

Editing initrd for RHEL5 or later..

There are cases where you need to edit files in initrd, and because it says .img in the extension, it is easy to make the assumption that with a loopback mounting the file, it would enable you to be able to edit the file.
BUT think again, based on my recent experience, for RHEL5, initrd is not just a img file.

It is a combination of gzip and cpio, then how can you edit it?

# gunzip -cd /boot/initrd-<version>.img | cpio -idv

This would extract all the files from initrd, then you should be able to change things.
Then to recompress it, you need to run following command;

#  find . | cpio -co | gzip -c9 > /boot/initrd-new.img

Easy? to find this detail, it took me awhile, not realizing that mkinitrd was just a script.

It gets more interesting if you want to change/move/add new modules into the initrd, after extracting the initrd file, you need to do following to extract modules then compress it again;

# gunzip -cd modules/modules.cgz | cpio -idv
# mv KERNEL-VER/ARCH/module.name.ko /tmp/
# find KERNEL-VER/ | cpio -H crc -o | gzip -9 > modules/modules.cgz
# rm -rf KERNEL-VER

Above example only covers deleting a module but it should be a good guide to do other things in it.

25Jul/100

Taking a screenshot in MAC

I like my mac to do documentations and photo editing.

For my next week's training preparation, I had to do a lot of screenshots.
With Windows and Linux, it is quite straight forward to take a screenshot, but realized that it wasn't as straight forward.

Followings are the key shortcuts that I found through google :)

  • Command-Shift-3: Take a screenshot of the screen, and save it as a file on the desktop
  • Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop
  • Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
  • Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
  • Command-Control-Shift-4, then select an area: Take a screenshot of an area and save it to the clipboard
  • Command-Control-Shift-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard
21Jul/100

Adobe Lightroom free Presets site

I have been using Adobe Lightroom for a while.
Even though it is not feature-rich as Photoshop, but this does everything that I need to do for my little photography hobby.

But what is great about is the preset capability.
Like photoshop's action, it can easily put effects.

Below is the site that I use a lot to get latest and best presets for lightroom

http://www.presetsheaven.com/category/presets/