Welcome! Log In Create A New Profile

Advanced

Debian does not boot on Pogoplug V4-A3-02

Posted by ayosher 
Debian does not boot on Pogoplug V4-A3-02
June 29, 2018 04:09PM
Hello,

I am trying to install Debian on Pogoplug V4-A3-02.
I installed 2017.07 U-Boot Kirkwood According to this thread.
U-Boot started OK, I can operate it using NetConsole.
I tried to install Debian kernel+rootfs using this thread.
I used Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2.
I am booting from MMC since specific device does not have USB2 connector and SATA connectors. I tried to use USB3 ports for booting, but it didn't worked at all.

Please see log below (kernel fails to start). Also I don't know how to boot original Linux from MTD using new u-Boot (is it possible?).
I never saw this unit working, just bought it on eBay. Original pogoplug service is down, so I am planning to connect my big UDB3 disk to it and use it as NAS.

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

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  6
Pogov4> printenv
printenv
arcNumber=3960
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=mmc
device=0:1
devices=mmc usb
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
ethact=egiga0
ethaddr=00:25:31:04:E1:E0
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=10.0.0.57
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=f78
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
nc_ready=1
ncip=10.0.0.5
preboot=run preboot_nc
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
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
scan_ide=ide reset
scan_mmc=mmc rescan
scan_usb=usb start
serverip=10.0.0.5
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_loaded=0
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3288/131068 bytes
Pogov4> boot
boot

MMC rescan: current device # 0 initialized OK

Partition Map for MMC device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            124733440       944ddab0-01     83 Boot
loading envs from mmc 0 ...
** File not found /boot/uEnv.txt **
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **
running scan_disk ...
Scan device mmc

MMC rescan: current device # 0 initialized OK
device mmc 0:1
1 bytes read in 14 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
3821592 bytes read in 126 ms (28.9 MiB/s)
loading uInitrd ...
7245696 bytes read in 179 ms (38.6 MiB/s)
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
10284 bytes read in 37 ms (270.5 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...



===============================================================================
Re: Debian does not boot on Pogoplug V4-A3-02
June 29, 2018 04:39PM
ayosher,

On this box, the USB 3.0 slot can only be used after the kernel has started. u-boot will not recognize it.

Your u-boot installation was good. Nothing is wrong with it.

> Please see log below (kernel fails to start).

With netconsole, the only output you will see after 1st installation is this:

> Starting kernel ...

After you have booted into Debian, you need to do further setup to see the kernel messages during startup.

Now, look for the box in your network. See if it has booted. Find a new dynamic IP that has recently assigned, or try to ping debian host name:

ping debian.local

If it indeed has not booted. You want to look at your rootfs. It's likeky a mis-step was done during rootfs creation (being root, partition must be labeld rootfs,...) You can post the log of the rootfs creation here and I will review it for you.

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



Edited 1 time(s). Last edit at 06/29/2018 04:41PM by bodhi.
Re: Debian does not boot on Pogoplug V4-A3-02
June 30, 2018 01:33PM
Hello Bodhi,

Thank you very much for your inputs.

It turns out that kernel probably booted OK (I am observing green steady led, not blinking), but for some reason kernel didn't asked for IP address from DHCP server. Maybe it somehow related to the fact that my network is 10.0.0.x and not 192.168.x.x.
Anyway, I added uEnv.txt to the /boot of the rootfs with:
custom_params='ip=dhcp'
After that I see my box with the correct IP address received from the router.
Box is answering ping now, but I cannot login SSH (connection refused).
Probably some issue with SSH server.

Please see below the log how I created my rootfs, I am doing that on debian system running in my Windows PC within VirtualBox.

Any help/advice will be appreciated.

root@debian-ayosher:/home/ayosher# 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,nosuid,relatime,size=2014208k,nr_inodes=503552,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=405100k,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=36,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=9182)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /run/user/115 type tmpfs (rw,nosuid,nodev,relatime,size=405096k,mode=700,uid=115,gid=120)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=405096k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sr0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,noexec,relatime,user)
/dev/sdb1 on /media/ayosher/8071-8262 type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
root@debian-ayosher:/home/ayosher# 
root@debian-ayosher:/home/ayosher# 
root@debian-ayosher:/home/ayosher# umount /dev/sdb1
root@debian-ayosher:/home/ayosher# dev=sdb
root@debian-ayosher:/home/ayosher# mnt=/mnt/tmp
root@debian-ayosher:/home/ayosher# 
root@debian-ayosher:/home/ayosher# sfdisk /dev/${dev} << 'EOF'
> ,,,*
> EOF
Checking that no-one is using this disk right now ... OK

Disk /dev/sdb: 3.8 GiB, 4026531840 bytes, 7864320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x222c13e5

Old situation:

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *     2048 7864319 7862272  3.8G  c W95 FAT32 (LBA)

>>> Created a new DOS disklabel with disk identifier 0xccd38d6a.
/dev/sdb1: Created a new partition 1 of type 'Linux' and of size 3.8 GiB.
Partition #1 contains a vfat signature.
/dev/sdb2: Done.

New situation:

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *     2048 7864319 7862272  3.8G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
root@debian-ayosher:/home/ayosher# mke2fs -j -L rootfs /dev/${dev}1
mke2fs 1.43.4 (31-Jan-2017)
/dev/sdb1 contains a vfat file system
Proceed anyway? (y,N) y
Creating filesystem with 982784 4k blocks and 245760 inodes
Filesystem UUID: 1ca379ff-cb2b-4c8c-8c82-7cc04067d46f
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

root@debian-ayosher:/home/ayosher# mount /dev/${dev}1 ${mnt}
root@debian-ayosher:/home/ayosher# cd ${mnt}
root@debian-ayosher:/mnt/tmp# cat ~ayosher/Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 | bunzip2 | tar x
root@debian-ayosher:/mnt/tmp# cat > ${mnt}/etc/fstab << 'EOF'
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> /dev/root       /               ext3    noatime,errors=remount-ro 0 1
> EOF
root@debian-ayosher:/mnt/tmp# sync
root@debian-ayosher:/mnt/tmp# sync 
root@debian-ayosher:/mnt/tmp# sync
root@debian-ayosher:/mnt/tmp# cd ~ayosher/
root@debian-ayosher:/home/ayosher# umount /mnt/tmp
Re: Debian does not boot on Pogoplug V4-A3-02
June 30, 2018 04:45PM
ayosher,

> Anyway, I added uEnv.txt to the /boot of the
> rootfs with:
> custom_params='ip=dhcp'

It is not necessary to do this, since you have full control of the box. And the rootfs is already set to boot with dhcp.

You could also edit /etc/network/interfaces in the rootfs to make it use a static IP 10.0.0.57. If you think the IP is causing problem.

> root@debian-ayosher:/mnt/tmp# cat
> ~ayosher/Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
> | bunzip2 | tar x

A simpler command would be better:

tar xf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

> root@debian-ayosher:/mnt/tmp# cat >
> ${mnt}/etc/fstab << 'EOF'
> > # /etc/fstab: static file system information.
> > #
> > # <file system> <mount point> <type>
> <options> <dump> <pass>
> > /dev/root / ext3
> noatime,errors=remount-ro 0 1
> > EOF

The above will cause problem in mounting rootfs. It should be like this as in the orginal fstab in the rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2:

LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian does not boot on Pogoplug V4-A3-02
July 01, 2018 05:39AM
Bodhi,

Thank you very much. Now I can login with ssh to the box.

I have a following question. When I will install all I need on SDcard (samba to share drives), I would like to put everything to the NAND.
So questions:
1) How to configure your u-Boot to check MMC and if not found load rootfs from MTD?
2) According to your best knowledge, is it possible to re-partition NAND, leaving current first 2M partition for uBoot and parameters, but merge all other to single 126M partition (should I change anything else beside mtdparts?)

ayosher
Re: Debian does not boot on Pogoplug V4-A3-02
July 01, 2018 04:46PM
ayosher,

> I have a following question. When I will install
> all I need on SDcard (samba to share drives), I
> would like to put everything to the NAND.
> So questions:
> 1) How to configure your u-Boot to check MMC and
> if not found load rootfs from MTD?

I don't recommend installing Debian on this box NAND, it is too small. You can run a smaller system using various rescue solutions. But to run full Debian is not recommended. Check the Rescue subforum for a few different ways to install rescue systems.

> 2) According to your best knowledge, is it
> possible to re-partition NAND, leaving current
> first 2M partition for uBoot and parameters, but
> merge all other to single 126M partition (should I
> change anything else beside mtdparts?)

NAND partition layout is what you make it to be. After you make sure that u-boot partition is untouched, the rest can be configured anyway you want, no need to change anything other than mtdparts (before you store something in that 2nd partition, you need to erase it first).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian does not boot on Pogoplug V4-A3-02
July 05, 2018 02:41AM
bodhi,

Thank you for your inputs.

Just to let you know, kernel you providing ignoring mtdparts that sent in command line.
Looks like it gets this information from dtb.
I used dtc to convert dtb to dts, looked into it - all partitions are described there.
So it sounds that to change MTD partitioning, need to rebuild dtb file passed to the kernel.

ayosher
Re: Debian does not boot on Pogoplug V4-A3-02
July 05, 2018 03:04AM
ayosher,

> Just to let you know, kernel you providing
> ignoring mtdparts that sent in command line.

That's incorrect. You must have some syntax error in the command line bootargs, and the kernel took what's in the DTB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian does not boot on Pogoplug V4-A3-02
July 05, 2018 02:52PM
bodhi,

Maybe you are right.
Could you please provide correct syntax for pogoplug V4?

ayosher
Re: Debian does not boot on Pogoplug V4-A3-02
July 05, 2018 04:49PM
ayosher,

Your envs were correct in this this post:
https://forum.doozan.com/read.php?2,62669,62669#msg-62669

Power up, interrupt serial console, and do whatever you want to change to envs, and then
printenv
boot

Post your entire serial boot log (from u-boot banner until the Debian login prompt).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian does not boot on Pogoplug V4-A3-02
July 06, 2018 06:06AM
bodhi Wrote:
-------------------------------------------------------
> ayosher,
>
> Your envs were correct in this this post:
> https://forum.doozan.com/read.php?2,62669,62669#msg-62669

I took a closer look again! It was actually wrong here:

bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)


Should be

bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian does not boot on Pogoplug V4-A3-02
July 06, 2018 10:02AM
bodhi,

You are right, thank you. Now it works.

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