Archive for the ‘ubuntu’ Category

installing mysql5 with php5 on Ubuntu for Wordpress

Thursday, December 20th, 2007

You need to install php5-mysql.

And then don’t forget to restart Apache. Just reloading won’t work.

Minimal Ubuntu install

Monday, December 3rd, 2007

From http ://ubuntuforums.org/showthread.php?t=207847,

$ sudo aptitude install x-window-system-core gnome-core gdm firefox synaptic xubuntu-system-tools gnome-app-install

Q: Why can’t I open a window on another Linux machine?

Thursday, October 27th, 2005

… even though the firewall is configured correctly…

A: Ubuntu/Gnome sets TCP off by default in gdm.conf. So if its a new installation, or you’ve upgraded without saving the changes you made previously, edit gdm.conf…

CoLinux for Ubuntu

Thursday, July 28th, 2005

To install from scratch, follow instructions for installing Debian Sid here

Now upgrade Debian Sid to Ubuntu Hoary

  1. Edit /etc/apt/sources.list, comment out Debian references, insert Hoary ones
  2. apt-get update
  3. apt-get dist-upgrade

Alternatively, if you already have Ubuntu installed on a separate partition, then you can follow the the instructions for running a dual-boot CoLinux setup

Printing to Windows XP printer from Ubuntu

Tuesday, May 24th, 2005

Enable “Print Services for Unix” on Windows XP machine and share printer. (I’m not actually sure that this is necessary, it might be a red herring…)

When you add the printer in Ubuntu,

  1. Choose “Network Printer” and “Windows Printer (SMB)”
  2. put your Workgroup in the Host field
  3. Put “guest@<host>/<printer>” in the Printer field (replacing <host> and <printer> with your host & printer names)

So, for example, if your Windows machine was called “Dozer” and your printer was called “LaserPrinter”, you would put “guest@Dozer/LaserPrinter”.

You should not need a name and password for the Windows machine for this to work.

Note: please note that case-sensitivity is important.. e.g. If you think your machine name is “DOMINO”, it should be “Domino” in the config above.

MythTV / PVR-350 / Ubuntu

Monday, April 18th, 2005

This blog entry used to contain an overview for constructing a MythTV box from Ubuntu and a Hauppauge PVR-350 card.

I’ve moved it from the blog into a permanent page here.

X-Out on a PVR-350

Monday, April 18th, 2005

Install the ivtv driver as described here http://www.willmer.com/kb/2005/02/installing-ivtv-driver-for-pvr-350-card/

Then, following the instructions in utils/README.X11,

install -c -m 0444 ivtvdev_drv_o /usr/X11R6/lib/modules/drivers/ivtvdev_drv.o

Then, set your default kernel to use a frame buffer.

Add
vga=791

to your kernel line

Add this to the line starting # kopt… in /boot/grub/menu.lst

vga=791

Identify the PCD ID of the PVR-350 card.

lspci

and look for the line relating to the PVR card. Mine says this…


0000:02:06.0 Multimedia video controller: Internext Compression Inc iTVC15 MPEG-2 Encoder (rev 01)

The first column gives you the bus, slot, function. You’ll need this for the xorg.conf.

Then add this to /etc/X11/xorg.conf

# add this as the first ServerLayout if you want it load automatically
Section "ServerLayout"
Identifier "TV"
Screen 0 "TV"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection

Section "Device"
Identifier "Hauppauge PVR350"
Driver "ivtvdev"
Option "fbdev" "/dev/fb1"
BusID "0:02:06" # this is the PCI ID you got earlier.
EndSection

Section "Monitor"
Identifier "PAL Monitor"
HorizSync 30-68
VertRefresh 50-120
Mode "720x576"
DotClock 42.6
HTimings 720 760 832 944
VTimings 576 577 580 602
Flags "-HSync" "-VSync"
EndMode
EndSection

