No IP Address


11 posts
by johnsnails » Fri Aug 03, 2012 11:27 am
Hey!

I was following a tutorial to set up a static IP address on my R-pi, anyhow after restarting my R-pi it did not get an ip address (something went wrong), how can I ssh or more specifically how can I return to DHCP or anything where I can get to a command line?

I feel that doing a clean install is overkill for what could be a common problem.

I guess in a nutshell, how does one drop to a terminal? I tried 'CTRL' + 'ALT' + 'F1' but didnt work :'(

Cheers.
Posts: 5
Joined: Fri Aug 03, 2012 11:23 am
by SirLagz » Fri Aug 03, 2012 3:33 pm
A link to the tutorial would be helpful, just to see what method you were using.

If you were using Raspbian, you will need to edit /etc/network/interfaces

should have

auto eth0
iface eth0 inet dhcp

to make eth0 use dhcp.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by johnsnails » Sat Aug 04, 2012 12:02 am
Thanks for the reply!

Cannot find the exact tutorial...

But to answer your other question, I am using Raspbmc.

So all I get is the XBMC interface, I needed to ssh onto it to make changes to IP address. but now its not getting an IP address, I can no longer ssh onto it.

Hope this helps.
Posts: 5
Joined: Fri Aug 03, 2012 11:23 am
by johnsnails » Sun Aug 05, 2012 3:29 am
Just letting you know, in the end I opted to do a clean install.

Although if anyone has an answer I'm sure it will save someone else some time. Not to mention a neat thing to know.

Cheers!
Posts: 5
Joined: Fri Aug 03, 2012 11:23 am
by SirLagz » Sun Aug 05, 2012 3:33 pm
RaspBMC should have the same thing as it's based off Debian.

If you get into the XBMC interface, Ctrl-Alt-F1 should dump you to a terminal where you can modify the /etc/network/interfaces file.

Otherwise there's probably a way to do it from the XBMC interface, but I'm not sure how at the moment.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by johnsnails » Tue Aug 07, 2012 5:08 am
Hey!

I will try again (because this thread might help someone else, but as mentioned earlier CTRL ALT F1 etc didnt bring up a terminal in Raspmc :'( If it does I will mark this thread as solved as that would have allowed me to edit the /etc/network/interfaces file to at least go back to dynamic IP and work out how to set a static IP.

Thanks again!
Posts: 5
Joined: Fri Aug 03, 2012 11:23 am
by SirLagz » Tue Aug 07, 2012 5:10 am
Oops, missed that.
Did you try CTRL-ALT-F2 ?
Otherwise, you could always modify the boot partition's cmdline.txt file, and add init=/bin/bash at the end to start straight into a shell.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by timothy3592 » Tue Aug 07, 2012 5:16 am
Actually I've noticed that either the wheezy or the sqeeze image actually ran the x server on tty1. CTRL-ALT-F1 is the gui and CTRL-ALT-F2 is the next available terminal. This is a little counter intuitive even for linux users :lol: .
Posts: 64
Joined: Wed Jun 13, 2012 6:06 am
by johnsnails » Wed Aug 08, 2012 3:45 am
Hey I tried CTRl ALT F1 through to F7

None of these switched between terminal or gui. But this could be because I am on Raspbmc and not the full blown debian version.

Anyhow, if anyone can work out a way to drop to terminal that would be cool. I didn't try the other recommendation by SirLagz

"Otherwise, you could always modify the boot partition's cmdline.txt file, and add init=/bin/bash at the end to start straight into a shell."

Wasn't sure how, although I assume you meant by mounting the sd card onto a computer and editing the file.

Although if that works, than that would solve the problem me thinks.

Thanks for everyone's help.
Posts: 5
Joined: Fri Aug 03, 2012 11:23 am
by SirLagz » Wed Aug 08, 2012 4:10 am
johnsnails wrote:"Otherwise, you could always modify the boot partition's cmdline.txt file, and add init=/bin/bash at the end to start straight into a shell."

Wasn't sure how, although I assume you meant by mounting the sd card onto a computer and editing the file.


Yes that's right. If all you had is a Windows computer that is.
If you had a Linux computer, then you could just mount the root partition directly and modify the file directly.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by jojopi » Wed Aug 08, 2012 5:58 am
timothy3592 wrote:Actually I've noticed that either the wheezy or the sqeeze image actually ran the x server on tty1. CTRL-ALT-F1 is the gui and CTRL-ALT-F2 is the next available terminal. This is a little counter intuitive even for linux users :lol: .
I believe all the squeeze and wheezy images had a getty on tty1, unless you changed something significant.

You may be thinking of the fedora remix. It is normal for fedora to suppress the getty on tty1 and run the display manager there, if you boot graphically.
User avatar
Posts: 2079
Joined: Tue Oct 11, 2011 8:38 pm