Initial Boot over USB?


80 posts   Page 1 of 4   1, 2, 3, 4
by sdjf » Sun Dec 09, 2012 7:25 pm
Is it totally impossible to perform the initial boot into Arch via ssh over USB instead of Ethernet? My Pi has arrived, but I am having serious problems finding Ethernet hardware that will work with the drivers available for the Zaurus PDA distribution that is the only way I have to access the Pi. If I could perform the initial boot of the Pi over USB, it would mean I could get it up and running soon.

I can find usb ethernet drivers for my PDA, but finding Ethernet adapters that use those old drivers is worse than looking for a needle in a haystack. Thought I found one, and they have changed to a different chipset and the drivers I have will not work with it. They definitely do not work with the one I bought. "device not claimed by any active driver" and yes, the drivers do show in lsmod.

It could take me months to find an adapter that will give me Ethernet ability, if I had known that, I would have bought one 6 months ago, but I expected the USB to Ethernet Adapter I needed to buy for my PDA to be plug and play, and was advised NOT to buy one until I could do thorough testing when my Pi arrived. That was a big mistake.

If I set IPs in cmdline.txt or something in config.txt in the boot partition, or would that not work because of things that need to happen during the setup that cannot be set in the txt files in the boot partition?

If this will work, then I need more specific guidance as this is a level I am not used to at all.

I hope the answer is yes...
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by joan » Sun Dec 09, 2012 7:30 pm
The Pi boots from the SD card in the SD card slot.
User avatar
Posts: 5203
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK
by redhawk » Sun Dec 09, 2012 8:11 pm
You cannot boot from USB media the PI is only capable of booting from an SD Card.

Why are you trying to use a PDA with the PI surely a USB keyboard (or USB PS/2 HID adapter) would be more suitable??

Richard S.
User avatar
Posts: 3328
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by sdjf » Sun Dec 09, 2012 8:44 pm
I have neither a monitor nor a television. It is built in for the Raspberry Pi to perform the initial boot (note I say initial boot, when the system needs setting up) via ssh over Ethernet. I would rather do that over USB if at all possible.

The only thing I have that can serve as a monitor available is a PDA, I am not asking to get told what to go out and borrow or buy (not realistic options right now), I am asking whether it is feasible to do what I need to do, with the hardware I have on hand.

Pepedog will know, I think I may have posted too late to catch him today.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by pepedog » Sun Dec 09, 2012 9:38 pm
Pepdog doesn't know everything. In fact I'm trying to get my head around what you want.
Are you talking about USB slave mode?
Posts: 960
Joined: Fri Oct 07, 2011 9:55 am
by sdjf » Sun Dec 09, 2012 9:58 pm
pepedog wrote:Pepdog doesn't know everything. In fact I'm trying to get my head around what you want.
Are you talking about USB slave mode?


LOL, Pepedog knows a lot, though. I have an Arch image on an SD card. No external monitor or TV available, I want to plug my PDA in with the Pi as host and PDA as slave, and ssh in to the Pi. Catch is, I have been told that the initial boot has to be done with either a keyboard and monitor, or over Ethernet. Is that the final word on that?

I do have a USB keyboard I could plug in to the Pi, I know it only uses 60mA so not too much power, what would happen if I plugged that keyboard into the Pi and turned it on the very first time but had neither a television nor a monitor attached? Would it unpack the system and populate the SD card so I could possibly edit configuration files to enable SSH after that? I would guess it might be an issue as key generation has to be live, doesn't it?
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by pepedog » Sun Dec 09, 2012 10:39 pm
There is no unpacking on boot, ssh is enabled and keys are generated in a few seconds.
A keyboard plugged in before or after boot just works, ctrl-alt-del reboots it, and you can login and poweroff. I guess in the arm word, where headless is more common than headful it's common to activate ssh.
webmin is a good web based tool for editing, and much more
Posts: 960
Joined: Fri Oct 07, 2011 9:55 am
by Joe Schmoe » Sun Dec 09, 2012 10:47 pm
I don't know where you get either of these ideas:

1) That you can boot over ethernet
2) That you cannot boot from USB

I get the impression that you are speaking some other language or talking about some other board (than the Pi).

In any case, #2 above is definitely untrue. #1 is untrue for most practical purposes (*).

(*) Meaning, that I think wizards have figured out ways to do it, but it is not really accessible to us mere mortals.
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2510
Joined: Sun Jan 15, 2012 1:11 pm
by ghans » Sun Dec 09, 2012 11:01 pm
AFAIK you can put Angström on your Zaurus ,
and Angström should support usbnet.


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
Posts: 4401
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by sdjf » Mon Dec 10, 2012 12:33 am
Joe Schmoe wrote:I don't know where you get either of these ideas:

1) That you can boot over ethernet
2) That you cannot boot from USB
_

It is my understanding that the Pi boots when the SD card is in place and the power is turned on.

However, when all the stuff at eLinux says you have to have a keyboard and monitor to use the Pi, I asked last March in the forums about access without a monitor and was told that Ethernet was the only way. I cannot find the archives or would give you a link.

Anyhow, I went ahead and turned the power on with the SD card in my Pi to see if it would work with my PDA plugged in to the Pi's usb hub. Now am struggling to figure out how to access the Pi. I assigned a USB0 IP in cmdline.txt as follows:

ip=192.168.129.1:192.168.129.3:127.0.0.1:255.255.255.0:rpi:usb0:off

Is that right? Is the usb0 right, I just guessed, the PDA is using usbd0 but I do not know if that is what the Pi would use.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by redhawk » Mon Dec 10, 2012 12:38 am
Since you have no TV or monitor, no computer, no laptop, no keyboard or mouse, no internet access what exactly are you using your Raspberry PI for??

Richard S.
User avatar
Posts: 3328
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by sdjf » Mon Dec 10, 2012 12:40 am
@gans: I have usbnet and usbdnet working on my Zaurus, I have used them. So see no need to change PDA distributions. The issue is one of having apparently been mislead by people not running Arch, saying I could not just use plain USB unless I first set everything up by either logging in as root over Ethernet or with a keyboard and monitor.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by sdjf » Mon Dec 10, 2012 12:47 am
redhawk wrote:Since you have no TV or monitor, no computer, no laptop, no keyboard or mouse, no internet access what exactly are you using your Raspberry PI for??


I did not say I have no keyboard, but I have no display for the Pi.

I will eventually have Internet access, but the main reason for the Pi is to enhance the computing power I have. Whether or not the Pi will go on the Internet is irrelevant. There are lots of things one can do with a computer without taking it on to the Internet.

In fact, I do have internet access, but the modem I have works on the PDA and will not work on the Pi. A 56K Socket CF Modem.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by ghans » Mon Dec 10, 2012 8:02 am
@sdjf
Looking back , my suggestion sounds a bit stupid. I have no idea
how you would set-up your Pi to communicate with the Zaurus
over usbnet on initial boot

And i wouldn't know which settings to use either.
Sorry for wasting your time.

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
Posts: 4401
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by sdjf » Mon Dec 10, 2012 8:46 am
@ghans: don't feel bad, I knew you were trying to help. There are a lot of pieces of the puzzle I need to figure out and in trying to circumvent getting asked why not do such-and-such, I tried to map out as much as I could about my reasons for asking in the first post.

@pepedog: still trying to understand your suggestions. Not sure how a web editor will help me with an offline Pi. But interesting to know that there is no unpacking during initial boot. I wish I could find the threads or wikis that led me to think that. Too bad they totally seem to have taken the original forum offline, I cannot find the earlier thread from last winter.

The question now shifts to whether all I need to do on the pi end is to put one line in cmdline.txt, declaring the IPs of the client and server on usb0. Is usb0 the correct reference for the server?

ip=192.168.129.1:192.168.129.3:127.0.0.1:255.255.255.0:rpi:usb0:off

Or is there some other default IP that the Pi is given? I see nothing in netstat -nr on the PDA, but if the above line is all that is needed, the debugging is on the PDA side and not the Raspberry Pi side. assuming there are not power supply issues, and I will have multimeter in a few days to check that.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by ghans » Mon Dec 10, 2012 8:57 am
Another Idea :

If the Zaurus can run Linux , and supports USB Host mode ,
why don't you log in via serial console ?
TTL-UART -> USB adaptors sell under 7 dollars AFAIK.


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
Posts: 4401
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by sdjf » Mon Dec 10, 2012 2:38 pm
ghans wrote: Another Idea :
If the Zaurus can run Linux , and supports USB Host mode , why don't you log in via serial console ?


Thank you. That is what I am trying to do, except I thought the Pi had to be the host and the Zaurus the client. Maybe that is what I am doing wrong? Am I instead supposed to set up the Pi as client and Zaurus as host?

Also, I only have one command line/terminal interface on the Zaurus and it will attach to whatever I tell it to. Not quite sure if you mean something different when you say serial console. I can use ssh on it to log into hosts on the internet, and can also use ssh to log in to my other PDA with it, if I want. And there is no router.

ghans wrote: TTL-UART -> USB adaptors sell under 7 dollars AFAIK.


I am not sure what you are talking about or why I would need one of these. My Zaurus has two USB ports (client and slave modes), and it's own USB hub. Why do I need a TTL or UART adapter?
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by ghans » Mon Dec 10, 2012 2:54 pm
You would use Minicom or similar on your Zaurus and the adaptor connected to the
Pis GPIO.

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=24950

AFAIK on usbnet both ends are equal , beacuse that creates a virtual ethernet adaptor on both "host"(Pi) and "client" (Zaurus) .
The thing i mean (plugs into the Pis GPIO pins) :
http://www.ebay.com/itm/New-USB-to-TTL-Serial-Cable-Adapter-FTDI-Chipset-FT232-USB-Cable-Computer-Cable-/261101529602?pt=US_Audio_Cable_Plugs_Jacks&hash=item3ccadd2a02

http://www.ebay.com/itm/new-PL2303-USB-To-RS232-TTL-Converter-Adapter-Module-cable-/170872574752?pt=LH_DefaultDomain_0&hash=item27c8cc9320
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
Posts: 4401
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by sdjf » Mon Dec 10, 2012 3:15 pm
ghans wrote: You would use Minicom or similar on your Zaurus and the adaptor connected to the Pis GPIO.

Thanks for the information about that, it might come in handy when I want to connect my other, older Zaurus to the Pi. Both Zauruses have Minicom on them as well as my preferred terminal, I guess I can use it if I have to, although I find some essential MINICOM commands do not seem to work reliably for me.
ghans wrote:AFAIK on usbnet both ends are equal, beacuse that creates a virtual ethernet adaptor on both "host"(Pi) and "client" (Zaurus).
The thing i mean (plugs into the Pis GPIO pins) :

Thanks, I did see some of those with google but was curious as to why I would need them when I can just use USB without purchasing any more hardware. If usbnet will work, then I just need to figure out what is not quite right in how I am setting things up in the software department.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by Lanzecki » Mon Dec 10, 2012 3:38 pm
I'm not sure you can achieve what you want without some prior configuration off the Pi before the boot. Out of the box I don't think that USB networking is configured (I may be wrong). I think that you would need to mount your SC card in another Linux box and make the configuration changes necessary to bring up the USBnet. Arch is a very lean distro too, which I think means that very little is set up at first boot. Raspbian is more friendly as the network is already there as long as you have a cable and a DHCP server available :) .

If you have a serial to usb adapter, you could perhaps set up a TTY against that. Not something I've ever tried so I have no idea if it would work in the way you need.

Another option might be to use a 1:1 (crossover) ethernet link to your PDA (if you have that capability on the PDA).
Posts: 1
Joined: Mon Dec 10, 2012 3:30 pm
by pepedog » Mon Dec 10, 2012 3:51 pm
Arch is a very lean distro too, which I think means that very little is set up at first boot. Raspbian is more friendly as the network is already there as long as you have a cable and a DHCP server available

Arch is like this too.
It's likely that has all the drivers that deb has too.

If usbnet is going to work, the device has to be plugged into pi and examine dmesg to see whats identified, no point guessing. Then the config begins.

usbnet can mean something totally different too, I have an Aldi wirless access point, it has usb ports on. Over ethernet I see these as usb ports on my pc.
Posts: 960
Joined: Fri Oct 07, 2011 9:55 am
by ghans » Mon Dec 10, 2012 3:54 pm
Yeah , google mostly gives results to USB over IP , instead of IP over USB.


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
Posts: 4401
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by sdjf » Mon Dec 10, 2012 3:57 pm
Hi Lanzecki,

I have put a line in the boot partition's cmdline.txt file that should configure USB networking, just not sure if I have done that right. See my earlier posts in this thread showing the entry I made.

I went for Arch specifically because it is lean, on dialup, it makes no sense to me to spend dozens of hours downloading another distribution that is mostly GUIs I never will use, and I understand the GUI distributions have disabled dialup. My Pi will eventually be going online via dialup.

I initially was trying to set up Ethernet to the PDA. The PDA should have Ethernet cability but it turns out that there are not drivers for any of the Ethernet adapters I can find to attach it to Ethernet, so I decided to use plain USB instead.

I think my best bet at this point is to connect the Pi and PDA via USB - no additional hardware required, I just need to get the setups right on both ends.

Maybe they are right and the Pi is defective, I am also trying to figure that out. The PWR light is red, no other LED is activated. This is hard stuff!
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by sdjf » Mon Dec 10, 2012 4:08 pm
@Pepedog: I thought I was supposed to use netstat -nr to examine what is happening, I am not sure dmesg on my PDA shows networking. I do have a separate syslog that shows networking.

What do I look for in the PDA's dmesg or my PDA syslog? I do not see anything related to the Pi in either on the PDA. Remember I only have access to the boot partition on the Pi at this point, nothing else on the Pi.

Re: LEDs, I do finally see the faint green on ACT, had to cover the bright red PWR to see the green as other so bright. So that is good.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by sdjf » Mon Dec 10, 2012 8:27 pm
Well, I have now managed, accidentally, to mount Partition 1 of the Raspberry Pi as a mass storage device on my PDA. I cannot mount Partition 2, probably as my PDA does not recognize ext4.

But this is not what I want, it is cool to be able to edit cmdline.txt without taking out the SD card, but I want to ssh into the Pi.

My cmdline.txt now reads as follows:

dwc_otg.dma_enable=1 dwc_otg.dma_burst_size=256 dwc_otg.lpm_enable=0 dwc_otg.dma_enable=1 console=ttyAMA0,38400 kgdboc=ttyAMA0,38400 console=tty1 loglevel=6 smsc95xx.macaddr=08:00:28:00:60:01 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait
#ip=192.168.2.1:192.168.2.3:127.0.0.1:255.255.255.0:rpi:eth0:off
ip=192.168.129.1:192.168.129.3:127.0.0.1:255.255.255.0:rpi:usb0:off
#ip=192.168.129.3:192.168.129.1:127.0.0.1:255.255.255.0:rpi:usb0:off

Note I have commented out other feeble attempts, I hope cmdline.txt is ignoring those commented out lines?

The browser I am using will not let me post more lines here, I can try to post dmesg output showing this later. But now that we see the pi is mounted as a storage device, and a friend said that is what dmesg was telling me, what do I try next? I had changed to loglevel=6 because someone else said they had to do that, the original cmdline.txt had loglevel=2.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1287
Joined: Fri Mar 16, 2012 5:20 am
Location: California