Welcome! Log In Create A New Profile

Advanced

Pogoplug Pro/Debian phenomenon when SATA-booting

Posted by JoeyPogoPlugE02 
Pogoplug Pro/Debian phenomenon when SATA-booting
May 14, 2015 03:18PM
Two Pogoplug Pros here with numerical names based on IP address reservation:
102: OpenWRT internally
104: uboot barely made it on

In both cases, they boot the recent Debian USB stick (those are exactly copies) and of course the 102 defaults to OpenWRT if the USB plug isn't there.
So today i take a spare SATA drive and copy the Debian install over. SATA wouldn't boot on it's own, but strangely-to-me having a Debian stick inserted was enough to boot to the SATA drive! It was a calculated risk for me to remove the Debian USB stick once I heard SATA crackling, and on both Pogos that's the only way at this point to boot it.

For now this isn't high priority since the SATA power supply would force the drive to spin forever, and eventually I hope to have a 5v hard drive that can have some sort of spindown capability (if possible).

Share your thoughts if you're so inclined :-)

=========
-= Cloud 9 =-



Edited 1 time(s). Last edit at 05/14/2015 03:19PM by JoeyPogoPlugE02.
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
May 14, 2015 04:26PM
Joey,

> So today i take a spare SATA drive and copy the
> Debian install over. SATA wouldn't boot on it's
> own, but strangely-to-me having a Debian stick
> inserted was enough to boot to the SATA drive!

To boot with SATA rootfs, you need to change u-boot envs. The changes involved telling u-boot where the rootfs and the kernel files are. It's best that you copy them from an existing setup, it's easier and avoid being locked out.

The reason it booted with both drives: the kernel files were loaded from the stick, and the actual rootfs was from the HDD :) It is very common behavior when you have both drives plugged in and they contain an identical rootfs. So if your HDD is a regular disk which has no rootfs on it, it would not boot (due to lack of setup parameters for HDD).

I have plan to update the Pogo V3 u-boot envs image so that it has similar scripting as the Kirkwood boxes (booting all drives in certain order). If you don't really need to do this then you can wait until I post it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
May 14, 2015 04:50PM
When you update the environment image you should include a link to download tld-5 u-boot so that the drive search function is supported. Last time I checked it still wasn't linked in the main thread.
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
May 14, 2015 05:20PM
LeggoMyEggo,

Yes. I recalled now why I did not post the new u-boot tld-5. The only difference from tld-4 was the default envs in the code (helped you with the bad block). Other than that there is no added functionality, so I did not think other users would care, since they always flash the default envs image.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
May 14, 2015 09:10PM
Neat stuff! I'll try to memorize the order for now. And I hate to get my hand stuck in the cookie jar asking more questions, but:

1. When I told Pogo "poweroff -h", the SATA appears to have spun down! If this is true, I'd like to get a jump start on power management and sleep/wakeup states.Is there already a place in Debian this is programmable? This just for theory and no I won't try it until understanding more.

-The explanation: my dream Pogoplug is a 5-watt pilot light available on demand, that can spin up a hard drive for access and eventually spin a 2nd one for backup.

2. If that wasn't enough, i wonder if there's an app you know of that can look inside pogo's flash in graphical way like a partition manager might display? I have no idea what's in there, and in the case of the Pogo with only a booter, this would help determine the best way to make and keep it perfect.

-The next explanation: I'd love to know what's left in the OpenWRT flash and even if all the original Pogo software stayed int he 2nd Pogo. If so I might try DavyGravy's Samba flash on that Pogoplug.

=========
-= Cloud 9 =-



Edited 1 time(s). Last edit at 05/14/2015 09:17PM by JoeyPogoPlugE02.
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
May 16, 2015 06:14PM
Joey,

> 1. When I told Pogo "poweroff -h", the SATA
> appears to have spun down! If this is true, I'd
> like to get a jump start on power management and
> sleep/wakeup states.Is there already a place in
> Debian this is programmable? This just for theory
> and no I won't try it until understanding more.

It is built in the current kernel. You just need to google/find the Linux PM commands.

> 2. If that wasn't enough, i wonder if there's an
> app you know of that can look inside pogo's flash
> in graphical way like a partition manager might
> display? I have no idea what's in there, and in
> the case of the Pogo with only a booter, this
> would help determine the best way to make and keep
> it perfect.
>

There is no need to. You could use nanddump to back up the NAND flash mtds, if that's what you want. To really look inside to see what being stored, use Linux commands to mount an MTD that has a file system on it. In the typical settings for our plugs, you can only see the files in the rootfs mtd. The other mts are raw data (mtd0 has u-boot, mtd1 has rescue kernel uImage or stock kernel uImage).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
September 12, 2015 06:28PM
bodhi Wrote:
-------------------------------------------------------
> Joey,
>
> > So today i take a spare SATA drive and copy the
> > Debian install over. SATA wouldn't boot on it's
> > own, but strangely-to-me having a Debian stick
> > inserted was enough to boot to the SATA drive!
>
> To boot with SATA rootfs, you need to change
> u-boot envs. The changes involved telling u-boot
> where the rootfs and the kernel files are. It's
> best that you copy them from an existing setup,
> it's easier and avoid being locked out.
>
> The reason it booted with both drives: the kernel
> files were loaded from the stick, and the actual
> rootfs was from the HDD :) It is very common
> behavior when you have both drives plugged in and
> they contain an identical rootfs. So if your HDD
> is a regular disk which has no rootfs on it, it
> would not boot (due to lack of setup parameters
> for HDD).
>
> I have plan to update the Pogo V3 u-boot envs
> image so that it has similar scripting as the
> Kirkwood boxes (booting all drives in certain
> order). If you don't really need to do this then
> you can wait until I post it.


yeah definitely give me a shout if that happens - the USB stick works but bogs down terrible on the Pro - SATA (II) 3.5" runs pretty good on the surface of things. SATA swapfile seems to make up for lack of RAM.

-update- wow after looking around I didn't realize how busy you are Bodhi - no trouble if it happens later or never - all in all i can more fully appreciate what the PogoPro lacks, a Zyxel fulfills.

Wish in the meantime I could rig a faux Debian USB stick to chain to the SATA, if so someone shout to me! The strengths of Linux are really hitting me like a ton of bricks lately. Thanks again.

=========
-= Cloud 9 =-



Edited 1 time(s). Last edit at 09/14/2015 12:17AM by JoeyPogoPlugE02.
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
September 14, 2015 11:02PM
Joey,

You don't have wait for me, people who have this box could post their settings, too :) Anyone?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
September 16, 2015 02:06AM
Joey,

Post your current u-boot envs
fw_printenv

If you have serial console, post the serial log, too! If you don't have serial console, post the current u-boot version that you have installed, is it the uboot.2013.10-tld-4 for Oxnas?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
September 17, 2015 12:01PM
fw_printenv right after I pulled the USB stick and let SATA boot, returns this:

root@DebianPlug:~# fw_printenv
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
if_netconsole=ping $serverip
preboot_nc=run if_netconsole start_netconsole
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
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
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb
ethaddr=00:25:31:01:c4:f3
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
preboot=run preboot_nc
ipaddr=192.168.1.10
serverip=192.168.1.100
root@DebianPlug:~#

As far as the TTY thing, I've have two here you recommended but haven't got the wires yet.
As for the u-boot version I'm not sure ether - how can i tell?
Lastly (maybe unimportant), I don't understand the server in thefw_printenv result shows that IP because mine should be 192.168.178.104, and for all I know it could be a Samba miscalculation or result of switching the kernel over.

