Search This Blog

Friday 23 October 2009

iPhone music stored as other

A few nights ago, I updated my iPhone (3G S) to the latest version. Upon doing this I had to resync it. The next day, while putting an album on, I noticed I had 4.08GB of Music and 4.03GB of "other". It occurred to me that this must be my music.

I googled around quite a bit and the only way I could find to fix this was to restore the iphone and resync everything. This in my opinion, is not good enough. Apparently Apple are aware of this issue but have not issued a fix for it.

I would encourage you all to write to Apple and let them know what you think. Contact details can be found here.

Slow iPhone sync on VirtualBox Ubuntu

Recently I purchased an iPhone. While I think Apple are possibly the least scrupulous company around, I do like their hardware. I had an iPod touch for some time and decided it was time to upgrade.

I have been using Ubuntu as my primary OS for some time, for my iPod (and now iPhone), I run a virtual copy of XP on VirtualBox. What strook me initially was how long the iPhone took to sync, it was far longer than my iPod touch ever took. Up to an hour just to add on album. This seemed ludicrous but I just assumed that was the case.

Solution

Ok, I am yet to work out why this works but it does. If it is taking you a long time to sync your iPhone and virtual Windows, change the display resolution on Windows to 800 * 600. This fixes it and it will sync fast. I do not know why (yet). This was never an issue on the iPod touch so I'm not sure why it is on the iPhone. Hope this helps.

Wednesday 25 March 2009

ERROR: bpgetfile unable to access network - jumpstart

I have recently been installing Solaris 10 on a virtualisaed environment on a Sun T5240

I have noticed with each install, I get a similar error that I can't pass

{0} ok boot net - install
Boot device: /virtual-devices@100/channel-devices@200/network@0 File and args: - install
Requesting Internet Address for 0:14:4f:fb:fb:f3
SunOS Release 5.10 Version Generic_120011-14 64-bit
Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
whoami: no domain name
WARNING: ncp0: unable to determine ncp (cpu) binding (ncp)
Configuring devices.
WARNING: ncp0: unable to determine ncp (cpu) binding (ncp)
Using RPC Bootparams for network configuration information.
Attempting to configure interface vnet0...
Configured interface vnet0
ERROR: bpgetfile unable to access network
/sbin/install-discovery: information: not found

The install sits at the # prompt at this point. I typed 'exit' here, expecting it to error out and found it continues the install, I have done two machines this way and both work properly

Wednesday 18 March 2009

Drop sybase devices

I recently installed a virtual machine from a flash archive. This machine had Sybase devices on raw devices which weren't accessible from the virtual machine. I knew I needed to reinstall these which is quite straightforward but because Sybase thought they existed, I couldn't drop them or access them. Below is what I tried.

1> Drop database
2> go

This gave an error saying the database was in use

1> sp_dropdevice
2>

This gave an error as it said the DB needed to be dropped.

1> dbcc dbrepair (DB_name, dropdb)
2> go

This gave a message telling me that I couldn't repair the database as it was not marked suspect. I couldn't mark it suspect as it hadn't initialised at start up time (because the devices weren't present).

I used to be excellent at this stuff but I rarely work on it any more. I knew there was a way to do this but it took some searching, eventually I found:

1> use master
2> go
1> sp_configure 'allow update', 1
2> go
1> begin tran
2> go
1> delete from sysusages where dbid =
2> go
1> commit
2> go
1> begin tran
2> go
1> delete from sysdatabases where dbid=
2> go
1> commit
2> go
1> sp_configure 'allow update', 0
2> go

This is the exact procedure I used and I am now happily reinstalling my databases.

Friday 20 February 2009

Authenticate SAMBA share against Active Directory

I have done this twice, ever and both times were tedious. I have a Linux file server and two Windows servers, one of which is the PDC. What I want to do, is have the samba shares check the PDC for authentication removing the need for separate samba passwords. There isn't a huge amount to this, it is just a matter of finding everything. You have to put references to a usermap in smb.conf and in the usermap have your *nix users mapped to you domain users in the following form