Section "Screen"
Identifier "TV"
Device "Hauppauge PVR350"
Monitor "PAL Monitor"
DefaultDepth 24
DefaultFbbpp 32
Subsection "Display"
Depth 24
FbBpp 32
EndSubsection
EndSection

You can see the entire xorg.conf file here.

Reboot and see if it works…

Not working? You may need to rebuild the kernel to get it going

Follow the instructions at http://www.ubuntulinux.org/wiki/KernelHowto

Installing ivtv driver for PVR-350 card

Thursday, February 24th, 2005

Platform:
Ubuntu Hoary Preview Release
AMD64
Hauppauge PVR-350

if you don’t already have it, get the basic stuff for building a kernel module.
Get basics for building a kernel module

Following the instructions at Ubuntu Linux FAQ

$ sudo apt-get install build-essential linux-headers-`uname -r`

If you get an error like this,

make: *** /lib/modules/2.6.10-2-386/build: No such file or directory. Stop.
make: *** [all] Error 2

this is the bit you need to revisit.

Get ivtv module source

Get the latest stable tarball from Chris Kennedy’s site:

http://ivtv.no-ip.info/ivtv-0.2.0-rc3g.tgz (as of Feb 24th 2005)

Unpack it.

Build and install the module.

$ cd driver
$ make
$ sudo mv /lib/modules/`uname -r`/kernel/drivers/media/video/msp3400.ko ~/msp3400.ko.orig # (or any other place; or just delete it)
$ sudo make install

Create /etc/modutils/ivtv
Create this file as follows:

alias char-major-81 videodev
alias char-major-81-0 ivtv
options ivtv ivtv_debug=1 ivtv_std=2

Now, I think you ought to able to have this at the top of the ivtv file, and for it to automatically pick up this directory.

keep
path[ivtv]=/lib/modules/2.6.10/extra

But that doesn’t work, so you’ll need to copy over the /lib/modules/2.6.10/extra directory into /lib/modules/`uname -r`/kernel/drivers.

Firmware
Extract the firmware and put that in /lib/modules

Create /etc/init.d/ivtv
Create this file as follows:

modprobe ivtv
modprobe ivtv-fb # if using PVR-350 and framebuffer

Make it executable

$ sudo chmod +x /etc/init.d/ivtv

Set ivtv to load at boot

$ sudo update-rc.d ivtv defaults 12 # need to run this before gdm if using card for X output

Gotchas

  1. If you’re using the default kernel, then you’ll find the ivtv modules end up in /lib/modules/2.6.10, rather than /lib/modules/2.6.10-5-386. (for example). Which means that modprobe will fail, because it won’t be able to find the modules. Fix this by copying the directory across, and re-running depmod

    # cp -r /lib/modules/2.6.10/ivtv /lib/modules/2.6.10-5-386/kernel/drivers/video
    # depmod

Dual-Boot Windows XP with Ubuntu Linux

Friday, February 11th, 2005

If you install grub, setting it up for a dual boot Linux and WindowsXP, and then you get an “autochk fail” error when you try booting into WindowsXP, check that the Windows partition is not hidden.

If it is, add an “unhide” line before the “root” line in your menu.lst. Like so,

title Windows XP Professional
unhide (sd0,1)
root (sd0,1)
makeactive
chainloader +1

This example shows a SCSI disk with WindowsXP on the 2nd partition.

Installing Ubuntu Hoary from LiveCD

Thursday, February 10th, 2005

Note: This will not necessarily get you the installation you would have from an official installation CD! Use with caution…

I installed Hoary into a single partition, formatted as ext3 on a SCSI disk, with one other partition as swap. So I’ll be referring to /dev/sda5 and /dev/sda6 in this walk-through - you will need to use the right names for your installation.

Why did I do this?

I wanted Hoary on one of my machines. My original plan had been to install Warty and then use dist-upgrade, but for some reason, Warty hung in the installation after reboot. So since I didn’t actually want Warty, I thought about trying this approach instead.

