Talk:Installing Debian To Flash

From PlugWiki
Jump to: navigation, search

Should there be a 'reset' command at the end of the Burn a New Kernel section? I went straight through to the Run the Debian Installer section and it hung for me. After power off/on I resumed at the Run the Debian Installer section without issue.

Contents

2011-01-03 Run the Debian Installer

U-Boot 1.1.4 (Dec 27 2009 - 22:03:21) Marvell version: 3.4.27
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFEE0
Soc: 88F6281 A1 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz
DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000 size 256MB
DRAM CS[1] base 0x10000000 size 256MB
DRAM Total size 512MB 16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
Flash: 0 kB

That U-Boot output seems to suggest that RAM addresses 0x0 to 0x800000 are reserved for the boot loader, and nothing should be written below 0x800000.

Suggest replacing

   == Run the Debian Installer ==
   setenv ipaddr 169.254.1.1
   setenv serverip 169.254.78.185
   tftpboot 0x0400000 uImage
   tftpboot 0x0800000 uInitrd
   setenv bootargs console=ttyS0,115200 base-installer/initramfs-tools/driver-policy=most
   bootm 0x0400000 0x0800000

with

   == Run the Debian Installer ==
   setenv ipaddr 169.254.1.1
   setenv serverip 169.254.78.185
   tftpboot 0x800000 uImage
   tftpboot 0x1100000 uInitrd
   setenv bootargs console=ttyS0,115200 base-installer/initramfs-tools/driver-policy=most
   bootm 0x800000 0x1100000

Debian not loaded after installation

Everything works fine until I come to the step "Boot with USB rootfs". The plug reboots but loads Ubuntu (probably from the internal flash drive) instead of Debian (from the USB drive).

I have followed each of the steps and have chosen a standard setting for partitioning (boot partition with ext2 (I think sda2), partition for general purposes (I think sda3) and swap partition (I think sda5)).

In Martin Michlmayr's description on how to install Debian on a USB drive (http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html) the parameters set before rebooting the plug are completely different:

setenv bootargs_console console=ttyS0,115200 setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x0800000 /uInitrd; ext2load usb 0:1 0x400000 /uImage' setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0x400000 0x0800000' saveenv

Which one is correct? Sorry if this is a completely stupid question but I'm new to Linux and the plug.

Thanks!


quick tip - if you hack your v2 board and add a sata port stick with the 3.4.16 bootloader otherwise the sata port will fail to reset when you plug anything in. Also the arch number should be 2678 (The debian installer gets confused with 2097 in the doc)... The 2.6.34 kernel works beautifully so far .

Run the Debian Installer

When I tried to boot the Deian installer I got the message "Error: unrecognized/unsupported machine ID (r1 = 0x0000020f)". I reset and tried again and it worked. Perhaps you need a reset after the setenv.

Clone USB rootfs to internal flash

I did not like copying / mounted read-write so I remounted it "mount -o ro,remount /" rather than syncing. (I don't see the point of syncing in any case because you are going via the filesystem.) To remount / read-only I had to kill rsyslogd and

/etc/init.d/cron stop
/etc/init.d/atd stop
/etc/init.d/portmap stop
/etc/init.d/nfs-common stop


resetenv before starting

I had originally started with the install debian on usb/sd tutorial off site, and then I did this tutorial and had problems. I recommend people reset their environment variables to factory before starting these tutorials. I had the problem above where it would boot into Ubuntu and not Debian, and I found that ubiformat is not included in Ubuntu's mtd-utils..only in the Debian package. A 'resetenv' on the console would remedy this problem.

Personal tools