Archive for August, 2009

Changing hostname/computer name on Ubuntu

August 11, 2009

At work I changed from “ricky-desktop” to “ricky-work” (to avoid confusion with my home PC) and now I’m going to change it again to “rickyw” to avoid redundancy (everyone at work [who actually looks] sees me as “ricky-work” which is redundant. Might as well change it to my username.)

Edit /etc/hostname
hostname rickyw
Edit /etc/hosts
service hostname.sh start
I think that’s all, but I may be wrong. (Why is this process so complicated?)

Any existing windows that you have open will have their title appended with “on oldname” because they were started with the old hostname. Any new windows come out normally, it seems.

CD/DVD in the boot sequence?

August 1, 2009

On some BIOSes you had to put the disc device in the boot order in order to boot off of it. But now, many BIOSes (my own PCs, along with new ones I’m setting up at work) allow you to press F11/F3 “for BBS popup” (I think that’s what it’s called) which stops the system when it’s about to boot off of a device, and lets you choose what device to boot from.

The “norm” around work is to change the order in the BIOS, but I think that is too much work and can cause other problems (idiocy in general and LAN boots in the boot order). Why not just press one key to boot off a CD when you’re only going to do it <=5 times in the computer's lifetime? (Okay, maybe 8 for some of our systems, but who cares.)

On the machines I deem "mine" (if I can) I just wipe the boot order – just leave the hard drive there. If I want to boot off of anything else (which doesn't happen regularly) I will choose it myself.

Using the install DVD as a repository for yum

August 1, 2009

At work we use Red Hat Enterprise Linux and we don’t want to use the online repositories. (hmm.. set up a central repository of sorts?) Anyways, I would follow this guide (plus the step in the comments to import GPG keys), but we image these drives via FTP and don’t want to keep copies of ISOs (we do x64 and 32) on the hard drive’s filesystems that would end up getting backed up (and doubling the image size). You can use the same method to create a repository with the CD and not an ISO file:

  1. Create a mountpoint and mount the DVD
  2. mkdir -p /mnt/rhel/dvd
    mount /dev/cdrom /mnt/rhel/dvd

  3. Install createrepo somehow
  4. rpm -i createrepo.rpm

  5. Make a repository in the directory above your mountpoint
  6. cd /mnt/rhel/
    createrepo .

  7. Clean the repo (I’m not sure if this is necessary)
  8. yum clean all

  9. Add your new repo to yum’s repo list.. edit /etc/yum.repos.d/dvd.repo with:
  10. [dvd]
    name=dvd
    baseurl=file:///mnt/rhel
    enabled=1

  11. Import the GPG keys for the DVD
  12. rpm –import /mnt/rhel/dvd/RPM-GPG-KEY

I am writing this from memory, so no guarantees on correctness :)