In failsafe mode, the kmods necessary to access the drive will not be loaded, unless they were built into the base image. Release builds are not so built, you have to install the kmods separately. Those end up in the overlay filesystem which is intentionally not mounted for failsafe.
You would have to mount_root to obtain access to the installed packages, then load the kmods manually.
Thanks mk24,
so, I understood that it isn't loaded in failsafe, but I can do it manualy if i install the package kmods in normal mode first. Then in failsafe again, after mount_root, I can load kmods manually.
I will try it out tomorrow.
Best,
carliedu
Yes, it would be a possibility but what I'm looking for is to recover from bad configuration changes that blocks the access to the router. This happened so many times for me that I'm studing a fast way to correct the error.
So guys. Finaly I found the solution for my problem:
PROBLEM:
I have an router with only 4 MB flash size with an USB socket. I need more space. So I take an 1 GB pen-drive and install it (see: http://www.brendangrainger.com/entries/13).
All works fine until I make a wrong configuration and the router could not boot again or the access to the router was blocked with a wronf firewall configuration.
This happened so many times for me . How to correct the error without having to make a clean install and restore the last good configuration (if I have a backup).
I tried to boot in failsafe mode and tried to mount the pen-drive in failsafe to correct the configuration. It took me a long time studying how the boot process works and how to mount the pen-drive again with the fstab that haven't (in failsafe) the pen-drive configuration. With help in this forum I realised that it would be dificult if I had not installed some packages before the problem occurs. In failsafe mode the boot do not load optional kernel modules.
SOLUTION:
After a good night's sleep, "dreaming" with openwrt, I found out that the solution is simple, but it was not resolved.
So now I am sure that my solution works. I tested it out from beginning to end.
PROBLEM:
I have an router with only 4 MB flash size with an USB socket. I need more space. So I take an 1 GB pen-drive and install it (see: http://www.brendangrainger.com/entries/13).
All works fine until I make a wrong configuration and the router could not boot again or the access to the router was blocked with a wronf firewall configuration.
This happened so many times for me . How to correct the error without having to make a clean install and restore the last good configuration (if I have a backup).
I tried to boot in failsafe mode and tried to mount the pen-drive in failsafe to correct the configuration. It took me a long time studying how the boot process works and how to mount the pen-drive again with the fstab that haven't (in failsafe) the pen-drive configuration. With help in this forum I realised that it would be dificult if I had not installed some packages before the problem occurs. In failsafe mode the boot do not load optional kernel modules.
SOLUTION:
After a good night's sleep, "dreaming" with openwrt, I found out that the solution is much simpler than I was trying. Failsafe is not necessary to recover from a missconfiguration made on a pendrive.
• Shut down the router
• Remove the Pen-drive (where the wrong configuration do not let the router boot or be accessed)
• Boot the router in normal mode without the pen-drive until you can access it by ssh
• Connect the pen-drive to the USB port mount -t ext4 /dev/sda2 /mnt/usbdrive (adapt this line to your configuration)
• Edit the wrong config file(s) (that are on /mnt/usbdrive ) and make the correction(s): vi /mnt/usbdrive/upper/etc/config/xxxxx (xxxxx is the file with wrong configuration)
• Do not forget to return the fstab setting mv /etc/config/fstab /etc/config/fstab_old cp /mnt/usbdrive/upper/etc/config/fstab /etc/config/fstab
• reboot
So simple and I lost so much time.
I hope this helps another users with the same problem.