Welcome! Log In Create A New Profile

Advanced

Pogoplug V3 Pro boot with multiple drives attached

Posted by emac 
Pogoplug V3 Pro boot with multiple drives attached
October 17, 2015 01:01PM
So far, I have been able to successfully modify my uBoot on my pogoplug pro and boot into Debian. However, I am looking to use Netatalk to set up a network drive for my Macbook Pro to use as a Time Machine backup, and I have run into a problem where uBoot fails when I have more than one device attached to the pogoplug during the initial boot process. I suppose I can simply unplug all other drives whenever I need to reboot, but that is less than convenient, and was hoping there might be a way to automate the search for the correct drive on boot.

I have seen this post (http://forum.doozan.com/read.php?3,19093) which looks like it might accomplish what I am looking for, but the sample boot variables and the uBoot version look to be for the Kirkwood builds, not OXNAS. Is there a way to use the USB scan script on the pogoplug pro, and will that solve the problem of not being able to boot when multiple drives are connected?

fw_printenv output below:
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd_stock=setenv autoload n; setenv bootargs_stock "root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M"; setenv poweroutage yes; setenv boot "bootm 60500000"; setenv bootcmd_stock_fw "run set_bootargs_stock; run boot_nand"; setenv boot bootm 60500000; setenv boot_nand "run load_nand boot || run load_nand2 boot"; setenv kernflmode s; setenv load_nand2 "nboot 60500000 0 800000"; setenv load_nand "nboot 60500000 0 200000"; setenv set_bootargs_stock "setenv bootargs $bootargs_stock"; setenv mainlinelinux no; run bootcmd_stock_fw
bootcmd=run dt_bootcmd_usb; run bootcmd_stock; reset
bootdelay=10
console=console=ttyS0,115200n8
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dtb_addr=0x62c00000
ethact=mii0
ethaddr=00:25:31:01:02:0c
fdt_file=/boot/dts/ox820-pogoplug-pro.dtb
if_netconsole=ping $serverip
ipaddr=192.168.2.100
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
preboot=run if_netconsole start_netconsole
serverip=192.168.2.5
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
usb_device=0:1
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10

I have tried simply adding the env variables from section A1 post listed above using netconsole, but see either messages like:
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... READ_CAP ERROR
EHCI timed out on TD - token=0x3c008d80
or
** Bad device usb 0 **
** Bad device usb 1 **
** Bad device usb 1 **
** Bad device usb 1 **
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command

which makes me think that something about the script might need to change to work for the OXNAS boot process?
Re: Pogoplug V3 Pro boot with multiple drives attached
October 17, 2015 10:54PM
emac,

> which makes me think that something about the
> script might need to change to work for the OXNAS
> boot process?

Yes it does! I'm in the process to release a new u-boot envs image for Kirkwood, so I will also create one for Oxnas (which is basically the same, with address and other things adjusted for Oxnas).

For now, if you want to, then use the idea in the above link and script a correct sequence, using the uEnv.txt. It is safer to play with it using uEnv.txt.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug V3 Pro boot with multiple drives attached
October 18, 2015 04:46PM
Quote
bodhi
I'm in the process to release a new u-boot envs image for Kirkwood, so I will also create one for Oxnas (which is basically the same, with address and other things adjusted for Oxnas)

Awesome. I will keep an eye out for that, and play around with the uEnv boot to see if I can get something working myself.

In the meantime, a related question would be: is there a best way after booting to automount external drives on plugin using the partition LABEL so that I can share those volumes as an AFP or SMB share? I have tried adding the rule to /etc/fstab, but that only accomplishes auto-mounting on startup, and I obviously can't yet have the drives plugged in on startup due to the above listed issue.

I have looked into USBmount but couldn't figure out if there was a way to customize the mount point (seemed it would always mount to /media/sd[x]) and trying to accomplish it all through custom udev rules was too dense and confusing. I have found some success writing a single udev rule:
SUBSYSTEM=="block", RUN+="/bin/mount -a"
and setting the auto option on my new fstab line, which does seem to accomplish the automount to my custom location, but also feels a bit hackish as it basically mounts all my fstab auto lines every time any drive is connected, when really I just need to mount the new drive. So, questions are:
  1. Is there anything inherently dangerous about what I am currently doing?
  2. Is there a better way to accomplish this? Maybe some help writing custom udev rules that would map a partition to a custom mount path (i.e. "/srv/timemachine") based on the partition LABEL?
Re: Pogoplug V3 Pro boot with multiple drives attached
October 18, 2015 07:41PM
I will post my udev rules file. We had this discussion long time ago here, but probably better if I just make it more visible!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug V3 Pro boot with multiple drives attached
October 18, 2015 11:13PM
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: