- Error message about /dev/null on ssh
Error when attempting to ssh out
The following commands, added to /etc/rc.local resolve this:
chmod 666 /dev/null
chmod 666 /dev/random
chmod 666 /dev/urandom
Pacman -Syu following the SATA install, then reboot did not result in an accessible device. The problem is, as noted elsewhere, is that the modules are incorrectly located.
As root, perform the command mv /lib/modules /usr/lib/modules
I've also modified the disk_create command, used to load the boot loader and kernel image. Since I keep the previous configuration in place, with the USB drive attached, I can easily switch back to a runnable system. I update the SATA drive from the Pogoplug Pro and have the SATA drive mounted on /mnt. Doing this allows me to merely look at /mnt/boot to see if a kernel is there, and use that in the disk update.
Here it is:$this->bbcode_second_pass_code('', '#!/bin/sh
# uncomment line below and set to the correct disk
disk=/dev/sdb
kernelPartition=${disk}1
if [ -z "${disk}" ] ; then
echo "You must uncomment/set the 'disk' variable"
exit -1
fi
workarea="."
stage1File=$workarea/stage1.wrapped
ubootFile=$workarea/u-boot.wrapped
# check to see if the target file system exists on /mnt
# and use the kernel from that
if [ -b $kernelPartition ]
then
if [ -f /mnt/boot/uImage.nopci ]
then
echo "Using kernel image uImage.nopci from /mnt/boot ... ^C to abort"
kernelFile=/mnt/boot/uImage.nopci
sleep 2
else
echo "using kernel $workarea/uImage"
kernelFile=$workarea/uImage
sleep 2
fi
else
echo "Kernel destination $kernelPartition does not exist .. no kernel will be written."
kernelFile=
fi
perl <<EOF | dd of="$disk" bs=512
print "\x00" x 0x1a4;
print "\x00\x5f\x01\x00";
print "\x00\xdf\x00\x00";
print "\x00\x80\x00\x00";
print "\x00" x (0x1b0 -0x1a4 -12 );
print "\x22\x80\x00\x00";
print "\x22\x00\x00\x00";
print "\x00\x80\x00\x00";
EOF
if [ -f "$stage1File" ];then
echo "Writing stage 1 to $disk"
dd if=$stage1File of="$disk" bs=512 seek=34
else
echo "stage 1 file not defined .. not written to $disk"
fi
if [ -f "$ubootFile" ];then
echo "Writing uboot to $disk"
dd if=$ubootFile of="$disk" bs=512 seek=154
else
echo "uboot not defined .. not written to $disk"
fi
# Only write the kernel if it has been defined
if [ "$kernelFile" ];then
echo "Writing kernel to ${kernelPartition}"
dd if=$kernelFile of="$kernelPartition" bs=512
fi
')
It's a tremendous help to have a serial console available when things do wrong. This is just like the old UNIX days!