pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Initial Boot over USB?

Mon Dec 10, 2012 8:35 pm

It was dmesg of the rpi that would be needed.
If the rpi has the module, ifconfig -a will show it. If it does I suppose config can be discussed.
You are going to have to borrow a minitor/tv, I can't see how you can continue without

Note that cmdline.txt is a one line thing, a command string to pass to the kernel. Subsequent lines ignored.

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Mon Dec 10, 2012 10:15 pm

I have no way to get a monitor any time soon.

I will fix cmdline.txt so what I need is all on one line, thanks for that clarification.

Can I ask what the device name will be when I do connect over usb, on the Pi end? Is anyone doing that who knows? Is it usb0 or something else? That could be what is wrong.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

micerinos
Posts: 74
Joined: Fri Nov 09, 2012 11:15 am
Location: Madrid, Spain

Re: Initial Boot over USB?

Tue Dec 11, 2012 8:43 pm

Hi,

interesting thing what you are trying to achieve. Kudos!

Not an arch expert here (and never used usb net before), but first of all you should make sure the arch kernel in raspi is configured with both usbnet and zaurus support (usbnet.ko and zaurus.ko). To recover kernel configuration in Raspbian (not sure about arch), you can do:

Code: Select all

zcat /proc/config.gz > .config 
As you can read here:
http://cateee.net/lkddb/web-lkddb/USB_NET_ZAURUS.html
http://www.linux-usb.org/usbnet/
if you are using stock rom in zaurus device, you need zaurus.ko module for it to work. If it is not present, you may need someone to compile it for your kernel version/build chain.

