Hi, I followed the guide at https://forum.doozan.com/read.php?3,12381 to install the new uBoot in the mtd0 partition in order to boot Debian on my NSA325v2 from an USB stick. It works, but I have two questions:
1) While following the guide, I skipped step 8 (Flashing default u-boot envs image). I didn't flash it because my (stock) /etc/fw_env.config was different from what is described in the guide (uses /dev/mtd1) and I was afraid of breaking something by flashing the wrong partition:
However, I found out that even by skipping this step, I could boot Debian from the USB stick apparently without any issue.
This is the stock mtd partition list:
What would be the appropriate command to flash the new environment vars on this setup?
2) How do I boot the stock firmware from the new uBoot? Ideally I would like to boot Debian only if the USB stick is inserted, otherwise I'd like to boot from the old nand partition. I've seen comments in the forum that say that you cannot boot the old firmware from the new uBoot, but I don't understand why. It should still be on the NAND, right?
Thanks for the incredible amount of information on this forum, it is invaluable!
--
Luca
1) While following the guide, I skipped step 8 (Flashing default u-boot envs image). I didn't flash it because my (stock) /etc/fw_env.config was different from what is described in the guide (uses /dev/mtd1) and I was afraid of breaking something by flashing the wrong partition:
~ # cat /etc/fw_env.config # Configuration file for fw_(printenv/saveenv) utility. # Up to two entries are valid, in this case the redundand # environment sector is assumed present. # Notice, that the "Number of sectors" is ignored on NOR. # MTD device name Device offset Env. size Flash sector size Number of sectors # NAND example /dev/mtd1 0x0000 0x20000 0x20000 4
However, I found out that even by skipping this step, I could boot Debian from the USB stick apparently without any issue.
This is the stock mtd partition list:
~ # cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "uboot" mtd1: 00080000 00020000 "uboot_env" mtd2: 00080000 00020000 "key_store" mtd3: 00080000 00020000 "info" mtd4: 00a00000 00020000 "etc" mtd5: 00a00000 00020000 "kernel_1" mtd6: 02fc0000 00020000 "rootfs1" mtd7: 00a00000 00020000 "kernel_2" mtd8: 02fc0000 00020000 "rootfs2"
What would be the appropriate command to flash the new environment vars on this setup?
2) How do I boot the stock firmware from the new uBoot? Ideally I would like to boot Debian only if the USB stick is inserted, otherwise I'd like to boot from the old nand partition. I've seen comments in the forum that say that you cannot boot the old firmware from the new uBoot, but I don't understand why. It should still be on the NAND, right?
Thanks for the incredible amount of information on this forum, it is invaluable!
--
Luca