=========
-= Cloud 9 =-
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
September 17, 2015 12:27PM
JoeyPogoPlugE02 Wrote:
-------------------------------------------------------
> fw_printenv right after I pulled the USB
> stick and let SATA boot, returns this:
>
>
> root@DebianPlug:~# fw_printenv
> autoload=no
> baudrate=115200
> bootargs=console=ttyS0,115200n8
> bootdelay=10
> console=console=ttyS0,115200n8
> ethact=mii0
> mtdids=nand0=41000000.nand
> mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
> stderr=serial
> stdin=serial
> stdout=serial
> usb_device=0:1
> if_netconsole=ping $serverip
> preboot_nc=run if_netconsole start_netconsole
> start_netconsole=setenv ncip $serverip; setenv
> bootdelay 10; setenv stdin nc; setenv stdout nc;
> setenv stderr nc; version
> usb_set_bootargs=setenv bootargs
> console=ttyS0,115200 root=/dev/sda1 rootdelay=10
> uinitrd_addr=0x60e00000
> uimage_addr=0x60500000
> dtb_addr=0x62c00000
> dt_load_initrd=ext2load usb 0:1 $uinitrd_addr
> /boot/uInitrd
> dt_load_uimage=ext2load usb 0:1 $uimage_addr
> /boot/uImage
> dt_bootm=bootm $uimage_addr $uinitrd_addr
> $dtb_addr
> 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
> dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb
> stop; reset
> bootcmd=run dt_bootcmd_usb
> ethaddr=00:25:31:01:c4:f3
> fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
> dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
> preboot=run preboot_nc
> ipaddr=192.168.1.10
> serverip=192.168.1.100
> root@DebianPlug:~#
>
>
> As far as the TTY thing, I've have two here you
> recommended but haven't got the wires yet.
> As for the u-boot version I'm not sure ether - how
> can i tell?
> Lastly (maybe unimportant), I don't understand
> the server in thefw_printenv result shows
> that IP because mine should be 192.168.178.104,
> and for all I know it could be a Samba
> miscalculation or result of switching the kernel
> over.

Let me update this envs set for you later. But netconsole should be working first.

The ipaddr and serverip are what you define them to be (both need to be static). And ipaddr should be defined with the same number in /etc/network/interfaces as static IP. 192.168.1.10. So your PC or laptop must be defined with static IP 192.168.1.100 so that it can serve as the netconsole server, or tftp server.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
September 17, 2015 01:36PM
bodhi Wrote:
-------------------------------------------------------
> Let me update this envs set for you later. But
> netconsole should be working first.


Before the weekend is out I'll do my best to acquire the proper wires - previously I'd checked all the wire bins at every thrift stores in town. And i hoard stuff like that, so I'll try again, or even get some jing and order from eBay in the States.

-update oh it looks possible to use netconsole to troubleshoot uBoot without a serial cable, so I'll brush up with same timetable.

Low priority though bodhi, don't knock yerself out over this - I haven't tried the OpenWRT Pogo yet either.

=========
-= Cloud 9 =-



Edited 1 time(s). Last edit at 09/17/2015 05:29PM by JoeyPogoPlugE02.
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
September 18, 2015 12:12AM
JoeyPogoPlugE02 Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > Let me update this envs set for you later. But
> > netconsole should be working first.
>
>
> Before the weekend is out I'll do my best to
> acquire the proper wires - previously I'd checked
> all the wire bins at every thrift stores in town.
> And i hoard stuff like that, so I'll try again, or
> even get some jing and order from eBay in the
> States.

Netconsole:
http://forum.doozan.com/read.php?3,14

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
September 18, 2015 08:44PM
Long story short, I might be wise to wait for the wires. Last night/early today I was exploring around the OpenWRT Pogoplug, and while that doesn't boot the Debian hard drive either (as-is), there might be provisions within the GUI to kick that in, or alternately use Samba to share HD storage running from OpenWRT.

But I don't get the netcat stuff - after doing the code and Windows command prompt I realized Pogo didn't have netcat installed, and the link was bad - so newb I am I'll be proceeding slowly here. Truth be told I'd trade one of my Pros for an equally recent E02 in a heartbeat.

=========
-= Cloud 9 =-



Edited 1 time(s). Last edit at 09/18/2015 08:48PM by JoeyPogoPlugE02.
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
September 19, 2015 04:06PM
Joey,

> Long story short, I might be wise to wait for the
> wires.

> But I don't get the netcat stuff - after doing the
> code and Windows command prompt I realized Pogo
> didn't have netcat installed, and the link was bad

Yes, it is best that you have serial console. Makes everything so much easier.

