//burnz.blog

How to change the hostname in Ubuntu

February 26, 2009 · 6 Comments

To change hostname in Ubuntu or any Debian variant Linux, modify the /etc/hostname and /etc/hosts.

sudo vi /etc/hostname

Change the old hostname to a new hostname.

sudo vi /etc/hosts

Also, change the oldhostname to a new hostname,

192.168.1.100               newhostname

After done, changing the /etc/hostname and /etc/hosts, you need to restart the hostname service.

sudo /etc/init.d/hostname.sh stop

sudo /etc/init.d/hostname.sh start

And then you log out from the shell and log in back. Once logged in, type

hostname

to check on the changes you have made for the hostname.

→ 6 CommentsCategories: Linux / Unix · Tutorial · Ubuntu
Tagged:

Linux is sexy, too

February 24, 2009 · 1 Comment

sexy-linux

→ 1 CommentCategories: General · Linux / Unix
Tagged: ,

Ubuntu auto shutdown due to high CPU temperature

February 23, 2009 · 3 Comments

Ubuntu

I use a laptop with Ubuntu 8.10 installed at work. While running the some high process, the CPU temperature get really high and its automatically shutdown the system. This thing happen every 2 or 3 days and its really annoying. The syslog showed the following error message:

ACPI: Critical trip point
Critical temperature reached (100 C), shutting down.

I know it is a safety feature, but really, I can’t afford to keep having the system shutdown while my system doing something important. My system fans are working but for whatever reason my CPU temp exceeds the critical threshold of 99C. On some systems you can see what your threshold is within the BIOS and even edit it but not on this one. So what’s a frustrated developer supposed to do? Well, it turns out you can tell you system to ignore the high temp threshold and to just keep on chugging along. NOTE: This isn’t the best advice I ever gave, if you do this then fry your CPU don’t come bitching to me.

sudo vi /etc/modprobe.d/options

Go to the last line of the file and add:
options thermal nocrt=1

Save the file.

Once you have this option set you need to reconfigure the kernel to pick up these changes, enter the following command:

sudo dpkg-reconfigure linux-image-$(uname -r)

This will update your kernel and then tell you to restart when it is done. Once you restart the system, type the following command the verfiy:

cat /proc/acpi/thermal_zone/*/*

It should display something similar like below.

<setting not supported>
<polling disabled>
state:                   ok
temperature:             52 C
critical (S5):           99 C <disabled>

Now your system won’t restart when the critical heat point is passed. Again, don’t blame me if you hurt your machine by doing this.

→ 3 CommentsCategories: Linux / Unix · Tutorial · Ubuntu
Tagged: , ,

How to reset Ubuntu root password

September 9, 2008 · 6 Comments

If your memory or mistyping leaves you without the right password to get into an account on a Linux computer, there’s no need to reformat. You’ll just need to reboot into single user mode to reset it. Here’s how to do it on a typical Ubuntu machine with the GRUB bootloader:

  1. Reboot the machine.
  2. Press the ESC key while GRUB is loading to enter the menu.
  3. If there is a ‘recovery mode’ option, select it and press ‘b’ to boot into single user mode.
  4. Otherwise, the default boot configuration should be selected. Press ‘e’ to edit it.
  5. Highlight the line that begins with ‘kernel’. Press ‘e’ again to edit this line.
  6. At the end of the line, add an additional parameter: ’single’. Hit return to make the change and press ‘b’ to boot.
Change the admin password

The system should load into single user mode and you’ll be left at the command line automatically logged in as root. Type ‘passwd’ to change the root password or ‘passwd someuser’ to change the password for your “someuser” admin account.

Reboot

Once your done, give the three finger salute, or enter ‘reboot’ to restart into your machine’s normal configuration.

That’s all there is to it. Now just make sure to write your password down on a post-it and shove it somewhere safe like under your keyboard. :)

[ Source: Hackzine.com ]

→ 6 CommentsCategories: Linux / Unix · Security · Tutorial
Tagged: ,

How to setup headless Sun xVM VirtualBox on Ubuntu server

September 4, 2008 · 9 Comments

The steps are not too difficult but I did have to find a few places for information. Search on the forum turn up nothing on this subject so hopefully this HOWTO would be helpful to someone out there.

Note: This is not using the OSE version.

Background:
VirtualBox has a very good GUI running on the host to manage guest OS. However when running a server, we typically do not want to run X on it. Fortunately VirtualBox has commandline tools to manage guest systems. It also provides the VirtualBox Remote Desktop Protocol (VRDP) to allow connection to the guest remotely.

Clarification of terms used:
Host – refers to the machine we are trying to install VirtualBox.
Guest – the VirtualBox guest system that is setup on the host.
Remote – the PC that we are working on to connect to the host via SSH.

This setup was done on a fresh install of Ubuntu Server 8.04 with openssh-server installed.

All the following steps are done by SSH into the host from a remote (I’m using Windows for now).

1. Get required packages
Download the Ubuntu package for VirtualBox from http://www.sun.com/software/products/virtualbox/get.jsp

wget “download link here” -O virtualbox_1.6.2-31466_Ubuntu_hardy_i386.deb

We are using the non-OSE version here.

The manual from http://www.virtualbox.org/wiki/Downloads is also very useful.

2. Installation

sudo dpkg -i virtualbox_1.6.2-31466_Ubuntu_hardy_i386.deb

This will generate a bunch of dependencies. Fix them with

sudo apt-get -f upgrade

3. Decide on user, disk files location

First decide which user you want to run VirtualBox. Add this user to the vboxusers group.

sudo usermod -a -G vboxusers vboxuser

By default VirtualBox creates the directory .VirtualBox on the user home directory and put all the config and disk file there. In my setup, I put the disk files in /var/vbox as I had created a large partition for this purpose.

4. Install a guest OS

You will need an iso for the guest OS install CD. Copy or download it to the host. For example we will just use ubuntu-8.04-server-i386.iso

-create a vm

VBoxManage createvm -name ubuntu -register

-config vm

VBoxManage modifyvm ubuntu -memory “256MB” -acpi on -boot1 dvd -nic1 nat

-create a disk

VBoxManage createvdi -filename “/var/vbox/ubuntu.vdi” -size 5000 -register

-add disk to vm

VBoxManage modifyvm ubuntu -hda “/var/vbox/ubuntu.vdi”

-register an install iso

VBoxManage registerimage dvd /var/vbox/ubuntu-8.04-server-i38.iso

-mount iso on vm

VBoxManage modifyvm ubuntu -dvd /var/vbox/ubuntu-8.04-server-i38.iso

-start the vm with port

VBoxHeadless -startvm ubuntu -p 3389 &

If you are running just 1 guest, the -p 3389 is optional. For more than 1 guest, it has to listen to different port.

5. Connect from remote

Since my desktop is still Windows, I use Remote Desktop Connection. (On XP, Start>All Programs>Accessories>Communications)

For Mac, use http://www.microsoft.com/mac/products/remote-desktop/
For Ubuntu, look at http://ubuntuforums.org/showthread.php?t=824710

Just fill in the IP of your host (or IP:port if not the default) and you should see the Ubuntu installation waiting for you.

Other useful commands:

VBoxManage controlvm ubuntu poweroff
VBoxManage controlvm ubuntu reset

Getting Ubuntu Server to run in VirtualBox

After installation and restarting, you may find that the boot up hang with this error

This kernel requires the following features not present on the CPU: 0:6

To fix this, do the following:

  1. Reset the guest
  2. Hit F12 to choose to boot from the CD. (It goes by pretty quickly, reset again if you miss it.)
  3. Select Rescue a broken system
  4. After going through the install screens you will get a command prompt. Select to run it on the root system.
  5. Install the virtual linux-virtual kernel

apt-get install linux-virtual

6. Reboot and this should fix the restart.

Upgrading kernel
If the kernel on the host is upgraded, the VirtualBox kernel module need to be re-compiled. Do the following steps:

  1. apt-get install make gcc linux-headers-2.6.24-19-server (other kernel header, check uname -a)
  2. /etc/init.d/vboxdrv setup

It should recompile the VirtualBox module and everything should be working again.

[ Source: kcnnc from Ubuntu Forum ]

→ 9 CommentsCategories: Linux / Unix · Software · Tutorial · Ubuntu
Tagged: , , ,

Google Chrome (BETA) for Windows

September 3, 2008 · 1 Comment

Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.

Google Chrome

Google Chrome

One box for everything
Type in the address bar and get suggestions for both search and web pages.

Thumbnails of your top sites
Access your favorite pages instantly with lightning speed from any new tab.

Shortcuts for your apps
Get desktop shortcuts to launch your favorite web applications.

[ Source: Google Chrome ]

→ 1 CommentCategories: Google · Microsoft · Software · Windows
Tagged: , , , ,

Bill Gates retires from Microsoft

June 23, 2008 · Leave a Comment

A Harvard University dropout who ushered in the home computer age and made billions of dollars along the way will have his last official day of work at Microsoft on June 27, 2008.

Three people will essentially fill the void left behind when Bill Gates retires from the company he and friend Paul Allen co-founded in 1975.

Since Gate’s begin his transition from leading Microsoft to heading his personal-bankrolled charity, The Bill and Melinda Gates Foundation, his job as Chied Software Architect has been handled by Ray Ozzie.

Craig Mundie inherited Gate’s Chief Research and Strategy Officer duties, while former Harvard classmate Steve Ballmer become Chief Executive Officer at the Seattle-based software colossus.

Gates left Harvard after two years to found the firm that become global powerhouse Microsoft. He later received honorary degrees from Harvard and other universities.

After retiring, Gates will remain chairman of the Microsoft board of directors and its largest shareholder.

“I don’t think anything is going to drastically change the day he leaves,” said Matt Rosoff of the private analyst firm Directions On Microsoft.

“If he thinks something is important and tells Steve Ballmer, Ballmer will listen to him.”

Still, Gates’s bespectacled nerdish visage is an integral part of Microsoft’s image and his departure is symbolic, according to analysts.

“The challenge Microsoft has when the founder departs is remembering its heart,” said analyst Rob Enderle of the Enderle Group in Silicon Valley.

“At some point the firm has to take the essence of what make Bill Gates successful and make surethat is preserved. Whether it is a company or a person, once you’ve lost your heart there isn’t much left but a shell” – AFP

→ Leave a CommentCategories: Microsoft
Tagged:

Fix date and time in Ubuntu

June 20, 2008 · 14 Comments

Dual-booting with Ubuntu and Windows sometimes giving a problem with date and time in Ubuntu. This is a well-established problem when dual-booting, since Linux assumes the hardware clock represents UTC, whereas Windows assumes the hardware clock represents local time. Luckily Linux provides ways to change this to fix it.

If you go into your clock settings, I think you can select between setting the hardware as either UTC or local time. Try switching that, and then adjust the time and see if it “sticks.”

If not, you can do this via the commandline in Linux :-

  1. In Linux, set the date and time to what it currently is. For example if it’s 10:20am local time:
    user@server:~$ sudo date -s 10:20
  2. Then update the hardware clock accordingly, and force this to be considered “localtime”:
    user@server:~$ sudo /sbin/hwclock --systohc --localtime
  3. Check to make sure it looks right:
    user@server:~$ sudo /sbin/hwclock --localtime
  4. Sync between hardware clock and system clock:
    user@server:~$ sudo /sbin/hwclock --hctosys --localtime

Now Linux should consider the clock to be “localtime”, which should be identical to what Windows is doing. So after rebooting into Windows, the time should look right.

Hope that helps.

→ 14 CommentsCategories: Linux / Unix · Tutorial
Tagged: , , ,

Firefox 3 launch a success: 8 million downloads in 24 hours

June 20, 2008 · 1 Comment

Mozilla’s Firefox 3 release event yesterday was an epic success. The servers logged over 8 million downloads during the 24-hour download day, and Mozilla has declared victory after exceeding its initial goal of 5 million downloads.

The rapid pace at which the downloads are occurring makes it difficult to compute an exact total. The counter appears to be lagging behind the actual count, and Mozilla’s statisticians say that the number could be as high as 3 million just four hours after Firefox’s official launch. Users can follow along at home by watching the counter at the official site.

Firefox 3 downloads have already exceeded the total number of downloads that took place in the first 24 hours after the Firefox 2 release. This is a significant milestone for Mozilla, which hopes that Firefox 3 will set the world record for the most software downloaded in a 24-hour period.

The display shows a breakdown by country, which indicates that the highest number of downloads is coming from the United States, followed by Germany and Spain. The US alone has reached over half a million downloads.

[ Spread Firefox | Download Day 2008 ]

→ 1 CommentCategories: Mozilla · Software
Tagged: , ,

Coming Tuesday, June 17th: Firefox 3

June 12, 2008 · Leave a Comment

Whenever we’re asked “when is Firefox going to be released” we endeavor to answer to the best of our abilities, but the truth of the matter is that we’ll only ever ship “when it’s ready”. We have a lot of indicators that help us understand when the product is ready for release: feedback from our pre-release milestones, excitement in the community and the press, availability of compatible Add-Ons, and a large active beta community helping us ensure that the release is compatible with all the various sites on the Internet.

After more than 34 months of active development, and with the contributions of thousands, we’re proud to announce that we’re ready. It is our expectation to ship Firefox 3 this upcoming Tuesday, June 17th. Put on your party hats and get ready to download Firefox 3 — the best web browser, period.

[ Source: Mozilla Developer News ]

→ Leave a CommentCategories: Linux / Unix · Mozilla · Software · Windows
Tagged: , ,