|Name||Modified||Size||Downloads / Week||Status|
|Totals: 8 Items||17.0 MB|
This is the NAS-CC boot firmware. This firmware is meant to replace the LinkSys stock firmware.
NAS-CC boot's firmware main functionality is to:
Actual end user functionality is provided by the installed distro.
The NAS-CC boot firmware makes use of an old Buildroot snapshot (2008-08-27). This is included with the source distribution.
Allthough, this firmware is quite old, it provides all the functionality needed for a basic boot environment.
This is the list of the top-level files
Unpack the source tarball. Then enter:
From the root directory of the unpacked source tarball.
For this you need a working
qemu program. Enter:
./mk run boot
This will attempt to run your boot image from
By default it will
qemu user level networking. This means that it
will configure the network using DHCP and assign IP address
10.0.2.15. The host acts as the router and is given IP address
10.0.2.2. A virtual DNS servers is visible on 10.0.2.3.
BEWARE doing this may brick your NAS200.
Essentially there are two ways of getting NAS-CC on your device.
One is using the
redboot upgrade utility and the other one is using
the upgrade firmware option from the webpage.
The preferred method for upgrading under NAS-CC is by the
upgrade utility since NAS-CC does not provide its own method for
doing firmware upgrades. That is, if after downgrading to NAS-CC
you want to go back to a different firmware you will have to use
redboot upgrade to do so.
To upgrade using NAS-CC this software distribution includes a script
to put your NAS200 in upgrade mode and the
upslug program that is
used to flash the firmware.
upslug is a Linux tool. For Windows users, you may want to visit
Before beginning, you must compile the
upslug executable. This can
be found in the
tools/upslug subdirectory. It is up to you to
decide if you want to place
upslug in your executable PATH.
These steps must be run as root user:
swupgradewhich can be found in the
swupgradeshould have printed the word
Redboot>and return you to the shell prompt.
upslug -f -u firmware.bin. Replace firmware.bin with the name of your firmware file.
You can use this procedure to install not only NAS-CC but any firmware that is compatible with the NAS200.
boot NAS-CC firmware image does not touch any of the
attached discs. By default it will scan any attached storage devices,
either internal SATA or external by USB, for boot scripts. If it
finds any, it will try to boot from them.
You can break the boot process by pressing the two USB buttons in the back of your NAS200.
If it did not find any boot scripts or if you aborted the boot process
(by pressing the USB buttons) it will drop into fail-safe mode. In
fail-safe mode, you can only log-in to the system by using an attached
serial console. However, pressing the two USB buttons will enable
By default this provides a password-less
telnet console on an IP
address provided by
DHCP or the default
redboot IP address:
DHCP is not available.
You can then to start using your NAS-CC by telnet'ing to it (either
by the IP address provided by the
DHCP server or 192.168.21.249 if
DHCP is not functioning). This will give you a prompt where you can
enter Linux commands. You can use this prompt to check if things are
working. A basic set of disc management and network commands are
available for you to set-up your NAS200.
After your NAS200 has been flashed you need to create a distro USB key to boot from.
Refer to the distro specific instructions:
The NAS-CC will boot the /rc script when first starting as the
init process. This script scans all attached storage devices
(including USB ports) for bootable partitions. If it finds one or
more bootable partitions it will proceed to boot them. If this fails
(because the partitions were misconfigured or there were none) then it
will drop to its fail-safe mode.
Determining if a partition is bootable is done by mounting it and checking if any of thes files are present:
NAS-CC will look for these files in all these directories of a partition:
The directories beginning with
/share should map to the Linksys
DISK_1 shares. While the ones begining with
/public to the
PUBLIC DISK shares.
* should be replaced with a number which is used to determine
the priority. i.e. higher priority scripts will override lower
priority scripts. The default (if no number is specified) is 50.
So you can set up a bootable partition on the internal SATA discs with priority 50 and if you want to boot a differrent configuration you can store it on a USB drive with a higher priority. NAS-CC will boot from the USB drive if it has the highest priority. This is a way to quickly test new kernel/root configurations without having to reflash your device.
If the filename started with the characters
one, the scripts is
taken to be a oneshot script. That means, that it will only be used
once and afterwards, the script will be renamed to
This is used so that you can safely test new boot configurations. If
the boot configuration failed, it will be ignored the next reboot.
You just need to rename the boot script to something without the
one in front to make the change permanent. After you are
happy that things work correctly.
kexec scripts allows you to replace the currently running Linux kernel
to a new kernel.
kexec scripts can contain the following
kernel=vmlinuz cmdline="console=ttyS0" initrd=""
Shown are the default values. You can (should) override this as
necessary. The kernel and initrd can be specified as absolute paths
if starting with
/ or are considered relative to the
kexec script file is actually a shell script so any shell
commands are valid here.
Useful variables that are available for use are:
These scripts simply transfer control to the boot partition without
loading a new linux kernel. This means that you will be using the
Linux kernel loaded from flash. The boot partition will become the
new root parition.
chroot scripts can contain the following:
new_root=/mnt old_root=/pivot init=/sbin/init
These are the defaults and do not need to be specified.
The old root parititon will be available in the directory specified by
/pivot by default) and must already exist on the root of
the boot partition. The old root partition can then be unmounted.
Control will be transferred to the
init program (usually
/sbin/init) for the actual start-up sequence.
The boot parition is always mounted read-only.
These scripts allow you to replace the currently running Linux kernel with a new kernel and initrd image loaded from a firmware image file, in the same format as the ones used to flash the system.
Firmware scripts can contain the following specifications:
cmdline="console=ttyS0 root=/dev/ram0" fwname=linux.bin
kexec scripts, this file is actually a shell script so any shell
commands are valid here.
Useful variables that are available for use are:
This actually loads the
squashfs into memory so you loose about 6MB
of RAM with this set-up. Because the Linksys firmware will activate
swap areas, this should not be much of a problem.
You can use this to boot the NAS200 original Linksys firmware. Just
make sure that the boot script and firmware file are located either in
a root share called
misc scripts are just shell scripts that will be called during the boot process.
These can be used to do special configuration actions on your device. Combined with the oneshot facility, this can be used for making unattended/scripted upgrades of devices.
Further information can be found in the sources doc directory here.
NAS-CC is Copyright (C) 2008 Alejandro Liu Ly
NAS-CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
NAS-CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public icense along with this program. If not, see http://www.gnu.org/licenses/