Showing posts with label Fedora ARM. Show all posts
Showing posts with label Fedora ARM. Show all posts

Sunday, July 1, 2012

Getting Fedora-17 ARM images to understand booting LVM volumes

In order to get your uInitrd to understand booting from a LVM volume, you need to regenerate the initramfs and uInitrd images with the LVM bits.  To do so, follow these steps (substitute your versions as necessary):
  1. Install LVM (yum -y install lvm2)
  2. Update initramfs image (in /boot run dracut -f initramfs-3.3.6-3.fc17.armv5tel.kirkwood.img 3.3.6-3.fc17.armv5tel.k
    irkwood)
  3. Update uInitrd image (in /boot/uboot run mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/ini
    tramfs-3.3.6-3.fc17.armv5tel.kirkwood.img uInitrd-kirkwood)
So now you're wondering how to do this if you don't already have a running system?  Well, in theory you can run dracut and mkimage from a host system, but I've been unsuccessful getting a working image that way.  So to create my bootstrap uInitrd, I built a throwaway system, then used uInitrd to boot my LVM enabled system. 

The easiest approach would be to do the above steps, the move the boot media to a another computer, and copy the root filesystem to a temporary file, delete the partition with the root filesystem, and add it to a volume group (as a PV) and create a LV and copy the root filesystem back.  It sounds complicated but it's not.

Monday, January 2, 2012

Fedora 14 ARM on Pandaboard, part 3

Now that you have a Pandaboard booting Fedora 14 ARM, there are still some cleanup tasks to do.

Set the system time and install the ntp daemon.

# date 123017102011                                         
Fri Dec 30 17:10:00 EST 2011                                                   
# yum install ntp ntpdate
Loaded plugins: presto
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ntp.armv5tel 0:4.2.6p2-7.fc14 set to be installed
---> Package ntpdate.armv5tel 0:4.2.6p2-7.fc14 set to be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch             Version                  Repository      Size
================================================================================
Installing:
 ntp             armv5tel         4.2.6p2-7.fc14           fedora         573 k
 ntpdate         armv5tel         4.2.6p2-7.fc14           fedora          73 k

Transaction Summary
================================================================================
Install       2 Package(s)

Total download size: 645 k
Installed size: 1.7 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 645 k
(1/2): ntp-4.2.6p2-7.fc14.armv5tel.rpm                   | 573 kB     00:18   
(2/2): ntpdate-4.2.6p2-7.fc14.armv5tel.rpm               |  73 kB     00:01   
--------------------------------------------------------------------------------
Total                                            30 kB/s | 645 kB     00:21   
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing     : ntpdate-4.2.6p2-7.fc14.armv5tel                          1/2
  Installing     : ntp-4.2.6p2-7.fc14.armv5tel                              2/2

Installed:
  ntp.armv5tel 0:4.2.6p2-7.fc14        ntpdate.armv5tel 0:4.2.6p2-7.fc14     

Complete!
#
Turn on ntpd and start it.

# chkconfig ntpd on
# service ntpd start
Starting ntpd:                                             [  OK  ]
#


Enable LVM monitoring service (this is one of the %post failures during the LVM installation)

# chkconfig lvm2-monitor on                                 
# service lvm2-monitor start                                
Starting monitoring for VG panda:   1 logical volume(s) in volume group "panda"
monitored                                                                      
[  OK  ]                                                                       
#


Lock the guest account.

# usermod -L guest                                          
#

Add /boot/uboot as an entry in fstab.  The entry should look like this:

LABEL="uboot"           /boot/uboot             vfat    defaults,noauto 0 0
You also will want to update the / entry in fstab to mount the filesystem ext4 since that's what we formatted it as (mounting as ext3 is perfectly valid but will use none of the ext4 capabilities or features).  That line will now look like:

LABEL="rootfs"            /                       ext4    defaults        1 1

