Welcome! Log In Create A New Profile

Advanced

HowTo: Mainline/Minimal Wheezy Install via Debian Installer/Netboot

Posted by davygravy 
HowTo: Mainline/Minimal Wheezy Install via Debian Installer/Netboot
March 07, 2012 05:36PM
Mainline Minimalist Wheezy Installation via Debian Installer/Netboot
(right now this is for just PogoE02, Dockstar is essentially the same, minus the machid number [can use Dockstar's machid]; also this has been tested on a Pogoplug V4 using a special PogoV4-only U-Boot that supports MMC/SD cards - the installer detected the SD card and handled it correctly)

This brief HowTo shows a non-Doozian, purely Debian approach to installing Wheezy via Netboot on a Pogoplug E02/V2. Jeff's setup is by far still my favorite, but since I've tested this Debian Installer and it worked well, I thought that someone might benefit from having another method documented here, so here goes:

0. Assumptions: You have the following:
  • a pogoplug E02
  • a basic working knowledge of Linux and CLI
  • a serial cable and know how to access the serial port on your Pogoplug E02
  • a USB Flash Drive or USB HDD
  • the sole responsibility for not bricking your Pogoplug E02 (or other device)

1. On a desktop/laptop/other computer, set up the following:
A. A tftp server. In the root directory for the tftp server, place the following two files (after untarring):
uImage-sheeva-wheezy - old : see hint below
uInitrd-sheeva-wheezy - old : see hint below
These were taken from here: http://d-i.debian.org/daily-images/armel/
but certainly newer updated installer materials are added frequently, so update if you wish. HINT: Use the uImage & initrd from here : http://d-i.debian.org/daily-images/armel/daily/kirkwood/netboot/marvell/sheevaplug/


B. A USB-serial console cable, connected to your Pogoplug E02, and use minicom or some other equivalent program so you have serial access to your Pogoplug.


2. Make sure you have a version of u-boot installed that will work with 3.2 and newer kernels, ie. it needs to be built w/ the L2-CacheDisable patch.

If you need one that has this capability, [ u-boot_032012_pogoplugE02-debian ] has the correct code in it to disable the caches when decompressing the kernel. This u-boot also has the default environment values set to automatically boot a normal Debian installation. Note that this u-boot is a mainline-flavor binary : its env vars are very minimal, and it uses the mainline settings for /etc/fw_env.config:
# MTD device name       Device offset   Env. size       Flash sector size
/dev/mtd0               0x60000         0x20000         0x20000

Warning: Flashing anything to your computer equipment can lead to minor or major problems. This has never happened to me, but I make no guarantees for you. Proceed with caution and at your own risk.

The new uboot can be installed like this:
A. Download and untar u-boot_032012_pogoplugE02-debian to your tftp server's root directory.

B. In the console window, execute the following commmands:
tftpboot 0x800000 u-boot_032012_pogoplugE02-debian
nand erase 0x0 0x80000
nand write.e 0x800000 0x0 0x80000
If all has gone well, you'll see something like:
PogoE02> tftpboot 0x800000 u-boot_032012_pogoplugE02-debian
Using egiga0 device
TFTP from server 192.168.11.149; our IP address is 192.168.11.150
Filename 'u-boot_032012_pogoplugE02-debian'.
Load address: 0x800000
Loading: ####################################
done
Bytes transferred = 524288 (80000 hex)
PogoE02> nand erase 0x0 0x80000

NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
PogoE02> nand write.e 0x800000 0x0 0x80000

NAND write: device 0 offset 0x0, size 0x80000
 524288 bytes written: OK
If everything looks good, then execute
reset

C. You should observe the following, and yes, hit any key to stop the boot process:
U-Boot 2011.12-00447-gfca94c3-dirty (Mar 04 2012 - 21:39:45)
Pogoplug E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0 
PogoE02>



3. Power up your Pogoplug and hit a key to stop the boot process.

Set the following env variables: ethaddr, ipaddr, serverip, machid
  • ethaddr will look something like 00:25:31:02:CD:67 (but look at the bottom of your pogoplug's housing/stand to see _your_ MAC/ether address - each machine has a unique ethaddr)
  • serverip will be the ip address of your tftp server that you set up in step 1
  • ipaddr will be an unused ip address for your pogoplug to use while running u-boot
  • machid _must_ be set to 831
After entering each of of those values, execute the command saveenv to make the values persistent.
setenv ethaddr 00:25:31:02:CD:67
setenv ipaddr 192.168.11.150
setenv serverip 192.168.11.149
setenv machid 831
saveenv
After executing saveenv, you'll see this sort of output:
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x60000 -- 100% complete.
Writing to Nand... done

4. Using the tftp client in u-boot, pull in and load the uImage kernel and the uInitrd ramdisk image.
tftpboot 0x00800000 uImage-sheeva-wheezy
tftpboot 0x01100000 uInitrd-sheeva-wheezy

You should see something like this:
PogoE02> tftpboot 0x00800000 uImage-sheeva-wheezy
Using egiga0 device
TFTP from server 192.168.11.149; our IP address is 192.168.11.150
Filename 'uImage-sheeva-wheezy'.
Load address: 0x800000
Loading: #################################################################
         ##########################################
done
Bytes transferred = 1570560 (17f700 hex)
PogoE02> tftpboot 0x01100000 uInitrd-sheeva-wheezy
Using egiga0 device
TFTP from server 192.168.11.149; our IP address is 192.168.11.150
Filename 'uInitrd-sheeva-wheezy'.
Load address: 0x1100000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###########################################################
done
Bytes transferred = 4678867 (4764d3 hex)
Then set bootarg as needed, and boot. (do not make these persistent by executing saveenv, as they are needed only for the install process)
setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most
bootm 0x00800000 0x01100000


5. Follow through the install process. You will need to have a USB drive ( USB flash or hdd) plugged into your Pogoplug_E02. This will follow the standard Debian Install process. When formatting your USB drive, chose ext2 or 3 for the / partition. Don't chose ext4 for /, as it may not be well supported currently in UBoot. Ext4 should be fine for any share or extra partition, though. When choosing packages, make sure you install ssh. It will take probably between 15 to 20 minutes, depending on the speed of your hard drive and internet connection. After it finishes, it will reboot.



6. When it reboots, you may have to change some of the env var values in U-boot.
*If you installed the uboot above [ u-boot_032012_pogoplugE02-debian ] , then the default setting in the u-boot env values will allow it to boot without any changes. No further changes need to be made in this case.

*If you installed any other u-boot binary, then make sure that the env vars contain the following:
setenv bootargs_console console=ttyS0,115200
setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00800000 /uImage; ext2load usb 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0x00800000 0x01100000'
and of course make them persistent by executing
saveenv
Once this is all set up and arranged, from within u-boot's command line interface, execute a
reset


Your Pogoplug will now boot into the new Wheezy install.


6. Log in via console, or via network if you wish (though you'll have to determine your IP address via scanner, etc.) Run apt-get update, install u-boot-tools and create /etc/fw_env.config"
# MTD device name       Device offset   Env. size       Flash sector size
/dev/mtd0               0x60000         0x20000         0x20000
This will allow you to change u-boot's env var values from while booted in Linux. Exercise caution while changing any of these. If in doubt, read the u-boot documentation at http://www.denx.de/wiki/U-Boot/WebHome .




Your minimal Wheezy Armel install is now done, enjoy.

=====================================================



Edited 20 time(s). Last edit at 03/30/2012 02:22PM by davygravy.
Howdy davygravy

I normally cross-install Wheezy under QEMU for the Dockstar to a USB flash drive. I take it that you are installing Wheezy to a USB device and that apart from the device specific u-boot and machid this method is equally applicable to the Dockstar?

I know this is still a work in progress: the more methods of installing Debian on the Pogoplug, Dockstar, etc; the merrier.
Re: HowTo: Mainline/Minimal Wheezy Install via Debian Installer/Netboot
March 08, 2012 08:34PM
Robert Mugabe Wrote:
-------------------------------------------------------
> Howdy davygravy

Howdy back @ u, Mugabe!

> I normally cross-install Wheezy under QEMU for the
> Dockstar to a USB flash drive. I take it that you
> are installing Wheezy to a USB device and that
> apart from the device specific u-boot and machid
> this method is equally applicable to the Dockstar?

It certainly should be. There is a writeup for it here: http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html

> I know this is still a work in progress:
> the more methods of installing Debian on the
> Pogoplug, Dockstar, etc; the merrier.

I've submitted patches to u-boot for support on the Pogoplug_E02. This u-boot uses that mainline/vanilla code with no mods/changes.

The 2012.03 U-Boot release should be just around the corner. That will be an opportune time to have all of the U-Boot binaries updated, so they can boot the newer 3.2 & higher kernels w/o patches.

=====================================================



Edited 1 time(s). Last edit at 03/08/2012 08:41PM by davygravy.
Thanks for all your effort! Just wanted to let you know that your work is appreciated.
Re: HowTo: Mainline/Minimal Wheezy Install via Debian Installer/Netboot
March 27, 2012 02:51PM
Howdy davygravy,

Great write up as usual.

Do you know if this can be accomplished using net console?

Regards,

Michael Crump
Re: HowTo: Mainline/Minimal Wheezy Install via Debian Installer/Netboot
March 27, 2012 03:31PM
Yup, doing it right now. Just read the direction carefully through before you actually do it, making sure you understand each step in advance. Then actually try the process, if you are at all new to it. (...just my suggestion...)

=====================================================
Re: HowTo: Mainline/Minimal Wheezy Install via Debian Installer/Netboot
March 30, 2012 02:28PM
This concept works on the Pogoplug V4 also, using the new u-boot that I created for it that enables MMC/SD cards in u-boot. This same u-boot should probably work on a Pogoplug Mobile. Don't attempt to use the u-boot for the PogoE02... instead, you'd have to use the u-boot mentioned here http://forum.doozan.com/read.php?3,7477,7477#msg-7477 , and have serial access - I don't have the netconsole scripts included into the default environment, though the underpinnings/infrastructure for it is there.

setenv bootargs_console console=ttyS0,115200
setenv bootcmd_mmc 'mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000'
saveenv

=====================================================



Edited 1 time(s). Last edit at 04/09/2012 04:28PM by davygravy.
davygravy Wrote:
-------------------------------------------------------
> This works on the Pogoplug V4 also, using the new
> u-boot that I created for it that enables MMC/SD
> cards in u-boot. This same u-boot should probably
> work on a Pogoplug Mobile

Great progress! I would love to give it a try on my pogo V4 as well. Before bricking it by installing the wrong uboot I would like to ask if the uboot linked above "u-boot_032012_pogoplugE02-debian" does have the SD/MMC boot features needed in V4/mobile inside? Or do you reference another image for that?
Re: HowTo: Mainline/Minimal Wheezy Install via Debian Installer/Netboot
April 09, 2012 04:31PM
docbee Wrote:
-------------------------------------------------------
> Great progress! I would love to give it a try on
> my pogo V4 as well. Before bricking it by
> installing the wrong uboot I would like to ask if
> the uboot linked above
> "u-boot_032012_pogoplugE02-debian" does have the
> SD/MMC boot features needed in V4/mobile inside?
> Or do you reference another image for that?

Definitely don't use the PogoE02 image, instead you would have to use this one: http://forum.doozan.com/read.php?3,7477,7477#msg-7477

I don't make any guarantees about it still working w/ the original software (Pogoplug cloud software) that it comes with. Mine was nonfunctional when I bought it (got it for cheap, but it had been tampered with by a previous owner/user).

=====================================================
Re: HowTo: Mainline/Minimal Wheezy Install via Debian Installer/Netboot
August 03, 2012 05:56AM
davygravy Wrote:
-------------------------------------------------------
> Mainline Minimalist Wheezy Installation via Debian Installer/Netboot
> (right now this is for just PogoE02, Dockstar is essentially the same, minus the machid number [can use Dockstar's machid]
> ......
> 2. Make sure you have a version of u-boot
> installed that will work with 3.2 and newer
> kernels, ie. it needs to be built w/ the
> L2-CacheDisable patch.
> ......

Hi Davy,

2 quick questions :

I've the following u-boot version installed :

u-boot>> version

U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStar
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
u-boot>>

Is it compatible with the requirement ? (I think but...)

I was unable to find the right machid for Dockstar. Could you give me the value ?

Best regards

Marc



Edited 1 time(s). Last edit at 08/03/2012 05:58AM by cuagn.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: