I am trying to install a debian on my ReadyNAS Duo V2 since a week now.
It's far from easy....
Well, my current problem is, that I would like to mount my root filesystem instead of the stock one.
I simply add INIT=/bin/sh to the BOOTARGS, so the boot stops before mounting the root fs from harddisk.
I provided my root filesystem on USB drive.
Now, this is what I did after booting into initrd:
Code: Select all
~ # mkdir new-root
~ # mount /dev/sda1 new-root
~ # cd new-root
/new-root # mkdir old-root
/new-root # pivot_root . old-root
pivot_root: Invalid argument
Tried to move the other mounts, as I found a suggestion in the web.
Code: Select all
$ mount --move /sys /new-root/sys
$ mkdir /new-root/dev/pts
$ mount --move /dev/pts /new-root/dev/pts
$ mount --move /dev /new-root/dev
$ mount --move /proc /new-root/proc
And added EXEC in front...
Code: Select all
$ exec switch_root -c /dev/ttyS0 /new-root /init
[... outputs usage info but no meaningful error message ...]
Bringing up RAID arrays...mdev: /sys/class: No such file or directory
done
Bringing up network...done
ERROR: Could not mount data partition [/dev/mtdblock4] (No such file or directory)
mdev: /sys/class: No such file or directory
/bin/ash: can't access tty; job control turned off
Code: Select all
$ exec pivot_root . old-root
pivot_root: Invalid argument
Bringing up RAID arrays...mdev: /sys/class: No such file or directory
done
Bringing up network...done
ERROR: Could not mount data partition [/dev/mtdblock4] (No such file or directory)
mdev: /sys/class: No such file or directory
/bin/ash: can't access tty; job control turned off
- when I add a exec in front of pivot_root or switch_root, I get the same error message, but some init seems to be executed afterwards.
- the init called seems to be the init from initrd, it did not rotate root.
Does anyone have a hint?
thanks,
JPT