Apparently, the typical behaviour of usbnet module is to create a network interface called usb0 (if everything fails, that may mean you are using a wrong ifname). I'm not really sure how kernel boot configuration of networking will interact with Arch's network setup. It may be easier if you simply edit the file /etc/conf.d/network with something similar to this (as per instructions found here, https://wiki.archlinux.org/index.php/Ne ... figuration):

Code: Select all

 interface=usb0
 address=192.168.0.10
 netmask=24
 broadcast=192.168.0.255
 gateway=YOUR_PDA_IP
Therefore, you need access to your root partition in the SD, so you may need again someone's help with that. Also, you may not have a TV, but I'm sure you know someone that has. A simple RCA cable (I'm sure you know someone that has one and can borrow for some hours) will allow you to see what happens in your raspi when pluggin-in your PDA. It can save you lots of time. dmesg, lsusb and ifconfig are essential informations.

Hope it helps. Good luck!


sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Tue Dec 11, 2012 9:14 pm

Thank you Pepedog.
Can anyone paste in that line? On my PDA screen, all I can see is one very long column of numbers, below which is a whole lot of information smashed together, probably they put this in an html table instead of putting it into an accessible format for everyone.

Thanks!
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Initial Boot over USB?

Tue Dec 11, 2012 9:25 pm

CONFIG_USB_NET_ZAURUS=m
So it's there

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Tue Dec 11, 2012 9:32 pm

pepedog wrote:CONFIG_USB_NET_ZAURUS=m
So it's there
thank you, what does that mean?
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

ghans
Posts: 7868
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Initial Boot over USB?

Tue Dec 11, 2012 9:36 pm

It means that Zaurus support has enabled as loadable kernel
module (m) . Perhaps you should try

Code: Select all

  
modinfo zaurus 
modprobe zaurus 
at the commandline.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Tue Dec 11, 2012 9:49 pm

@miceneros: thank you for your interest. I really cannot get or borrow an external display any time soon, so I am determined to find a way to make this work. This is Linux and it certainly should be possible to set up a headless connection without a display to set it up.

I think one key may be in checking the entries in cmdline.txt more carefully, I am searching out information about that and modifying my cmdline.txt file accordingly.

Until I can get access to the pi somehow using ssh, all I have access to is the boot partition, maybe because my Zaurus does not recognize ext4. So I cannot edit any files in the regular file system itself, It is a catch 22.

I am not sure if the line pepedog pointed out means that usbnet.ko and zaurus.ko are installed in Arch, or supercedes any need for them.

A lot of this is above my head, but I have a Zaurus friend, who lives far away but is also trying to help and will refer him to the information you and pepedog have provided.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Tue Dec 11, 2012 10:01 pm

ghans wrote:It means that Zaurus support has enabled as loadable kernel
module (m) . Perhaps you should try

Code: Select all

  
modinfo zaurus 
modprobe zaurus 
at the commandline.
that is good news ghans. but the whole point of this thread is I have no access to commandline on the Pi until I get usb or ethernet working. Ethernet is a hardware driver issue for my PDA so trying to see if I can just use usbnet to ssh in.

will typing in those commands trigger module loading? if that is the case, I can try them without seeing what I am doing. I read that I could type root, wait a minute, type root, wait a minute, then enter commands, right?
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

ghans
Posts: 7868
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Initial Boot over USB?

Tue Dec 11, 2012 10:13 pm

If Arch has a root account , yes i presume. (Rasbian uses sudo)
Does Arch launch raspi-config at first boot ?


I am convinced that using the Pi UART will get results faster. Is "screen"
available for your Zaurus ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Thu Dec 13, 2012 3:50 am

ghans wrote:Does Arch launch raspi-config at first boot ?
I really do not know
ghans wrote:I am convinced that using the Pi UART will get results faster. Is "screen" available for your Zaurus ?
I have been curious about UART, but I am not convinced it would be faster when I know nothing about UART or the GPIO pins and have none of the equipment needed to set up a serial connection that way. I do not even know what I would need. Although I do think that, at some point, it might be a better way to connect both of my Zauruses to the Pi.

About "screen," I do not think it is available for the Zaurus, but maybe there is an equivalent. What would it do? I have a console program that gives me command line access, and I can do anything there one would do from the command line, including open lynx browser, which is what I use for most of what I do on the Internet, as it is so much faster.

Just to update everyone, an out-of-state Zaurus friend put a copy of the hard float image on his secure server for me to look at, and while the old image I had downloaded did not have it, the current image has Zaurus support, as Pepedog kindly pointed out. So, while it is grueling over dialup with a low memory device that crashes easily, I am in the process now of preparing an SD card with the September image and hoping that will resolve a lot of the problems I have been having connecting to my Pi.

/usr/lib/modules/3.2.27-5-ARCH+/kernel/drivers/net/usb/zaurus.ko.gz

I had hoped that I could get the March version to do this work instead of going through multiple crashes and reboots of my Zaurus, but since my chances of getting in to the Pi via ssh are much, much better with the current image, I am putting my Zaurus to work.

I will report back, once I have either a working solution, or more issues I need help with. Some issues are arising that may be more appropriate in other threads and subforums, but will be posting more here when it is appropriate.

Thank you all for your patience with my questions.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

ghans
Posts: 7868
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Initial Boot over USB?

Thu Dec 13, 2012 7:34 am

As i said , a cheapo USB -TTL UART adaptor would directly plug into the Pi
and the Zaurus.They even can be directly plugged into the GPIO. You may
need a USB mini male to USB A female adaptor cable though. With screen
you could attach to the serial console and start raspi-config , lynx (on the Pi)
or vim . In short, all pure commandline apps should run over on a
serial terminal correctly.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Initial Boot over USB?

Thu Dec 13, 2012 10:05 am

If Arch has a root account , yes i presume. (Rasbian uses sudo)
Does Arch launch raspi-config at first boot
No it doesn't. archlinuxarm is ready to wear.

sdjf, I am considering making a new rootfs soon, it will have network configured so changes to static etc will be easy.
Also I suspect to get what you want working, access to config on the ext4 partition will be needed. With the serial at least you can always login

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Thu Dec 13, 2012 10:30 am

@pepedog: new rootfs will mean new image? I have got the current HF installed, testing, green light flashes, but still no luck with connecting Zaurus.

One thing really questioning is syntax for /boot/cmdline.txt, the example you linked to is for an nfs file system, and still have no clue about whether pi or zaurus is client vs. server and keep having to change the file to see if any combination works, nothing so far.

yes, I see advantage of getting the usb to serial adapter, issue is disability gets in the way of buying/borrowing stuff. Amazon is out of stock on the adapters with db9 female connectors, my zaurus has a serial cable with db9 male.

does green light flashing on ACT mean system booting okay? concerned as so many Arch users have had trouble getting the current image to boot.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: Initial Boot over USB?

Thu Dec 13, 2012 10:58 am

I use a serial connection to my RPi on numerous occasions. I picked up the Adafruit cable https://www.adafruit.com/products/954. Console access actually works very well though I have no idea how well it would work via a PDA.

In that you indicate you are located in California, is there not someone near you that you could use to temporarily use a monitor?

Also, assuming you could do this ahead of time, you can easily make many of the configuration files and scripts available from the FAT partition when you have it mounted in your PDA (surprised people still use these)....

You would of course need visual access first... but you can symbolically link the interfaces wpa* files even the /etc/rc.boot script to the /boot directory. Example: http://rpi.tnet.com/project/faqs/winacc ... rfacesfile

This would enable you to do some offline config and get results in a very slow process kind of way...

It might be possible to have someone make you an image with these changes and just mail it to you (not email).
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Initial Boot over USB?

Thu Dec 13, 2012 11:42 am

I was thinking same, required config file symlinked to the fat, and a whole image required

ghans
Posts: 7868
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Initial Boot over USB?

Thu Dec 13, 2012 11:54 am

I was actually thinking about using the Zaurus as USB Host.
Could you check that your Zaurus supports that ?
And then connect the UART adaptor to the Pi , the USB end to
the Zaurus.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

micerinos
Posts: 74
Joined: Fri Nov 09, 2012 11:15 am
Location: Madrid, Spain

Re: Initial Boot over USB?

Thu Dec 13, 2012 12:19 pm

Hi,
Dweeber wrote:In that you indicate you are located in California, is there not someone near you that you could use to temporarily use a monitor
Now I know more in detail sdjf's constraints (I asked the very same question), I can say that certainly he/she is really serious about not being a good idea to get a screen or any new device. To be of help here, we should just stick to the concrete constraints already exposed: how to connect a sl6000 zaurus pda (it's an ancient linux 2.4 which can read FAT and ext2/ext3 partitions in SD card, but not ext4) to raspi through usbnet. I tested the process with my android and raspbian, and the process is deceptively simple provided the you have the module and normal access to screen/keyboard.

As you said, the simplest way to accomplish it is to build a custom image that has enabled support for zaurus usb module and autoconfigures network properly. As pepedog mentioned, arch kernel has zaurus.ko compiled as a module, not built in. Therefore, if hot-plugging works as intended (which we can assume) zaurus module will be loaded after udev, which is typically done after kernel has passed over the initialization sequence to init process. That may be the reason why any kernel parameters to setup an interface that does not exist will simply do nothing.

I see several posibilities for the custom image:
1) It is compiled with built-in support for zaurus,
2) An initrd filesystem with zaurus module manages module loading and interface configuration (I think 'ip=' parameter is discarded by kernel autoconfiguration if initrd exists, someone can confirm?)
3) Default arch network configuration includes a usb0/eth1 entry so that arch knows how to manage interface configuration (the decision between usb/eth naming is related to how the OS manages mac address if the device: random mac's will trigger eth naming, while physical address will trigger usb naming).
4) Rootfs is formatted as ext3/ext2, so that sdjf can edit it himself from the pda to adapt network configuration.
5) The simbolic link solution proposed by Dweeber should also work.

