[raspberry-vi] Re: R Pi not starting

  • From: "Jim Kutsch, KY2D" <JimKutsch@xxxxxxxxx>
  • To: <raspberry-vi@xxxxxxxxxxxxx>
  • Date: Tue, 3 Sep 2013 12:07:19 -0400

Phil,
I thought you'd be prompted to ask more but I didn't want to overwhelm you
with everything in the first note. I only have a few minutes but I'll put
some quick answers within your note below to get you going the next step.

Jim


-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx
[mailto:raspberry-vi-bounce@xxxxxxxxxxxxx] On Behalf Of Agent Orange
Sent: Tuesday, September 03, 2013 11:13 AM
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Re: R Pi not starting


Thanks guys, and Jim in particular, for all that awesome information.  Jim,
I've been trying some of your commands, and now I can move around through
the directory structure, which is a good start!

I've noticed that things look different depending on how I log on.  

If I log on as "user" I get a prompt which says "User@Arch Pi $".  Whereas,
if I log on as "root", I get a prompt which says "Bash 4.2".  Why the
different prompts, and what does bash 4.2 mean?

JK: The most important part of the prompt is the $ or # character. The $ is
for regular users and the # indicates "superuser" (or root). The user @ Arch
Pi part is the user logged in and the name of the Linux system. For example,
if I change my system name to ky2d and login as Jim, I'd get a prompt like
Jim @ ky2d $. In the case of a root login, the bash is which shell you are
running and 4.2 is the version of the Linux kernel. For fun, you can change
any of these prompts by setting something in the shell variable "PS1" (such
as "PS1=What Now?" and then starting a new shell. After that, your prompt
would be "What Now?" This is only the beginning of how much you can do to
customize Linux to what you want.

Is it something to do with having "root" privilages?  What is the purpose of
the root directory.  I see that I can only get into /the root if I am logged
on as root, but it's empty according to ls.  What's the purpose of the root
directory?

JK: What you can get into and what you can do with files are controlled by
permissions. That's the RWXR-XR-X like strings you'll see if you run ls -l.
The first set of three letters are what the owner of the file or directory
can do. The second set are permissions for members of that user's "group" of
users, and the third are what everyone else can do. This is frequently
called user, group, and other.

That's a great tip about increasing the punctuation level with Numlock 0
plus F12.  Is it possible to make changes like this and have Speakup save
them for the next session?

JK: No. But you can create a command to set them and have that run every
time you login as an automatic part of your login process. We can discuss
that more in a future note.

I'm trying to work the cat command.  I'm at the User@Arch Pi prompt and I
can tell that my current directory is /home/user.  I type ls -1 and see that
one of the files in this directory is readme.  So I type cat readme  so see
the contents of this file.  But I get the message "no such file or
directory".  If I just type readme, I get the message "Bash: readme: Command
not found"  How can I use the cat command to read this and other files?

JK: Case is extremely important in Linux. It's not like Windows. README,
ReadMe, and readme are not the same files, they are three different ones in
Linux. You have to listen to the pitch shift feature in Speakup and see if
they are capital or lower case letters. For now, if it doesn't work, just
try capitals. Also, a really nice shorthand is the use of the tab key. If
you type cat r<tab> the tab will complete the line with anything that's not
ambiguous that starts with lower case r in the current directory. So, trying
cat r tab with upper and lower case r will get that readme file to print.

I'm also finding that I can't run either of the scripts in this directory to
expand the size of the partition as I get similar messages.  Am I doing
something wrong?  Is there something I need to know about entering commands
or executing files?


JK: Two things. First, it could be the upper or lower case thing again.
Second, it could be that the current directory isn't in the path where the
shell looks for commands. You can force it to execute a command in the
current directory by starting it with ./ (note that that was a period
followed by a slash.) So, dot followed by slash, followed by x (./x) means
execute x in the current directory even if the current directory isn't in
the shell's search path. Note, it's safer security not to have the current
directory in the search path on a multiuser system so just get used to the
dot slash thing.

If I wanted to read readme in an editor, which is the best one to use with
Speakup?  I've heard of VI and nano.  

JK: this question could start religious wars but, personally, I like ex. Ex
is a line editor and I've used it for so many years that I never moved up to
a GUI based editor.

I've tried using VI with limited success.  I understand that it has an
insert mode for inserting text (accessed by pressing i) and a command mode
for everything else (accessed by pressing ESC when in insert mode).  I get
commands like DD to delete the current line, and x to delete the char under
the cursor.  And that seems to work, more or less.  But I can't get VI to
save and close reliably.  For example, pressing ESC and then ZZ does not
appear to save a file and then close VI.  I'm having to do :W to save the
file, and then Alt F2 to close VI - I can't find any other command,
including Esc Q, which will close VI and return me to the system prompt.  Is
there some reason why ESC ZZ or ESC WQ does not close VI and save the file?

JK: Vi uses ex commands for writing and quitting. Try :w for write and :q
for quit (note the colon character). A combined :wq does write and quit
together.

If there's an easier editor to use, I could give that a go.  Is Emacspeak an
editor and is that better than VI on this distro?  

JK Personal choice. As I said, I have never been disappointed by ex.


When typing ls -1, is there another parameter I can add to get one screen at
a time when there are lots of files?  They scroll off the top of the screen
at the moment.

JK: you can use ls -l | more which takes the output of ls and "pipes" it
into another command, more. More gives some lines than gives more when you
hit return. You can also limit what the ls returns by telling it only to
list some files. For example, ls -l a* will only list files that start with
the letter a.

In Windows, .exe denotes an executable application file, and .txt or .bat
denotes a text file or script.   Is there a way of identifying different
file types in Linux?  

JK: it's the permission string I mentioned earlier. The "x" in the string of
rwx means executable. R is readable, and w is writable.

I better stop there for now or you'll get board of me very quickly!  

Thanks for your patience.

Phil








-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx
[mailto:raspberry-vi-bounce@xxxxxxxxxxxxx] On Behalf Of Jim Kutsch, KY2D
Sent: 02 September 2013 20:11
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Re: R Pi not starting

Phil,
Don't worry about  the questions, ask away. There are plenty of us on the
list who will help. 

To address your specific questions, if I remember to do a shutdown before
powering off, it's rare. I've just cut power several times with no issue. Of
course, if you are in the middle of editing something with files open or if
you have started a complicated command and spun it off into the background,
then a powerdown would be unwise and may corrupt something.

As for learning the command line interface, there are several good
resources. The shell (the piece of the Linux system that provides the CLI)
is basically similar enough between Linux distributions that any Linux
tutorial would help you get started.

To get you started and give you a few things you can try out, here are some
commands you will find useful:

ls will list the files in the current directory. I always use "ls -1" so it
lists the files one per line. Using "ls -l" will give you  a "long" listing
which shows you the owner and group, permissions, and date/time of
modification.

cat x where x is a file name will display the contents of that file.

Date will show you the system date and time.

The directory structure is a tree structure similar to that on windows
except that the forward slash is used and / itself is the root of your
filesystem. So., /home/jim would be, for example, my home directory. cd or
chdir will take you to another directory, such as cd /etc will put you in
the /etc directory and cd x would take you to subdirectory x in your current
directory. A double period (..) is shorthand for up one level. So, if you
were in /home/jim, then cd .. would take you up to /home. The pwd (print
working directory) command will always show you where you are. You can make
new subdirectories by using mkdir x which would create a directory x in your
current directory. Using mkdir /home/jim/x would create a directory x inside
/home/jim no matter what directory you were in when you ran the command. 

One thing I advise everyone starting with Speakup to do is increase the
punctuation levels so you are sure to hear all the punctuation. At least
until you really become familiar with Linux, hearing all punctuation is
important. Hold the 0 key on your side keyboard and press F11 until it says
level 4 then do the same thing with holding 0 and pressing F12.

All CLI commands and a lot of other things are documented in a manual in the
system. The command "man date" will give you the manual pages for the date
command.

Enjoy and bring your questions,
Jim  


-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx
[mailto:raspberry-vi-bounce@xxxxxxxxxxxxx] On Behalf Of Agent Orange
Sent: Monday, September 02, 2013 1:02 PM
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Re: R Pi not starting


Thanks Mike it will be good to speak.

This is my first time ever using Linux or a Pi so I'm about to ask lots of
really dumb questions.

Once logged in, do I shut down properly before powering off by typing sudo
shutdown -h now?

Is there a beginners guide to the Linux command line which will explain the
basics of the linux file system, key commands, etc?  I've searched online.
There is plenty of info, but nothing that I have been able to find which
walks a user through is first time at a linux command line.

Phil


-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx
[mailto:raspberry-vi-bounce@xxxxxxxxxxxxx] On Behalf Of Mike Ray
Sent: 02 September 2013 17:11
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Re: R Pi not starting

Phil,

There is a long and detailed history of efforts to get tts and the speakup
screen-reader going on the Pi.

I will email you off-list with my phone number so we can speak.

Mike

On 02/09/2013 16:35, Agent Orange wrote:
> Mike, and all,
>
> As I mentioned earlier, new R Pi boards made by Radio Spares use a 
> Hynix rather than a Samsung chip.  This is causing many older R Pi 
> images to fail to boot.  I understand that this issue is likely to 
> effect all rev 2 Ri Pi boards manufactured by Radio Spares since 
> around
March / April 2013.
>
> This has caused Mike's accessible Arch Pi Linux image to fail to boot.
>
> I have found a solution which works on my R Pi Model B from Radio Spares:
>
> 1.  Download the latest standard Arch Linux image and write it to your 
> SD card.
>
> 2.  Copy the following three files from the SD card to your PC:
>
> bootcode.bin,
> fixup.dat, and
> start.elf
>
> 3.  Overwrite your SD card using the accessible Arch Linux image.
>
> 4.  Copy the three files mentioned above from your computer and use 
> them to replace the equivalent files on your SD card which contains 
> the accessible Arch Linux distro.
>
> 5.  Put the SD card into your R Pi and boot as usual.  The boot 
> messages will be spoken and username and password can be entered.
> Espeak appears to be unaffected.
>
> This is my first time using the Pi so all I have done is overcome the 
> boot failure and achieve a successful boot, I have not tested any 
> other aspect of the OS.
>
> Mike - might be worth having a play and seeing if you want to 
> incorporate these files into your updated image to prevent others from 
> experiencing this issue?  If you have a dropbox account, I'd be happy 
> to let you have the three files which I used.
>
> Phil
>
>
>
>
> -----Original Message-----
> From: Agent Orange [mailto:agentorange@xxxxxxxxxxxx]
> Sent: 02 September 2013 15:25
> To: 'raspberry-vi@xxxxxxxxxxxxx'
> Subject: RE: [raspberry-vi] Re: R Pi not starting
>
>
> Hi Mike,
>
> I have tried booting the Pi with both speakers and headphones 
> connected to the 3.5mm socket.
>
> I can't look for the Pi on my network as my router only has a single 
> Ethernet port which is the one my PC uses to connect to it.
>
> I've found it claimed that taking the files bootcode.bin, fixup.dat, 
> and start.elf from the latest Wheezy image and using these to 
> overwrite the same files in the image which won't boot, might fix the
problem.
>
> I'll try it and see.  If it doesn't work, I'll also try taking these 
> three files from the latest Arch linux distro and see whether that works.
>
> Here's where I first read this suggestion:
>
> http://www.xbmchub.com/forums/raspberry-pi-discussion/4924-%5Bimg%5D-r
> asp-el
> ec-8gb-6.html
>
>
> Phil
>
>
> -----Original Message-----
> From: raspberry-vi-bounce@xxxxxxxxxxxxx 
> [mailto:raspberry-vi-bounce@xxxxxxxxxxxxx] On Behalf Of Michael A Ray
> Sent: 02 September 2013 14:52
> To: raspberry-vi@xxxxxxxxxxxxx
> Subject: [raspberry-vi] Re: R Pi not starting
>
> Hello Phil,
>
> I was not aware of the change to the board.  I can't remember what 
> version of firmware is in the image on the download page but I know it 
> is pre
> 07/07/2013 because the firmware after that causes a problem with the 
> text to speech.
>
> Have you tried to find the Pi on your network with something like nmap 
> or by looking at the ADSL router to see if you can find what IP 
> address has been issued by it?
>
> I am about to upload a new and slightly fixed version of the Arch 
> image but it will be the same firmware version and has a kernel 
> compiled by me to version 3.6.11.
>
> Do you have a speaker or phones connected to the 3.5mm jack when you boot?
>
> Mike
>
>
> On 02/09/2013 14:31, Agent Orange wrote:
>> So it looks like I'm writing the image correctly and so have the card 
>> formatted at the same time.
>>
>> The trouble shooting page at
>>
>> http://elinux.org/R-Pi_Troubleshooting
>>
>> Describes my symptoms at section 1.4, and says that
>>
>> . Older images do not load boot code for revB boards with the Hynix chip.
>> Use release 2013-02-09 (?) or later. (I observe a single blip on the 
>> green activity LED)
>>
>> I'm not really sure what this means, but I searched online and 
>> discovered that this is a reference to the fact that Radio Spares 
>> have changed from a Samsung chip to a Hynix chip, and that some older 
>> images for the Pi will not work with this image.  I think my Pi may 
>> be one of these newer Hynix based models.
>>
>> Perhaps this is one for Mike - but does anyone know whether the 
>> accessible Arch Linux distro boots OK with these models of the Pi?
>> Has anyone tried this distro on an RS model B Pi made since around 
>> April
> this year?
>> Phil
>>
>>
>>
>> -----Original Message-----
>> From: Tim Chase [mailto:raspberry-vi@xxxxxxxxxxxxxxxxx]
>> Sent: 02 September 2013 14:06
>> To: raspberry-vi@xxxxxxxxxxxxx
>> Cc: agentorange@xxxxxxxxxxxx
>> Subject: Re: [raspberry-vi] R Pi not starting
>>
>> On September  2, 2013, Agent Orange wrote:
>>> Do I need to format my 4GB SDHC card before burning the image to it, 
>>> or will burning the image to the SC card be sufficient to format it 
>>> correctly?
>>>
>>> Windows tells me the SD card is formatted as FAT32, is this OK for 
>>> the Pi or does it need to be x4 or something?
>> If you properly write the image (using an image-writer rather than 
>> just copying the image file to the disk), it should be the equivalent 
>> of formatting the drive.  Depending on the disk image you use, it 
>> might show up as FAT32 or as an EXT partition.
>>
>> -tim
>>
>>
>> ===========================================================
>> The raspberry-vi mailing list
>> Archives: //www.freelists.org/archives/raspberry-vi
>> Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
>> -----------------------------------------------------------
>> Raspberry Pi and the Raspberry Pi logo are trademarks of the 
>> Raspberry Pi
> Foundation.
>> This list is not affiliated to the Raspberry Pi Foundation and the 
>> views
> and attitudes expressed by the subscribers to this list do not reflect 
> those of the Foundation.
>> Mike Ray, list creator, January 2013
>>
>>
>
> --
> Michael A. Ray
> Analyst/Programmer
> Witley, Surrey, South-east UK
>
> Ham Radio Call-sign: G4XBF, licensed since 1982
>
> Don't just sit there, learn something
>
> Raspberry VI:
> http://www.raspberryvi.org/
> NVDA, the best free screen-reader in the world:
> http://www.nvda-project.org/
>
>
>
> ===========================================================
> The raspberry-vi mailing list
> Archives: //www.freelists.org/archives/raspberry-vi
> Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
> -----------------------------------------------------------
> Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry 
> Pi Foundation.
>
> This list is not affiliated to the Raspberry Pi Foundation and the 
> views and attitudes expressed by the subscribers to this list do not 
> reflect those of the Foundation.
>
> Mike Ray, list creator, January 2013
>
> ===========================================================
> The raspberry-vi mailing list
> Archives: //www.freelists.org/archives/raspberry-vi
> Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
> -----------------------------------------------------------
> Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry 
> Pi
Foundation.
>
> This list is not affiliated to the Raspberry Pi Foundation and the 
> views
and attitudes expressed by the subscribers to this list do not reflect those
of the Foundation.
>
> Mike Ray, list creator, January 2013
>


--
Michael A. Ray
Analyst/Programmer
Witley, Surrey, South-east UK

Don't just sit there, learn something

Interested in accessibility on the Raspberry Pi?
Visit: http://www.raspberryvi.org/

 From where you can join our mailing list for visually-impaired Pi hackers

===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of
the Foundation.

Mike Ray, list creator, January 2013

===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of
the Foundation.

Mike Ray, list creator, January 2013

===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of
the Foundation.

Mike Ray, list creator, January 2013

===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of
the Foundation.

Mike Ray, list creator, January 2013

=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: