Welcome! Log In Create A New Profile

Advanced

How to switch from Arch to Debian?

Posted by TDinCT 
How to switch from Arch to Debian?
March 08, 2013 04:38PM
Hello,

I've got a Pogoplug E02 with U-Boot 2011.12 (Feb 20 2012), a working netconsole setup, and Arch Linux booting from an external 80GB USB HDD. What's the best way to switch from Arch to Debian? I've looked at this thread (Kernel Too Old? Debian Wheezy on Pogoplug E02) and downloaded Jeff's Wheezy and Squeeze installer scripts.

Looking at those scripts, though, I'm confused. They're both hardcoded to /dev/sda1, which is where Arch is currently running from. In Arch, I would just extract a root filesystem image onto another device. What's the procedure for Debian?

Thanks,
Tom
Re: How to switch from Arch to Debian?
March 08, 2013 06:49PM
@Tom

The procedure for Debian as we've been using is Jeff's installer scripts. These meant to be run on a stock Pogoplug OS. After you've installed Arch, you have new uBoot and everything is working, but you can't run either scripts from your current Arch booting USB because the script needs to wipe out the disk. So you could either remove the USB drive and boot back to Pogo OS, then use another USB stick/HDD to install. Or you could use Davy's ready-made NSA320 rootfs image without running installation script: http://forum.doozan.com/read.php?2,7806. There is another potential approach that I though about but have not tried.

ArchLinux ARM has many developers and great organization, so they can provide a ready-to-use rootfs for people to download. Debian ARM plugs don't have a formal group like that so many forum members have contributed pieces and pieces of solutions. Jeff, Davy, and Vlad have created most of solutions here (and many others have too), but we don't have enough volunteers to organize a wiki (I'm guessing, there was a wiki effort that has started but nothing came out of it yet).

HTH,
-bodhi



Edited 1 time(s). Last edit at 03/08/2013 06:52PM by bodhi.
Re: How to switch from Arch to Debian?
March 08, 2013 07:07PM
Thanks, bodhi. I figured out a few minutes before you replied that I needed to install from the Pogo OS to overwrite the Arch installation. I was under the mistaken impression that the original OS was gone forever when I installed the new U-Boot and Arch, but now I understand that only the Pogo U-Boot is gone; not the OS.

So, I unplugged the HDD and booted the Pogo OS. I must have changed that root password, but I found a post on the Arch forum explaining how to mount the NAND, chroot to it, and change the password.

Once I was past that, I tried the Wheezy script. That failed with the debootstrap problem, so I tried the Squeeze script. I modified that slightly to not rewrite U-Boot (I already have the new one) and to not use a swap partition (I'll use a swap file). The Squeeze script ran fine, but I couldn't get it to (re)boot because it was missing uImage and uInitrd. I went back to Pogo OS, mounted the HDD, and looked at /boot. That had the -kirkwood files (vmlinuz, config, initrd, etc.), but no uInitrd or uImage.

I don't remember seeing any installation errors. What have I missed (or messed up)?

Thanks again,
Tom
Re: How to switch from Arch to Debian?
March 08, 2013 07:38PM
You're almost there! the debootstrap installation has been glitchy lately. But since you got to the installation basically done, you can generate uImage and uInitrd manually.
You can use mkimage to do that, similar to the description this post: http://forum.doozan.com/read.php?2,11601,11627#msg-11627
Re: How to switch from Arch to Debian?
March 08, 2013 09:07PM
After the Squeeze installation finished, I ran the mkimage commands you suggested (with the appropriate version numbers). Here's the output:

Image Name:   Linux-2.6.32-5
Created:      Sat Jan  1 00:23:27 2000
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    1437136 Bytes = 1403.45 kB = 1.37 MB
Load Address: 0x00008000
Entry Point:  0x00008000

Image Name:   initramfs-2.6.32-5
Created:      Sat Jan  1 00:25:36 2000
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    4535977 Bytes = 4429.67 kB = 4.33 MB
Load Address: 0x00000000
Entry Point:  0x00000000

After a shutdown and power-cycle, the boot starts out fine, according to netconsole:

Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1437200 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
4536041 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.32-5
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1437136 Bytes = 1.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-2.6.32-5
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4535977 Bytes = 4.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
Using machid 0xdd6 from environment

Starting kernel ...

...but the front LED never lights up and my DHCP server never gets a request, so I have no access and no idea if it booted successfully or not.

Is there anything else I can try, or should I use Davy's prebuilt rootfs?

Thanks for all your help,
Tom
Re: How to switch from Arch to Debian?
March 08, 2013 09:23PM
With this vanilla Squeeze kernel, I don't think arcNumber and machid for Pogoplug E02 will work. You can interrupt uBoot using netconsole and set arcNumber back to 2097:

setenv arcNumber 2097

- and if machid is set to dd6, then remove it

setenv machid

After you've booted into Debian, you can upgrade to Wheezy, and then later use a patched kernel for Pogoplug E02 to update it so all LEDs can be controlled properly.

(Davy's rootfs seems to lack the Pogoplug E02 patch support, as reported by others in the latest few threads)
Re: How to switch from Arch to Debian?
March 09, 2013 11:23AM
@bodhi

Thanks for all your help. I now have Wheezy running with your 3.2.28 kernel. This is my first time with Debian, and I've learned a lot the past two days. Now I'm going to work on getting a Squeezebox server going...

Tom
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: