Twitter Updates

    follow me on Twitter

    G-AVLN in front of her home

    G-AVLN in front of her home

    Mostly Unix and Linux topics. But flying might get a mention too.

    Monday, October 29, 2007

    Re-installing Dell XPS M1330 (Part 4)

    Well, the machine is ready for Linux. I have preserved the original software by installing it in a much smaller partition, allowing most disk space to be left for Linux.

    Obtain installable Ubuntu CD-ROM
    ------------------------------------------------
    Well, the system is ready for Linux installation. One little detail first - need to get the Linux software itself. I decided to go for the highly recommended Ubuntu, after the less than successful attempt with CentOS. No time to order a ready made CD or DVD, so need to download the ISO image (onto an XP box) and burn the CD disk. One reason for the choice is that this is the distribution that Dell use when pre-installing their machines with Linux.

    1. Download Ubuntu 7.10 Gutsy Gibbon (ISO image).

    There are numerous sites that will sell disks with the image on it. But if you have a decent bandwidth, it's cheaper to download your own. My bandwidth is useless, but it was still quicker than ordering disks and waiting for delivery.
    I got the image from: http://www.ubuntu.com/getubuntu/download. It took nearly 3 hours for the 712MB image (ubuntu-7.10-desktop-i386.iso) to land on my Desktop.

    2. Download ISO file burning software (unless you already have it)

    Many commercial programs exist. I used a freeware program: ISO Recorder v2 from http://isorecorder.alexfeinman.com/isorecorder.htm. Once the ISO Recorder is installed, "Copy image to CD" option will appear when you right-click in the ISO file.

    3. Having inserted empty CD in the drive, locate the ISO file you have downloaded, right-click it, and select the "Copy image to CD" option. Follow the steps - it will take few minutes for the new disk to be written.

    Boot from the Ubuntu CD and install it on hard disk
    --------------------------------------------------------------------
    Select "Start or install Ubuntu". Watch the little orange bar for a couple of minutes, then a blank screen for a minute or so, eventually Ubuntu starts the services. This will initially start Ubuntu as Live CD (i.e. run directly off the CD). Linux is at that point in memory (and using the CD). However, we will use this to install Ubuntu permanently into the spare partition on the hard disk.

    Double-click the Install icon, to start Install program.

    Welcome screen - press "Forward" (notice default is English)

    Where are you? - Use the map to locate a city in your timezone (London for me).

    Time zone is shown as BST (GMT+1:00) - press "Forward"

    Keyboard layout - press "Forward" (unless you are not in the UK, in which case change it! )

    Prepare disk space - select "Manual" (see Note 1 below for the rationale of my partition layout that I am suggesting) - press "Forward"

    Prepare partitions - on my machine, the current layout showed:

    Device Type ... Size Used
    /dev/sda
    /dev/sda1 fat16 ... 49 MB 33 MB
    /dev/sda2 ntfs ... 42952 MB 14700 MB
    /dev/sda5 154890 MB unknown
    /dev/sda6 fat32 ... 2154 MB 50 MB

    Highlight /dev/sda5 and press "Delete partition" - it should now show as "free space"

    Highlight the "free space" line and press "New partition".
    Fill the form with: - 150 MB ext3 /boot

    Highlight the "free space" line and press "New partition".
    Fill the form with: - 2000 swap

    Highlight the "free space" line and press "New partition".
    Fill the form with: - 5000 MB ext3 /

    Highlight the "free space" line and press "New partition".
    Fill the form with: - 10000 MB ext3 /home

    Highlight the "free space" line and press "New partition".
    Fill the form with: -10000 MB ext3 /usr

    Highlight the "free space" line and press "New partition".
    Fill the form with: - 1000 MB ext3 /var

    Highlight the "free space" line and press "New partition".
    Fill the form with: - 850 MB ext3 /tmp

    Highlight the "free space" line and press "New partition".
    Fill the form with: - 2500 MB ext3 /spare1

    Highlight the "free space" line and press "New partition".
    Fill the form with: - 2500 MB ext3 /spare2

    Press "Finish", then "Ignore" (if you got it, see Note 2 below)

    Migrate Docs and Settings - press "Forward"

    Who are you? - fill in the form; press "Forward"

    Ready to install

    Note 1.
    I never trust automatic partitioning tools - they never seem to split the disk in a sensible way.I want to share files with Windows, hence fat32 partition.

    I'm of a traditional UNIX school, where a separate partition is used for just about anything ;-). I always have at least one spare partition, for rescuing data from broken partitions, experimenting, trying new or experimental filesystem types, etc.

    This time I've ended up with 2 spare partitions, because one of them was going to be vfat type. This didn't work (see Note 2), but I will try changing the type later on, once the system is up and running.

    Note 2.
    Issues I had during the install:

    When partitioning, after creating all partitions I wanted, I have then selected the rest of the disk and assigned the "don’t_use" filesystem type. What a mistake - the process crashed. Waited a long time hoping that the little timer indicating that something is happening would time out and allow me to continue. Nope. Had to cancel the whole procedure and start from scratch (all the way from double-clicking in the Install icon). Second time round tried fat16 instead of fat32. Same problem. Tried to "Ignore" it, but when the actual partitioning started, got a new message:

    "Failed to create a file system: The fat 16 file system creation in partition #4 of SCSI1 (0,0,0) (sda) failed. Press "OK".

    This put me back into the partitioner (but I had to select "Manual" again. However, at least the partition information was remembered. Just had to go through each one and allocate type and mount point. At this point, I have also given up on the fat partition, and set it to free space (by deleting it).

    Once the complete partitioning process, you need to press "Finish". At this point, the Warning message popped:

    "File system doesn't have expected sizes for Windows to like it. Cluster size is 2k (expected 1k); number of clusters is 24026 (47959 expected); size of FATs is 94 sectors (188 expected). I chose to ignore this message and pressed "Ignore".

    Re-installing Dell XPS M1330 (Part 3)

    Using Dell MediaDirect (TM) 3.3 to partition disk
    --------------------------------------------------
    Before I move on, I need to give credit to another blogger, who published a quick howto about installing M1330 with dual boot configuration: (http://linuxevangelist.blogspot.com/2007/10/dual-boot-in-dell-xps-m1330-with.html). Without his information, it would've taken me a lot longer to realise that the MediaDirect disk is more than an application. It is a bootable CD, and is important for partitioning and making sure that Vista would be able to make use of the various media buttons the M1330 has (at this point I'm not sure if Linux will be able to use them ).

    Installing Vista
    --------------------------------------------------
    Put Vista disk in the drive and restart the box. Follow the few simple instructions. No problem with the install, except I had to insert the disk several times before it started - I hope I don't have an inherent CD or drive problem! A quick reboot into Vista to confirm it worked - it did, after a fashion. What surprised me is, though, it started into 800x600 resolution! A quick adjustment (Start --> Control Panel --> Appearance and Personalization: Adjust Screen Resolution) and slide the resolution to 1280x800.

    Worked fine, but I thought Windows do these things automatically. Hmmm.

    Installing Drivers and Utilities (grey Driver and Utilities disk)
    ---------------------------------------------------------------------------
    Insert the Drivers and Utilities CD disk in the drive. Select "Run..." in the AutoPlay pop up screen. Say "OK" to start. On my machine, the virus wizard showed a warning: "An unidentified program wants access to your computer". Not really knowing what it's about, I can only assume that driver setup.exe is regarded as potential virus. So, selected "Allow". A couple of more "OK" clicks and 30 seconds later the Dell Resource Disk printed a Welcome message with hardware, drivers and hardware utilities being displayed. Close this screen, and you will find that behind it the install wizard is waiting for you to press "Finish". Do that. Eject the disk (with the eject touch key above the main keyboard).

    Installing Dell Webcam Manager (blue Driver and Utilities disk)
    ------------------------------------------------------------------------------
    Insert the Drivers and Utilities CD disk in the drive. Select "Run..." in the pop up screen. Scroll to the bottom of the licence text and press "Yes" to accept the licence. Unless you have a good reason to change the default destination for the drivers to go to, accept the default location: c:\Program Files\DELL. Select the "Full Installation".

    The "Dell Webcam Software" screen will be displayed, and this stage of the installation should take not more that 5 minutes.

    Allow the laptop to restart (default action on "Finish"). The CD will be automatically ejected, and the machine will reboot.

    Installing Dell MediaDirect(TM) 3,3
    --------------------------------------------------
    Insert the Drivers and Utilities CD disk in the drive. Select "Run..." in the AutoPlay pop up screen. Say

    Another warning from the virus - press "Allow" again, Then "Enter" to start installation. First time round the disk got stuck again (you know when it happens, because it starts making repeatable noises). Had to eject the disk and restart the process. Not happy about it!

    But eventually it all worked, and MediaDirect installed itself in a separate partition. Another reboot to confirm it's all installed and working from Windows perspective. Vista booted fine, all touch keys work OK (although I haven't really played any media with it - can't wait to put Linux on and see how it can handle the same hardware).

    So, the next step is to obtain Linux - this time I'll go for Ubuntu - and install it in the free space.


    Friday, October 26, 2007

    Re-installing Dell XPS M1330 (Part 2)

    I only need Vista for MS for a few applications used at work. Other than that, everything I need can be done by Linux.

    Also, I don't want *all* applications installed by default, so I had to start from scratch. As every self-righteous know-it-all techie, I threw the Vista install disk in, to re-install, clean up the disk and repartition it in the process.

    Allowing your M1330 to boot from DVD
    --------------------------------------------------
    First little hiccup that surprised me was that CD/DVD is after hard disk in the BIOS booting sequence.

    Not a problem: reboot the system, hit F2 as soon as the first Dell screen appears and locate under "System" the "Bootable Sequence" menu item. Scroll down to it, press <Enter>. Now, with the list of available bootable devices displayed, reshuffle them to have HDD after DVD. Nice to see that booting from a USB device is available: reassuring if not surprising.

    There is some help at the bottom of the BIOS setup screen. I couldn't get how to actually move the entry. If up/down arrow keys are described as Up/Down arrows (to select the line), what could U/D mean (to move the entry)? Well, trial and error proved that U/D means Shift-Up or Shift-Down arrows. Obvious !?

    My preferred sequence would be:

    1. CD/DVD/CD-RW Drive
    2. USB Storage Device
    3. Internal HDD

    That's for my personal use - security consideration may dictate different approach (not a good idea to allow booting from removable media in a commercial environment).

    Once you have the correct sequence, do ESCAPE, then choose Save/Exit and Enter. That will accept your new setting and continue booting the system.

    During my first attempt, I have followed this with a fresh install of CentOS 5. It kind of worked, however, no sound, Ethernet or wireless were recognised. Screen required adjustments, but was fine after that. However, on reboot, although Vista was shown (as "other"), it wouldn't boot - missing MBR!

    Not very worried about any of this - I never expect my first install to work. But I decided to take a step back, and rethink my approach. A bit of googling didn't go amiss. There was a very useful blog entry from a chap who tried to achieve a similar configuration, and I took his advice. More in the next part...

    Re-installing Dell XPS M1330 (Part 1)

    I have invested a few pounds ;-) into a gorgeous toy. I want to start playing with applications that require a dual core processor, have a bit more memory and disk. For one thing, I will be investigating virtualisation, first step: ESX from VMWare, now that we are the authorised training place for them. If anything, I need to understand exactly the Linux portion of the product (Linux for ESX administrators course will follow soon).

    This is a great excuse to have a box with the spec:

    System Info:
    ---------------------------
    System: XPS M1330
    BIOS version: A06 (09/03/2007)

    Processor Type: Intel(R) Core(TM)2 Duo processor
    Max. Clock Speed: 2.2 GHz
    Processor Cache: 4096 KB
    Dual Core Present: Yes

    Memory Info
    ---------------------------
    Installed: 4096 MB
    Speed: 667 MHz
    Channel Mode: Dual
    Technology: DDR2 SDRAM
    Device Info
    ---------------------------
    Primary Hard Drive: 200 GB HDD
    Video Memory: 128 MB
    Panel Type: 13.3" Wide XGA
    Native Resolution: 1280 by 800

    It's got all sorts of other bits and pieces, WIFI, bluetooth - of course, fingerprint recognition, camera, and a product called MediaDirect, which I haven't yet sussed out.

    My first task is to reinstall it. I want a minimal install of the Vista the box came with, and Linux, which will take over most of the tasks. First quick reinstall has proven that RedHat derivatives couldn't cope. Very few devices were recognised with CentOS 5 or Fedora 6. So I decided to give the highly recommended Ubuntu 7.10 Gutsy.

    Well, I'm in business, incredibly impressed with Ubuntu. I am documenting every step of my attempts, and will be posting them in turn, as things progress.

    The next post will cover the partitioning and preparing for Ubuntu install without losing any facilities and drivers used by Vista.



    Wednesday, October 24, 2007

    An example of using eval

    When learning (or teaching) eval, the first - and very valuable - example of it is to see eval's ability to evaluate the value of the last positional parameter:

    $ set a b c d

    $ eval print -- \$$#

    d


    We use eval it to force the shell to perform a double scan, when we need to find a value of a value. First scan will evaluate the $# to the number of available parameters (in this case: 4); the second scan will check the value of it (d). This is 'bread and butter' of eval application.

    Other cases of using eval are a bit more obscure, and for that reason eval is often forgotten...

    Here is an example that is not 'that' obscure - and possible quite useful. A delegate wanted to rename all files in a given directory, to change the character case from lower to upper. What he devised, successfully, is as follows:

    for file in *

    do

    mv $file $(echo $file | tr '[a-z]' '[A-Z]')

    done



    This worked, until he found that some of the files contained 'unfriendly' characters: spaces. The script failed to cope with this.

    This is where eval stepped in:

    for file in *

    do

    eval mv '"$file"' \"$(echo "$file" | tr '[a-z]' '[A-Z]' )\"


    done

    In this case eval allows to insert an additional set of double quotes, which protected spaces embedded in file names.

    Wednesday, October 17, 2007

    ksh93 - test, test and then test a bit more

    Since ksh93 is now [1] available for most version of UNIX (and Linux), we have been tentatively moving our courses (especially scripting) towards the new syntax. At the moment the scripting course is still based predominantly on the pre-93 versions, but we now introduce a fair amount of comparisons, 'gotchas' and demos of new capabilities and syntax.

    Truth is, months later we still find new idiosyncrasies.

    Here is one I found today, whilst teaching... Imagine the following example, to illustrate the need for double quotes when creating and accessing variables:

    If you want to assign a value that has leading or trailing spaces or tabs, you need the quotes:

    $ address=" 6 Pie Corner"

    Would you expect to see the leading spaces if you didn't use the quotes when accessing the variable? Of course not! Well, in ksh93 it works! Haven't checked yet if this behaviour is driven by any particular setting or switch, but in my CentOS 5 ksh (Version M 1993-12-28 r), the following worked out of the box:

    $ print -- $address

    <space><space>6 Pie Corner


    [1] in the original posting this said 'not' - corrected 18/10/2007

    Monday, October 15, 2007

    No access to ntp source?

    When you install Linux on a PC, you may find that the hardware clock enforced the time. Normally, you would use the ntpd (network time protocol daemon) to synchronise the system (software) time with a selection of external sources.

    However, what if you are not connected, or for some reason just don't have access to time servers (for example the ntpd port 123 is blocked)?

    Well, unless you need to maintain a precise time (in which case you still need to find access to a reliable source), you can just use the good old date command and inform the hardware clock of the change.

    # date --utc 101517052007.00

    will update the system (software) clock and set the current time and date to: Oct 15 18:05:00 BST 2007.

    The only problem is that system clock doesn't run when your machine is powered off. What does continue to run is the hardware clock. It ticks forever. External power present or not. Because on start-up the hardware clock is used, you need to flush the system date into the hardware clock, and as long as the hardware clock is accurate enough, your newly adjusted time will be persistent over reboots.

    Use the hwclock tool to achieve this:

    # hwclock --systohc

    Do remember, though: this is 'quick and dirty'. If you require consistent and accurate time keeping, you need to synchronise the system clock with an external source...

    Saturday, August 18, 2007

    How much do people pay for Windows software?

    There is a discussion brewing in our local LUG, to do with almost philosophical aspect of software theft.
    The basis for the thread lie in one of the most interesting articles on the subject I have ever read:

    http://tlug.jp/articles/Windows_Is_Free

    As many before, it explores moral aspects of using "second hand" software, but less usually, it attempts to analise the implication of cracked software on the industry itself and how, ironically, the effectively free windows software distorts the balance of marketing power between windows, mac OS and linux.

    Keyboard layout in Solaris 10

    If there is a way of setting UK keyboard during Solaris 10 installation - I don't know it! However, the /boot/solaris/bootenv.rc has a directive for that - just change US to UK.

    A reboot, unfortunately is necessary...

    Monday, July 09, 2007

    Keyboard layout in Centos

    I have been playing with Centos 5, which is the community binary for binary version of RHEL 5 (with various elements, such as text and graphics depicting or referring to Red Hat replaced with Centos, quite legally, might I add). It's an excellent alternative, as long as you don't expect a 24/7 support, or automatic updates or any of the value added stuff that a formal contract from Red Hat provides.

    Anyway, the install from the DVD onto my Vaio PCG-V505BP went without any problems. Selected "Gnome Desktop", "Server" and "Server-GUI" software, and the only other customisation was disk partitioning (I like my partitions to be done the old-fashioned UNIX style).

    So, as I said, the installation completed successfully, and to my best knowledge all hardware was recognised OK (still testing, so can't be totally sure). One little surprise, though - the keyboard layout was the US, not UK! Well, it is quite possible that I messed it up myself (when selecting the keyboard during installation). Either way, I went to correct it by hand, and thought I'd document it. It's quite straightforward, but a thing to remember is that two different configuration files need to be changed.

    For CLI (character interface screen, accessed through CTRL-ALT-F1 - F6) you need to modify the /etc/sysconfig/keyboard. Change the KEYTABLE line to read:

    KEYTABLE="uk"

    This will have immediate effect, and any new CLI session will assume the correct keyboard.

    For GUI screen terminals, you need to change the Xorg configuration file: /etc/X11/xorg.conf. In the "Section InputDevice", identify the line with XkbLayout and modify it to read:

    Option "XkbLayout" "uk"

    Unlike CLI setting, this GUI change will only take place after GUI session is restarted. I have tried the standard CTRL-ALT-Backspace, to restart Xorg server, but it didn't work! Well, not for the first time. On many systems this is disabled.

    I refuse doing a full reboots lightly, so I tend to 'recycle' GUI instead. First of all, make sure you don't have any GUI-dependent users or applications before you carry out the next step (they may not like being kicked off the system without a warning).

    To 'recycle' GUI means switching runlevels to 3 than to 5 again. To do that: open a CLI session (press CTRL-ALT-F1), log in as root, and switch runlevel to 3 with:

    # init 3

    Once the 'anaconda' message appears on the screen - you are in runlevel 3, even though you see no new prompt. Hit "Enter", and the prompt will be printed. At that point, switch back into runlevel 5 with:

    # init 5

    Your new keyboard layout is now available to all users.

    Thursday, July 05, 2007

    Default gateway in Solaris 10

    I'm spending a lot of time switching between different versions of UNIX and Linux, and the detailed syntax of the command line stuff keeps catching me out. So I will start documenting for myself (and any QA-IQ colleagues) some of the most popular things that are needed in our classrooms.

    This week it is a turn of Solaris 10 (ix86), in our Swindon office. Our infrastructure is such that the 192.168.1.254 gateway requires an argument of 1 where the 'metric' value used to be. No rocket science - just the command line syntax, but it kept me unconnected for far too long (or am I getting too indoctrinated by the Linux syntax and the power of the ip command there?).

    Anyway: to add the default gateway to the Solaris 10 :

    # route add default 192.168.1.254 1

    Then obviously adjust the browser settings to the correct proxy for your location (with port 8080 on QA-IQ sites). In the Mozilla version provided with Solaris 10 you can find the settings in Edit --> Preferences --> Advanced --> Proxies.

    Get it back together again

    Had so many changes within the company - blog went onto the back burner. Things are getting calmer and easier again, and hopefully I can get on with it properly. With any luck, the postings will start coming out again...

    Sunday, May 06, 2007

    Forcing hp2400 to print double sided

    Needed to print a set of labs for a new version of a course. Run out of time, and although the manuals are being printed, the labs documents had to be done by hand! So to save the Amazon, I managed to get my printer to print double-sided! Although this is specifically for the hp2400, the algorythm of printing sequence and which way at which stage should be useful for any printer...

    1. Ensure all documents have an even number of pages

    2. First print the even pages with the last page on top.

    Select File --> Print...

    - in "Print:" drop down menu select "Even pages" (default is "All pages in range")

    Then select "Properties" --> Basics

    - in "Page Order" mark "Back to Front"

    Then press "OK" in Properties screen, and "OK" again in Print screen

    3. Replace the paper

    Pick up the freshly printed pages. Keep them together, in the same order they were printed and the same side up (i.e. printed side up). Rotate the whole bunch 180 degrees horizontally and insert in into the paper tray. Once in the paper tray, the orientation of the paper should be such that one can read the pages correctly, with the highest even page at the top.

    4. Print the odd pages with the ultimate result having the first page on top.

    Select File --> Print...

    - in "Print:" drop down menu select "Odd pages" (default is "All pages in range")

    Then select "Properties" --> Basics

    - in "Page Order" mark "Front to Back"

    Then press "OK" in Properties screen, and "OK" again in Print screen

    Sunday, November 19, 2006

    The IFS mystery

    The IFS is involved in the parsing of the command line (word splitting) and in variable assignment during the read built-in execution.

    But there is a side effect, which I have only discovered recently, by accident. If you assign positional parameters with set:

    $ set a 'b c' d 'e f'

    than using the * parameter we can get at the values individually or as one word. To illustrate, try the following:

    $ echo $* "$*"

    a b c d e f a b c d e f


    However, if you 'nullify' the IFS variable:

    $ IFS=""

    then the behaviour of the shell when referencing the * parameter changes:

    $ echo $* "$*"

    a b c d e f ab cde f

    This only works with the * parameter (not with @) and only if IFS had a null value (if you inset IFS altogether, then the shell will use a space to separate positional parameters.

    Finally, I've checked this behaviour in ksh and bash - same (and documented in manual pages, at least in bash).

    Wednesday, November 15, 2006

    Quoting command substitution

    When we learn the inner works of a shell, we quickly realise the benefit of using double quotes with request for variable substitution.

    For example, to assign a value to a variable (and preserve leading spaces), we would use:

    $ address=" 23 Acacia Avenue "

    A correct quotation is needed to recall the value complete with the spaces:

    $ echo "<$address>"

    The less known application of the quotes is when they are around the command substitution syntax. By default, POSIX shells remove trailing new-lines during command substitution. Double quotes change this behaviour!

    Compare the output of the following commands:

    $ echo $(ls)
    log.1 log.2 log.3

    and

    $ echo "$(ls)"
    log.1
    log.2
    log.3

    Wednesday, November 08, 2006

    Graphics problems...

    For all its maturity, problems with graphics with installs out of the box are still there... This time, trying to use RHEL4 on an HP machine with Intel 82845G/GL[Brookdale-G]/GE Chipset.


    Seems fine, until you try to restart the X Window System with CTL-ALT-Backspace. The screen just goes blank, no message, no GUI - nothing. Log into a character interface, run level 5 is shown, and the startx command works well.


    Just wonder, actually... Could it be a setting somewhere stopping the CTL-ALT-Backspace restart deliberately? Will need to do a bit of 'googling'.

    Tuesday, November 07, 2006

    Adjusting the kernel for Oracle

    In the golden old days, when installing Oracle on UNIX, a laborious kernel recompilation process was often needed, to adjust required memory parameters.

    On Linux, the process is much simpler, as most of the significant parameters may be changed 'on the fly', effortlessly, and without as much as a reboot, let alone kernel compilation.

    All current kernel parameters may be found in /proc/sys/kernel location. Explore it, to see that each parameter has its own file, with either a Boolean Yes/No (or 1/0) or a string value.

    The set of parameters required for Oracle10g (only part of the list is quoted here) says:

    shmmax  = 2147483648
    shmmni = 4096
    shmall = 2097152

    shmmin = 1
    shmseg = 10

    There are different ways of implementing it: first of all, you can get the values directly into the memory constructs, for example:

    # echo 2147483648 > /proc/sys/kernel/shmmax

    This will adjust the value correctly, with the slight drawback - the value will return to whatever the default was after the next reboot.

    Alternatively, for a more permanent modification, you can place the required definitions in the kernel configuration file: /etc/sysctl.conf.

    kernel.shmmax=2147483648
    kernel.smni=4096
    kernel.shmall=2097152
    kernel.shmin=1
    kernel.shmseg=10
    and inform the kernel of the changes with:

    # sysctl -p

    command, which will read the values from the sysctl.conf file and place them in the
    appropriate files under /proc/sys/kernel.
    Any subsequent reboots will also make use of these values.
     

    Thursday, October 05, 2006

    Crashing Unix?

    What's that?

    Having now worked so much with Linux, I have developed an unhealthy approach to file system care. Initially by accident, then by design - to test, now by habit, when I shut a Linux machine, I just slam the lid - generally just pull the power on it (I'm talking laptops here - not really advisible on servers, especially of a production, live variety).


    Well, I've been waiting for some kind of corruption, longing for the fsck to be forced on me, waiting to sit there for the entire afternoon typing "yes", because I've forgotten to provide the -y option (and worrying that ^C would upset it further - which it wouldn't!).

    Nothing! A bit of a delay on subsequent boots, but no disaster of any description.

    This week we are working on porting our generic UNIX admin course onto SPARCs with Solaris 9 (I'm still not up to speed with the new Solaris 10 features, but that's a totally different story).

    We are working at the brand new offices in Birmingham (on the verge of the China Town - wonderful, but that's yet another different story). The machines were shipped from London. Once connected - power on, and... three out of four boxes booted OK, the last one would not.

    Guess what: had to do a manual fsck on the /var partition. Guess what: forgot to do the -y option. Except that I did interrupt it this time ;-)

    Fsck declared the partition healthy - boot into runlevel 3 - no joy: utmpx file missing. Back to single user: it turned out that most of the /var partition is missing! Having recreated most of it by hand, the machine came up - eventually.

    Now then - I might be totally unfair to Solaris at this point, but the corruption has no known history or explanation. The machines had been installed at the same time from a jumpstart (logs confirm it), then they were shutdown and shipped. Did the engineer pull the power? Very likely. Did the engineer remove by hand some of the /var tree - doubt it very much.

    Well, at least I had a chance to reacquaint myself with the good old fsck !

    Tuesday, September 26, 2006

    I'll be back

    My blog has been awfully neglected lately.

    The company's merger meant a new look at the portfolio, to integrate and merge the offerings. Quite exciting, as several new sites mean access to loads more kit, including some top spec Sparc machines, which will be employed very quickly for the new generation of administration courses. The breadth of the combined customer base is demanding several new courses, at either end of the spectrum. Linux for desktop at one end, and top level enterprise server stuff at the other.

    Teaching trips to all corners of the world add variety and excitement, but do nothing to relief time squeeze ;-)

    All in all rather busy times for us! But I have so much to document, that hopefully this blog might start flowing again soon...

    Sunday, August 27, 2006

    Choice is wonderful

    There has been so much arguing about pros and cons of open source, I'm not going to start now. Developers and system architects having choice in selecting programs and having the Linus-given right to modify them and adjust them to their need is all truly great.

    It may, however, give the rest of us headaches when trying to adjust our understanding of a command or program behaviour.

    Take the login program. Originated quite early in the UNIX evolution. Linux implementation (look at the bottom of man login) refers to:
    'BSD login 5.40 (5/9/89) by Michael Glad (glad@daimi.dk) for HP-UX.
    Ported to Linux 0.12: Peter Orbaek (poe@daimi.aau.dk)
    '.

    Both SuSE and Red Hat derivatives use this version of the program.
    However, if you are SuSE user, there is one more credit line you can see there:
    'Added new features: ThorstenKukuk (kukuk@suse.de)'.

    I have only realised that, when hours of trying and trying to make the /etc/securetty file work consistently failed, and I was reaching that well know to me desparation state.

    In manual pages, under SPECIAL ACCESS RESTRICTIONS, where the behaviour of the two standard access files (securetty and usertty) are described, the behaviour of the securetty file is described, but on closer inspection, in the DESCRIPTION section it's stated:
    'This login implementation does ignore /etc/nologin and /etc/securetty. You need to configure this in the PAM configuration file for login...' .

    Why? Obviously the assumption is made that PAM ought to run at all times - a very sensible advice. But why force people? The worse implication to me is that if administrator decides to leave the PAM configuration out of the equation, the simple system access configuration is then missing altogether...

    Apart of anything, it means that I cannot have an exercise in the 'generic' Linux course that can be done on both distributions.
    How annoying!

    I'm not going to throw it out, though. It will act as a reminder for all of us, not to become complacent.

    This is the beauty of UNIX and Linux - always keep you on your toes, make you test all solutions on every new platform, force you to test-run every script or program you want to port...

    Blog Archive