LinuxUser=DOMAIN\windowsUser

eg.

paulm=DOMAIN\paul.mulcahy

There are lines that have to be added to smb.conf so it will look use the active directory users, in my case, these are in the global section fo smb.conf

[global]
workgroup = WORKGROUP
realm = DOMAIN
preferred master = no
server string = Fileserver
security = domain
encrypt passwords = yes
log level = 1
log file = /var/log/samba/%m
max log size = 50
printcap name = cups
printing = cups
idmap uid = 600-20000
idmap gid = 600-20000
template homedir = /home/users/%U
template shell = /bin/bash
password server = server
username map = /etc/samba/smbusers

This is all quite straightforward, what had me was getting it into the domain. After much searching I found this command.

net rpc join -S SERVER -U user

Which must be run as root. After that, I was able to log in to my samba shares using my Windows log in.

Al red italics are varialbes wich should be changed to suit your environment

Tuesday 17 February 2009

Nortel case study

In work sometime ago I had a whole new network installed using Nortel equipment. We purchased a Nortel BCM 400 PBX and Nortel 1120e IP phones. Nortel asked me to participate in a case study so I decided I post it here.

http://www.nortel.com/corporate/global/emea/cstudies/collateral/nn123383emea.pdf

Monday 9 February 2009

How to install Cairo dock in Ubuntu

Ok, this is very straight forward and I will admit, I used the article at http://maketecheasier.com/how-to-install-and-configure-cairo-dock-in-ubuntu-intrepid/2009/01/20 to do this. If you don't know that site, it is an excellent one.

Cairo dock is similar to Avant-Window-Manager (AWN) but does not need any composting
manager (Compiz) to run. I have found, with a little testing, that is uses less CPU than AWN too.

Installation is quite straightforward:

In a terminal:

sudo vi /etc/apt/sources.list
add the following line and save and close
deb http://repository.cairo-dock.org/ubuntu intrepid cairo-dock
add the signed PGP key
wget -q http://repository.cairo-dock.org/ubuntu/cairo-dock.gpg -O- | sudo apt-key add -
Install the application
sudo apt-get update
sudo apt-get install cairo-dock cairo-dock-plug-ins

To Launch the dock

Applications-> System Tools -> Cairo-Dock

To add the dock to startup

System -> Preferences -> Session

Select the Startup tab

When the dialogue opens, click Add

Enter the command cairo-dock in the command to run text box.

Friday 30 January 2009

Use SC prompt Sun4v Alom

This one annoyed me. The Sun4V architecture no longer seems to use ALOM. There is now ILOM.

I am new to ILOM and it is a whole new set of commands and it looks differenet ( -> instead of SC>). Through a bit of reading, I found it is possible to get SC> back but you must set up a specific account. Here is how I did it.

Log in to ILOM as root and follow these steps:

-> create /SP/users/admin
ILOM should ask for a password
-> set /SP/users/admin role=Administrator
-> set /SP/users/admin cli_mode=alom

The second line sets the admin user's role as Administrator, the third line sets
the cli_mode to admin

Once this is done, log out and log in as as your new admin user and you'll see the
familiar SC> prompt

Wednesday 28 January 2009

Insert table of contents, word 2003

This is by no means a daunting task but is one I constantly forget how to do. In typical MS fashion, there is no menu link for it, instead it is well hidden.

I normally write my document first including chapter numbers, then I add the ToC when I'm done.

To add a Toc

Insert -> Reference -> Index and Tables

When the option box comes up, click the 'Table of contents' tab. From here there are a few options that you can modify.

Tuesday 27 January 2009

Change IP and hostname in Solaris

This is the procedure to change and IP address and hostname in solaris (v440). It is best to be connected by serial port or net sc.

Find the existing IP address

# ifconfig -a

bring down the port