netcat usage has 2 different phases: u-boot and Debian. During booting, you use the netconsole driver inside u-boot. During Debian boting, it is a different netconsole driver altogether. So setting up netconsole to observe booting progress is to set u-boot envs to run its netconsole driver. You already installed new u-boot, so setting it up is all you need. However, you are right to wait for the wires, it is a lot easier to get netconsole working with serial console already working.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
October 27, 2015 02:04AM
@Joey,

http://forum.doozan.com/read.php?3,24213

If you don't want to reflash, you could use the env text file in the tarball.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/27/2015 12:50PM by bodhi.
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
October 31, 2015 12:01AM
I'm probably real close but wherever i can do something in Windows, it's a safer deal for sure.

So far I've downloaded the dropbox Tar, copied the tar and extracted contents to /tmp using WinSCP

I've tried the other codes and they work, there's no bad blocks, confident to start flashing... get here...

5. Extract the archive to /tmp 
cd /tmp
tar -xf uboot.2013.10-tld-4.ox820.bodhi.tar

I've tried variations and no comprende. Trying to understand how this works. We're trying to flash Pogoplug's chip and not the USB stick that's plugged into it right? Also using WinSCP I can place any file anywhere and start from there, but I'm not sure where in the file structure this would have downloaded a dropbox file.

Hope not to confuse you further, but FWIW I tried the printenv and apparently it's still got netconsole at startup.

root@DebianPlug:~# fw_printenv
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
preboot_nc=run if_netconsole start_netconsole
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
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
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb
ethaddr=00:25:31:01:c4:f3
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
serverip=192.168.178.100
ipaddr=192.168.178.104
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
root@DebianPlug:~#

I'd been basking in the ease of the E02 lately and forgot where I was at. And no I don't know much at all. You might have pointed out something that's easy as pie and I missed it, but I'll keep reading and try to make sense where possible.

=========
-= Cloud 9 =-



Edited 1 time(s). Last edit at 10/31/2015 12:04AM by JoeyPogoPlugE02.
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
October 31, 2015 03:13AM
Joey,

> I've tried the other codes and they work, there's
> no bad blocks, confident to start flashing... get
> here...

So far so good!

> 5. Extract the archive to /tmp
> cd /tmp
> tar -xf uboot.2013.10-tld-4.ox820.bodhi.tar

> root@DebianPlug:~#

You are at the Debian ssh prompt here.

> I've tried variations and no comprende. Trying to
> understand how this works. We're trying to flash
> Pogoplug's chip and not the USB stick that's
> plugged into it right?

Yes. We are flashing to NAND.

Recommendation:

You actually do not have to reflash the env image. You could just enter these envs at the command line. There are 2 files in the tarball

uboot.2013.10-tld-5.ox820.environment.img (the default envs image to be flashed) 
uboot.2013.10-tld-5.ox820.environment (the content of the default envs in text format)

So to make it really safe, copy that file to your rootfs /boot/uEnv.txt

cd /boot
cp -a uboot.2013.10-tld-5.ox820.environment uEnv.txt

And reboot. During u-boot starting, it will read this file and set all the envs in this file, and then boot with it (without saving anything).

Once you satisfy that everything works like you expect, then you could use the fw_setenv commands to set each one at the command line.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
WOW!
October 31, 2015 10:50PM
Something worked! Almost certainly bodhi's instructs one message back which said:

cd /boot
cp -a uboot.2013.10-tld-5.ox820.environment uEnv.txt


The Debian partition on the USB stick is an identical copy of the one on the SATA hard drive. But I wasn't sure which one took hold of the new way. Luckily it must have been the USB stick because I copied that again and that's how it's working.

So now with SATA and USB plugged in, it'll boot to SATA. I noticed this worked four reboots ago.

So for the record, I strongly doubt Pogo's nand got touched, and here's the fw_printenv to see what you see.

root@DebianPlug:~# fw_printenv
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
preboot_nc=run if_netconsole start_netconsole
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
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
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb
ethaddr=00:25:31:01:c4:f3
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
serverip=192.168.178.100
ipaddr=192.168.178.104
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
root@DebianPlug:~#

*Excited semi-off-topic ramble: Looking good! Can't thank you enough. Again like the E02 now I can study what happened at leisure, and maybe spec it out so it boots to what is specified and SAMBAs whatever is plugged in the SATA jack. And plug it in the other openWRT one with SATA and see if it works.

=========
-= Cloud 9 =-



Edited 1 time(s). Last edit at 11/01/2015 12:08AM by JoeyPogoPlugE02.
OpenWRT too
October 31, 2015 11:32PM
OK i also tried taking the same USB stick and SATA drive and plugging them into spare Pogoplug3 that had OpenWRT flashed to NAND, and same result, it booted to the SATA with Debian. Sweet!

=========
-= Cloud 9 =-
Re: WOW!
November 01, 2015 01:39AM
Joey,

> root@DebianPlug:~# fw_printenv
> autoload=no
> baudrate=115200
> bootargs=console=ttyS0,115200n8
> bootdelay=10
> console=console=ttyS0,115200n8
> ethact=mii0
> mtdids=nand0=41000000.nand
> mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
> stderr=serial
> stdin=serial
> stdout=serial
> usb_device=0:1
> preboot_nc=run if_netconsole start_netconsole
> usb_set_bootargs=setenv bootargs
> console=ttyS0,115200 root=/dev/sda1 rootdelay=10
> uinitrd_addr=0x60e00000
> uimage_addr=0x60500000
> dtb_addr=0x62c00000
> dt_load_initrd=ext2load usb 0:1 $uinitrd_addr
> /boot/uInitrd
> dt_load_uimage=ext2load usb 0:1 $uimage_addr
> /boot/uImage
> dt_bootm=bootm $uimage_addr $uinitrd_addr
> $dtb_addr
> 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
> dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb
> stop; reset
> bootcmd=run dt_bootcmd_usb
> ethaddr=00:25:31:01:c4:f3
> fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
> dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
> serverip=192.168.178.100
> ipaddr=192.168.178.104
> if_netconsole=ping $serverip
> start_netconsole=setenv ncip $serverip; setenv
> bootdelay 10; setenv stdin nc; setenv stdout nc;
> setenv stderr nc; version;
> preboot=run if_netconsole start_netconsole
> root@DebianPlug:~#
> 
>

Cool!

In Debian the old envs still show. That because you put the new envs text inside uEnv.txt :) those envs in uEnv.txt were used for booting, but not saved. Once you are satisifed that all works perfect, then think about the next step, which is saving those envs permanently.

So what do you have on the USB stick, or the SATA HDD now?

After booted in to Debian

ls -latr /boot
uname -a
mount
df -h

And do the above commands for the 2nd box, too.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WOW!
November 01, 2015 01:55AM
ok here's the results:

OpenWRT > USB stick SATA chain booted.

ls -latr /boot
root@DebianPlug:~# ls -latr /boot
total 39108
-rwxr-xr-x  1 root root  4170000 Feb 12  2015 zImage-3.18.5-oxnas-tld-1
-rw-r--r--  1 root root   100778 Feb 12  2015 config-3.18.5-oxnas-tld-1
-rw-r--r--  1 root root  1544413 Feb 12  2015 System.map-3.18.5-oxnas-tld-1
-rwxr-xr-x  1 root root  4170000 Feb 12  2015 vmlinuz-3.18.5-oxnas-tld-1
-rw-r--r--  1 root root  9098838 Feb 12  2015 linux-headers-3.18.5-oxnas-tld-1_1_armel.deb
-rw-r--r--  1 root root 11616738 Feb 12  2015 linux-image-3.18.5-oxnas-tld-1_1_armel.deb
-rw-r--r--  1 root root   413571 Feb 12  2015 linux-3.18.5-oxnas-tld-1.patch
drwxr-xr-x  2 root root     4096 Apr 19  2015 backup
-rw-r--r--  1 root root  4170064 Apr 19  2015 uImage
-rw-r--r--  1 root root  1979540 Apr 19  2015 uInitrd
-rw-r--r--  1 root root  2527217 May  6 23:06 initrd.img-3.18.5-oxnas-tld-1
drwxr-xr-x  2 root root     4096 May  9 16:20 dts
drwxr-xr-x 23 root root     4096 Aug 19 11:56 ..
-rw-r--r--  1 root root     2511 Oct 23 02:41 uboot.2013.10-tld-5.ox820.environment.txt
-rw-r--r--  1 root root     2511 Oct 23 02:41 uboot.2013.10-tld-5.ox820.environment
-rw-r--r--  1 root root     2511 Oct 23 02:41 uEnv.txt
-rw-r--r--  1 root root   131072 Oct 23 02:49 uboot.2013.10-tld-5.ox820.environment.img
drwxr-xr-x  4 root root     4096 Oct 31 17:59 .
root@DebianPlug:~#

uname -a
root@DebianPlug:~# uname -a
Linux DebianPlug 3.18.5-oxnas-tld-1 #2 SMP PREEMPT Thu Feb 12 11:17:40 PST 2015 armv6l GNU/Linux
root@DebianPlug:~#

mount

root@DebianPlug:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=14957,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=12180k,mode=755)
/dev/sda1 on / type ext3 (rw,noatime,errors=remount-ro,barrier=1,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=24340k)
tmpfs on /tmp type tmpfs (rw,relatime)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
root@DebianPlug:~#

df -h

root@DebianPlug:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       7.1G  2.5G  4.3G  38% /
udev             10M     0   10M   0% /dev
tmpfs            12M  300K   12M   3% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            24M     0   24M   0% /run/shm
tmpfs            60M   12K   60M   1% /tmp
root@DebianPlug:~#


======================================================================
Regular Debian Pogoplug 3 chain booted to SATA:

ls -latr /boot

root@DebianPlug:~# ls -latr /boot
total 39108
-rwxr-xr-x  1 root root  4170000 Feb 12  2015 zImage-3.18.5-oxnas-tld-1
-rw-r--r--  1 root root   100778 Feb 12  2015 config-3.18.5-oxnas-tld-1
-rw-r--r--  1 root root  1544413 Feb 12  2015 System.map-3.18.5-oxnas-tld-1
-rwxr-xr-x  1 root root  4170000 Feb 12  2015 vmlinuz-3.18.5-oxnas-tld-1
-rw-r--r--  1 root root  9098838 Feb 12  2015 linux-headers-3.18.5-oxnas-tld-1_1_armel.deb
-rw-r--r--  1 root root 11616738 Feb 12  2015 linux-image-3.18.5-oxnas-tld-1_1_armel.deb
-rw-r--r--  1 root root   413571 Feb 12  2015 linux-3.18.5-oxnas-tld-1.patch
drwxr-xr-x  2 root root     4096 Apr 19  2015 backup
-rw-r--r--  1 root root  4170064 Apr 19  2015 uImage
-rw-r--r--  1 root root  1979540 Apr 19  2015 uInitrd
-rw-r--r--  1 root root  2527217 May  6 23:06 initrd.img-3.18.5-oxnas-tld-1
drwxr-xr-x  2 root root     4096 May  9 16:20 dts
drwxr-xr-x 23 root root     4096 Aug 19 11:56 ..
-rw-r--r--  1 root root     2511 Oct 23 02:41 uboot.2013.10-tld-5.ox820.environment.txt
-rw-r--r--  1 root root     2511 Oct 23 02:41 uboot.2013.10-tld-5.ox820.environment
-rw-r--r--  1 root root     2511 Oct 23 02:41 uEnv.txt
-rw-r--r--  1 root root   131072 Oct 23 02:49 uboot.2013.10-tld-5.ox820.environment.img
drwxr-xr-x  4 root root     4096 Oct 31 17:59 .
root@DebianPlug:~#

uname -a

root@DebianPlug:~# uname -a
Linux DebianPlug 3.18.5-oxnas-tld-1 #2 SMP PREEMPT Thu Feb 12 11:17:40 PST 2015 armv6l GNU/Linux
root@DebianPlug:~#

mount

root@DebianPlug:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=14957,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=12180k,mode=755)
/dev/sda1 on / type ext3 (rw,noatime,errors=remount-ro,barrier=1,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=24340k)
tmpfs on /tmp type tmpfs (rw,relatime)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
root@DebianPlug:~#

