Welcome! Log In Create A New Profile

Advanced

Dockstar - uBoot problem

Posted by jussi 
Dockstar - uBoot problem
March 27, 2012 08:19PM
Hello Everyone,

I'm attempting to build a piratebox uisng a dockstar to run the chat feature. I have built another piratebox without shout using just a TP-Link with no problems. I have had no luck and nothing but issues having followed the instructions to load uBoot. I believe that I have installed it correctly but when I try to boot via USB (Different issue to deal with) the status light on the dockstar turns off and it turns into a paperweight.

I have connected via SSH to attempt in getting netconsole to work, but when I give it the fw_setenv command it tells me that the command was not found. I checked the /usr/bin directory but the file is not there. I did find it in the /usr/sbin directory but the command still will not work.

Pogoplug:~$ fw_setenv
-bash: fw_setenv: command not found
Pogoplug:~$


Additionally, I have tried to do a recovery but when I give it the mget command, it tells me that it can't because it is a read-only file system.

Connecting to jeff.doozan.com (69.163.187.226:80)
wget: can't open 'uboot.mtd0.dockstar.original.kwb': Read-only file system


Have I not correctly installed uBoot? or is my limited knowledge in unix/linix causing me to make a rookie mistake?


"Help me Obi-One Kenobi you're my only hope..."
Re: Dockstar - uBoot problem
March 27, 2012 08:34PM
are you sure you are actually booting debian, or are you booting just the pogo stockware right now?

uname -r
will tell you... 2.6.20-ish will be pogo, 2.6.32-ish or higher will prolly be Debian...

=====================================================
Re: Dockstar - uBoot problem
March 27, 2012 11:03PM
I think that command prompt (Pogoplug:~$) most certainly is the Pogo stock system! Jussi, make sure you are in /tmp directory before downloading.
Re: Dockstar - uBoot problem
March 27, 2012 11:24PM
Yes, that's the thing uBoot tells me:


Pogoplug:/tmp$ ./install_uboot_mtd0.sh
Connecting to jeff.doozan.com (69.163.187.226:80)
valid-uboot.md5 100% |*******************************| 756 --:--:-- ETA
## Valid uBoot detected: [dockstar jeff-2010-10-23-current ebd566de30c6521e65fb1255415c037f pogov1 jeff-2010-10-23-current]
## The newest uBoot is already installed on mtd0.


and I get

Pogoplug:/$ uname -r
2.6.22.18


What I don't understand is if uBoot is installed, why is it not running?

Thanks again for any input :)
Re: Dockstar - uBoot problem
March 28, 2012 03:20PM
Jussi,

Did you use this instruction to install UBoot and Debian Squeeze from Jeff:
http://jeff.doozan.com/debian/

If you did not then what system do you have on the USB stick?
Re: Dockstar - uBoot problem
March 28, 2012 06:55PM
Bodhi,

I followed the instructions on

http://jeff.doozan.com/debian/uboot/



As there is no additional instructions on that page or the main instructions that I am following on:

http://wiki.daviddarts.com/PirateBox_DIY_Plug_Computer


My understanding was that only uBoot was needed to be installed on the dockstar to allow USB boot. Nowhere in anything that I have read, says anything different.

I take it that this is not the case and debian is required?

Let me know so that I don't brick my dockstar. :)

~Jussi~
Re: Dockstar - uBoot problem
March 28, 2012 07:35PM
Jussi,

Sure, you can boot other other systems on the Dockstar using Jeff's UBoot. I looked the PirateBox instructions, very interesting! If you've done the USB installation for PirateBox, and still can't boot USB, then the next thing to try:

At the Pogoplug OS command prompt, do warm reboot (i.e. /sbin/reboot, or shutdown -r now). Usually, if the USB stick's brand is one that causes problem in cold boot, then warm boot likely works. Whether this works or not, you should try using a different USB stick. There are sticks that don't work properly as listed in this thread (the Sandisk USB is most reliable in booting):
http://forum.doozan.com/read.php?2,1915,2604#msg-2604

bodhi
Re: Dockstar - uBoot problem
March 28, 2012 10:23PM
Bodhi,

I will try that thanks.

Should I assume that because uBoot is having an issue with the USB device it is normal for uBoot to not boot the default system? Hence why the LED goes out and it turns into a paperweight when the USB stick is in?

Thanks again for all your input...

~Jussi~
Re: Dockstar - uBoot problem
March 28, 2012 10:45PM
Jussi,

It's hard to tell. Usually if you see LED light flashing for a while during boot, and then turns off, it's "likely" that the booting is not a problem, but possibly there is some problem with the rootfs on the USB drive or the drive itself that UBoot does not like. Since you're booting the Pogo stock, you can set up netconsole to observe the booting process and see where is the problem. Netconsole instructions:
http://forum.doozan.com/read.php?3,14,14

-bodhi
Re: Dockstar - uBoot problem
March 28, 2012 11:19PM
Bodhi,

Yes, I would love to see what's going on during boot but:

I've been working on getting netconsole to work under win 7 64-bit for 4 days now!

I've tried using Ubuntu, but having never heard of Ubuntu until 2 days ago, my attempts to figure it out are slow going.

Almost at the point that I would rather pay someone to get the bloody thing to work. LOL!

~Jussi~
Re: Dockstar - uBoot problem
March 29, 2012 01:24AM
Jussi,

:-) If you have Ubuntu then just open a terminal, follow the Jeff's instruction above for netconsole. It should be straight forward for Ubuntu. It's on the desktop side. The harder part is setting it up on the Dockstar side. You will have to download the fw_env tools to be able to set it up.

If you found it in /usr/sbin then the command should be

Pogoplug:~$ /usr/sbin/fw_setenv


-bodhi



Edited 1 time(s). Last edit at 03/29/2012 01:36AM by bodhi.
Re: Dockstar - uBoot problem
March 29, 2012 02:29PM
Bodhi,

Yes, my issue all along has been with nc rather than Ubuntu. For whatever reason nc will not accept any other command but:

nc -u 192.168.1.142 6666
(doesn't get bootlog by the way, but at least it trys to listen)

Anything else it just spits back the command switch list. (no error)

short list of what switches I've tried:

nc -l -u -p 6666
nc -p 6666
nc -l -p 6666
etc....


I don't know if it helps, but I have included the printout of the environment on the Dockstar.

Pogoplug:~$ /usr/sbin/fw_printenv
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:75:1A:49:A2
arcNumber=2097
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
serverip=192.168.1.181
ipaddr=192.168.1.142


I don't know what else to try to do, due to my lack of knowledge in UNIX and what (I'm obviously) doing wrong. This project seemed so easy from the documentation!
Re: Dockstar - uBoot problem
March 29, 2012 05:36PM
Jussi, sorry I have to ask these basic questions re your netconsole setup. Sometime we just overlook these minor details!

- Did you double check your Ubuntu desktop IP that it's really 192.168.1.181?
- And also the Dockstar IP 192.168.1.142? Did you set your router to assign this IP to the Dockstar every time it's up?
Re: Dockstar - uBoot problem
March 29, 2012 09:49PM
bodhi,

Yes I have a WAP router running DD-WRT and all the addresses are DHCP addresses. Ubuntu tells me via the network settings window that it has 192.168.1.181 with a subnet of 255.255.255.0 (I can double check in the router to see if in fact that is the address that was given to the desktop.)

