Welcome! Log In Create A New Profile

Advanced

No USB Boot / Getting Kernel Messages in NC

Posted by nat 
nat
No USB Boot / Getting Kernel Messages in NC
February 24, 2015 11:46AM
Well, I can say I've learned a lot about installing Debian on a Pogoplug series 4 over the past couple of days. However, I'm at a point that I can't get it to boot from Debian on a USB and can't figure out why. I've been trying everything I can from this forum for the past two days, but I'm not solving my problem. I'd really appreciate any assistance.

Quick recap:

- Installed Debian using the instructions on qnology.com-- worked perfectly.
- Messed around with the image enough that I wanted to start clean, so reformatted and reinstalled the system tar files on the USB files.
- USB wouldn't boot because I used ext2, but then wouldn't boot even after I reimaged and reinstalled using ext3.
- Did a complete reset of the USB drive and environment using the appropriate steps from qnology, and it still won't boot.
- Have since installed Bohdi's 201407 uboot on the Pogoplug and the associated 3.17 linux image on the USB and monkied endlessly in setting and resetting the environment and changing USB drives, but no change.
- I have no problem getting the Pogoplug series 4 to boot to the Pogoplug environment (boot_pogo) so I can update the settings, but USB booting doesn't work since I originally set up the pogoplug.

I have two main questions:

How do you get kernel logging working in nc? I have nc working up to the "Starting Kernel" message, then it stops. In addition to the standard nc settings (which are working up through the uboot process) I used some boot arguments to redirect the dmesg log to the nc, but I'm not getting anything after Starting Kernel:

usb_custom_params 'loglevel=7 netconsole=6666@192.168.1.10/eth0,6666@192.169.1.50/'
set_bootargs_usb 'setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts $usb_custom_params'

Does anyone have any idea what I'm doing wrong? Everything seems to be working, but USB just doesn't boot.

Latest fw_printenv (though I have tried about 20 combinations and two different USB drives):

baudrate=115200
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
machid=f78
arcNumber=3960
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
rootfstype=ext3
ethaddr=00:25:31:04:e2:38
serverip=192.168.1.50
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run bootcmd_pogo; reset
bootcmd_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
devices=usb mmc ide
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
uenv_import=echo importing envs ...; env import -t 0x810000
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_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /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
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;
ipaddr=192.168.1.10
usb_root=LABEL=rootfs
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts $usb_custom_params
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
usb_custom_params=loglevel=7 netconsole=6666@192.168.1.10/eth0,6666@192.169.1.50/


Latest nc output:


U-Boot 2014.07-tld-2 (Sep 19 2014 - 16:13:05)
Pogoplug V4
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Hit any key to stop autoboot:  0 
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Reset IDE: ide_preinit failed

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

Part	Start Sector	Num Sectors	UUID		Type
  1	21        	15632694  	0001b1cd-01	83 Boot
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

no IDE devices available
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
2822232 bytes read in 373 ms (7.2 MiB/s)
6114335 bytes read in 459 ms (12.7 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.17.0-kirkwood-tld-1
   Created:      2014-10-25   3:29:23 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2822168 Bytes = 2.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.17.0-kirkwood-tld-1
   Created:      2014-10-25   3:29:30 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6114271 Bytes = 5.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK


Starting kernel ...

Thanks,

Nat



Edited 1 time(s). Last edit at 02/24/2015 11:48AM by nat.
Re: No USB Boot / Getting Kernel Messages in NC
February 24, 2015 02:14PM
@Nat,

Your u-boot envs look fine. So the problem is just either bootargs or mounting rootfs. Your bootargs looks fine too. So retrace your steps in creating the rootfs:

- Logging into another Linux box as root (sudo won't work).
- Format the USB drive as a single Ext3 partition, and untar the rootfs archive as instructed in the kernel/rootfs thread.
- Label the rootfs partition as rootfs using tune2fs.
- Remember to do sync a few times.
- Take it to the Pogo and cold start.

Once you booted into Debian, you can set up netconsole for kernel output as described here:
http://forum.doozan.com/read.php?2,9522


Also:
- what brand is the USB thumb drive? some USB brand is really bad for booting. When in doubt, try a good brand such as Sandisk.
- You can also try rootfs 3.16 (it is simpler to create).

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



Edited 2 time(s). Last edit at 02/24/2015 02:19PM by bodhi.
nat
Re: No USB Boot / Getting Kernel Messages in NC
February 24, 2015 05:32PM
You know Bodhi, I tried so hard to try and filter through the prior posts to solve my problem because I didn't want to bug you. You have devoted a lot of time to repeating the same information to different people with the same problem, and I'm very conscious of this. I appreciate that you took the time to assist me.

Long story short, I switched to the 3.16 image and it seems to be working. I'm not certain, but I have a suspicion that the image wasn't the problem. I've been reserving a DHCP address for the Pogoplug on the router, and there may be something hinky about how it does reservations. I initially booted the 3.16 and couldn't reach the Pogoplug, but then I deleted the DHCP reservation, rebooted the pogoplug, and *POOF* there it is under an unreserved address. Hmmm, puzzling. One thing that strikes me is that my problems started around the time that I set up nc on the Pogoplug, and I've definitely been having little connectivity weirdness with the linux box that is the target of the "serverip" address.

My drive is a Sandisk Cruize Fit, so it is one of the recommended models I think. I've also been testing with an older Patriot model. Both have worked for a period of time.
Re: No USB Boot / Getting Kernel Messages in NC
February 24, 2015 05:49PM
@nat,

> You know Bodhi, I tried so hard to try and filter
> through the prior posts to solve my problem
> because I didn't want to bug you. You have
> devoted a lot of time to repeating the same
> information to different people with the same
> problem, and I'm very conscious of this. I
> appreciate that you took the time to assist me.

No problem! we are not well organized (i.e. no wiki) so it is a little difficult to search for solution.

>
> Long story short, I switched to the 3.16 image and
> it seems to be working. I'm not certain, but I
> have a suspicion that the image wasn't the
> problem. I've been reserving a DHCP address for
> the Pogoplug on the router, and there may be
> something hinky about how it does reservations. I
> initially booted the 3.16 and couldn't reach the
> Pogoplug, but then I deleted the DHCP reservation,
> rebooted the pogoplug, and *POOF* there it is
> under an unreserved address. Hmmm, puzzling.

Ah! perhaps it is related to the udev net rules, perhaps not. You could check your 3.17 rootfs for content of
cat /lib/udev/rules.d/75-persistent-net-generator.rules | grep KERNEL
cat /etc/udev/rules.d/70-persistent-net.rules

There are MAC addresses in the 2nd file that must be commented out (I made sure I did in the released rootfs).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: