New Pi

Thanks Rob and Alex. Pinged google OK. Had left wifi dongle plugged in previously which may have caused lack of connection. I then updated the system as per Alex which after about 2hrs completed OK. Then attempted to enter Robs code which was OK until I had to select router and enter encryption key. I then get errors from Bash. Not sure what I should be entering to get aceptance. How do I select router? I am with Plusnet and using a technicolor router with ssid,sn & router password, GW, MAC and key password shown underneath the router. At this stage I am still connected via the ethernet cable.
Malcolm
--
T M Smith 
Using an Iyonix and RISC OS 5.20 in the North Riding of Yorkshire
Reply to
T M Smith
Loading thread data ...
I'm pressed for time, so I must just improvise. Besides I've already written a comprehensive explanation HERE for some Italian OP [try google]. My Voda.. dongle was a problem till I understood HOW it worked: Don't step blindly to stage N+1 until stage N 'confirms' 1. the dongle is detected: dmesg | tail 2. the dongle has switch from cdrom to : tail -f /var/log/messages eject 'switched' mine. 3. only then do you call the pppd. === Let me just paste my scripts here:---- File: VodaSwitch Line 1 Col 1 380 bytes 100% # Connect VodaNet dongle echo 'This script for Kogi: Enter if ready to EJECT:' read READY modprobe usbserial vendor=0x19d2 product=0x1179 sleep 2 eject /dev/sr0
exit 0 ====================== # copied from => /mnt/slak/home/Inet/Voda8 ==
echo 'This script for Kogi to Connect after BlueLED shows switched: ?' read READY
ln -s /dev/ttyACM0 /dev/modem #dmesg | tail | grep ttyUSB
pppd lcp-echo-interval 300 lcp-echo-failure 44 connect ' chat -v "" ATZ OK\ AT+CGDCONT=1 OK \ ATM2DT*99# CONNECT "" TIMEOUT 99 ' \ /dev/ttyACM0 460800 debug crtscts defaultroute usepeerdns
exit 0 =========================== # copied from => /mnt/slak/home/Inet/Voda8 ==
echo 'This script for Kogi to Connect after BlueLED shows switched: ?' read READY
ln -s /dev/ttyACM0 /dev/modem #dmesg | tail | grep ttyUSB
pppd lcp-echo-interval 300 lcp-echo-failure 44 connect ' chat -v "" ATZ OK\ AT+CGDCONT=1 OK \ ATM2DT*99# CONNECT "" TIMEOUT 99 ' \ /dev/ttyACM0 460800 noauth debug crtscts defaultroute usepeerdns
exit 0 ============== I've just pasted these from my PC, which doesn't use the last script. But I remember that rPi needed the script instead of the 2nd one pasted here.
You should understand and confirm each step, instead of going blindly. dmesg | tail AND tail -f /var/log/messages in different consoles both show what's happening.
Reply to
Unknown
This is Usenet, not some sort of WWW forum.
Reply to
Rob Morley
[snip info on linux distro's]
Well the end result of this was my sd card was corrupted. Would not boot and ok(green) led flashed numerous time then gave up completely. Pity since the distro upgrade seemed to go Ok. It was when using wicd-curses things appeared to go wrong. Would not accept my input to select the router so I s/d and would not boot after that.
Not sure what went wrong!
I have just re-formated the card using 'SD Formater V4' on W7. Now to get a disk image or whatever.
Malcolm
--
T M Smith 
Using an Iyonix and RISC OS 5.20 in the North Riding of Yorkshire
Reply to
T M Smith
How did you do the shutdown?
If you merely yanked the plug with a program running then I'm not surprised if it got corrupted. Your best bet is to Ctrl-C to kill the rogue program and then, if you still feel the need for a shutdown, use 'sudo halt' or 'sudo reboot'.
SD cards are rather easier to corrupt than spinning rust under many operating systems. WinCE is rather good at it, especially if somebody yanks the card out without shutting down the WinCE system first, or at least closing down the app. So, in general its good to get into the habit of stopping things before removing the card. In a Pi that means a full shutdown before removing the main card, but in general, provided you've unmounted the card, it will be safe - but you can't unmount a card that's in use, e.g. to Pi boot card.
... and when you've up and running again, make a backup of the card. Rince, wash and repeat each time you've made changes/done stuff that you want to keep. Mine gets backed up before I do a Raspbian upgrade + update.
--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie
It would be really nice to be able to send a shutdown request to the OS by shorting two pins together, or some other undemanding-of-hardware method.
Reply to
Roger Bell_West
I closed the programs until I was at the commandline prompt and then took off the power. From what you say that was a mistake
I have copied NOOBS onto the card using the Iyonix. The card does not boot!!!. Should all the files be in root or should for eg the os files stay in their own directories.
Malcolm
--
T M Smith 
Using an Iyonix and RISC OS 5.20 in the North Riding of Yorkshire
Reply to
T M Smith
In message Roger Bell_West wrote:
How does one unmount the card on a pi?
Malcolm
--
T M Smith 
Using an Iyonix and RISC OS 5.20 in the North Riding of Yorkshire
Reply to
T M Smith
Rince, wash ? What is a satisfactory method of backup?
--
T M Smith 
Using an Iyonix and RISC OS 5.20 in the North Riding of Yorkshire
Reply to
T M Smith
It's not difficult to write a simple cron-driven Bash script to do just that. Quite a few people have. :)
Reply to
Dom
???
Is not "two pins" hardware ??
OK, I just shorted two pins here, did your Rpi turn off ? :-)
Reply to
hamilton
the
Aren't the hardware reset pins only on Rev2(?) boards and not installed at manufacture? It's also a brute force hardware reset, pretty much the same pulling the power out.
One could always write bit of code that monitors one of the GPIO lines and if that changes state call "shutdown -h now" to gracefully shutdown the device.
--
Cheers 
Dave.
Reply to
Dave Liquorice
The "watchdog" package can do that. It runs a background program that can test for all kinds of conditions and when they are (not) met, it attempts to reboot the machine in software. You specify what you want to monitor in a config file. When the reboot fails, or when the entire system including that program suddenly gets stuck, it will use the hardware watchdog to reset the system (with the risk of card corruption).
Reply to
Rob
I want to be able to _shut down_ the machine, not reboot it. (It's typically been sitting in the back of my car logging GPS data. There's no scope for a screen or keyboard, but I could bodge in a switch to a pair of GPIO pins.)
Reply to
Roger Bell_West
You could also plug in a wifi stick, set up an AP (
formatting link
), install a web server, make a web page with a button that calls a (php/whatever) script that makes a system call to shutdown, and finally add the web server user to the sudoers file via "sudo visudo" like so "www-data ALL=NOPASSWD: /sbin/shutdown". Log on to the AP with your phone/tablet then browse to the pi's address.
Reply to
A. Dumas
Since the card is the Linux boot device, you have to shut down the entire OS. "shutdown -h now" will do it (run as root, so you probably need sudo shutdown -h now).
On the other hand, if you are running RISC OS you don't need to worry - nothing is held open, and you can even swap the card while running.
--
Alan Adams, from Northamptonshire 
alan@adamshome.org.uk 
 Click to see the full signature
Reply to
Alan Adams
That used to be good enough for DOS computers because DOS is not a multitasking system. Linux, even at the command line prompt, is. It does not always go wrong; I had some system crashes and had to pull the plug but luckily it never resulted in sd card corruption. So yeah, to be safe always use "sudo shutdown -h now" or "sudo halt" or "sudo poweroff" (effectively all the same) before yanking the power.
Reply to
A. Dumas
fastest way to get a shutdown is sync; halt.
if you are sure there's no live cached write data, halt will thump the system down.
Leastways on normal *nix systems it will.
formatting link

has more detail
--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
 Click to see the full signature
Reply to
The Natural Philosopher
That's all very well, but not all pis will have a terminal connected, and the effort in doing so may outweigh the effort of replacing the sd.
I run 2 pis as headless controllers, and have only, ever, yanked the power to shut down for over a year now, one of them on a daily basis. I do have standby sds at hand for the unlikely case of corruption, but they have not been called upon because of power yanking (although I've corrupted an sd by other means). Neither have I seen *reliable* reports of this happening to anyone else.
I believe this potential problem to be very much overstated, but, of course, YMMV.
Cheers, Tony
Reply to
Tony van der Hoff
the danger with plug pulling is that the disk daemon MAY be in the process of writing data.
so you may get corrupted file or worst case a corrupted disk STRUCTURE.
halt should in theory shut down that daemon gracefully and fast and then kill all other running programs gracelessly.
THEN pull the plug..
--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
 Click to see the full signature
Reply to
The Natural Philosopher

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.