Tech

Editing Solaris Boot CD slices.

Solaris boot iso's can contain several slices. Those slices are usually not acessable unless you burn the iso to a cd. But that is a waste of cd's, and I have to walk round to the server room to constantly insert in new discs.

I need to be able to modify the Solaris boot cd's to do some custom stuff during the boot process, so I need to be able to edit the disc, and then put it all back together into an iso again.

Using the info at Jumpstart server from ISO’s I created a slightly more complicated program to extract all the slices. This should produce an output with the same values that of prtvtoc does.


# ./extractslices.ksh ./sol-8-hw4-sparc-v1.iso ./sol-8-hw4-sparc-v1-s
Examining ./sol-8/sol-8-hw4-sparc-v1.iso
Partition       Start   Length  File
   0            0       1006720 ./sol-8-hw4-sparc-v1-s0
   1            1006720 184320  ./sol-8-hw4-sparc-v1-s1
   2            1191040 5120    ./sol-8-hw4-sparc-v1-s2
   3            1196160 5120    ./sol-8-hw4-sparc-v1-s3
   4            1201280 5120    ./sol-8-hw4-sparc-v1-s4
   5            1206400 5120    ./sol-8-hw4-sparc-v1-s5
   6            0       0       Zero Length Partition
   7            0       0       Zero Length Partition

Then to do the edits...


# lofiadm -a /sol-8-hw4-sparc-v1-s1 /dev/lofi/1
# mount -F ufs /dev/lofi/1 /mnt

Make edits to /mnt


# umount /mnt
# lofiadm -d /dev/lofi/1
# cat sol-8-hw4-sparc-v1-s* > newcd.iso

Burn and go!

Recovering TX000 ALOM Passwords

Procedure as below for reseting the T2000 ALOM password due to no scadm command available for the sun4v architecture in Solaris 10.

Recovering TX000 ALOM Passwords

For security reasons, this procedure is available only while accessing the system
directly through the serial port. The procedure resets all ALOM NVRAM settings.

To Recover Your ALOM Passwords:

1. Connect to the ALOM serial port.
2. Power down the Sun Fire T2000 Server.

Remove the power cords from both power supplies. Wait several seconds for power
to discharge before reinserting the cords.

3. Press the Escape key during ALOM boot when the following text is displayed on
the console:

Boot Sector FLASH CRC Test
Boot Sector FLASH CRC Test, PASSED.
 
 
Return to Boot Monitor for Handshake

After pressing the Escape key, the ALOM boot escape menu is printed:

ALOM Menu
 
e - Erase ALOM NVRAM.
m - Run POST Menu.
R - Reset ALOM.
r - Return to bootmon.
Your selection:

4. Enter e to erase the ALOM NVRAM.

Your selection: e
ALOM NVRAM erased.
 
ALOM Menu
 
e - Erase ALOM NVRAM.
m - Run POST Menu.
R - Reset ALOM.
r - Return to bootmon.
Your selection:

5. Enter r to return to the ALOM boot process.

Your selection: r
 
ALOM POST 1.0
Status = 00007fff

ALOM then boots and resets all NVRAM settings. You are automatically logged on
as user admin with no password and no permissions. All ALOM NVRAM settings
are reset to the factory defaults.

BTW: Make sure place the following lines in your /etc/system file for Solaris 10 which is for mandatory T2000 support.

* Begin tuning recommended for T2000
*
set pcie:pcie_aer_ce_mask=0x1
*
set autoup=900
set tune_t_fsflushr=1
set rlim_fd_max=260000
set rlim_fd_cur=260000
set sq_max_size=100
set ipge:ipge_tx_ring_size=2048
set ipge:ipge_srv_fifo_depth=16000
set ipge:ipge_reclaim_pending=32
set ipge:ipge_bcopy_thresh=512
set ipge:ipge_dvma_thresh=1
set ip:ip_squeue_fanout=1
set ipge:ipge_tx_syncq=1
*
set segkmem_lpsize=0x400000
* End tuning recommended for T2000

