Linux embedded file system (Linux v. 2.6.26.5) running on raw NAND flash, it use Full Image's RootFS. U-boot 2009.03 bootloader. I need access shell after the Kernel is fully loaded, so that I can reset password.
For now I use busybox emergency shell, so Linux kernel not fully loaded, the root partition is not mounted, not all drivers are loaded and many commands not work. I need mount the root partition, but I don't know exactly what is the real root partition on /dev. Boot log contain some lines,
Kernel command line: console=ttyS1,115200n8 rootfstype=squashfs noalign half_image=0 verify=y
LINUX_ROOTFS is 4
VFS: Mounted root (squashfs filesystem) readonly.
...
I guess root can be /dev/mtdblock5, but not sure. What is correct command to mount the root partition?
mount /dev/mtdblock5 /
Also what is worst case scenario, if I don't guess partition and set it incorrectly?
edit: I tried fdisk
BusyBox v1.10.2 (2017-08-02 14:07:25 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty; job control turned off
# fdisk -l
/bin/sh: fdisk: not found
#
# mount
mount: no /proc/mounts
#
# lsblk
/bin/sh: lsblk: not found
I managed mount /proc. But can't mount /dev, /sys.
# cd /
# mount -t dev dev /dev
mount: mounting dev on /dev failed: No such device
# mount -t proc proc /proc
# mount -t sys sys /sys
mount: mounting sys on /sys failed: No such device
# mount -t devpts devpts /dev/pts
mount: mounting devpts on /dev/pts failed: No such file or directory