If pepedog builds such an image, i'd recommend to create a rootfs formated in ext2 so sdjf can simply play with the whole distro 'offline'. In-kernel compilation of the module may also allow for boot time network setup. I can prepare a raspbian image with that features, but I think sdjf prefers arch over debian (which I don't agree, of course ;) ).

Cheers

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Initial Boot over USB?

Thu Dec 13, 2012 3:11 pm

I am considering going back to ext3 rootfs as I have seen some astonishing things with ext4. So the PDA can then edit?
Also considering that arch kernel will use defconfig (apart from ARCH tag), so if module is builtin it has to be done there. This is what I have done with -next kernel

micerinos
Posts: 74
Joined: Fri Nov 09, 2012 11:15 am
Location: Madrid, Spain

Re: Initial Boot over USB?

Thu Dec 13, 2012 3:59 pm

pepedog wrote:I am considering going back to ext3 rootfs as I have seen some astonishing things with ext4. So the PDA can then edit?
Also considering that arch kernel will use defconfig (apart from ARCH tag), so if module is builtin it has to be done there. This is what I have done with -next kernel
Maybe sdjf can confirm this, but being a 2.4 kernel it should work unless Panasonic did very weird stuff with it.

Cheers

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Thu Dec 13, 2012 4:27 pm

A lot of this is way above my head, my only computer experience within the last 20 years is the Zaurus. I kind of know how that works, but know nothing about other systems.

I think "screen" is a package for some computers. It sounds like it may be something providing serial access, I already have a terminal program built in to my Zauruses, and they can run minicom, ssh or a VNC client. And both can work with vfat, ext2 and ext3 file systems. Have fsck and fdisk tools, but the versions are 2002-2004 or earlier, not sure. But they cannot mount or read the ext4 contents of current partition 2.

Have both sl5000 and sl6000 Zaurus PDAs, custom 2.4.6 and 2.4.18 kernels from Sharp (not panasonic), have been using the sl6000 for connecting to Pi as it is the one with USB and Ethernet and host ability built in, but both have serial capabilities. Eventually, I do want *both* to be able to access the Pi, as sl6000 will be the work horse that I use to work with the Pi, but am writing an application that also will run on the Pi all the time and be accessed via VNC from the sl5500 Collie.

Yes, the sl6000 does have host capability. Tested last April, was able to connect the two zauruses plugging the sl5500 in the sl6000's usb hub.

My Zaurus friend in Texas could customize an image for me, I was afraid if he did that, it might not work properly as the changes would not be happening via Pacman. I could then download that image from his server. All my software has to be downloaded off internet, wget is faster than ssh for sure.

But I think we need to wait and see if the next image Pepedog comes out with will just work out of the box, possibly with any minor changes being made by me to the boot partition.

I have not yet tried the two commands that somewone suggested might raise the zaurus module (instead of insmod???), I am skeptical they will work as the USB keyboard I have goes out of control (emitting random keypresses) when plugged in to any powered hub I have, and I would have to plug it into the Pi's powered hub. An approved Motorola charger is on the way to me, but cannot count on getting it this week.

I was rather surprised to see that the boot partition is in vfat, but now I understand it is so that Windows and Mac users can access and edit it.

I have already put a lot of time and energy into learning how to use Pacman offline and into downloading the Arch versions of the packages I want to install, along with their dependencies. Arch makes more sense to me, I am like a fish out of water if you put me in a GUI desktop environment. I will be running GUIs when needed, but most of my time will be on the command line.

Zaurus PDA can do a lot, my website created using vi and the GUI editors on both Zauruses, pages uploaded via ftp:

http://sdjf.esmartdesign.com/

I am running out of spare cards to put new images on, thought I had 4 of the 2GB cards, but only the Lexar ones are big enough to hold the final image, the Kingstons have 1967MB on them, but dd runs out of space trying to write to them. even though the image is under 1900 MB when unpacked, I do not understand that.

Will order some 4GB cards today but they may not arrive before attendant on vacation a few weeks.

Can download one more image, what shall it be? Also, I really need md4sum for it, otherwise have to get someone else to download it and run md5sum because Zaurus does not have sha1sum.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Fri Dec 14, 2012 1:53 am

@ghans and dweeber: Thanks, I sure got that backwards, which end was the Pi! And thank you for the product links. I had to get help but now see that those products at adafruit and ebay do not require soldering.

But, what works in theory does not always work in reality. eLinux makes it clear that this sort of product does not always work on various distributions. These may not necessarily work on Arch. They should but that does not mean they will.

I think I saw at Dweeber's website that he is running Wheezy, and we are talking Arch here.

So, if anybody has definitely used any of these adapter cables on Arch successfully, please say so. And whatever distribution, you might add them to the eLinux verified peripherals page, I did not see them there.

http://elinux.org/RPi_VerifiedPeripherals

But, as I have mentioned before, cannot get much (if any) hardware at all for quite a while. After today, my window of opportunity for immediate hardware purchases is pretty much over (I am not rich and cannot afford next day or special delivery of things). So this might be an interesting possibility in the long range, but is not something I think I can act on now.

I hope that there will be a software solution sooner because that is more within reach for me. Am continuing to see if I can tweak what I am doing on the Zaurus end but, if others have said, cmdline.txt's IP statement is not being used in this case, it may be a useless endeavor, at least with the 18 Sep image.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: Initial Boot over USB?

Fri Dec 14, 2012 2:50 am

sdjf wrote:I think I saw at Dweeber's website that he is running Wheezy, and we are talking Arch here.
I have the Arch distro, I will throw it on a card and take some pics...

Okay... just tried it.... no go.

Not that it won't work, but by default Arch doesn't run with console access turned on. there is some info on this in the following thread: http://www.raspberrypi.org/phpBB3/viewt ... 53&t=19186 Not being an Arch linux user, I am a bit surprised, but I've not had experience with it before.

I suppose if you get an image with it setup, you would be good to go.
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Initial Boot over USB?

Fri Dec 14, 2012 5:14 am

dweeber:

thanks, I had seen that thread and while a lot of it is above my head, I did see the comment about speed and changed that in my cmdline.txt to 38400. Funny it did not come up when I searched specificially for adapters, it came up when I was looking for posts about cmdline.txt and the information did not register in memory that it was talking about serial connection.

so that means two of four adapters work in arch, is that right?

I am more likely to consider one from ebay as the Adafruit is much more expensive. However, that one is from ebay on the UK, and I am in USA, do not want to deal with import issues.

Buying something that will not necessarily work in order to get access does not make sense to me, too many unknowns may not get me very far, and it will be way past the few weeks Allied gives to return defective units if this Pi has issues.

Did get to test my power input, it ranges 4.98 to 5.28 volts, a little over the 5.25 I have seen as a maximum, could that be messing anything up on this rev 2 board? More stable power will be arriving shortly.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

Return to “Arch”