Chadster766 wrote:Single User Mode in Linux has a multitude of uses. The main ones are root password resets and drive maintenance.
Standard Linux stuff.
Yes, I'm familiar with single user mode... for servers & desktops.
Hitting enter on a serial console after booting gives you a root prompt. You can reset root's pw without an issue.
Root fs, which is often what you are fsck'ing in single user mode isn't needed on the WRT1900AC as it's flash with an overlay. And if the overlay is hosed, well, it's hosed and fsck won't fix it. If your doing something like a root pivot-- again, it simply won't pivot because it won't mount-- no need to single user to fix.
But if you want to give it a go anyway (caveat that there aren't actually runlevels in OpenWrt that I know of then printenv & setenv are your uboot friends with "linksys_nandboot" and "linksys_altnandboot" the two variables that contain the bootargs depending on which firmware you are booting from.
You can also manipulate them from the shell using fw_printenv and fw_setenv
root@faster:~# fw_printenv nandboot
nandboot=run linksys_nandboot
root@faster:~# fw_printenv linksys_nandboot
linksys_nandboot=nand read $default_load_addr $pri_kern_addr $pri_kern_size; setenv bootargs $console $default_mtdparts root=/dev/mtdblock5 ro rootfstype=$fs_type init=/sbin/init; bootm $default_load_addr;
root@faster:~# fw_printenv linksys_altnandboot
linksys_altnandboot=nand read $default_load_addr $alt_kern_addr $alt_kern_size; setenv bootargs $console $default_mtdparts root=/dev/mtdblock7 ro rootfstype=$fs_type init=/sbin/init; bootm $default_load_addr;
(Last edited by jklap on 22 May 2014, 18:56)