Installing the Nvidia drivers on Debian.

The debian wiki wiki.debian.org/NvidiaGraphicsDrivers discribes the process.

Nvidia has two releases of its drivers, one that supports recent cards, and another "legacy" that supports older cards.

To install:


# apt-get install module-assistant gcc nvidia-kernel-common
# m-a update
# m-a prepare

For the newer driver run:


# m-a auto-install nvidia
# apt-get install nvidia-glx

For the older driver run:


# m-a auto-install nvidia-kernel-legacy-source
# apt-get install nvidia-glx-legacy

Then configure the x.org config file, adding the driver as "nvidia", make sure "glx is being loaded, and dri and glcore are not.

Linux on the IBM Thinkpad 570

IBM Thinkpad 570 - Notes on Installing and Maintaining Linux

It has been several years since I updated my documentation on running Linux on the IBM Thinkpad 570. Most of this documentation relates to Redhat version 6.x. Instead of updating the old documentation, I am rewriting from scratch.

  1. Installation
  2. I use Debian GNU/Linux on most machines I administer, so this documentation relates to my experience installing Debian 3.1 on the IBM Thinkpad 570.

    1. CDROM Install
    2. The Thinkpad 570 has no CDRom drive by default, and is only available as an addon for the Ultrabase docking station. If you don't have the Ultrabase, you will need to use a network install. I had very few problems with this method. On the first boot attempt, the Laptop was not seated correctly on the Ultrabase which meant the CDRom didn't boot. It had power so I was able to eject and insert the media, but it didn't boot. If you have this problem make sure the boot screen is showing that it is detecting a ATAPI CDROM drive after where it does the memory check. If you have the boot flash screen on, you will need to hit escape to see this info, or turn it off in the bios settings.

    3. Network Install (Floppy Boot)
    4. For the network install boot the laptop from floppy. All 4 Boot floppies are needed. These can be found on the cd or from: ftp.debian.org. The contents of the boot cd will need to be available from a web server on the network, or you could do it from the internet if you had bandwith to burn. Boot using boot.img, insert the root.img, and then the two driver disks once the installer starts. The installer only loads one disk by default. I used the network driver disk first. At the "Select a keyboard layout" config screen, choose "Back" and then reselect "Load drivers from a floppy" to load the cdrom driver disk.
      An error message will pop up regarding being unable to find the installer cd. This is ok as there is no installer cd present. Skip down to "Detect Network Hardware"

    5. Issues
      • (CD) CDRom did not boot initially, see the CDROM Install section for notes.
      • Using the default debian kernel, a kernel panic occurs on a soft reboot. This occurs in the middle of the install when the installer reboots the machine. The easy work around is to do a hard reboot, by powering off the machine, then powering it back on when a reboot is required

  3. TBA
    1. TBA

Bicycle HeadCam V1

I made a headcam so that everyone could see the bullshit crashes I manage to come up with every weekend.

Larger Images are here: http://encypher.net/image/tid/144

Some first test shots around my house:
Test Shot 1Test Shot 1 Test Shot 2Test Shot 2 Test Shot 3Test Shot 3 Test Shot 4Test Shot 4 Test Shot 5Test Shot 5 Test Shot 6Test Shot 6

I sourced the camera from Altronics, an electronics supplier based in Perth, Australia. The specifc item is called a "Waterproof Colour Micro - Bullet CCD Camera", product number S9135. It runs off 9V DC and draws a maximum of around 300mA. The video output is suitable for plugging straight into a VCR or camcorder line-in, however mine came with a BNC plug, so I bought an adapter to convert that to RCA.

I was unable to find a 9V battery that would provide the required current for and hour, (the length of a DV tape, so a good time lenght to aim for), so I used 8 1.2V rechargable batteries from Jaycar, as well as sourcing the battery holder, and a plug suitable for powering the camera (PP0510).

Headcam - TopHeadcam - Top CCD closeup from rear. Note the mark I added to find the "up-down" plane. There were no apparent markings to this, so I pointed the camera at a known level bench, and rotated the camera until the output display showed it as level.

Headcam - ConnectorsHeadcam - Connectors View of the connectors from the rear. This enables me to remove the helmet, while keeping the bag on my back. Note the BNC-RCA adapter.

Headcam - FrontHeadcam - Front Headcam - Full ViewHeadcam - Full View View of the whole thing. Lotsa zip ties! Note that it needs to point in a slightly upwards direction, as usually when you ride you dip your head while holding the handlebars and raise your eyes. If the camera is mounted where you would expect the view will be mostly of your front wheel.

Headcam - RearHeadcam - Rear Headcam - TopHeadcam - Top

ASCII Chart

The ASCII Chart

ASCII (American Standard Code for Information Interchange), is a character encoding based on the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that work with text. Most modern character encodings have a historical basis in ASCII.

Exploding CD!

At the end of last month I put a msdn cd in my cd drive and tried to access it. It spun up for 10 seconds or so, then made a large bang. Check out the view when I ejected it:

cdrom_explodecdrom_explode

I guess my debian machine didn't like the microsoft cd. Took quite a while to vacuum and shake all the bits out.

Linux on the IBM Thinkpad 570 - Notes 1

IBM Thinkpad 570 - Notes on Installing and Maintaining Linux

It has been several years since I updated my documentation on running Linux on the IBM Thinkpad 570. Most of this documentation relates to Redhat version 6.x. Instead of updating this document, I am writing new documentation from scratch.

This document remains until that is finished. Note that this document was written mostly between 1999 and 2001, so references to "new" need to be taken in that context. "Development Kenerl" will be referring to the 2.3.x series, so is probably no longer relevant.

Installing

Most of this is very Redhat and Mandrake centric.... most of it should still apply to other distributions.

I couldn't see the need to get the ultra base for the 570, and so I have no CDROM. This leaves two options; a hard disk install from a windows partition or a network install. If you are going to do a network install, get Redhat 6.1 as the pcmcia network drivers actually work. I think they work in Suse 6 as well. If you want to keep windows, the easiest thing would be to leave the original 2gig fat partiition and delete the 4gig fat32 partition to use with linux.

For normal install instructions check out the readme's on the install CD.

Some of these instructions require a recompile of the kernel, there are many sources that tell you how to do this so I won't expand on that here.
Note: The latest dev kernel's appear to have a problem with the MII architecture on the 570, so set the architecture to Pentium instead of 686/P Pro and you will have no problems.

Display

X-Windows

X runs excellently out of the box on Redhat 6 and above. Just select the Neomagic chipset driver and Laptop display panel 1024x768 when Xconfigurator runs. 24 bit display modes are not supported at this time, so select 16 bit at 1024x768. The display adapter has 2.5 MB of display memory.

As an aside - Run enlightenment (without gnome) - it is very very cool.... gotta luv eye candy

Frame Buffer

Vesa frame buffer works fine, just add a line like vga=0x317 to lilo.conf and run lilo

Note: The vga x-server doesn't seem to work correctly under frame-buffer, so if you run programs like XF86Setup of like to look at vmware booting in full screen, don't use frame buffer.

Sound

The cirrus logic chipset is supported under the Alsa sound card drivers. You need at least 0.4.1c drivers or later. Get the driver, lib and util packages. untar, configure and compile all three.

From the alsa-driver directory

cp ./utils/alsasound /etc/rc.d/init.d/

Then use a sysv editor, (such as ksysv), to add alsasound to the startup for runlevel 3 and 5 and also to stopping in runlevel 6

add the following to /etc/conf.modules

#*****************************************************************************
# Config for sound in IBM Thinkpad 570 using ALSA sound drivers
#*****************************************************************************
# Base config
alias char-major-116 snd
alias char-major-14 soundcore
# Cards
alias snd-card-0 snd-card-cs461x
# OSS/Lite compat
alias snd-slot-0 snd-card-0
# OSS services of ALSA
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm1-oss
alias sound-service-0-12 snd-pcm1-oss
# Set mixer to stored defaults (with alsactl store)
post-install snd alsactl restore
#*****************************************************************************

