Reinstall of alt-f

1,669 views
Skip to first unread message

Martin Lešák

unread,
Nov 13, 2015, 6:13:48 AM11/13/15
to Alt-F
Hi,

I'm running Alt-F-0.1RC4.1 on my DNS-320 and I'm very happy with it. However lately my old disk died and I'm waiting for the new one.
I would like to use time before new HDD arrival and start installing alt-f to USB flash pen. I have 2 questions and hope that someone will answer them.

#1 How to make "factory reset" of alt-f? Is firmware re-flashing do the thing? I would like to start from scratch again..

#2 I would like to start installing alt-f on USB flash pen (no external USB drive) right from the beginning. Is it possible to start installing alt-f on USB without HDD in NAS and if so is there anything I should avoid?
- I guess filesystem on USB must be "labeled" so it'll always boot properly
- shall I enable "Swapping on USB device"?

Thanks for any help.
Donation of 5 euros sent. Developer can have a beer tonight :o)

João Cardoso

unread,
Nov 13, 2015, 2:20:30 PM11/13/15
to al...@googlegroups.com


On Friday, 13 November 2015 11:13:48 UTC, Martin Lešák wrote:
Hi,

I'm running Alt-F-0.1RC4.1 on my DNS-320

Hardware revision level? A1? B1?
 
and I'm very happy with it. However lately my old disk died and I'm waiting for the new one.
I would like to use time before new HDD arrival and start installing alt-f to USB flash pen. I have 2 questions and hope that someone will answer them.

#1 How to make "factory reset" of alt-f? Is firmware re-flashing do the thing? I would like to start from scratch again..

When you "clear settings" in the Settings webUI and reboot without saving settings, the default values shipped with the Alt-F firmware will be used. So there is no need to reflash the same fw version again, there's no point doing that. Flashing is always a "risky" operation, not comparable to a software (or OS) on-disk installation.

But the above is only true for the firmware, not for disk-installed packages; for those, all their files including configuration files, are stored on disk, and uninstalling a package might not be sufficient to remove all its files, so on the next install you might inherit something from the previous installation. The partial uninstall does not always occurs, and when it does it is mostly to not delete potential user-made changes.

For a completely fresh start, besides "clearing settings", you have to remove all Alt-F disk-installed packages. That might not occurs OK on the first try, try until the Package installer asks you for a filesystem were to install packages.


#2 I would like to start installing alt-f on USB flash pen (no external USB drive) right from the beginning. Is it possible to start installing alt-f on USB without HDD in NAS and if so is there anything I should avoid?

You don't need *any* disk or pen, be it internal or USB, to flash or *use* the Alt-F firmware. After flashing, you can at any time install disk-installable packages on *any* filesystem. When Alt-F boots (from flash), it will only use disk-installed packages when a filesystem with a folder named 'Alt-F' is found on it; if that folder does not exists, no harm, only the packages shipped with the firmware (on flash) will be used; if at any moment you plug a disk or pen and an 'Alt-F folder is found there, it will start to be used.
This last feature might raise issues when newer on-disk  packages are found and must replace "on the fly"  the ones that are shipped on the firmware and are already running.
 
- I guess filesystem on USB must be "labeled" so it'll always boot properly

Yes, that's safer.
 
- shall I enable "Swapping on USB device"?

No need for that, if you intend to have swap on the internal disks, and if the USB pen or disk is small. A 1TB USB disk *might* need to have swap on it, so the occasional filesystem check (fsck) at boot can succeed.

Having swap on USB disks is not a problem, it is only a problem for USB pens, which have a limited number of write cycles. And it is only an issue on USB pens if swapping starts to occurs.
So, on the DNS-320 (128MB of RAM, I believe), swap should not be necessary on "small" pens, as 128MB of RAM should be sufficient for fsck to succeed on a few tens GB filesystem.
If you start observing that swapping occurs frequently, you are using your box behind what it was designed to do. Stop unused services, refrain yourself to have running on the box everything you usually have on a PC. It works, but it starts being too slow as there is not enough RAM and disk (swapping) starts to be used in place of it.

So, each use case is different, there is not a unique correct answer to "use/not use swap on a USB pen"

 

Thanks for any help.
Donation of 5 euros sent. Developer can have a beer tonight :o)

Thanks 

Martin Lešák

unread,
Nov 20, 2015, 6:30:45 PM11/20/15
to Alt-F
Thanks for all info.

I started to move alt-f to my USB stick with the help of "Alt-F-reloc.sh" script from this forum. Unfortunately I got this message:

mount: mounting aufs on / failed: Device or resource busy
Unmounting /mnt/Volume_1/Alt-F aufs branch failed, stop all services first.
NO, /Alt-F still in use

I did stopped all services via "System utilities" - "Stop all services".
How to identify what's preventing from unmounting?

I'm sorry for asking so many questions. I truly search this forum first before posting them.