# ifconfig 'port' down

When you see the existing details, update accordingly. This assumes netmask and broadcast are being changed too where x is details

# ifconfig 'port' inet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx broadcast xxx.xxx.xxx.xxx

Make a copy of the hosts file

# cp /etc/hosts /etc/hosts.bak

edit the hosts file with the new IP address. If necessary, do the same on /etc/netmask

Restart the inet service, this will assign the new values

# /etc/init.d/inetsvc stop
# /etc/init.d/inetsvc start

if you need to change the default route, find the existing one with

# netstat -nar

to delete the existing route

# route delete default 'defaultroute'

then add it with

# route add default 'defaultroute'

make a back up of /etc/defaultroute and modify it.

To change the hostname, make a backup of hosts and modify /etc/hosts. Then make a back up of the following files and modify all

/etc/nodename
/etc/hostname.*interface
/etc/inet/hosts
/etc/inet/ipnodes

and rename directory under /var/crash

# cd /var/crash
# mv oldname newname

then reboot the server to ensure all changes have taken effect.

Friday 23 January 2009

Replace Windows with Ubuntu

For the last few years, I have been a sys admin on Linux and Solaris servers. Like most people, I was running XP at home and was always perfectly happy with it. Recently my laptop had began to slow so I decided I'd take the plunge and install Ubuntu (Linux).

The first thing that really got me was how nice Ubuntu looks. On a 1.86Ghz CPU with 2GB RAM. I have gotten a very nice looking desktop. It also opens all programs much faster than Windows did and has a faster boot time.

As a sys admin, I had exposure to quite a few systems or tools that I use. Being able to run Squid as a local proxy is excellent, I've always felt Squid's ad blocking was better than any random ad blocking software. The open source community has gotten better too with Linux equivalents to nearly all the Windows programs I use.

The only places I have found trouble are with iTunes (iPod Touch) and my remote control (Logitech Harmony 1000). I've gotten round both of these by installing VirtualBox and running a virtual Windows in here. This took a bit of tweaking for USB communication but has worked since and I can sync my iPod with it now. I'd still prefer Apple and Logitech actually wrote a Linux version, after all Mac OS X is based on BSD. I still have my original Windows partition installed but could probably replace it, the fear still has me. From what I've seen, virtual Windows will do everything I need.

If you are considering taking the plunge and installing Ubuntu as your primary OS, I would strongly recommend it. VirtualBox is free for single use non-commercial machines and runs Windows perfectly, especially if you only need a couple of apps. Ubuntu is definitely more stable and looks a lot nicer. Oh and don't forget, free.

Thursday 22 January 2009

Configure net system console port

Recently I've found a few of my network system console (net sc) ports don't work or are configured incorrectly.

I found on the SUN site that the main items to be configured are:

if_network true
netsc_tpelinktest true
netsc_dhcp false
netsc_ipaddr "ip address"
netsc_ipnetmask "netmask"
netsc_ipgateway "router"

These can be set using "setsc" for example

sc> setsc if_network true

Do this for each of the above values and when done you will
have to reset the sc port using "resetsc".

sc> setsc

If you are configuring the net sc for the first time,
use "setupsc" for the initial configuration,

SUNWsolaris9

Recently I was trying to install a virtual Solaris 9 container on a virtual Solaris 10 ldom. A former colleague had set up all the ldoms so this was the first time I had tried to put Solaris 9 inside one.
When I entered the command

"Create -t SUNWsolaris9"

I was getting an error of SUNWsolaris9 not found. I searched for this and could find little on the internet other than the exact line above in an installation guide. Through some more research and a little help I learned that I had to install the Solaris 9 container packages. I had assumed this to be done.

If you are trying to install a Solaris 9 zone inside an ldom, make sure you install called s9containers-1_0-rr-solaris10-sparc.tar.gz on the Solaris 10 ldom. If you are using Solaris 10/08, you will need version 1.0.1 of the same package.