Mixer chanels are muted by default so use an oss mixer or a native alsa mixer such as gamix or xamixer2 to unmute PCM and Master and increase the volume. The mixer settings are stored in /etc/alsa.conf by alsactl. I have found wierd things if the drivers are not properly unloaded.

Sound drivers do not survive suspend APM events and so the modules must be removed and reinitilized at each suspend. I explain how to do this in the APM section. Please realise that if a program is using a module it will not be able to be removed. This means all mixers and sound programs should be closed before suspending or shuting down. Esd now has native alsa support and I only use the oss emulation for a mixer epplet. However esd doesn't let go of the module correctly at suspend time. Running "esdctl off" should let the modules be removed, however that don't remove and I have to kill esd. This stuffs everything that was using esd.... oh well.... tell me if you do better.

APM

The APM settings that come with all the distributions I have installed (Redhat and Mandrake, 6 and 6.1) on the 570, all cause a crash when the 570 suspends. This can be temporally avoided by disabling apmd starting at boot time. (In setup) Better results are obtained by recompiling the kernel. I haven't worked out the best settings here, but these seem to work satisfactorily, if you do better tell me.

Always compile APM into the kernel and not as a module.
I choose

Power off on shutdown
Ignore multiple suspend
Ignore multiple suspend/resume cycles
RTC stores time in GMT --> Don't use this option if you run windows
Allow interrupts during APM BIOS calls

Even after this APM does not work perfectly producing a error like APM - an event queue overflowed, this doesn't seem to crash things like it does if you don't recompile. Hopefully the further development of ACPI will make these problems obsolete.

Scripts need to be added for pre suspending and post resuming. I'll add what I have when I get around to it. Note that these scripts have been depreciated and the future use will be via a sysv style proxy script. I havn't worked out how to get this working yet. I also am having some problems with esd. On my other laptop I was using, (which used oss drivers instead of alsa ones), esd was suspended and then the sound drivers could be removed. In the case of alsa, esd still seams to be holding onto the device. This means that esd needs to be forcibly killed, and any programs using it promptly fall over. hmmm... hints anyone?

InfraRed Port

The Thinkpad 570 is using the NSC PC97338 chipset which suports SIR, MIR and FIR speeds. The SIR is UART 16552 compatible, which means no driver is really required to use it, and it can be used like an ordinary serial port.

SIR only offers speeds comparable to modem line speeds, which is of little use to me, so I have not really played with it at all. To get FIR (4Mbps) which has a much more useable bandwidth level, a IR driver must be used. The chipset in the 570 is ISA based and uses DMA transfers for MIR and FIR

Dag Brattli has had some recent success with hacking the IrDA support for the Thinkpad 570. The driver is not yet publicly available, but FIR speeds have been measured to nearly 370 Kbytes/s, using FTP over IrLAN. Full support for IrDA sould appear in the 2.3.x kernels towards the end of January.

USB

Usb support works on the 570 quite well, however it must be remembered that USB support in Linux is quite experimental, and as such is _not_ complete, and many of the drivers do not work, or are unstable. I would suggest joining the linux-usb mailing list or at least reading the archives on this, as the development is rapid, with the code being updated in the kernel with almost every kernel release, which is happening every couple of days at the moment. The USB HOWTO site has information on setting up devices that might not be listed here. All this stuff can be achieved by visting www.linux-usb.org. This site has started to be maintained just recently, so is now a good central point for linux USB development.

To get USB working under linux the kernel must be recompiled. Kernels are available from your closest ftp.kenel.org mirror in the /pub/linux/kernel/v2.3 dir. In the 2.2.x kernel's, usb was located in the modules/misc subdir, this has been moved to a modules/usb dir of its own. The modutils package must be updated to be able to modprobe in these drivers. This is not required for SuSe 6.3 but was required for Mandrake 6.1.