df -h

root@DebianPlug:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       7.1G  2.5G  4.3G  38% /
udev             10M     0   10M   0% /dev
tmpfs            12M  300K   12M   3% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            24M     0   24M   0% /run/shm
tmpfs            60M   12K   60M   1% /tmp
root@DebianPlug:~#


So the USB stick has the Debian the way it's done here, and the SATA drive has the exact Debian partition copied but adds a swap file and another partition with optional data. FWIW I'm pretty close to having a drop-in (carefully) SATA stand like GoFlex, but some winterizing projects beckon for a day or so, so will return soon.

8-)

=========
-= Cloud 9 =-



Edited 4 time(s). Last edit at 11/01/2015 01:25AM by JoeyPogoPlugE02.
Re: Pogoplug Pro/Debian phenomenon when SATA-booting
November 01, 2015 02:20PM
Hey I missed the memo, how do you "save" then? If it's ready.

=========
-= Cloud 9 =-
Re: WOW!
November 01, 2015 02:54PM
@Joey,

The reason I asked for those info was to check your system to see if both booted the way you want them :)

1. The 1st box booted into USB rootfs, and everything is cool. Except that the HHD was not mounted, but this is to be expected. You would mount it later to use as the data drive. That's what I understood you wanted it?

2. The 2nd box also booted fine, but it booted into USB rootfs, not SATA. So even though you have set it up to booted OK, it is not what you wanted. Did I understand it correctly?

The important things to remember are the requirements for booting a disk correctly, as I described in the envs image release post:

Quote

a. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
b. The partition that contains the 2 kernel files must be partition 1 in a disk drive
c. The partition that contains the rootfs must be labeled rootfs

So to keep the configuration simple, you should have only 1 rootfs attached.

If both SATA and USB contain the exact rootfs, then it will boot into USB, and ignore the SATA drive. To selectively use SATA as prefered rootfs, you will need to change the envs in uEnv.txt a little bit. And the partition label must be different (e.g. rootfs for USB, sata_rootfs for HDD). If both have same label, you will run into a configuration problem later.

But if you intented all along that your rootfs is on USB and the SATA is just a data drive, then all is OK.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Howld it!
November 01, 2015 05:11PM
I don't mean to sound goofy here, but I've still got the 2nd configuration up, and it did boot to SATA (with the USB stick). It crackled booting up when it caught on and i went so far as to pull the USB stick (way after it was settled-in, not like above when it was first crackle) and try apps on the SATA drive. I hope I didn't get the results wrong last night as it was late and one eye was pried open.

But what I was most hoping for (I think we [well you] nailed it!), is:

1. OpenWRT is for experimentation/education (fun) only, so I'd expect to always have a usb stick in.
2. If SATA drive has same Debian OS that's fine to chain boot that way, fun mode like OpenWRT.
3. If SATA drive has no OS and only data, USB stick will boot and use SATA for Samba and maybe swap.

Pretty sure it works that way right now but haven't tested SATA with no OS.

-update- I have little to lose trying, so I'll delete the Debian copy on SATA and see what happens - take a break first...

=========
-= Cloud 9 =-



Edited 1 time(s). Last edit at 11/01/2015 05:13PM by JoeyPogoPlugE02.
Education is lifelong
November 01, 2015 07:39PM
With no copy of Debian on the SATA, it won't boot up at the USB stick. With SATA unplugged it's fine, then turn on the power to the SATA and it fdisks partition results.

So if the hard drive is all logical (no OS on it) and mounted into fstab, it should boot to USB and have optional SATA storage right?

The rest is probably fun but for me this step is a stickler.

Hey bodhi while we're at it, what's a ballpark speed you'd access on a SATA II off a Pogo Pro/Debian?

=========
-= Cloud 9 =-
Re: Education is lifelong
November 03, 2015 03:59AM
Joey,

> So if the hard drive is all logical (no OS on it)
> and mounted into fstab, it should boot to USB and
> have optional SATA storage right?

Yes, indeed. That's the most flexible config, IMO. This allows you to unmount, unplug the SATA drive and carry it somewhere else. But don't mount the SATA drive in fstab. Mount it in /etc/rc.local, so that it is like a portable drive.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Education is lifelong
November 03, 2015 12:02PM
bodhi Wrote:
-------------------------------------------------------
...
> But don't mount the
> SATA drive in fstab. Mount it in /etc/rc.local, so
> that it is like a portable drive.

Niiice. Please, I beg one more and I should be out of your hair for a while and study, make cheat sheets for future reference.

Is the entry in /etc/rc.local the same entry as would be put in fstab?
And is that before or after exit 0 that's already at the bottom?

=========
-= Cloud 9 =-
Re: Education is lifelong
November 03, 2015 12:33PM
Joey

Use the mount command.

# mount --help

Quote

Usage:
mount [-lhV]
mount -a [options]
mount [options] [--source] <source> | [--target] <directory>
mount [options] <source> <directory>
mount <operation> <mountpoint> [<target>]

Options:
-a, --all mount all filesystems mentioned in fstab
-c, --no-canonicalize don't canonicalize paths
-f, --fake dry run; skip the mount(2) syscall
-F, --fork fork off for each device (use with -a)
-T, --fstab <path> alternative file to /etc/fstab
-h, --help display this help text and exit
-i, --internal-only don't call the mount.<type> helpers
-l, --show-labels lists all mounts with LABELs
-n, --no-mtab don't write to /etc/mtab
-o, --options <list> comma-separated list of mount options
-O, --test-opts <list> limit the set of filesystems (use with -a)
-r, --read-only mount the filesystem read-only (same as -o ro)
-t, --types <list> limit the set of filesystem types
--source <src> explicitly specifies source (path, label, uuid)
--target <target> explicitly specifies mountpoint
-v, --verbose say what is being done
-V, --version display version information and exit
-w, --rw, --read-write mount the filesystem read-write (default)

-h, --help display this help and exit
-V, --version output version information and exit

Source:
-L, --label <label> synonym for LABEL=<label>
-U, --uuid <uuid> synonym for UUID=<uuid>
LABEL=<label> specifies device by filesystem label
UUID=<uuid> specifies device by filesystem UUID
PARTLABEL=<label> specifies device by partition label
PARTUUID=<uuid> specifies device by partition UUID
<device> specifies device by path
<directory> mountpoint for bind mounts (see --bind/rbind)
<file> regular file for loopdev setup

Operations:
-B, --bind mount a subtree somewhere else (same as -o bind)
-M, --move move a subtree to some other place
-R, --rbind mount a subtree and all submounts somewhere else
--make-shared mark a subtree as shared
--make-slave mark a subtree as slave
--make-private mark a subtree as private
--make-unbindable mark a subtree as unbindable
--make-rshared recursively mark a whole subtree as shared
--make-rslave recursively mark a whole subtree as slave
--make-rprivate recursively mark a whole subtree as private
--make-runbindable recursively mark a whole subtree as unbindable

For more details see mount(8).

So if MyMedia is the disk name you want, i.e. it is the disk label.
mkdir -p /media/MyMedia
mount -L MyMedia -o noatime /media/MyMedia

> And is that before or after exit 0 that's
> already at the bottom?

Put these 2 lines in rc.local before exit 0. Later to unplug, you need to use the umount command before disconnect. And when pluggin in back in, use the mount command again to make it visible.

Note that it is possible to do this, but don't treat it like a real portable drive. It should be plugged in at all time. And back up your drive :)

Edited: editorials.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 3 time(s). Last edit at 11/03/2015 11:01PM by bodhi.
YEAH!
November 04, 2015 12:33AM
Super cool thanks a million! That ought to be enough to set things in motion, save pennies for a couple of 2-TB drives and get a bulletproof home cloud going for the holidays.

I'd imagine another benefit of a Pogoplug, is if a person uses an uninteruptible power supply, it'll probably run 24 hours or something LOL - i just bring that up because there's used ones at thrift stores, but i'll probably never use one.

I should have this testing around this weekend with an expendable SATA II (Cat 6 cable should be here by then), so will drop you all a line and probably thank yall again.

:-)

=========
-= Cloud 9 =-
Author:

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: