I'm using the latest NAS4Free 9.1.0.1.755 x86-embedded on my good old Intel SS4200. My problem is, that I always need to change device.hints and loader.conf after an upgrade, because it's a headless machine (requires comconsole setting in loader.conf) and the PATA DOM is not recognized without some magic in device.hints, means the machine doesn't boot if those device.hints are not in place.
Every time I perform an firmware upgrade, NAS4Free automatically reboots before I can make those necessary changes, which means I then always have to connect another computer by serial console to setup the hints at the loader prompt for it to boot, then have to remount /cf read/writable and make those changes in loader.conf and device hints to persist.
Is there any way to prevent NAS4Free to automatically reboot after an upgrade so that I can make the required changes BEFORE rebooting?
Is there any other way to get those changes done automatically (by script?) after each upgrade?
I'm desperate here, because I want to keep that box up-to-date, but it's located in a place where no other computer is around (so to make it boot again after an upgrade I have to bring it with me to a PC that still has an RS232 port).
This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
How to prevent auto-rebooting after upgrade?
-
Master One
- NewUser

- Posts: 4
- Joined: 07 Dec 2012 10:52
- Status: Offline
How to prevent auto-rebooting after upgrade?
NAS4Free 9.1.0.1.804 x86-embedded on Intel SS4200-EHW
- raulfg3
- Site Admin

- Posts: 4865
- Joined: 22 Jun 2012 22:13
- Location: Madrid (ESPAÑA)
- Contact:
- Status: Offline
Re: How to prevent auto-rebooting after upgrade?
YES,Master One wrote:Is there any other way to get those changes done automatically (by script?) after each upgrade?
Create a script that copy desired lines and test it , once works fine, copy to something in your data disk ( eg: to /mnt/yourmountpool/script), and add it like a postinit (or like a preinit) script in webGUI.
you can see some examples here:
http://wiki.nas4free.org/doku.php?id=faq:0043
viewtopic.php?f=57&t=4491&p=23597
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)
Wiki
Last changes
HP T510
Wiki
Last changes
HP T510
-
Master One
- NewUser

- Posts: 4
- Joined: 07 Dec 2012 10:52
- Status: Offline
Re: How to prevent auto-rebooting after upgrade?
I guess it does not work with PreInit or PostInit, because once rebooted after firmware upgrade it's too late, the machine will not boot any more without those device.hints in place.raulfg3 wrote:YES, Create a script that copy desired lines and test it , once works fine, copy to something in your data disk ( eg: to /mnt/yourmountpool/script), and add it like a postinit (or like a preinit) script in webGUI.Master One wrote:Is there any other way to get those changes done automatically (by script?) after each upgrade?
Maybe a Shutdown script? Will that one be executed on Reboot as well, or only on Shutdown?
It would be best if the desired script is only run once after an upgrade, because then I can use "echo ... >> device.hints" instead of copying a prepared file into place, so that I do not loose any changes to loader.conf and device.hints in case the developers change something in those two files.
If I nevertheless would want to stop NAS4Free from automatically rebooting after an upgrade, how would I do that? Means which file handles the upgrade and initiates the reboot?
NAS4Free 9.1.0.1.804 x86-embedded on Intel SS4200-EHW
- kkd
- Forum Moderator

- Posts: 306
- Joined: 08 May 2013 21:47
- Location: Budapest, Hungary
- Contact:
- Status: Offline
Re: How to prevent auto-rebooting after upgrade?
Hi MasterOne
u can update manually by command (download img, ie.: /mnt/myshare/ ):
/etc/rc.firmware upgrade /mnt/myshare/NAS4Free-x64-embedded-9.1.0.1.775.img
do ur modification
/sbin/reboot
u can update manually by command (download img, ie.: /mnt/myshare/ ):
/etc/rc.firmware upgrade /mnt/myshare/NAS4Free-x64-embedded-9.1.0.1.775.img
do ur modification
/sbin/reboot
XigmaNAS x64-embedded | INTEL Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz | 9216MiB RAM | X x YTB WD Red ZFS mirror compressed
-
Master One
- NewUser

- Posts: 4
- Joined: 07 Dec 2012 10:52
- Status: Offline
Re: How to prevent auto-rebooting after upgrade?
Thanks for the hint, that's most likely the easiest manual way to go without too much fiddling around, although it requires an additional step, because the automatic shutdown is triggered at the end of /etc/rc.firmware upgrade, so I first have to disable that part.kkd wrote:Hi MasterOne
u can update manually by command (download img, ie.: /mnt/myshare/ ):
/etc/rc.firmware upgrade /mnt/myshare/NAS4Free-x64-embedded-9.1.0.1.775.img
do ur modification
/sbin/reboot
I'm still wondering if it can be done with a Command script of Type Shutdown using the WebUI System >> Advanced >> Command scripts, if type "Shutdown" is indeed executed on such an automatic reboot by /etc/rc.firmware upgrade as well.
I'm not really accustomed writing scripts, so maybe someone could give me a hand?
The script has to do the following:
- check if a dummy file ("ss4200.modified") is present in /cf/boot and if yes exit (as it only has to be executed once after an firmware upgrade)
- re-mount /cf read-write
- append the following to /cf/boot/loader.conf
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="9600"
console="comconsole,vidconsole"
- append the following to /cf/boot/device.hints
hint.ata.0.at="isa"
hint.ata.0.port="0x1F0"
hint.ata.0.irq="14"
- touch /cf/boot/ss4200.modified (do that the check at the beginning can determine it's already been modified)
That should be it. I guess it has to have full paths to the commands? If that would work as expected, I'd never have to worry again, and could perform upgrades right from the WebUI without additional work.
NAS4Free 9.1.0.1.804 x86-embedded on Intel SS4200-EHW
-
davidb
- Starter

- Posts: 55
- Joined: 05 Jul 2012 17:51
- Status: Offline
Re: How to prevent auto-rebooting after upgrade?
I was running NAS4Free on an intel SS4200 as well, but i was using a USB stick to run the OS. Like you, i found having the DOM in it difficult sometimes, and once i removed the DOM completely it would boot straight to USB (no need to hold reset button and power on at same time).
Just curious, what drives are you using in your SS4200?
Just curious, what drives are you using in your SS4200?
-
Master One
- NewUser

- Posts: 4
- Joined: 07 Dec 2012 10:52
- Status: Offline
Re: How to prevent auto-rebooting after upgrade?
I was using an USB stick as well at first, but I needed the USB ports for more disks, so that 128MB PATA DOM will have to do. It's working, one just has to keep those quirks in mind.davidb wrote:I was running NAS4Free on an intel SS4200 as well, but i was using a USB stick to run the OS. Like you, i found having the DOM in it difficult sometimes, and once i removed the DOM completely it would boot straight to USB (no need to hold reset button and power on at same time). Just curious, what drives are you using in your SS4200?
I now have 4x 2TB Samsung drives in use, 2x HD203WI and 2x HD204UI.
I never had any problems with booting, because I just configured the BIOS settings using a serial console.
I just performed the upgrade to 798 using the webGUI by first commenting the shutdown -r command in /etc/rc.firmware, so the manual way now works. All I have to figure out now is how to automate the application of the SS4200 patches.
NAS4Free 9.1.0.1.804 x86-embedded on Intel SS4200-EHW