Additional items you might want to address:
  1. Change the root password
  2. Add swap (create lvol, mkswap, and enable it)
  3. Install openssh-clients for ssh support
  4. Change the hostname (/etc/sysconfig/network) 
  5. Set the timezone (it's currently in EST)

Well, that should be enough to get started.

    Sunday, January 1, 2012

    Fedora 14 ARM on Pandaboard, part 2

    From my previous entry, you'll have already created a bootable SD card.  Yeah, it doesn't boot much and ends with a kernel panic, but that's just what we need so far to get Fedora 14 on the Pandaboard.

    Install a different u-boot.bin

    Unfortunately the u-boot.bin on the validation image doesn't read boot.scr (autoboot script) and the settings are hard-coded.  In order to get a more flexible u-boot.bin, we'll borrow from Jon Master's previous Fedora 13 Pandaboard image.  Download the fedora_arm_image_pandaboard-uboot-20110622-0.tar.xz file, extract u-boot.bin, and copy it to the uboot filesystem:


    # tar -x uboot/u-boot.bin -f fedora_arm_image_pandaboard-uboot-20110622-0.tar.xz
    # ls uboot
    u-boot.bin
    # mount /dev/sde1 /mnt/tmp
    # cp uboot/u-boot.bin /mnt/tmp/
    cp: overwrite `/mnt/tmp/u-boot.bin'? y
    # umount /mnt/tmp


    Download Fedora 14 ARM image and install the root filesystem


    Go ahead and download the F14 ARM RC1 minimal image previously referenced.

    Insert the SD card and wait until the card is recognized.  Then create the physical volume, volume group, logical volume, root filesystem, and install the files to the root filesystem.

    # pvcreate /dev/sde2
      Writing physical volume data to disk "/dev/sde2"
      Physical volume "/dev/sde2" successfully created
    # vgcreate panda /dev/sde2
      Volume group "panda" successfully created
    # lvcreate -L 2G -n root panda
      Logical volume "root" created
    # mkfs -t ext4 -L rootfs /dev/mapper/panda-root
    mke2fs 1.41.14 (22-Dec-2010)
    Filesystem label=rootfs
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    131072 inodes, 524288 blocks
    26214 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=536870912
    16 block groups
    32768 blocks per group, 32768 fragments per group
    8192 inodes per group
    Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912

    Writing inode tables: done                           
    Creating journal (16384 blocks): done
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 38 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    # mount /dev/mapper/panda-root /mnt/tmp
    # tar -xf rootfs-f14-minimal-RC1.tar.bz2 -C /mnt/tmp
    One thing that I haven't mentioned is that the minimal image doesn't contain lvm2, which we're going to need.  Go ahead and install that (and its dependencies) now:

    # rpm -ivh --ignorearch --root=/mnt/tmp http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/lvm2-2.02.73-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/lvm2-libs-2.02.73-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-1.02.54-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-event-1.02.54-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-event-libs-1.02.54-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-libs-1.02.54-3.fc14.armv5tel.rpm
    Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/lvm2-2.02.73-3.fc14.armv5tel.rpm
    Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/lvm2-libs-2.02.73-3.fc14.armv5tel.rpm
    Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-1.02.54-3.fc14.armv5tel.rpm
    Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-event-1.02.54-3.fc14.armv5tel.rpm
    Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-event-libs-1.02.54-3.fc14.armv5tel.rpm
    Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-libs-1.02.54-3.fc14.armv5tel.rpm
    Preparing...                ########################################### [100%]
       1:device-mapper-libs     ########################################### [ 17%]
    warning: %post(device-mapper-libs-1.02.54-3.fc14.armv5tel) scriptlet failed, exit status 127
       2:device-mapper          ########################################### [ 33%]
       3:device-mapper-event-lib########################################### [ 50%]
    warning: %post(device-mapper-event-libs-1.02.54-3.fc14.armv5tel) scriptlet failed, exit status 127
       4:device-mapper-event    ########################################### [ 67%]
       5:lvm2-libs              ########################################### [ 83%]
    warning: %post(lvm2-libs-2.02.73-3.fc14.armv5tel) scriptlet failed, exit status 127
       6:lvm2                   ########################################### [100%]
    warning: %post(lvm2-2.02.73-3.fc14.armv5tel) scriptlet failed, exit status 127
    #


    You can ignore the %post errors as %post is simply trying to run ldconfig to update the dynamic linker/loader cache or chkconfig to enable a service.

    Now there is still one problem with getting LVM to work:  The generated initramfs files have no LVM support.   This is a huge problem (the system will not be able to detect the root filesystem which is on a logical volume).  It's also a huge pain to fix it as dracut did not generate a bootable image when I tried to update the initramfs on my host system.  Because of that, I've made it easy on you - here is an initramfs with LVM support included.  Let's install that:

    # cp initramfs-2.6.40.3-0.fc14.armv7l.omap.img /mnt/tmp/boot/
    cp: overwrite `/mnt/tmp/boot/initramfs-2.6.40.3-0.fc14.armv7l.omap.img'? y
    #


    The next thing we'll need to do is update the boot files stored in the uboot filesystem (mkimage is in the uboot-tools package if it's not installed on your system).
    # mkdir /mnt/tmp/boot/uboot
    # mount /dev/sde1 /mnt/tmp/boot/uboot
    # mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 2.6.40.3.fc14.armv7l.omap -d /mnt/tmp/boot/vmlinuz-2.6.40.3-0.fc14.armv7l.omap /mnt/tmp/boot/uboot/uImage
    Image Name:   2.6.40.3.fc14.armv7l.omap
    Created:      Fri Dec 30 16:44:41 2011
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    3919956 Bytes = 3828.08 kB = 3.74 MB
    Load Address: 80008000
    Entry Point:  80008000
    # mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /mnt/tmp/boot/initramfs-2.6.40.3-0.fc14.armv7l.omap.img /mnt/tmp/boot/uboot/uInitrd
    Image Name:   initramfs
    Created:      Fri Dec 30 16:46:50 2011
    Image Type:   ARM Linux RAMDisk Image (uncompressed)
    Data Size:    8043128 Bytes = 7854.62 kB = 7.67 MB
    Load Address: 00000000
    Entry Point:  00000000
    #
    In order to boot, we'll need to also create a boot script and compile it.

    # echo "setenv bootargs 'console=ttyO2,115200n8 ro rootwait root=/dev/mapper/panda-root init=/sbin/init earlyprintk rd_NO_PLYMOUTH'" > /mnt/tmp/boot/uboot/boot.cmd
    # echo "setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 81600000 uInitrd; bootm 80300000 81600000'" >> /mnt/tmp/boot/uboot/boot.cmd
    # echo "boot" >> /mnt/tmp/boot/uboot/boot.cmd
    # mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Pandaboard boot script" -d /mnt/tmp/boot/uboot/boot.cmd /mnt/tmp/boot/uboot/boot.scr
    Image Name:   Pandaboard boot script
    Created:      Fri Dec 30 16:49:18 2011
    Image Type:   ARM Linux Script (uncompressed)
    Data Size:    257 Bytes = 0.25 kB = 0.00 MB
    Load Address: 00000000
    Entry Point:  00000000
    Contents:
       Image 0: 249 Bytes = 0.24 kB = 0.00 MB
    #
    Create the klist.txt file that contains the list of installed kernels.  This is actually not needed in this case since there is no xpfa repository with an updated grubby that can use it.  I'm just doing it for completeness.

    # echo "2.6.40.3.fc14.armv7l.omap" > /mnt/tmp/boot/uboot/klist.txt
    #

    This should be all that's required.  Let's unmount these filesystems, deactivate the volume group, eject the media, and try booting on the Pandaboard.



    # umount /mnt/tmp/boot/uboot /mnt/tmp
    # vgchange -an panda
      0 logical volume(s) in volume group "panda" now active
    # eject /dev/sde
    #

    If all has gone well, you're now sitting at the login prompt.  The root password is "fedoraarm".

    Next post will be dedicated to a few cleanup items.

    Friday, December 30, 2011

    Fedora 14 ARM on Pandaboard

    Jon Masters has provided a Pandaboard Fedora 13 image which mostly works great (the MLO appears to not work on the new ES model, but you can strip the MLO from the Pandaboard validation image and use it instead).

    However, if you have the desire to stay current, you might want to try a little newer version of Fedora.  I expect the floodgates to open shortly as the Fedora ARM team is working on bootstrapping Fedora 15, but in the meantime, Peter Robinson has provided a Fedora 14 ARM image.  No, it's not specific to the Pandaboard, but we can get it working anyway with a little elbow grease.  And if we leverage the work of others, we won't even have to do any compiling!

    Partitioning & formatting your SD card

    This is perhaps the most critical step - and one with many nuances and folklore.  The image provided by Peter is "generic" in the fact that it doesn't have Pandaboard specific files or image layout.  What this means is that we'll have to provide an additional partition: the MLO/uboot partition for Pandaboard.

    There have been some reported problems with specific SD cards, so I would suggest using a high quality SD card (I have used both Micro Center "generic" card and a PNY professional card without issues).  If there is any doubt about the card, try the validation image first.

    Once you have the card in hand, you can insert it into your computer and examine /var/log/messages to determine which device is assigned by the kernel.  In my case, this is what was reported:

    sd 4:0:0:2: [sde] 15644672 512-byte logical blocks: (8.01 GB/7.45 GiB)

    Also, it's worth noting that if there are mountable filesystems, they are probably mounted.  That's not what we want, so be sure to unmount any mounted filesystems from this card.

    Now I use fdisk to create two partitions:
    1. The uboot/MLO partition sized at about 64 MB.
    2. The rest of the card for the system.
    There is two things worth mentioning here.  Most people also create a separate swap, boot, and root partitions.  I'm not going to do that here.  I'm going to instead create a 2nd partitions to use as a PV (Physical Volume) for LVM.  I will then later create Logical Volumes for swap and root filesystems.  I will not be creating a separate /boot filesystem.  The reason that this is many times distinct from the root filesystem is because it makes recovery easier if you can mount up root and make changes.  Since the /uboot partition/filesystem will be copies of files from /boot, I won't make it separate - the /uboot filesystem will contain the important files.

    Now create the two partitions:

    # fdisk /dev/sde

    Command (m for help): c
    DOS Compatibility flag is set (DEPRECATED!)

    Command (m for help): o
    Building a new DOS disklabel with disk identifier 0xaa802e39.
    Changes will remain in memory only, until you decide to write them.
    After that, of course, the previous content won't be recoverable.

    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

    WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
             switch off the mode (with command 'c').
    Command (m for help): n
    Partition type:
       p   primary (0 primary, 0 extended, 4 free)
       e   extended
    Select (default p): p
    Partition number (1-4, default 1): 1
    First sector (62-15644671, default 62): 63
    Last sector, +sectors or +size{K,M,G} (63-15644671, default 15644671): +64M

    Command (m for help): t
    Selected partition 1
    Hex code (type L to list codes): 6
    Changed system type of partition 1 to 6 (FAT16)

    Command (m for help): a
    Partition number (1-4): 1

    Command (m for help): p

    Disk /dev/sde: 8010 MB, 8010072064 bytes
    247 heads, 62 sectors/track, 1021 cylinders, total 15644672 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xaa802e39

       Device Boot      Start         End      Blocks   Id  System
    /dev/sde1   *          63      131135       65536+   6  FAT16
    Partition 1 does not end on cylinder boundary.

    Command (m for help): n
    Partition type:
       p   primary (1 primary, 0 extended, 3 free)
       e   extended
    Select (default p): p
    Partition number (1-4, default 2): 2
    First sector (62-15644671, default 62): 131136
    Last sector, +sectors or +size{K,M,G} (131136-15644671, default 15644671):
    Using default value 15644671

    Command (m for help): t
    Partition number (1-4): 2
    Hex code (type L to list codes): 8e
    Changed system type of partition 2 to 8e (Linux LVM)

    Command (m for help): p

    Disk /dev/sde: 8010 MB, 8010072064 bytes
    247 heads, 62 sectors/track, 1021 cylinders, total 15644672 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xaa802e39

       Device Boot      Start         End      Blocks   Id  System
    /dev/sde1   *          63      131135       65536+   6  FAT16
    Partition 1 does not end on cylinder boundary.
    /dev/sde2          131136    15644671     7756768   8e  Linux LVM
    Partition 2 does not end on cylinder boundary.

    Command (m for help): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.

    WARNING: If you have created or modified any DOS 6.x
    partitions, please see the fdisk manual page for additional
    information.
    Syncing disks.
    #
    You'll notice that I forced the 1st partition to start at sector 63 even though this was listed as no longer a requirement.  For whatever reason, I was unable to get a starting sector of 2048 (the default when not using DOS-compatability mode) to work.  Your mileage may vary.

    We'll want to format that first partition too:

    # mkfs -t vfat -F 16 -n uboot /dev/sde1
    mkfs.vfat 3.0.12 (29 Oct 2011)
    #
    Installing the boot files

    Now to save some time creating the boot partition, we're going to borrow MLO and uboot binaries from the Pandaboard validation image and a previous Fedora-13 Pandaboard image.  Download this image and copy the binaries to your local directory.  Now let's discover how the image is laid out:

    # fdisk -l validation-19102011.img

    Disk validation-19102011.img: 83 MB, 83886080 bytes
    255 heads, 63 sectors/track, 10 cylinders, total 163840 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000

                      Device Boot      Start         End      Blocks   Id  System
    validation-19102011.img1   *          63       80324       40131    c  W95 FAT32 (LBA)
    validation-19102011.img2           80325      144584       32130   83  Linux
    #
    From this, we can know that the uboot filesystem is located at 512 bytes per sector x 63 sectors = 32256 bytes.  Let's mount it and copy out the files we need.  All we really need is MLO and u-boot.bin, but we'll go ahead and grab the uImage for some quick testing too.

    # mkdir tmp
    # losetup --offset 32256 --show --find ./validation-19102011.img
    /dev/loop0
    # mount /dev/loop0 ./tmp
    # ls tmp
    MLO  u-boot.bin  uImage
    # cp tmp/MLO tmp/u-boot.bin tmp/uImage .
    # umount ./tmp
    # losetup -d /dev/loop0
    # rmdir tmp
    #


    Now, let's copy the MLO, u-boot.bin, and uImage files to the flash.  The MLO must be the first file written, and never be re-written, so we have to take special precautions to make sure that this happens correctly with no other writes.

    # mount /dev/sde1 /mnt/tmp
    # cp MLO /mnt/tmp/
    # sync
    # umount /mnt/tmp
    # mount /dev/sde1 /mnt/tmp
    # cp u-boot.bin uImage /mnt/tmp/
    # umount /mnt/tmp
    So this should be enough to at least test and make sure we laid it out right.  Let's eject the media and try booting it on the Pandaboard.

    # eject /dev/sde
    #
     A quick test

    Welcome to minicom 2.5

    OPTIONS: I18n
    Compiled on Apr  6 2011, 07:59:07.
    Port /dev/ttyUSB0

    Press CTRL-A Z for help on special keys



    Texas Instruments X-Loader 1.41 (Sep 29 2011 - 10:43:53)
    OMAP4460: 1.2 GHz capable SOM
    Starting OS Bootloader from MMC/SD1 ...


    U-Boot 1.1.4-gc1cd80bc-dirty (Oct 12 2011 - 17:56:27)

    Load address: 0x80e80000
    DRAM:  1024 MB
    Flash:  0 kB
    Using default environment

    In:    serial                                                                  
    Out:   serial                                                                  
    Err:   serial                                                                  
    Hit any key to stop autoboot:  0                                               
    mmc read: Invalid size                                                         
                                                                                   
    4020344 bytes read                                                             
    ## Booting image at 82000000 ...                                               
       Image Name:   Linux-3.0.4+                                                  
       Image Type:   ARM Linux Kernel Image (uncompressed)                         
       Data Size:    4020280 Bytes =  3.8 MB                                       
       Load Address: 80008000                                                      
       Entry Point:  80008000                                                      
       Verifying Checksum ... OK                                                   
    OK                                                                             
                                                                                   
    Starting kernel ...                                                            
                                                                                   
    Uncompressing Linux... done, booting the kernel.                               
    [    0.000000] Linux version 3.0.4+ (danders@ccd-dev) (gcc version 4.3.3 (Sourc1
    [    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387f
    ...
    [    8.663208] Waiting 3sec before mounting root device...                     
    [   12.223846]   b301           65536 mmcblk0p1 00000000-0000-0000-0000-00000001
    [   12.233856]   b302         7756768 mmcblk0p2 00000000-0000-0000-0000-00000002
    [   12.242279] No filesystem could mount root, tried:  ext3                    
    [   12.242279] Kernel panic - not syncing: VFS: Unable to mount root fs on unkn)
    ...

    If you saw your board get at least to the point of trying to mount the root and failing, this is a good sign.  This means that the MLO, u-boot.bin, and uImage files are all functional.

    Next step is to get it booting a Fedora image - that's the next post.

    Thursday, February 3, 2011

    GuruPlug Plus Gets a New OS - Redux, part 3 (Fedora ARM on microSDHC)

    Booting a Fedora ARM Root Filesystem from microSDHC
    (this continues from the previous post)

    Now we have a fabulous new kernel and shiny new uboot.  Time to get Fedora ARM working.

    Although Fedora 12 is quite old at this point, I'm going to use it since the ARM packages for both Fedora 13, 14, and rawhide are incomplete.

    My first thought was to partition the SD card with 3 partitions:  1) a partition to support /boot (about 512 MB), 2) an ext3 partition (about 2 GB) for the root filesystem (since you'll soon see that booting a logical volume is going to be too much work), and 3) a partition to be a physical volume for LVM for anything that I might want to mount later.

    In the end I decided that I really didn't need /boot separate unless I was going to also be using LVM for the root filesystem.  The problem is that the Linux kernel by itself can not boot a filesystem on a logical volume.  You have to boot Linux with an initrd which loads the LVM modules, then boots from the root filesystem.  That's just too much effort at this point so I'm going to make the root filesystem ext3.  And that means that I won't need a separate /boot to hold the kernels.

    This is what my microSDHC looks like:

    # fdisk -l /dev/sde



    Disk /dev/sde: 7973 MB, 7973371904 bytes

    246 heads, 62 sectors/track, 1021 cylinders, total 15572992 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk identifier: 0x5e8436c8



       Device Boot      Start         End      Blocks   Id  System

    /dev/sde1              62     2120027     1059983   83  Linux

    /dev/sde2         2120028    15572291     6726132   8e  Linux LVM

    #

    You can get a copy of the root filesystem here:  https://fedoraproject.org/wiki/Architectures/ARM/Using#Latest_Release:_Fedora_12

    Assuming you've mounted your root filesystem (sde1 in my example) under /media/sdhc, you'll need to copy the contents of the pre-built root filesystem onto your SDHC card

    # tar -jxf rootfs-f12.tar.bz2
    # cp -ar rootfs-f12/* /media/sdhc/

    Now we're going to need the major/minor numbers of the root filesystem to feed to the kernel through uboot.  But don't fret, it can be found quite easily if you don't know.  Go ahead and test boot the kernel and let it tell you what the available major/minors are:

    Marvell>> nand read.e 0x6400000 0x100000 0x400000                              
                                                                                   
    NAND read: device 0 offset 0x100000, size 0x400000                             
     4194304 bytes read: OK                                                        
    Marvell>> setenv bootargs console=ttyS0,115200 rootdelay=10                    
    Marvell>> bootm 0x6400000                                                      
    ## Booting kernel from Legacy Image at 06400000 ...                            
       Image Name:   Linux-2.6.36                                                  
       Image Type:   ARM Linux Kernel Image (uncompressed)                         
       Data Size:    2947644 Bytes =  2.8 MB                                       
       Load Address: 00008000                                                      
       Entry Point:  00008000                                                      
       Verifying Checksum ... OK                                                   
       Loading Kernel Image ... OK                                                 
    OK                                                                             
                                                                                   
    Starting kernel ...                                                            
                                                                                   
    Uncompressing Linux... done, booting the kernel.                               
    Linux version 2.6.36 (kelly@speedy) (gcc version 4.4.3 (Sourcery G++ Lite er) )0
    ...
    VFS: Cannot open root device "(null)" or unknown-block(2,0)                    
    Please append a correct "root=" boot option; here are the available partitions:
    1f00            1024 mtdblock0 (driver?)                                       
    1f01            4096 mtdblock1 (driver?)                                       
    1f02          519168 mtdblock2 (driver?)                                       
    0810         7786496 sdb driver: sd                                            
      0811         1059983 sdb1                                                    
      0812         6726132 sdb2                                                    
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)


    From this boot attempt, we can see that our SDHC card is sdb and the root partition that I created is sdb1 which has a major/minor of 0811.


    With this info, we can now setup the uboot environment to boot this filesystem:

    Marvell>> editenv x_bootargs_root                                              
    edit: ubi.mtd=2 root=0811 rootdelay=10                                         
    Marvell>> saveenv                                                              
    Saving Environment to NAND...                                                  
    Erasing Nand...                                                                
    Erasing at 0x40000 -- 100% complete.                                           
    Writing to Nand... done                                                        
    Marvell>> reset                                                                
    resetting ...


    With a little luck, you'll now now a login prompt to your new Fedora 12 ARM system (default root password: "fedoraarm").

    Fedora release 12 (Constantine)                                                
    Kernel 2.6.36 on an armv5tel (/dev/ttyS0) 


    There was probably a lot of complaints about modules, which you can fix by installing the kernel modules that you got from the same place as your kernel.  These should be untarred to the / directory (which installs them in /lib/modules).

    Note: The pre-built rootfs you just booted has a guest user with no password.  Consider the security implications of this for your use case and take appropriate action.

    Additional packages I needed to install to meet my goals:
    • cryptsetup-luks
    • device-mapper
    • lvm2
    • nfs-utils
    • rpcbind
    Also, if you're trying to use the plug as a NFS server like I am, the kernel that is installed has the sunrpc functionality built in whereas Fedora assumes that it's a module to be loaded.  This will cause the startup scripts to emit an error.  This can be worked around by adding the following line to /etc/fstab:

    rpc_pipefs              /var/lib/nfs/rpc_pipefs rpc_pipefs defaults     0 0

    Saturday, October 9, 2010

    GuruPlug Plus Gets a New OS - Redux, part 2 (uboot/kernel)

    Flashing a new uboot & kernel
    (this continues from the previous post)
    Hit any key to stop the autoboot.  Since they factory uboot and kernel images have incorrect arcNumbers, flashing one and not the other will cause the kernel to not boot.  Because of this we're going to go ahead and flash both.

    In order to do this, you'll need:
    • a working tftp server (in Fedora 'yum install tftp-server' and make sure xinetd is reloaded and running).  I'm using a tftp server because the GuruPlug is picky about USB keys.
    • either no firewall or configuration settings for tftp (you can drop the firewall settings temporarily with 'sudo server iptables stop' and when you're finished 'sudo service iptables start'
    • A new uboot image.  I choose this one mostly for convenience.  In Fedora, this should be copied to /var/lib/tftpboot.
    • A new kernel image.  I choose this one mostly for convenience.  The only thing that I have found that I don't care for in this image is the kernel timestamps, but I can live with that for now.  In Fedora, this should be copied to /var/lib/tftpboot.
    First thing we will do is set the serverip and ipaddr variables.  Serverip is the IP address of the tftp server, and ipaddr is the GuruPlug address.  They need to be on the same subnet.
    Marvell>> setenv serverip 192.168.1.10                                        
    Marvell>> setenv ipaddr 192.168.1.11                                           
    Marvell>>
    Now we're ready to load the uboot image and flash it to nand memory.
    Marvell>> tftp 0x6400000 uboot.guruplug.bin                                    
    Using egiga0 device                                                            
    TFTP from server 192.168.1.10; our IP address is 192.168.1.11                  
    Filename 'uboot.guruplug.bin'.                                                 
    Load address: 0x6400000                                                        
    Loading: #############                                                         
    done                                                                           
    Bytes transferred = 180220 (2bffc hex)                                         
    Marvell>> nand erase 0x0 0x100000                                              
                                                                                   
    NAND erase: device 0 offset 0x0, size 0x100000                                 
    Erasing at 0xe0000 -- 100% complete.                                           
    OK                                                                             
    Marvell>> nand write.e 0x6400000 0x0 0x100000                                  
                                                                                   
    NAND write: device 0 offset 0x0, size 0x100000                                 
     1048576 bytes written: OK                                                     
    Marvell>>
    Ok, now we're ready to load the new kernel image and flash it to nand memory.

    Marvell>> tftp 0x6400000 sheeva-2.6.35.7-uImage                                
    Using egiga0 device                                                            
    TFTP from server 192.168.1.20; our IP address is 192.168.1.30                  
    Filename 'sheeva-2.6.35.7-uImage'.                                             
    Load address: 0x6400000                                                        
    Loading: #################################################################     
             #################################################################     
             #############################################################         
    done                                                                           
    Bytes transferred = 2798652 (2ab43c hex)                                        Marvell>> nand erase 0x100000 0x400000                                         
                                                                                   
    NAND erase: device 0 offset 0x100000, size 0x400000                            
    Erasing at 0x4e0000 -- 100% complete.                                          
    OK                                                                             
    Marvell>> nand write.e 0x6400000 0x100000 0x400000                             
                                                                                   
    NAND write: device 0 offset 0x100000, size 0x400000                            
     4194304 bytes written: OK                                                     
    Marvell>>
    At this point you'll want to reboot by using the reset command.  There are a couple things to be aware of at this point.  These are completely normal:  You'll get a CRC error for your environment and your MAC addresses are likely lost for your ethernet interfaces and you'll have to fix that.  We'll do that on this first boot.
    Marvell>> reset                                                                
    resetting ...                                                                  
                                                                                   
                                                                                   
    U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41)                         
    Marvell-GuruPlug                                                               
                                                                                   
    SoC:   Kirkwood 88F6281_A0                                                     
    DRAM:  512 MB                                                                  
    NAND:  512 MiB                                                                 
    *** Warning - bad CRC or NAND, using default environment                       
                                                                                   
    In:    serial                                                                  
    Out:   serial                                                                  
    Err:   serial                                                                  
    Net:   egiga0, egiga1                                                          
    88E1121 Initialized on egiga0                                                  
    88E1121 Initialized on egiga1                                                  
    Hit any key to stop autoboot:  0                                               
    Marvell>> setenv                                                               
    setenv - set environment variables                                             
                                                                                   
    Marvell>> printenv                                                             
    bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${;
    bootdelay=3                                                                    
    baudrate=115200                                                                
    x_bootcmd_usb=usb start                                                        
    x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000                       
    x_bootargs=console=ttyS0,115200                                                
    x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs                    
    stdin=serial                                                                   
    stdout=serial                                                                  
    stderr=serial                                                                  
    ethaddr=03:41:7d:ab:b4:7c                                                      
    ethact=egiga0                                                                  
    eth1addr=04:41:7d:ab:b4:7d                                                     
                                                                                   
    Environment size: 423/131068 bytes                                             
    Marvell>>

     Yep, just as predicted.  Let's fix those up and reboot:

    Marvell>> editenv ethaddr                                                      
    edit: 11:43:1c:77:a3:bb                                                        
    Marvell>> editenv eth1addr                                                     
    edit: 11:43:1c:77:a3:bc                                                        
    Marvell>> saveenv                                                              
    Saving Environment to NAND...                                                  
    Erasing Nand...                                                                
    Erasing at 0x40000 -- 100% complete.                                           
    Writing to Nand... done                                                        
    Marvell>> reset                                                                
    resetting ...                                                                  
                                                                                   
    U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41)                        
    Marvell-GuruPlug                                                               
                                                                                   
    SoC:   Kirkwood 88F6281_A0                                                     
    DRAM:  512 MB                                                                  
    NAND:  512 MiB                                                                 
    In:    serial                                                                  
    Out:   serial                                                                  
    Err:   serial                                                                  
    Net:   egiga0, egiga1                                                          
    88E1121 Initialized on egiga0                                                  
    88E1121 Initialized on egiga1                                                  
    Hit any key to stop autoboot:  0                                               
    (Re)start USB...                                                               
    USB:   Register 10011 NbrPorts 1                                               
    USB EHCI 1.00                                                                  
    scanning bus for devices... 3 USB Device(s) found                              
           scanning bus for storage devices... Device NOT ready                    
       Request Sense returned 02 3A 00                                             
    1 Storage Device(s) found                                                      
                                                                                   
    NAND read: device 0 offset 0x100000, size 0x400000                             
     4194304 bytes read: OK                                                        
    ## Booting kernel from Legacy Image at 06400000 ...                            
       Image Name:   Linux-2.6.35.7                                                
       Image Type:   ARM Linux Kernel Image (uncompressed)                         
       Data Size:    2798588 Bytes =  2.7 MB                                       
       Load Address: 00008000                                                      
       Entry Point:  00008000                                                      
       Verifying Checksum ... OK                                                   
       Loading Kernel Image ... OK                                                 
    OK                                                                             
                                                                                   
    Starting kernel ...                                                            
                                                                                   
    Uncompressing Linux... done, booting the kernel.                               
    [    0.000000] Linux version 2.6.35.7 (kelly@speedy) (gcc version 4.4.3 (Source0
    [    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397
    [    0.000000] CPU: VIVT data cache, VIVT instruction cache                    
    [    0.000000] Machine: Marvell GuruPlug Reference Board                       
    [    0.000000] Memory policy: ECC disabled, Data cache writeback               
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa8
    [    0.000000] Kernel command line: console=ttyS0,115200 ubi.mtd=2 root=ubi0:ros
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)             
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) 
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)  
    [    0.000000] Memory: 256MB 256MB = 512MB total                               
    [    0.000000] Memory: 513680k/513680k available, 10608k reserved, 0K highmem  
    [    0.000000] Virtual kernel memory layout:                                   
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)               
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)               
    [    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)               
    [    0.000000]     vmalloc : 0xe0800000 - 0xfe800000   ( 480 MB)               
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)               
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)               
    [    0.000000]       .init : 0xc0008000 - 0xc002b000   ( 140 kB)               
    [    0.000000]       .text : 0xc002b000 - 0xc04fd000   (4936 kB)               
    [    0.000000]       .data : 0xc051e000 - 0xc054e7e0   ( 194 kB)               
    [    0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, 1
    [    0.000000] Hierarchical RCU implementation.                                
    [    0.000000]  RCU-based detection of stalled CPUs is disabled.               
    [    0.000000]  Verbose stalled-CPUs detection is disabled.                    
    [    0.000000] NR_IRQS:114                                                     
    [    0.000000] Console: colour dummy device 80x30                              
    [   21.474963] Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)        
    [   21.714888] pid_max: default: 32768 minimum: 301                            
    [   21.714954] Mount-cache hash table entries: 512                             
    [   21.715203] CPU: Testing write buffer coherency: ok                         
    [   21.717038] NET: Registered protocol family 16                              
    [   21.718247] Kirkwood: MV88F6281-A0, TCLK=200000000.                         
    [   21.718261] Feroceon L2: Cache support initialised.                         
    [   21.732685] bio: create slab at 0                                   
    [   21.733189] vgaarb: loaded                                                  
    [   21.733691] SCSI subsystem initialized                                      
    [   21.734415] usbcore: registered new interface driver usbfs                  
    [   21.734671] usbcore: registered new interface driver hub                    
    [   21.734847] usbcore: registered new device driver usb                       
    [   21.737378] cfg80211: Calling CRDA to update world regulatory domain        
    [   21.737567] Switching to clocksource orion_clocksource                      
    [   21.751467] NET: Registered protocol family 2                               
    [   21.751664] IP route cache hash table entries: 4096 (order: 2, 16384 bytes) 
    [   21.752354] TCP established hash table entries: 16384 (order: 5, 131072 byte)
    [   21.752708] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)      
    [   21.752912] TCP: Hash tables configured (established 16384 bind 16384)      
    [   21.752922] TCP reno registered                                             
    [   21.752933] UDP hash table entries: 256 (order: 0, 4096 bytes)              
    [   21.752956] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)         
    [   21.753095] NET: Registered protocol family 1                               
    [   21.753340] RPC: Registered udp transport module.                           
    [   21.753351] RPC: Registered tcp transport module.                           
    [   21.753360] RPC: Registered tcp NFSv4.1 backchannel transport module.       
    [   21.836710] JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.            
    [   21.837960] JFS: nTxBlock = 4013, nTxLock = 32105                           
    [   21.839308] msgmni has been set to 1003                                     
    [   21.841654] alg: No test for stdrng (krng)                                  
    [   21.841700] io scheduler noop registered                                    
    [   21.841710] io scheduler deadline registered                                
    [   21.841811] io scheduler cfq registered (default)                           
    [   21.849009] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled        
    [   21.849872] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A   
    [   22.203935] console [ttyS0] enabled                                         
    [   22.215396] brd: module loaded                                              
    [   22.222241] loop: module loaded                                             
    [   22.226963] NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND )
    [   22.235759] Scanning device for bad blocks                                  
    [   22.308974] Bad eraseblock 1843 at 0x00000e660000                           
    [   22.352006] Bad eraseblock 2867 at 0x000016660000                           
    [   22.398578] Bad eraseblock 3986 at 0x00001f240000                           
    [   22.407376] Creating 3 MTD partitions on "orion_nand":                      
    [   22.412553] 0x000000000000-0x000000100000 : "u-boot"                        
    [   22.418708] 0x000000100000-0x000000500000 : "uImage"                        
    [   22.424758] 0x000000500000-0x000020000000 : "root"                          
    [   22.431735] UBI: attaching mtd2 to ubi0                                     
    [   22.435595] UBI: physical eraseblock size:   131072 bytes (128 KiB)         
    [   22.441926] UBI: logical eraseblock size:    129024 bytes                   
    [   22.447354] UBI: smallest flash I/O unit:    2048                           
    [   22.452095] UBI: sub-page size:              512                            
    [   22.456737] UBI: VID header offset:          512 (aligned 512)              
    [   22.462609] UBI: data offset:                2048                           
    [   23.267491] UBI: attached mtd2 to ubi0                                      
    [   23.271299] UBI: MTD device name:            "root"                         
    [   23.276199] UBI: MTD device size:            507 MiB                        
    [   23.281201] UBI: number of good PEBs:        4053                           
    [   23.285931] UBI: number of bad PEBs:         3                              
    [   23.290407] UBI: max. allowed volumes:       128                            
    [   23.295043] UBI: wear-leveling threshold:    4096                           
    [   23.299780] UBI: number of internal volumes: 1                              
    [   23.304243] UBI: number of user volumes:     1                              
    [   23.308718] UBI: available PEBs:             0                              
    [   23.313181] UBI: total number of reserved PEBs: 4053                        
    [   23.318181] UBI: number of PEBs reserved for bad PEB handling: 40           
    [   23.324299] UBI: max/mean erase counter: 2/0                                
    [   23.328601] UBI: image sequence number: -1                                  
    [   23.332760] UBI: background thread "ubi_bgt0d" started, PID 465             
    [   23.339820] MV-643xx 10/100/1000 ethernet driver version 1.4                
    [   23.345692] mv643xx_eth smi: probed                                         
    [   23.351963] net eth0: port 0 with MAC address f0:ad:4e:00:17:93             
    [   23.360584] net eth1: port 0 with MAC address f0:ad:4e:00:17:94             
    [   23.366691] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver      
    [   23.373333] orion-ehci orion-ehci.0: Marvell Orion EHCI                     
    [   23.378646] orion-ehci orion-ehci.0: new USB bus registered, assigned bus nu1
    [   23.407617] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000              
    [   23.427615] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00             
    [   23.434187] hub 1-0:1.0: USB hub found                                      
    [   23.437992] hub 1-0:1.0: 1 port detected                                    
    [   23.442558] Initializing USB Mass Storage driver...                         
    [   23.447668] usbcore: registered new interface driver usb-storage            
    [   23.453703] USB Mass Storage support registered.                            
    [   23.458519] usbcore: registered new interface driver ums-datafab            
    [   23.464660] usbcore: registered new interface driver ums-freecom            
    [   23.470864] usbcore: registered new interface driver ums-jumpshot           
    [   23.477098] usbcore: registered new interface driver ums-sddr09             
    [   23.483228] usbcore: registered new interface driver ums-sddr55             
    [   23.489558] mice: PS/2 mouse device common for all mice                     
    [   23.495335] rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0              
    [   23.501453] i2c /dev entries driver                                         
    [   23.505576] cpuidle: using governor ladder                                  
    [   23.510182] cpuidle: using governor menu                                    
    [   23.514376] sdhci: Secure Digital Host Controller Interface driver          
    [   23.520638] sdhci: Copyright(c) Pierre Ossman                               
    [   23.525390] mmc0: mvsdio driver initialized, lacking card detect (fall back )
    [   23.534529] mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver        
    [   23.540973] mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver        
    [   23.587646] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )                       
    [   23.595288] mmc0: new high speed SDIO card at address 0001                  
    [   23.627645] mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )                  
    [   23.667643] mv_xor mv_xor.2: Marvell XOR: ( xor cpy )                       
    [   23.707646] mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )                  
    [   23.717283] usbcore: registered new interface driver hiddev                 
    [   23.723063] usbcore: registered new interface driver usbhid                 
    [   23.728769] usbhid: USB HID core driver                                     
    [   23.732622] oprofile: hardware counters not available                       
    [   23.737754] oprofile: using timer interrupt.                                
    [   23.743491] TCP cubic registered                                            
    [   23.746741] NET: Registered protocol family 17                              
    [   23.751414] lib80211: common routines for IEEE802.11 drivers                
    [   23.757700] usb 1-1: new high speed USB device using orion-ehci and address 2
    [   23.765796] rtc-mv rtc-mv: setting system clock to 2010-09-30 17:15:40 UTC ()
    [   23.872392] UBIFS: mounted UBI device 0, volume 0, name "rootfs"            
    [   23.878461] UBIFS: file system size:   515837952 bytes (503748 KiB, 491 MiB,)
    [   23.886505] UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LE)
    [   23.893864] UBIFS: media format:       w4/r0 (latest is w4/r0)              
    [   23.899735] UBIFS: default compressor: zlib                                 
    [   23.903934] UBIFS: reserved for root:  0 bytes (0 KiB)                      
    [   23.909880] VFS: Mounted root (ubifs filesystem) on device 0:13.            
    [   23.915947] Freeing init memory: 140K                                       
    [   23.967703] hub 1-1:1.0: USB hub found                                      
    [   23.971764] hub 1-1:1.0: 4 ports detected                                   
    modprobe: FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such filey
                                                                                   
    INIT: version 2.86 booting                                                     
    [   24.267939] usb 1-1.1: new high speed USB device using orion-ehci and addres3
    [   24.417916] scsi0 : usb-storage 1-1.1:1.0                                   
    Starting the hotplug events dispatcher: udevd.                                 
    Synthesizing the initial hotplug events...[   25.448862] scsi 0:0:0:0: Direct-A0
    [   25.487658] sd 0:0:0:0: [sda] Attached SCSI removable disk                  
    [   25.534923] sd 0:0:0:0: Attached scsi generic sg0 type 0                    
    done.                                                                          
    Waiting for /dev to be fully populated...[   25.643065] scsi 0:0:0:1: Direct-Ac0
    [   25.856648] sd 0:0:0:1: Attached scsi generic sg1 type 0                    
    [   25.862808] sd 0:0:0:1: [sdb] 15572992 512-byte logical blocks: (7.97 GB/7.4)
    [   25.927690] sd 0:0:0:1: [sdb] Write Protect is off                          
    [   25.932528] sd 0:0:0:1: [sdb] Assuming drive cache: write through           
    [   26.101923] sd 0:0:0:1: [sdb] Assuming drive cache: write through           
    [   26.108161]  sdb: sdb1 sdb2                                                 
    [   26.256963] sd 0:0:0:1: [sdb] Assuming drive cache: write through           
    [   26.310164] sd 0:0:0:1: [sdb] Attached SCSI removable disk                  
    [   62.691332] EXT3-fs: barriers not enabled                                   
    [   62.697559] kjournald starting.  Commit interval 5 seconds                  
    [   62.757697] EXT3-fs (sdb1): using internal journal                          
    [   62.762537] EXT3-fs (sdb1): mounted filesystem with writeback data mode     
    done.                                                                          
    Setting the system clock.                                                      
    Activating swap...done.                                                        
    Setting the system clock.                                                      
    Cleaning up ifupdown....                                                       
    Loading kernel modules...FATAL: Could not load /lib/modules/2.6.35.7/modules.dey
    Checking file systems...fsck 1.41.3 (12-Oct-2008)                              
    done.                                                                          
    Setting kernel variables (/etc/sysctl.conf)...done.                            
    Mounting local filesystems...done.                                             
    Activating swapfile swap...done.                                               
    Setting up networking....                                                      
    Configuring network interfaces...done.                                         
    Starting portmap daemon....                                                    
    Setting up ALSA...done (none loaded).                                          
    INIT: Entering runlevel: 2                                                     
    Starting enhanced syslogd: rsyslogd.                                           
    Starting system message bus: dbus.                                             
    Starting OpenBSD Secure Shell server: sshd.                                    
    Starting MySQL database server: mysqld.                                        
    Checking for corrupt, not cleanly closed and upgrade needing tables..          
    Starting MTA: exim4.                                                           
    ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system pos!
    Starting Network Interface Plugging Daemon: eth0 eth1.                         
    Starting web server: lighttpd.                                                 
    Starting Samba daemons: nmbd smbd.                                             
    Starting file alteration monitor: FAM.                                         
    Starting NTP server: ntpd.                                                     
    [   75.207567] warning: `ntpd' uses 32-bit capabilities (legacy support in use)
    Starting periodic command scheduler: crond.                                    
    uap0: error fetching interface information: Device not found                   
    FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy
    SIOCSIFADDR: No such device                                                    
    uap0: ERROR while getting interface flags: No such device                      
    uap0: ERROR while getting interface flags: No such device                      
    No such device                                                                 
    ERR:UAPHOSTCMD is not supported by uap0                                        
    ERR:Command sending failed!                                                    
    No such device                                                                 
    ERR:UAPHOSTCMD is not supported by uap0                                        
    ERR:Command sending failed!                                                    
    FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy
    iptables v1.4.2: can't initialize iptables table `nat': iptables who? (do you n)
    Perhaps iptables or your kernel needs to be upgraded.                          
    FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy
    iptables v1.4.2: can't initialize iptables table `nat': iptables who? (do you n)
    Perhaps iptables or your kernel needs to be upgraded.                          
    Starting very small DHCP server: udhcpd (v0.9.9-pre) started                   
    Unable to open /var/lib/udhcpd.leases for reading                              
    SIOCGIFADDR failed, is the interface up and configured?: No such device        
    Starting DNS forwarder and DHCP server: dnsmasq.                               
    FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy
    iptables v1.4.2: can't initialize iptables table `filter': iptables who? (do yo)
    Perhaps iptables or your kernel needs to be upgraded.                          
    ERROR: Module btmrvl_sdio does not exist in /proc/modules                      
    ERROR: Module btmrvl does not exist in /proc/modules                           
    Starting bluetooth: bluetoothd.                                                
    FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy
    [   76.187926] eth0: link up, 1000 Mb/s, full duplex, flow control disabled    
    Can't open HCI socket.: Address family not supported by protocol               
    Can't open HCI socket.: Address family not supported by protocol               
                                                                                   
    Debian GNU/Linux 5.0 guruplug-debian ttyS0                                     
                                                                                   
    guruplug-debian login:                                                                              

    If your intent was only to upgrade uboot and the kernel, I have good new for you - you're mostly done.  If you want to keep Debian, just login with root/nosoup4u and install the kernel modules that were in the same directory as the kernel (untar them to /).