Joao Cardoso

unread,
Nov 20, 2015, 8:48:22 PM11/20/15
to Alt-F


On Friday, November 20, 2015 at 11:30:45 PM UTC, Martin Lešák wrote:
Thanks for all info.

I started to move alt-f to my USB stick with the help of "Alt-F-reloc.sh" script from this forum. Unfortunately I got this message:

mount: mounting aufs on / failed: Device or resource busy
Unmounting /mnt/Volume_1/Alt-F aufs branch failed, stop all services first.
NO, /Alt-F still in use

I did stopped all services via "System utilities" - "Stop all services".

Try executing the script when using telnet and not ssh. The script should be saved, e.g., in /tmp. Be sure that /Alt-F/root does *not* exists. And many other unlikely do/don't.

The script you refer to is a copy of another forum topic, where some nasty details are explained. This is a difficult task with many implications and side-effect requirements, so I didn't commented on it.
 
How to identify what's preventing from unmounting?
 
Can't do that, any open file (under the covers, i.e., 'lsof' will *not* list it) or process running under /Alt-F (its path will not show Alt-F, it looks like an ordinary /usr/bin process) can prevent unmounting. Doing it right after a reboot is more likely to succeed. That's what I do when I can't unmount aufs, no matter how hard I try ;-)

Martin Lešák

unread,
Nov 24, 2015, 6:22:03 AM11/24/15
to Alt-F

I'm posting some answers:

I'm running Alt-F-0.1RC4.1 on my DNS-320 revision A1.



On Friday, November 20, 2015 at 11:30:45 PM UTC, Martin Lešák wrote:
Thanks for all info.

I started to move alt-f to my USB stick with the help of "Alt-F-reloc.sh" script from this forum. Unfortunately I got this message:

mount: mounting aufs on / failed: Device or resource busy
Unmounting /mnt/Volume_1/Alt-F aufs branch failed, stop all services first.
NO, /Alt-F still in use

I did stopped all services via "System utilities" - "Stop all services".

Try executing the script when using telnet and not ssh. The script should be saved, e.g., in /tmp. Be sure that /Alt-F/root does *not* exists. And many other unlikely do/don't.

The script you refer to is a copy of another forum topic, where some nasty details are explained. This is a difficult task with many implications and side-effect requirements, so I didn't commented on it.

 I' tried to run script after stopping all services and connected via telnet. I ran the script from /Alt-F/temp folder. Still ended with "can't unmount aufs". The reason might be as you stated in the presence of /Alt-F/root folder. Is it safe to delete this folder in order to run relocation script?

João Cardoso

unread,
Nov 24, 2015, 10:29:15 AM11/24/15
to Alt-F


On Tuesday, 24 November 2015 11:22:03 UTC, Martin Lešák wrote:

I'm posting some answers:

I'm running Alt-F-0.1RC4.1 on my DNS-320 revision A1.


On Friday, November 20, 2015 at 11:30:45 PM UTC, Martin Lešák wrote:
Thanks for all info.

I started to move alt-f to my USB stick with the help of "Alt-F-reloc.sh" script from this forum. Unfortunately I got this message:

mount: mounting aufs on / failed: Device or resource busy
Unmounting /mnt/Volume_1/Alt-F aufs branch failed, stop all services first.
NO, /Alt-F still in use

I did stopped all services via "System utilities" - "Stop all services".

Try executing the script when using telnet and not ssh. The script should be saved, e.g., in /tmp. Be sure that /Alt-F/root does *not* exists. And many other unlikely do/don't.

The script you refer to is a copy of another forum topic, where some nasty details are explained. This is a difficult task with many implications and side-effect requirements, so I didn't commented on it.

 I' tried to run script after stopping all services and connected via telnet. I ran the script from /Alt-F/temp folder.

No. Read the README file under /Alt-F!
You shouldn't use /Alt-F for any reason; it should not even be part of a share, as if a networks browser clients caches it it might try to refresh it or keep open files on it. The Alt-F folder is for exclusive Alt-F usage.
I could as well completely hide it, saving many problems, but that's not the way I think thinks should be handled, "hiding" them.

 
Still ended with "can't unmount aufs".

Of course. The script is running and so its file is open and the filesystem can't be unmounted when there are open files on it.
 
The reason might be as you stated in the presence of /Alt-F/root folder.

That is another reason for me to think that you use /Alt-F as a normal folder. /Alt-F/root shouldn't happen, as it maps to /root and that is the folder you are in when you ssh or telnet the box.

Is it safe to delete this folder in order to run relocation script?

Yes, but you might have some trouble removing it, as it will be marked as removed under /Alt-F and  that will make /root to not appear, possibly preventing you to login the next time. Read the wiki on advanced usage or search the forum for 'aufs.sh'.
Reply all
Reply to author
Forward
0 new messages