Before you start

Make free space for new partitions on disk.

Boot from LiveCD into Hoary

You’ll do all the setup running Hoary from the LiveCD.

Create new partitions

Using fdisk, create two new partitions in the free space on disk you made earlier: “/” and swap.

Set partition IDs appropriately (0×82 and 0×83)

Make new filesystems on the partitions

I wanted to use ext3, you may prefer a different format. My new partitions were /dev/sda5 (Linux) and /dev/sda6(swap) so:

mkfs.ext3 /dev/sda5
mkswap /dev/sda6

Create /mnt and mount the new Linux partition on it.

# mkdir /mnt
# mount /dev/sda5 /mnt

Setup networking

You need this because you’ll need to install cloop-utils over the network in a minute.

Add your interface to /etc/network/interfaces and then bring it up. For example,

# vi /etc/network/interfaces
# ifup eth0

Add a known working nameserver in /etc/resolv.conf

Install cloop-utils

# apt-get update
# apt-get install cloop-utils

Populate filesystem

Now you’ve got cloop-utils, you can create the filesystem on your new Linux partition.

We’ll take this from the LiveCD.

First, extract the compressed filesystem to the hard disk.

# extract_compressed_fs /cdrom/casper/filesystem.cloop > /mnt/extracted_fs

Second, mount this now uncompressed filesystem

# mkdir /mnt/cloop
# mount /mnt/extracted_fs /mnt/cloop -o loop

Finally, copy the filesystem over to the new Linux partition.

# rsync -av /mnt/cloop/* /mnt/

Setup new Hoary system

Before you can boot your new Hoary system, you’ll need to do some of the things that the install process usually does for you, including installing the Grub bootloader.

Chroot into your new filesystem, so that all changes get made in the new partition.

# mount -t proc proc /mnt/proc
# cp /etc/network/interfaces /mnt/etc/network/interfaces
# chroot /mnt /bin/bash

You’ll need to modify resolv.conf within the chroot-ed environment, else name resolution won’t work.

# vi /etc/resolv.conf

Edit /etc/fstab (it’s currently empty) and set it up correctly. You need to get this right! Here’s an example.

# /etc/fstab: static file system information.
#
# proc /proc proc defaults 0 0
/dev/sda5 / ext3 defaults 0 1
/dev/sda6 none swap sw 0 0

Add yourself to sudoers list

You’ll need to use visudo

Install Grub

You’ll need to know what you’re doing with Grub. If you’re not sure, especially if you’ve already got Windows installed, check what you’re doing with someone who does understand it first!

# apt-get update
# apt-get install grub grub-doc

Generate a new menu.lst file

# update-grub

and edit it to suit you. If you have a dual-boot machine, then you’ll also need to add the other bootable partitions manually

Unless anyone knows how to do this automagically? please let me know

Then, copy over the stage 1 files

# cp /lib/grub/i386-pc/* /boot/grub

And now install grub

# grub
grub> root (hd0,4)
grub> setup (hd0)
grub> quit

Rebuild new kernel

I needed to rebuild the kernel at this point, since the default one didn’t seem to include SCSI. This might not have been necessary…

Follow instructions at http://www.ubuntulinux.org/wiki/KernelHowto

Remake initrd

Thanks to "noone cool" for this.

You should remove the current initrd file and run mkinitrd as the last step before rebooting. So any needed drivers at boot time will be available. This fixes a VFS root mount error you might get if you use ext3, sata, scsi, etc.


# rm /boot/initrd.img-2.6.10-3-386 (—change this if needed—)
# mkinitrd -o initrd.img-2.6.10-3-386 2.6.10-3-386

Reboot

Reboot, taking out the LiveCD. If you’ve got everything right, you’ll now have a running Hoary installation. If not, boot up the LiveCD and fix the problems.

Comments welcome!
Rachel