Should I configure IP addresses outside of DHCP? (Wouldn't think that would be an issue)

Thanks for your input

~Jussi~
Re: Dockstar - uBoot problem
March 29, 2012 10:15PM
Jussi,

I don't think it's a problem either. As long as you're certain that the router assigns the same IP addresses for the Dockstar and the Ubuntu desktop every time you boot up then the netconsole set up is OK.

The fw_printenvs output looks fine to me also. Since you're new to Linux, perhaps you should go through the full installation for Debian first using a USB stick (it does not take long). And then test your set up for netconsole. After you've verified everything is working, reboot with the PirateBox stick. What brand of USB stick do you use?

-bodhi
Re: Dockstar - uBoot problem
April 10, 2012 09:04AM
Jussi,

I have just picked up on your problem which appears to be similar to mine. I too have been trying to get the PirateBox to work on a Dockstar without luck.

I changed the ArcNumber to 2998 in accordance with Jeff Doozan's recommendation for a Dockstar This did not solve the problem of failing to boot from the USB stick, it did however result in the LED turning to a solid green after initially flashing green.

I have tried two Dockstars and countless USB sticks (including SanDisk sticks as recommended by many), the results are all the same. I am hoping somebody out there can help as Linux operating systems are completely new to me. I have been successfully designing hardware circuits for the past 40 years so to keep the old brain active I decided to try something new - whoops!

I have a serial port connected to the Dockstar so I am able to see what is happening during the boot, the print out is in the attached file.

It appears that the USB stick is failing to mount correctly. Could somebody PLEASE help!!

Regards

HenryOz
Attachments:
open | download - Dockstar1 - Piratebox Startup Problem (12.7 KB)
Re: Dockstar - uBoot problem
April 10, 2012 07:25PM
I don't have any familiarity w/ PirateBox, but I can tell you that it is booting correctly, at least up until line 140 or even 148. After that it looks like there is some sort of permissions problem.

Does PirateBox require special permissions to run on Debian? (note all of those statements after 148 about "only root can do that".

I'd try googling "debian piratebox permissions", for starters. Sorry I can't pin it down further...

=====================================================
Re: Dockstar - uBoot problem
April 11, 2012 07:37AM
davygravy

Thanks for the suggestion, it seems logical.

A google search of debian piratebox permissions didn't yield anything useful.

As an experiment I changed the permission of all files on the USB stick using the chmod 777 command, however, this did not solve the problem.

The next step I would like to try is to change the uid and gid to 'root'. Can this be done globally for the files on the USB stick with the setuid and setgid commands?

Thanks

HenryOz
Re: Dockstar - uBoot problem
April 11, 2012 07:46PM
Dunno... it is very possible that the piratebox binaries might only run properly if there is a user set up for its processes.

=====================================================
Re: Dockstar - uBoot problem
April 13, 2012 05:46AM
From the information posted, it looks to me that:
1) There is no problem with uboot. It seems to be booting off the usb .
2) The usb is being mounted properly
3) the kernel is booting, but its have problem starting various services due to file system permission problems

I think that the file system permissions on the piratebox partition are not getting set correctly when you are doing the steps 3 & 4 of the piratebox wiki instructions. Try setting the file owner and groups to root by doing the following as super users (root);
root[rich]# chown -R root:root /media/piratebox/
Re: Dockstar - uBoot problem
April 13, 2012 06:22PM
Hi laprjns

Many thanks, you are a champion.

Changing /media/piratebox/ files uid and gid to root appears to have solved the problem. I haven't had a chance to do a lot of testing on the PirateBox yet but it appears that the server is up and running.

The boot up didn't appear to be 100% correct, there was one tmp file that could not be removed towards the end, and the Droopy symbol was skewed, but apart from that everything seems good. I have attached the printout for information.

Again many thanks

HenryOz
Attachments:
open | download - Dockstar #1 - Piratebox Start with Files at Root (14.1 KB)
Re: Dockstar - uBoot problem
April 14, 2012 05:29AM
HenryOz Wrote:
-------------------------------------------------------

> The boot up didn't appear to be 100% correct,
> there was one tmp file that could not be removed
> towards the end,

That apparently is not a problem. The startup script "S01piratebox_start" is just trying to clean up temporary files that may have been upload during the last sessions. If there are no files to delete then it's going to throw that message.
From S01piratebox_start:
#Remove any tmp files left behind from past uploads
rm /mnt/share/piratebox/tmp*

> and the Droopy symbol was skewed
maybe just a formatting issue with the terminal session.

Looks to me like you got a running system
Re: Dockstar - uBoot problem
April 15, 2012 02:19AM
laprjns

Yes the system is working correctly.

Thanks for your help again

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