Vera extroot

root@MiOS_$$$$$$$$:/# block mount
block: mounting /dev/mtdblock6 (squashfs) as /mnt/mtdblock6 failed (-1) - Unknown error -1
block: /dev/mtdblock9 is already mounted
block: /dev/sda1 is already mounted
block: /dev/sda2 is already mounted

So it’s mounted. Have you run the extroot script?

C

about 13 times …still the same thing

Filesystem                Size      Used Available Use% Mounted on
rootfs                    8.6M      5.1M      3.6M  59% /
/dev/root                10.0M     10.0M         0 100% /rom
tmpfs                   124.8M    416.0K    124.3M   0% /tmp
/dev/mtdblock7            8.6M      5.1M      3.6M  59% /overlay
overlayfs:/overlay        8.6M      5.1M      3.6M  59% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda1               493.6M      2.6M    454.7M   1% /tmp/log/cmh
/dev/sda2               109.4G    104.8M    103.7G   0% /mnt/sda2
/dev/mtdblock10          50.0M      1.4M     48.6M   3% /storage
/dev/mtdblock10          50.0M      1.4M     48.6M   3% /etc/cmh-firmware
/dev/mtdblock10          50.0M      1.4M     48.6M   3% /etc/cmh-backup
/dev/mtdblock9            9.8M      9.8M         0 100% /mios
root@MiOS_#######:/# ls /dev
batM0               loop5               mtd4                mtdblock2           root
bus                 loop6               mtd4ro              mtdblock3           sc_gpio_ioctl
button0             loop7               mtd5                mtdblock4           sc_led_ioctl
console             mem                 mtd5ro              mtdblock5           sda
cpu_dma_latency     mtd0                mtd6                mtdblock6           sda1
full                mtd0ro              mtd6ro              mtdblock7           sda2
i2cM0               mtd1                mtd7                mtdblock8           sg0
i2s0                mtd10               mtd7ro              mtdblock9           shm
kmsg                mtd10ro             mtd8                network_latency     tty
log                 mtd11               mtd8ro              network_throughput  ttyS0
loop-control        mtd11ro             mtd9                null                ttyS1
loop0               mtd1ro              mtd9ro              port                ttyS2
loop1               mtd2                mtdblock0           ppp                 urandom
loop2               mtd2ro              mtdblock1           ptmx                watchdog
loop3               mtd3                mtdblock10          pts                 zero
loop4               mtd3ro              mtdblock11          random

Hold on and take a deep breath here. Did you get any error during the process?
If no, and it is likely, it looks like your rootfs was correctly copied over to your SSD (/dev/sda2)
So you are good. The only problem is that the system appears not to have pivoted properly during boot up. Can you please go look into your /cmh/config/fstab and make sure that it is setup correctly?

>config global
	option anon_swap '0'
	option anon_mount '1'
	option auto_swap '1'
	option auto_mount '1'
	option delay_root '5'
	option check_fs '0'
config swap
	option enabled '0'
	option device '/dev/sda2'
config mount
	option enabled '1'
	option target '/'
	option device '/dev/sda2'
	option fstype 'ext4'
	option options 'rw,sync'
	option enabled_fsck '0'
config mount
	option enabled '1'
	option target '/tmp/log/cmh'
	option fstype 'ext3'
	option options 'rw,noatime,nodiratime,errors=continue,data=ordered'
	option enabled_fdisk '1'
	option enabled_mkfs '1'
	option enabled_fsck '1'
	option label 'mios'
	option fssize '512'
	option fsck_days '30'
	option fsck_mounts '10'
	option device '/dev/sda1'
config mount
	option target '/mnt/mmcblk*'
	option enabled '1'

is that from root or from etc/config/fstab ?

config global
	option anon_swap '0'
	option anon_mount '1'
	option auto_swap '1'
	option auto_mount '1'
	option delay_root '5'
	option check_fs '0'

config mount
	option enabled_fdisk '1'
	option enabled_mkfs '1'
	option label 'mios'
	option fssize '512'
	option fsck_days '30'
	option fsck_mounts '10'
	option target '/'
	option device '/dev/sda2'
	option fstype 'ext4'
	option options 'rw,sync'
	option enabled '1'
	option enabled_fsck '0'

config mount
	option enabled '1'
	option target '/tmp/log/cmh'
	option fstype 'ext3'
	option options 'rw,noatime,nodiratime,errors=continue,data=ordered'
	option enabled_fdisk '1'
	option enabled_mkfs '1'
	option enabled_fsck '1'
	option label 'mios'
	option fssize '512'
	option fsck_days '30'
	option fsck_mounts '10'
	option device '/dev/sda1'

config mount
	option target '/mnt/mmcblk*'
	option enabled '1'

config global 'automount'
	option from_fstab '0'
	option anon_mount '0'

config global 'autoswap'
	option from_fstab '0'
	option anon_swap '0'

config mount

config swap
	option enabled '0'
	option device '/dev/sda2'

config mount

config swap

config mount

config swap

config mount

config swap

config mount

config mount

config mount

no errors that i am aware of

Yes it looks good. I noticed that the pivot can fail at times mostly due to timing of when the SSD is available. It may take sometime for the USB interface/SSD to be ready.

I also noticed at one point that the pivoting may be forced using uuid instead of the device path. Is your SSD on a powered USB hub?

I attached a slightly updated script which uses the uuid of the drive instead of the /dev path. Code change courtesy of @DesT. It should help with the pivot timing.
extroot.sh.zip (1.5 KB)

ok i will try this

   Filesystem                Size      Used Available Use% Mounted on
rootfs                    8.6M      5.0M      3.6M  58% /
/dev/root                10.0M     10.0M         0 100% /rom
tmpfs                   124.8M    332.0K    124.4M   0% /tmp
/dev/mtdblock7            8.6M      5.0M      3.6M  58% /overlay
overlayfs:/overlay        8.6M      5.0M      3.6M  58% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda1               493.6M    428.0K    456.9M   0% /tmp/log/cmh
/dev/sda2               109.4G    104.6M    103.7G   0% /mnt/sda2
/dev/mtdblock10          50.0M      1.4M     48.6M   3% /storage
/dev/mtdblock10          50.0M      1.4M     48.6M   3% /etc/cmh-firmware
/dev/mtdblock10          50.0M      1.4M     48.6M   3% /etc/cmh-backup
/dev/mtdblock9            9.8M      9.8M         0 100% /mios

mouting it but not doing the pivot

cfg094d78
cfg0a4d78
/dev/mtdblock6: UUID="7da747e6-4ed89c8d-0dc86410-f064d4b6" VERSION="1024.0" TYPE="squashfs"
/dev/mtdblock7: TYPE="jffs2"
/dev/mtdblock9: UUID="c82ec6c0-834b904c-3543ccdc-032a1b86" VERSION="1024.0" TYPE="squashfs"
/dev/sda1: UUID="1ec55429-6c3a-4a6a-99a3-4198f7c4c8bf" LABEL="MiOS" NAME="EXT_JOURNAL" VERSION="1.0" TYPE="ex                                                                                                                                t3"
/dev/sda2: UUID="f931ca64-b956-45d8-b539-1e4c1b7f3993" NAME="EXT_JOURNAL" VERSION="1.0" TYPE="ext4"

@richie.digital
add this two line in the /etc/rc.local (before exit :slight_smile: )

export PREINIT=1
mount_root

what would that do?

https://dev.archive.openwrt.org/ticket/14946

nope didnt work

You, I hope, only added the two lines and did not copy the fstab example but if you did, you replaced the uuid with yours right?

It seems a lot like you have some mount timing issue. I have at times experienced the failure of the pivot but it’s always been because the SSD was ready too late in the process. It could be because of a slow hub or a slow USB/SATA interface.
Having the SSD powered on before the vera (using a powered hub) and using the uuid both helped.

but it worked absolutely ok up until the veraPlus crashed, but i can try that but the ssd is powered by the usb port

When it happened to me, the problem was intermittent… it is a hardware timing issue. Every few reboots, it would fail to pivot. @DesT saw the same thing and I gave him the same uuid suggestion which appeared to have worked for him. You either have had some hardware degradation or you just got “lucky” initially.

1 Like

nope same thing ------ im gonna pull the drive and zero it out

usinf your fstab i get

block: extroot: failed to load /etc/config/fstab: Parse error (invalid command) at line 2, byte 0

got it mounted but still cannot extroot

in other news whe i run the commands individually i get

root@MiOS_######:~# mkfs.ext4 /dev/sda2
mke2fs 1.42.4 (12-June-2012)
/dev/sda2 is mounted; will not make a filesystem here!


mount /dev/sda2 /mnt/sda2
mount: mounting /dev/sda2 on /mnt/sda2 failed: Device or resource busy



root@MiOS_#######:~# fdisk -l

Disk /dev/mtdblock0: 127.5 MiB, 133693440 bytes, 261120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock1: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock2: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock3: 256 KiB, 262144 bytes, 512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock4: 20 MiB, 20971520 bytes, 40960 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock5: 20 MiB, 20971520 bytes, 40960 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock6: 18.6 MiB, 19513856 bytes, 38113 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock7: 8.6 MiB, 9043968 bytes, 17664 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock8: 1 MiB, 1048576 bytes, 2048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock9: 16 MiB, 16777216 bytes, 32768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock10: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock11: 19.3 MiB, 20185088 bytes, 39424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 111.8 GiB, 120034123264 bytes, 234441647 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device    Boot     Start       End    Blocks  Id System
/dev/sda1 *            1   1060289    530144+ 83 Linux
/dev/sda2        1060290 234436544 116688127+ 83 Linux