Unable to ssh to TonidoPlug with latest ArchLinuxARM

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby thoughtcriminal » Mon Feb 25, 2013 1:39 am

That worked for me too...sort of. Here's the details:

At first, I plugged my arch USB drive into my main desktop, but I got this error when I tried to chroot:

$this->bbcode_second_pass_code('', '
failed to run command `/bin/bash': Exec format error
')

I guess it's because I'm trying to chroot into an ARM system via an amd64 host, so I booted up my outdate but working (pre-systemd) tonido arch image via a USB hub, then I plugged in the new (non-working) USB drive along side it and chrooted in that way.

I ran "systemctl enable sshd.socket" as nicux recommended, and I got this output:
$this->bbcode_second_pass_code('', 'ln -s '/usr/lib/systemd/system/sshd.socket' '/etc/systemd/system/sockets.target.wants/sshd.socket'')
Then I tried booting it and I got this error when I tried to SSH:
$this->bbcode_second_pass_code('', 'ssh_exchange_identification: Connection closed by remote host')
Obviously enough it's because I hadn't run "ssh-keygen -A". Once I did that, I was able to successfully SSH in with the default root/root username/pass!

In summary, the whole process was:
$this->bbcode_second_pass_code('', '
#this first line may vary for you. sda is my working (pre-systemd) arch drive, sdb is the partition I'm working on with a fresh arch image.
mount /dev/sdb1 /mnt/usb
cd /mnt/usb
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
mount -t devpts pts dev/pts/
chroot /mnt/usb
systemctl enable sshd.socket
ssh-keygen -A
')

However, the first thing I tried was removing the two extra lines in /etc/network.d/wired-eth0 (to see if they were part of the solution or not). vi wouldn't open the file, though (no error message or anything). So I tried "pacman -Syu" and I got this output:
$this->bbcode_second_pass_code('', '
:: Synchronizing package databases...
error: failed to update core (unable to lock database)
error: failed to update extra (unable to lock database)
error: failed to update community (unable to lock database)
error: failed to update alarm (unable to lock database)
error: failed to update aur (unable to lock database)
error: failed to synchronize any databases
error: failed to init transaction (unable to lock database)
error: could not lock database: Read-only file system
')
Following this thread (it's not quite the same, but worth a shot), I plugged the USB drive into my desktop machine and ran fsck. It came up clean, and I'm still getting the Read-only file system error. So I guess I'm stuck again. Great progress, though!
thoughtcriminal
 
Posts: 4
Joined: Sat Feb 23, 2013 2:30 am

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby nicux » Mon Feb 25, 2013 10:50 am

#thoughtcriminal, you shoud fill the /etc/fstab file to mount correctly the filesystem. For example:
/dev/sda1 / ext3 rw,defaults 0 1
nicux
 
Posts: 3
Joined: Sat Sep 11, 2010 4:00 pm

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby thoughtcriminal » Fri Mar 01, 2013 4:17 am

Thanks, nicux. I checked out my fstab...and it's empty! I don't have time to fix it now, but I confirmed that fstab is also empty in the latest tar. Is that normal? If so, then populating the fstab file should be a step in the instructions.

If it's not supposed to be empty should I file a bug report on github? Ditto for the missing systemd symbolic link and host keys to enable sshd? I ask because I don't see any existing bug reports, which kind of surprises me for bugs this serious. Am I looking in the wrong place, or are Tonido plugs really that unpopular :?
thoughtcriminal
 
Posts: 4
Joined: Sat Feb 23, 2013 2:30 am

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby nicux » Fri Mar 01, 2013 11:57 pm

I don't know. I always try to resolve my problems in Archlinux for X86_64 and after a long period of time where I could not been able to use my tonido plug, I have descompressed this new image with systemd and I have found these problems. I prefer to know the opinion of the developers (WarheadsSE and pepedog) about both problems.
nicux
 
Posts: 3
Joined: Sat Sep 11, 2010 4:00 pm

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby WarheadsSE » Sat Mar 02, 2013 3:20 am

The fstab is no surprise
The ssh daemon should be on by default, and generate the host keys on first boot.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby pepedog » Sat Mar 02, 2013 10:41 am

My thoughts are this should all work, if -
    the right file system is used (what uBoot demands)
    tar was extracted as root
    no extra setting needed for device (ie as mac in oxnas) needed
    drive/network cables/router all good

If the thang has actually booted into archlinux arm then plugging in a usb keyboard works, ie ctrl/alt/del to see if it reboots
Likewise using imagination you can log in with keyboard and poweroff
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby ks1g » Sun Mar 17, 2013 10:17 pm

I can confirm thoughtcriminal's procedure from his 24 Feb 2013 post worked on one of my v1 tonidoplug. Kudos to you, my friend! Particularly helpful were the steps he listed to get the correct bits mounted in the chroot environment to create the sshd key. Adding the 2 lines to the end of /etc/network.d/wired-eth0 was not necessary. Didn't help w/o the sshd work, and didn't need it with sshd.

The fix was SUCCESSFUL using ArchLinuxARM-2013.03-armv5te-rootfs.tar.gz

I had tried what I thought was a different image (may have messed it up), it would log me in, but never gave a shell prompt.
I have 2 v1 tonidoplugs here with working (sort of) systems (enough to ssh into), so I was able to do the work on the target box. Not sure what I'd have done without that.

Update: Was also bit by the read-only file system. Fix: execute the following command:
$this->bbcode_second_pass_code('', '
root@alarm ~]# mount -o remount,rw /
')
then edit /etc/fstab:
$this->bbcode_second_pass_code('', '
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/root / ext3 rw,defaults
')
Seems to be working now. Yay! :D

Hope this helps someone and the appropriate maintainers know what to fix. May be as simple as the sshd socket, if sshd generates it's keys on 1st boot. I may try that myself at some point.
ks1g
 
Posts: 1
Joined: Sun Mar 17, 2013 10:05 pm

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby jambo » Thu Apr 11, 2013 9:46 pm

I didn't have a second tonidoplug to work with, but after installing ArchLinux on a USB hard drive and rebooting, I could tell something was working because my list of DHCP users now had "alarm" as a Client ID. I shut down, disconnected the hard drive, booted into the Ubuntu system, attached and mounted the hard drive, edited /etc/fstab on the hard drive (which had been empty) and added:
$this->bbcode_second_pass_code('', '/dev/sda1 / ext2 rw,defaults 0 1')
Then I rebooted from the USB hard drive and so far so good. I have access through ssh, I can update and install packages with pacman. I haven't done extensive testing, but ArchLinux seems to be running fine on my TonidoPlug.

jambo
jambo
 
Posts: 12
Joined: Fri Jun 17, 2011 7:37 pm

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby WarheadsSE » Fri Apr 12, 2013 11:37 am

It really should be /dev/root and not /dev/sda1
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Unable to ssh to TonidoPlug with latest ArchLinuxARM

Postby danip » Mon Jun 10, 2013 2:26 pm

I've been having the same problem (no ssh) with a new installation of Arch Linux.

I followed thoughtcriminal's instructions (thanks!). The only difference -I don't know if that's a factor- is that I chrooted to the hard disk containing Arch Linux via the Ubuntu in the flash memory of the plug. The hard disk has 2 partitions and yes, I'm installing Arch to the first one.

I was able to ssh to the device. But as soon as I write the correct password, instead of logging me in it hangs there. So per your instructions I changed my fstab to make my partition writable. But I get the exact same problem. I've tried both "/dev/sda1" and "/dev/root", and nothing changes.

Taking a look at the logs I can verify that the hard disk is still not writable. So I guess I'm doing something wrong with my fstab which by the way is:
$this->bbcode_second_pass_code('', '/dev/root / ext3 rw,defaults')

Any suggestion? Thank you in advance!
danip
 
Posts: 4
Joined: Mon Jun 10, 2013 2:08 pm

PreviousNext

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 7 guests