LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   headless install (https://www.linuxquestions.org/questions/slackware-arm-108/headless-install-4175693335/)

brian-in-ohio 04-08-2021 10:29 AM

headless install
 
I am trying my first headless install on a raspberry pi (I have done the monitor/mouse/keyboard plugged in way many times) but I'm stuck. Can I plug the ethernet cable directly to my laptop or are the instructions on the sarpi site expecting that I would plug the pi into a router than access the pi using ssh that way? If I plug the pi directly into my pc (running 64bit slackware current) what do I need to do on the laptop side for the pi to get an ip address? I would appreciate any help just steer me to a bit of documentation, duckduckgo searches all lead to things that start with 'open my network on windows10' with pictures of park benches or use systemctl blah blah.
Thanks

camorri 04-08-2021 10:47 AM

The easy way to give your pi ( which model ? ) an address, it to run as root, netconfig, and fill in the details. I would suggest a fixed IP address and not use dhcp. Do that with the keyboard and monitor attached. Then connect the ethernet cable to your router.

It sounds to me as if you have not done much network configuring. How have you got your router set up? I have 16 ip addresses for dhcp, and the rest for fixed addressing. This way, my desktops including my Pi 3 have fixed addresses, and the mobile machines use dhcp for getting addresses.

You could plug your ethernet cable directly to another system, however, you have to set up a point to point connection since no router is involved. More difficult that using a router. You would have to set up static routing for the Pi on both ends. I have never tried it, in theory it can work.

Been running my Pi 3 for about a year without problems, other than my lack of knowledge.

Hope this helps.

Emerson 04-08-2021 10:53 AM

After you put the image to SD card (or USB stick) edit its networking configuration, set static address, then you will know how to find it on LAN. And make sure SSH daemon will start.

Exaga 04-09-2021 07:32 AM

Quote:

Originally Posted by brian-in-ohio (Post 6238579)
I am trying my first headless install on a raspberry pi (I have done the monitor/mouse/keyboard plugged in way many times) but I'm stuck. Can I plug the ethernet cable directly to my laptop or are the instructions on the sarpi site expecting that I would plug the pi into a router than access the pi using ssh that way? If I plug the pi directly into my pc (running 64bit slackware current) what do I need to do on the laptop side for the pi to get an ip address? I would appreciate any help just steer me to a bit of documentation, duckduckgo searches all lead to things that start with 'open my network on windows10' with pictures of park benches or use systemctl blah blah.
Thanks

Further to Emerson's advice...

You can set the static IP in your '/boot/cmdline.txt' file prior to booting the device and running the Slackware ARM installer. Details can be found on this page: https://sarpi.penthux.net/index.php?p=preinstall

Bascially, you edit the '/boot/cmdline.txt' file and put something like "kbd=us nic=auto:eth0:static:192.168.1.100:24" somewhere in there - NB: 192.168.1.100:24 is an example IP address with a 24-bit netmask.

brian-in-ohio 04-11-2021 04:09 PM

Is a router involved? Can I put one end of the ethernet cable into the pi and the other the pc? Do I need a cross over cable? Is it ssh pi@static.ip.address. or something else? I'm lost...

camorri 04-11-2021 04:16 PM

Not sure why you are lost. Could you explain further.

Quote:

Is a router involved?
You need to tell is yes or no. Which is it?

Quote:

Can I put one end of the ethernet cable into the pi and the other the pc?
Yes you can. Most likely you do not need a cross-over cable. Old ethernet cards yes, newer cards made in the last 10 years no.
Quote:

ssh pi@static.ip.address. or something else?
Looks correct, assuming pi is the user name you have created on the pi. It should be username@fixed-ip-address of the pi.

Try a ping command and see if you have IP connectivity.

If you go straight to the pi, you need to set up static routes between the pi and pc.
Using a router looks after that, both devices need to be in the same sub-net.

mralk3 04-12-2021 07:45 AM

It is much easier to set up a DHCP reservation than to do static routes. Most modern home routers have a way to set an IP address reservation for every networked device in the web interface.

Emerson 04-12-2021 11:18 AM

I haven't used SoHo routers for longest time, how do you know which is your Pi in router setup? Don't you need to know MAC address for this?

mralk3 04-12-2021 05:37 PM

Quote:

Originally Posted by Emerson (Post 6240261)
I haven't used SoHo routers for longest time, how do you know which is your Pi in router setup? Don't you need to know MAC address for this?

Yes you need to know the MAC address. It's not just soho routers that do this. It may even be easier to do so on larger setups. That is besides the point. You can see your MAC address by looking at ifconfig.

Code:

/sbin/ifconfig eth0 | grep ether
Just change eth0 to the name of your network device.

enine 04-15-2021 08:34 AM

Quote:

Originally Posted by brian-in-ohio (Post 6240015)
Is a router involved? Can I put one end of the ethernet cable into the pi and the other the pc? Do I need a cross over cable? Is it ssh pi@static.ip.address. or something else? I'm lost...

You can do the install with our without a router. Without a router I'd suggest a crossover to be safe, I don't think I have any NICs which will auto detect, and then specify an IP for the Pi and your other system on the sane subnet. With a router then a normal cable is fine and either look at the router for new devices in use or specify a static IP in the cmdline.txt as Exaga noted. His SarPi site documents it well https://sarpi.penthux.net/index.php?p=preinstall

When you boot off the SarPi installed with the you will connect as root to the IP specified to do the install, this is the same as if you do a Slackware install with a keyboard and monitor, your connecting to a simple system as root to install only. Once you complete the install you can either add anew user before the final reboot or re-connect as root afterward. Also remember after the final reboot its now using the network settings specified during the install which could be a different IP.

Exaga 04-17-2021 06:14 AM

Quote:

Originally Posted by enine (Post 6241372)
Without a router I'd suggest a crossover to be safe, I don't think I have any NICs which will auto detect, and then specify an IP for the Pi and your other system on the sane subnet.

All models of Raspberry Pi feature an auto-sensing Ethernet port. So, it doesn't matter which type of Ethernet cable is connected.


All times are GMT -5. The time now is 11:58 AM.