Linux

Boot into Wndows partition after wipe out Linux partition

After I wiped out my Ubuntu partition in order to get some extra space for my Windows 7. I got following message when I restart my computer :

error: no such partition
grub rescue>

I found the resolution on Microsoft's website after googling for a bit and it's quite easy. Just follow these steps :

a) Insert the Windows 7 System Repair DVD or Installation DVD and reboot.

b) Select the correct keyboard input method and click ‘Next’.

Note: If you are using the Windows7 Install DVD then at the 'Install Now' prompt (Do not pick the Install Now option) instead choose the 'Repair your computer' option located in the lower left of the dispay.

c) The System Repair tool will search for a valid operating system and will report that “Windows found problems with your computer’s startup options. Do you want to apply repairs and restart your computer?”

d) Click ‘Repair and restart’ and reboot again to the Windows 7 System Repair environment.

e) Click ‘Next’ at the keyboard selection prompt and when the ‘System Recovery Options’ screen appears verify that the “Use recovery tools that can help fix problems starting Windows” is selected.
Note that on your Dual Boot system there now should be only one operating system listed. Click the ‘Next’ button.

f) Now from the menu list select the ‘Command Prompt’ option.

g) At the DOS prompt type the following three commands:

bootrec.exe /fixmbr

bootrec.exe /fixboot (may return an 'Eliment not found' message)

bootrec.exe /RebuildBcd

h) Close the command prompt window and click the ‘Startup Repair’ option.

i) The repair process may take some time, so wait until the process completes at which point you will see two messages “Windows cannot repair this computer automatically” and “Startup Repair cannot repair this computer automatically”.

These messages are the result of the radical changes made by removing the other drive. Ignore the Send/Don’t send options.

J) Close this message window by clicking on the X in the upper right corner of the Send/Don’t send window. Next click on the ‘View advanced options for system recovery and support’ option and from the main menu once again click ‘Startup Repair’. This time the repair process may only that a few seconds and when prompted “Startup Repair could not detect a problem”, click ‘Finish’ and run the ‘Startup Repair’ option one more time, click ‘Finish’, and then remove the System Repair DVD and click ‘Restart’. Reboot the computer.

How to: Install .deb package in OpenSUSE

จริงๆ ก็ใช้ alien ตามธรรมดาแต่จดเก็บไว้หน่อยกันลืม

sudo zypper install alien
sudo alien -r package.deb
sudo zypper install package.deb

Eclipse 3.5.1 functionality problem with GTK+ 2.18

ตั้งแต่เปลี่ยนมาเป็น Ubuntu 9.10 ก็ไม่ได้แตะต้อง Eclipse อีกเลย ช่วงนี้มีงานที่ต้องพึ่งเจ้าอ้วนนี่สักหน่อยก็เลยต้องหามาติดเครื่องไว้ และก็เป็นธรรมดาที่ต้องใส่ปลั๊กอินบ้างเพื่อเพิ่มความอืดเข้าไปอีก (ผมแซวเล่นนะแฟน Eclipse อย่าว่ากัน)

ปัญหามาเกิดตอนกำลังเพิ่มรายชื่อของปลั๊กอินที่จะใช้ เพราะไม่ว่าจะกดปุ่มอะไรก็ตามมันก็ไม่ทำงานอะไรต่อ ตอนแรกนึกว่าเป็นที่ตัวจาวาเองแต่หาไปหามาก็เจอว่า Eclipse 3.5.1 มีปัญหากับ GTK+ 2.18 อยู่ โดยทางผู้พัฒนาบอกว่าให้หาเวอร์ชั่น 3.5.x ไปใช้แทนแต่ที่ให้โหลดก็ยังมีแค่ 3.5.1 เลยต้องออกแรงไปหา 3.5.2 RC1 มาใช้ซึ่งสุดท้ายก็มาเจอที่ mirror.in.th

Completely remove KVM to prevent error in Virtualbox

ปกติเวลาจะ uninstall โปรแกรมใน Ubuntu ก็ใช้คำสั่ง

sudo apt-get remove packagename

แต่เรื่องมีอยู่ว่าช่วงนี้ผมต้องลองใช้โปรแกรมจำพวก Visual Machine หลายตัวซึ่งจะมีบางกรณีที่โปรแกรมจะไม่สามารถทำงานได้ถ้าโปรแกรมอีกตัวหนึ่งติดตั้งไว้อยู่ โดยที่ผมเจอจะเป็นกรณีที่ Virtualbox ไม่สามารถเรียกใช้ Visual Machine ได้ถ้าโปรแกรม KVM ยังถูกติดตั้งอยู่ในระบบ

แต่หลังจากถอด KVM ออกไปแล้วก็ยังไม่สามารถใช้ Virtualbox ได้อยู่ดี ก็เลยต้องพึ่งลูกพี่กูเกิลตามระเบียบ ซึ่งก็ได้ความว่าถ้าใช้คำสั่งตามด้านบนระบบจะลบแค่ตัวโปรแกรมแต่พวก config file ต่างๆ จะยังเก็บไว้อยู่ ทำให้ Virtualbox ยังคิดว่ามี KVM ถูกติดตั้งอยู่ในระบบ ฉะนั้นเราต้องถอนรากถอนโคนมันด้วยคำสั่งนี้

sudo apt-get purge packagename

วิญาณของ KVM ก็ไปสู่สุขคติไม่มากวนใจอีกต่อไป

An user-friendly way to mount ISO image in Ubuntu

Normally, this is how I mount an ISO image file in Ubuntu

sudo mount -o loop -t iso9660 /path/to/iso/image/image.iso /where/to/mount/

I always forget this command since I don't have to deal with this type of file much so I have to google it every time I want to mount this one.

Fortunately, in my last attempt I found an easy way to mount an ISO file, Gmount-iso.

Read the rest of this entry »

The best twitter client, ever

curl -u username:password -d status="Message" http://twitter.com/statuses/update.xml