Hi Baruch,
what I want is manually mount the root file system from busybox rescue shell.
To make some changes, umount and exit from shell. Linux v 2.6.26.5,
rootfstype=squashfs, root filesystem is on mtd4, NAND flash, jffs2.
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
# ls -l
drwxrwxr-x 2 1005 1005 432 Aug 2 2017 bin
-rwxr-xr-x 1 1005 1005 715844 Aug 2 2017 cordless_nodect.coma
drwxr-xr-x 2 0 0 32 Aug 2 2017 dev
drwxr-xr-x 2 1005 1005 3 Aug 2 2017 eeprom
drwxr-xr-x 4 1005 1005 386 Aug 2 2017 etc
drwxr-xr-x 2 1005 1005 3 Aug 2 2017 fpar
drwxr-xr-x 4 0 0 48 Aug 2 2017 home
drwxr-xr-x 2 1005 1005 3 Aug 2 2017 hsfw
drwxr-xr-x 3 1005 1005 287 Aug 2 2017 lib
drwxrwxr-x 2 1005 1005 3 Aug 2 2017 mnt
drwxr-xr-x 2 1005 1005 3 Aug 2 2017 nvram
drwxrwxr-x 2 1005 1005 3 Aug 2 2017 proc
lrwxrwxrwx 1 1005 1005 8 Aug 2 2017 root -> tmp/root
drwxr-xr-x 2 1005 1005 642 Aug 2 2017 sbin
drwxr-xr-x 2 0 0 3 Aug 2 2017 sys
drwxr-xr-x 2 1005 1005 3 Aug 2 2017 tmp
drwxr-xr-x 7 1005 1005 73 Aug 2 2017 usr
lrwxrwxrwx 1 1005 1005 7 Aug 2 2017 var -> tmp/var
drwxr-xr-x 6 1005 1005 4051 Aug 2 2017 www
# mount -t proc none /proc
# mount -t sysfs none /sys# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev debugfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev tmpfs
nodev inotifyfs
nodev configfs
nodev devpts
squashfs
nodev ramfs
nodev nfs
nodev jffs2
nodev mqueue
nodev rpc_pipefs# mount -t devtmpfs devtmpfs /dev
mount: mounting devtmpfs on /dev failed: No such device
# mount -t jffs2 /dev/mtd4 /mnt/root
mount: mounting /dev/mtd4 on /mnt/root failed: No such file or directory# mount
-t jffs2 /dev/mtdblock4 /mnt/root
mount: mounting /dev/mtdblock4 on /mnt/root failed: No such file or directory
I didn't find instructions how to manually mount root file system on nand flash
from rescue shell.
Alex
On Sunday, December 3, 2017 9:23 AM, Baruch Siach <[email protected]> wrote:
Hi Alex,
On Fri, Dec 01, 2017 at 03:17:39PM +0000, A.W.C. wrote:
> But I already have directories /dev, /proc, /sys, /tmp
> If I'll make these new dir for TinyCross they will replace existing ones?
>
> mkdir -p /proc
> mkdir -p /sys
> mkdir -p /tmp
> mkdir -p /var/log
>
> Basically, I want mount root partition, its located on /dev/mtd4. In my
> specific case I need manually mount a few partitions only required for this
> task, correct?
> Then mount root
>
> mount /dev/mtd4 /mnt/root
You must specify the type of the filesystem when mounting raw MTD filesystems.
This is probably jffs2 in your case, though it might also be ubifs. In case of
ubifs you also need to "attach" the ubi volume before you mount it.
> Please correct me if I'm wrong.
>
> How to exit from busybox shell properly? Command 'exit' produces Kernel panic.
This is expected behaviour. The kernel panics when PID 1, your shell, exits.
The common implementation is to exec the rootfs init from the initramfs init
script.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox