Rootfs partition problem on GL-MT6000

Long story short - partition 7 is now named something other than rootfs and the GL-MT6000 will not boot.
I can enter recovery mode, select and upload an image file but the flash fails due to the incorrectly labeled partition 7.
See my other post for background.

Is there any way to get into a bricked router and correct the partition table?


How did I get in this mess? I corrected a prior issue (my earlier post) but had a gdisk warning that the new partition did not end on a 1024 boundary and some eccryption services could have an issue with that.
I decided to fix that and calculated a new ending sector. I pulled the end of the partition in a little more. No warnings this time so I commited changes and rebooted. ...Then realized I had not changed the gdisk default name for the new partition to rootfs. Now neither OpenWRT or the recovery console know where to look.
Yup, my bad.

CLB_GL-MT6000

Is: correct the partition table not possible in recovery mode as you wrote earlier?
You can always try rename it now and reboot?

Maybe you have to set mount_root, as described here:
https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset#fixing_your_settings

Regards, DG.

Thank you for the response DG.

Once in recovery mode I can ping the router but cannot SSH

I can bring up the U-Boot screen with my browser. I can select and upload a bin file but I cannot flash. The flash utility expects to write to rootfs which has been renamed.

I need to get to a console of some type to rename that partition but I have not found a way to do this.

Here is how I got into this mess. It may help someone find a solution or it may help someone else avoid an issue.

I was running OpenWRT snapshot as the stable release does not yet exist. I was adding usb iPhone tethering per the OpenWRT wiki and the router locked up following this command "/etc/init.d/network restart".

I waited quite some time and eventually unplugged the router and powered it back up. It booted but with disk errors in the log.

I corrected the errors with a gdisk variant, I think sgdisk which also converted the disk to GPT. I picked the incorrect utility perhaps.

The original problem was corrected but I now had errors ragarding a corrupt backup GPT and backup GPT overlapping the end of the last partition (#7 or rootfs). The original table must have been MBR requiring no backup table as partition 7 was written to the end of the disk.

Back to sgdisk I did:
d - Delete partition 7
n - Create new partition 7. Same starting sector but 64KiB smaller. Type 8300 retained.
x - e - Enter expert mode to move backup GPT to end of disk.
v - Verify new configuration. Noticed name was changed.
c - change name to rootfs
v - Verify
w - Write changes (Warning - partition does not end on a 1024 boundary, some encryption routines may have difficulty with this)
quit - exit gdisk
reboot

The router booted and ran but I decided to pull the partition back to a multiple of 4096 sectors the next day. I used gdisk:
d - Delete partition 7
n - Create new partition 7. Same starting sector but last sector on even multiple of 4096. Type 8300 retained.
x - e - Not required as backup GPT is already at end of disk.
v - Verify new configuration. Noticed name was changed.
c - In my haste I forgot this step and thus these posts
v - Verify
w - Write changes (no warnings about ending on 1024 boundaries or anything else)
quit - exit gdisk
reboot (attempt)

So... the router expects to be working with the rootfs partition but it is renamed.

CLB_GL-MT6000,

Re-running your steps (I read also your other topic) some questions pop-up:

  • the router locked up following this command "/etc/init.d/network restart".
    What did you changed? If it locks up afterwards, there must be a typo or some other mistake in it and network will never come up.
    TTL-Serial needed to fix this, or the router only boots into recovery/failsafe mode.

  • It booted but with disk errors in the log.
    How did you see those logs, what was in the logs? If you now can not get into the device?

  • Router has eMMC memory, no idea if you can use gpart for its partitioning, mtd is another type and can NOT be set that way.

  • Why did you delete rootfs, you removed all of OpenWrt.

On OpenWrt: ssh should always be possible from LAN side - LAN1 no DHCP (recovery/failsafe mode)

The screen you shown is NOT OpenWrt: U-Boot screen with my browser
This looks more the OEM flash / recovery utility.

Did you try to flash original OEM firmware with this tool?
Does that work?

If it does, re-try installing OpenWrt and leave as is, it is SNAPSHOT version, WiP (Work In Progress).

DG.

Unless someone posts otherwise I will assume that recovery would require factory flash via an onboard header and proceed with other options.
Thank you for your time and suggestions.

CLB_GL-MT6000,

  • I changed nothing. I cut & paste that command from the wiki I was following
    Then I wonder why you should restart network, if nothing is changed. (Which wiki?)

You probably did something like:

# Enable tethering
uci set network.wan.ifname="usb0"
uci set network.wan6.ifname="usb0"
uci commit network
/etc/init.d/network restart

Then you DO change settings in /etc/config/network !

And really, the screen you send is NOT from OpenWrt, most probably your router can not boot OpenWrt anymore and falls back to OEM firmware to recover an OEM firmware version. see: https://docs.gl-inet.com/router/en/4/faq/debrick/
There is your U-Boot screen with the following:
Note: The Uboot Web UI above may not be exactly the same as what you see, because the Uboot version is different for different production dates. In some cases, we recommend upgrading the Uboot version. Please refer to the tutorial below.

Did you also follow: https://openwrt.org/toh/gl.inet/gl-mt6000#installation
to install OpenWrt? There is written:
Use an OpenWrt sysupgrade image for the initial install. It is compatible with the OEM webUI flashing routine and retains the OEM recovery which includes a webUI. (Installing the OpenWrt factory image would also flash the OpenWrt version of the u-boot bootloader which would make recovery more difficult.)
(As I thought.)

DG.

You do not read well or thoroughly but all the same, thank you for initially approaching this with positive intent.

I soldered pins to the serial port. My FT232 adapter finally arrived. It took just a few minutes to load drivers & PuTTY. There was no issue opening a serial session in U-Boot.

gpt rename mmc 0 7 rootfs
reboot

And... She lives!

Nothing lost or deleted. No need to re-flash.
Now I'm off to change a bunch of those verboten settings.

Ciao...