Thursday, May 24, 2007

Debian 4.0 r0 (Etch) installation on IBM System p5 510 inside LPAR

For some reason, the usual CD/DVD installation does not work in LPAR. I tried both Debian 4.0r0 (netinst and complete cd-1) and OpenSUSE 10.2 (dvd). The errors are known. I reported the OpenSUSE bug here [1], and the Debian bug has been reported here [2]. Update: This workaround should also work in OpenSUSE. Select the logical volume where the installer was disk dumped (dd) as the installer media. This can be done in the Main Menu (4>1>3).

There is a workaround documented by Gottfried Scheckenbach in debian-boot list [3]:

Of interest for users of VIO (via HMC or IVM):
I have found a way around burning a new disc (because I'm not physical near to the machine): I downloded the iso onto the VIO server and putted it via dd into a newly created virtual disc aka LV on the VIO. I attached this virtual disc as secondary hard disc to the LPAR and booted the LPAR using the defictive cdrom. After running into the missing files problem on initializaton of the installer I remounted /cdrom from this second hard disc.

I clarified the 'dd' command from him and he pointed me to the command `oem_setup_env`:
the padmin user has it's own PATH environment - there you see no dd (nor the other usual AIX stuff). But if you switch to root (with oem_setup_env), you can use all normally available AIX commands. And you must be root to write into the LV device. If you look inside /dev you find two devices witch contain the name of your lv - you have to use the block device, not the character one.

To use AIX commands like dd, login as root using the command `oem_setup_env`. This is another helpful documentation in disk dumping the cd-1 ISO image [4].

This is a step by step documentation on the workaround:

0. The assumptions are: you already are inside the VIO server as root, you already have created storage pools (one of which is the rootvg where VIO is located), also you have already created the partition where to install Linux, via IVM.

1. We create the logical volume from one of the storage pools. In this example, we create a logical volume named 'vdiso' from a storage pool named 'LinuxPoolvg'. Since the cd iso is about 700mb, I'll peg the size of the logical volume to 1gig.

$ mklv -lv vdiso LinuxPoolvg 1G

2. Copy the cd iso (debian-40r0-powerpc-CD-1.iso) to the VIO server. I used ftp. (Default user/password: padmin/padmin)

3. Disk dump the ISO to the logical volume as documented by Gottfried and here [4]. If you look inside /dev you find two devices which contain the name of your logical volume. Make sure you use the block device, not the character one.

$ oem_setup_env
# ls -l /dev/*vdiso
crw------- /dev/rvdiso
brw------- /dev/vdiso
# dd if=debian-40r0-powerpc-CD-1.iso of=/dev/vdiso bs=8M

4. Attach the logical volume to the concerned partition via IVM. This is a resourceful guide in managing your partitions using IVM [5]. The attached logical volume will be seen as /dev/sdb1 (you can verify the device name later by using `dmesg` to check for kernel messages on the attached device).

5. Create a virtual terminal (vt) connection to a partition. In this example, the id of the partition is 2:

# exit
$ mkvt -id 2

To remove the vt:

$ rmvt -id 2

To exit the vt and go back to the shell:

(tilde period)

6. Activate the partition using IVM. You should see the boot process from the newly created virtual terminal connection. You should also see yaboot bootloader. Type `install64` to load the 64-bit kernel of the Debian installer and initiate an installation.

7. The installation should fail as reported by Gottfried [2], a failure to read from the cd media. Go back to the Debian installer main menu and scroll down to 'Execute a shell'. You will be given a busybox ash shell. Verify the Linux device name of logical volume (mentioned earlier in step 4) using `dmesg`. Mine is /dev/sdb1.

8. Unmount the cd media mounted in /cdrom and replace it with the logical volume created in step 1:

Busybox ASH:
# umount /cdrom
# mount /dev/sdb1 /cdrom
# exit

9. You should be brought back to the main menu. Re-start the installation from the step 'Load installer components from CD'. Select all components.

10. There will be a problem detecting the PPPoE concentrator. I just skipped this step and continued.

11. Gottfried reports here [3] that there will be a problem with ext3 reformatting, so we use reiserfs instead.

12. Please read Gottfried's other notes (e.g. yaboot placement) for other possible errors. I encountered a minor problem with the default boot sequence but it's as simple as specifying the newly-installed partition in the SMS menu.

If you have other problems, you can drop a comment here or report it as a bug to the concerned Debian list.

[1] link1
[2] link2
[3] link3
[4] link4
[5] link5

Tuesday, May 22, 2007

Resetting admin password in IBM System p5 510 Express ASMI

These are the steps in resetting the admin password:

0. Re-route stored static in your body via an ESD wrist strap to a
metallic element.

1. Look for the 2 toggle switches and service processor batt. The batt
should be in front of the Power Supply 1 and Power Supply 2 (codes: E1
and E2, see Rear Location Codes on the cover plate). The "very tiny"
toggle switches should be in the area of P1-C14 slot.

I forgot the exact sequence but it should be a combination of the ff. step (2):

2. Remove the battery, toggle the switches to the opposite direction.
Allows some time for the caps to discharge.

3. Move back the toggle switches and put back the batt in its place.

4. Assign your PC to Class C subnet (i.e. masked
IPaddr: 192.168.2.x for HMC1 or
IPaddr: 192.168.3.x for HMC2

5. Ping HMC1 or HMC2. Access the web interface using the default address: (for HMC1) or (for HMC2)
Note: Sometimes you have to force the https protocol:
Example: (for HMC1)

6. The default 'admin' password is: admin
The default 'general' password is: general

7. You are required to change the admin password before being allowed
to change ASMI settings.

Monday, May 21, 2007

ld: unrecognized option '--hash-style=both'

gcc -Wl,,-export-dynamic obj_linux-native/socketdev_listener.o \
contiki-linux-native.a -o testv6.linux-native
/usr/local/bin/ld: unrecognized option '--hash-style=both'
/usr/local/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status

If you look closely, the error is something related to the local gcc not using the host's linker (ld).

$ which gcc

$ which ld

For some reason, I messed my compiler path. To synchronized gcc to use the host's dynamic linker (i.e. /usr/bin/ld), set the environment variable COMPILER_PATH to /usr/bin.

$ export COMPILER_PATH=/usr/bin

$ gcc -print-prog-name=ld

Saturday, May 12, 2007

Upgrade: Ubuntu Edgy (6.10) to Feisty (7.04)

I broke my rule of using the Ubuntu version one step backward from the current development release. My main interest is the stable ntfs driver with write capability. The upgrade went smooth except for a minor issue related to shared-mime-info package and a custom package (freemind). I reported the fix here.

Tuesday, May 01, 2007

Upgrade woes

I am sharing some of the notes that I've jotted down. This might be helpful to people who are upgrading from the long-term supported (LTS) Ubuntu Linux Dapper Drake (6.06.1) to Edgy Eft (6.10). My own cycle in upgrading is one step backward from the current development release. The current release is Feisty Fawn (Ubuntu 7.04). I use the command update-manager -c -d to dist-upgrade. This must be run as a privileged user.

Error 1:
Could not fetch the package liboobs. This is something related to our Internet filter in the university. So, I have to manually download the liboobs (edgy eft version) and place it in /var/cache/apt/archives/.

Error 2:
Could not install /var/cache/apt/archives/samba_3.0.22-1ubuntu4.1_i386.deb. The error log is: subprocess new pre-removal script returned error exit status 102. At first, I ignored the error but this will come up again later.

Error 3:
The upgrade aborts now. Your system could be in unusable state. A recovery was run (dpkg --configure -a). installArchive() failed.

I checked the logs at /var/log/dist-upgrade. main.log reports the samba error (see Error 2). This is the fix to it:

# cd /etc/rc2.d/
# ls -al
(At this point, you need to check for the broken samba symlink. Remove the symlink.)
# rm K09samba
(Alternatively, use the unlink command.)

To continue with the dist-upgrade: update-manager --dist-upgrade

Error 4:
Subprocess post-installation script returned error exit status 2. installArchive() failed.

This is the error log in /var/log/dist-upgrade/apt.log:
ERROR: root: got an error from dpkg for pkg: 'firestarter': subprocess post-installation script returned error exit status 2.

To get more debugging message, I enabled the following flag and rerun dpkg:
export DEBCONF_DEBUG=developer; dpkg --configure -a

The error is related to firestarter failing to start its daemon. The error occurs when running the script /etc/init.d/firestarter start. To see more debugging message, remove the redirection of the following line in the init.d script /etc/init.d/firestarter start:
# $FS_CONTROL start > /dev/null
(new line:)

The offending line is in the script /etc/firestarter/ It aborts when any network interface called in /etc/firestarter/configuration is not yet initilized. In my case, it is eth1 (wlan). I just assigned an IP address to the offending interface.

The next offending line in /etc/firestarter/ is related to the DHCP not starting properly. Just disable DHCP for NATs when you enabled NAT in /etc/firestarter/configuration. In /etc/firestarter/configuration, set the following lines to off:

# Enable DHCP server for NAT clients
# Forward server's DNS settings to clients in DHCP lease

To continue with the dist-upgrade: update-manager --dist-upgrade

Error 5:
After the dist-upgrade and reboot, my X session failed to start. The log follows:

/etc/X11/Xsession.d/50xorg-common_determine-startup: 48: /usr/bin/tpaneld: not found
mkdtemp: private socket dir: Permission denied

The fix to it is to chmod the /tmp directory to a+w: chmod a+w /tmp (as privileged).

Error 6:
Firefox 2 complains when installing an addon in its error console: installLocation has no properties.

The fix to it is to rename extensions.rdf:
$ mv ~/.mozilla/firefox/{profile}/extensions.rdf extensions.rdf.orig

If you have questions, post them and leave a comment. I will answer you from there.