If you have been reading this USB page previously, you would have seen that I was having trouble with bios versions, and pci irq allocations for the USB to PCI chip. This got USB working for a while, but it stoopped working during November 99. These problems seem to have evaporated.

Setup prior to recompiling the Kernel

As I am unable to say why USB has started working again, so I don't know how important the exact configuration of the laptop, kernel, or distribution is. I am currently running bios version 54, (These bios updates are available from support at www.ibm.com.) This is setup with the pure bios defaults (F9 in bios setup), but I would expect other setups to work. Note that this is different to my previous advice which recomended changing the PCI irq numbers. I am currently using the SuSe 6.3 distribution. The first kernel I have tried where all these problems went away, was 2.3.36.

Backporting

Backporting onto the 2.2.x series is possible, and has recently been keeping up to date with the latest kernel versions, so this may be a valid option. I haven't and don't intend to try this, so I have no idea if it works or not. I'll post any solutions if you try it.

Compiling the Kernel

Get the the latest development kernel, 2.3.x.

The following is a bit outdated... but you get the idea.

Under USB Drivers - not for the faint of heart select the following; (I suggest modules where possible)

Support for USB

UHCI (Intel PIIX4 and others)

Enable lots of ISOC debugging output

Preliminary /proc/bus/usb support

USB Hub Support

and then any drivers for any devices you may have. -> Compile away

modules.conf

This section needs updating. After rebooting the modules need to be loaded. I don't know all the lines that should be added to modules.conf, but stick in.

above usbcore usb-uhci hub

Then use modprobe to load the drivers

modprobe usbcore
modprobe usb-uhci

then load any devices you wish to use such as hub, mouse keyboard and so on.

Devices

Setting up devices is well explained in the HOWTO.

At the moment my usb hub, usb mouse, and usb keyboard (from a G3) all work perfectly. My USB Zip drive detects and loads, but isn't working. HP scanners are also supported, but when I plug mine in, the kernel messages say it is a unsupported model at the moment This was fixed by a patch against 2.3.25. The usbscanner driver in the kernel often has newer patches are available here.

Mouse

Most people will most likely want to use a USB mouse in X-Windows, so I will explain that here.

The USB mouse used to use a different Major and Minor numbers to other USB devices. I have used a recent kernel that went back to the old type. So if your mouse doesn't work, it may be worth trying the old numbers.

Set up a /dev entry for the mouse

mknod /dev/usbmouse0 c 180 16

or the old type

mknod /dev/usbmouse0 c 10 32

(note: the major and minor numbers for the mouse have changed so if you have a /dev entry already and it then doesn't work that might be why)

The XF86Config file needs to be edited. If you use Redhat this is located in /etc/X11/XF86Config.

add into the Section "ServerFlags"

AllowMouseOpenFail

This will allow you to start X if you happen to not have your USB mouse plugged in when X starts.

also make a new section as follows;

Section "Xinput"

SubSection "Mouse"
DeviceName "USB Mouse"

Protocol "IMPS/2"

Port "/dev/usbmouse0"

AlwaysCore

EndSubSection

EndSection

The mouse can be unplugged and plugged in and continue to work will X is running, but X must be restarted if you started X without the mouse plugged in

TPCTL

tpctl is a configuration tool for IBM ThinkPad laptop computers. It does some of the things under Linux that PS2.EXE does under DOS and that the ThinkPad Configuration program does under Windows. tpctl provides access to all of the functionality of the IBM SMAPI BIOS as documented in the IBM ThinkPad Technical Reference manuals. It can also configure some parallel and serial port resources and display certain information from the CMOS RAM.

Lucent Winmodem

Winmodem's are unsupported under linux at the moment, however there is some development underway for the lucent chipset.

The driver status currently has the card working like a sound card, and as some baic modem stuff completed. It can do phone onhook, get phone offhook, and can do fullduplex transmition and receiving.

Disclamer:

This page is in no way related to the IBM corporation, and the opinions and information contained within this page are my own, and do not necessarally reflect those of the IBM corporation. Use this information at your own risk. Basically if your computer explodes, it is not my fault.