Page 2 of 3

Re: Rooting ANY firmware level... the hard way

Posted: Wed Jul 08, 2015 4:59 pm
by dragongtr
I am having the same problems as above and would like to add the following information.

I have tried this on a Hub with Firmware 1.1 and on a separate Hub with Firmware 0.89.

Both hubs have the same result.

/ # ubiattach -p /dev/mtd3
ubiattach: error!: UBI is not present in the system
/ #
ubiattach -m 3 does not work either

ubiattach -p /dev -m 3 doesn't work

Re: Rooting ANY firmware level... the hard way

Posted: Wed Jul 08, 2015 10:43 pm
by CloneNum3
Next chance I get, I'll try to run through the process with the various firmware level hubs I have.

Re: Rooting ANY firmware level... the hard way

Posted: Thu Jul 09, 2015 3:12 am
by zeroepoch
Looking at some notes I made over at XDA regarding reformatting the /database partition I see one possible missing step.

Code: Select all

mount -a
ubiattach -p /dev/mtd3


Everyone's mtd layouts looks the same as mine so it's the right number and everything. If the above commands work then it means /dev (a virtual filesytem) was not mounted so /dev/mtd3 did not exist. In case anyone is wondering how to reformat the /database partition in case it's messed up do:

Code: Select all

mount -a
ubiformat /dev/mtd3 -y -q
ubiattach -p /dev/mtd3
mknod /dev/ubi1 c 252 0
ubimkvol /dev/ubi1 -m -N database
mount -t ubifs ubi1:database /database

Re: Rooting ANY firmware level... the hard way

Posted: Thu Jul 09, 2015 11:06 am
by dragongtr
I can also do a screen share session at any point if you want to get to see what I have on my hubs.

Re: Rooting ANY firmware level... the hard way

Posted: Sat Jul 11, 2015 5:26 pm
by BotoTheClown
IT WORKS!!!!!!!!

Many many thanks. The "mount -a" is what was missing...

Code: Select all

mount -a
ubiattach -p /dev/mtd3


I followed the rest of the instructions and I can now SSH to my hub using my own set of SSH keys. It's awesome.

OpenHAB here I come!

Re: Rooting ANY firmware level... the hard way

Posted: Sat Jul 11, 2015 7:08 pm
by CloneNum3
BotoTheClown wrote:IT WORKS!!!!!!!!

Many many thanks. The "mount -a" is what was missing...

Code: Select all

mount -a
ubiattach -p /dev/mtd3


I followed the rest of the instructions and I can now SSH to my hub using my own set of SSH keys. It's awesome.

OpenHAB here I come!


Wonderful! I updated the initial post adding the mount -a command

Re: Rooting ANY firmware level... the hard way

Posted: Tue Dec 15, 2015 7:15 pm
by rimshot
If you're having the problem above with ubiattach, first do

Code: Select all

/# mount -t proc none /proc
/# mount -t sysfs none /sys


After that, the 'ubinfo' command should detect the UBI devices, and the ubiattach as above should work.

Re: Rooting ANY firmware level... the hard way

Posted: Tue Dec 15, 2015 7:40 pm
by rimshot
FYI... To avoid having to do the NAND ground hack again, while in u-boot do:

Code: Select all

--> setenv bootdelay 2
--> saveenv

And then you can always interrupt the boot process and get back to the u-boot prompt without having to do the NAND hack.

Re: Rooting ANY firmware level... the hard way

Posted: Tue Dec 22, 2015 6:39 pm
by z.tyler1
Hello, any help is appreciated. When i run "nand read ${loadaddr} app-kernel 0x00400000 && bootm ${loadaddr}", i get the error "NAND read: device 0 offset 0x2b00000, size 0x400000 Attempt to read outside the flash area 0 bytes read:" Do you know what i did wrong?

Re: Rooting ANY firmware level... the hard way

Posted: Sat Apr 02, 2016 8:13 pm
by d79
z.tyler1 wrote:Hello, any help is appreciated. When i run "nand read ${loadaddr} app-kernel 0x00400000 && bootm ${loadaddr}", i get the error "NAND read: device 0 offset 0x2b00000, size 0x400000 Attempt to read outside the flash area 0 bytes read:" Do you know what i did wrong?


I had the same issue and I got through it by copying and pasting the "nand read ${loadaddr} app-kernel 0x00400000 && bootm ${loadaddr}" line instead of typing it in. I have no idea why that worked and typing did not, but it did.