diff options
author | Mike Westerhof <mwester@dls.net> | 2006-02-26 06:26:25 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-02-26 06:26:25 +0000 |
commit | a3b19a2d385714c2ec861955593a6a6749165529 (patch) | |
tree | 71868afdc3296388eef3adaf4541c568ee17a432 /packages/nslu2-binary-only | |
parent | 0a4e9508e4f9cb6e2c48f4be88f87021c2ce06c7 (diff) |
unslung-rootfs: README, NOTES, unsling fix - unsling handles pre-existing passwd files more carefully
Diffstat (limited to 'packages/nslu2-binary-only')
3 files changed, 133 insertions, 43 deletions
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r63/NOTES b/packages/nslu2-binary-only/unslung-rootfs-2.3r63/NOTES index 4e09b459c2..98839fffa1 100644 --- a/packages/nslu2-binary-only/unslung-rootfs-2.3r63/NOTES +++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r63/NOTES @@ -168,8 +168,14 @@ Also not that telnet is not enabled by default - there is an openssh package and a dropbear package that either can replace telnet access with secure shell access. - - Dropbear package details on NSLU2-Linux wiki at: +OpenSSH is the simplest to install: + + - OpenSSH package details on NSLU2-Linux wiki at: + http://www.nslu2-linux.org/wiki/HowTo/UseOpenSSHForRemoteAccess + +Dropbear is preferred by some: + - Dropbear package details on NSLU2-Linux wiki at: http://www.nslu2-linux.org/wiki/HowTo/UseDropBearForRemoteAccess The rationale behind not enabling telnet by default is ensure that an Unslung @@ -333,7 +339,8 @@ Split from 3.x stream to allow parallel development. 4.2: -New switchbox implementation with NFS and external USB disk root filesystem support. +New switchbox implementation with NFS and external USB disk root filesystem +support. 4.3: @@ -451,3 +458,27 @@ First public release of 5.x firmware. 6.0: First alpha release of 6.x Unslung firmware, based on Linksys V2.3R63 firmware. + +6.5: + +Unsling script now prompts for a root password to be used, additional sanity +checks added to minimize the chance of an improper unsling. User feedback +added to indicate the status (running from internal flash or booted up from +an external drive) via /etc/motd, ipkg, as well as the main web page. Improved +diagnostic messages from unsling. Added a Linksys customization to "mount" +to the slingbox version of mount. + +6.6: + +- Changed the code that handles the ".ext3flash" functionality so that it can + handle booting from either /dev/sda or /dev/sdb. +- Better text, and cleanup of the "telnet.htm" management page. +- Unsling now creates the wmtp and utmp files. +- Unsling now "edits" the .../conf/passwd file instead of replacing it. +- Ipkg dependencies fixed so that kernel-modules no longer need to be + "force-installed". +- Support for mounting ISO images stored on the local disk added + (kernel-modules loop.o and isofs.o are now created). +- The keyspan.o USB serial kernel-module is also created at build time. +- README file updated to reflect the new unsling script as well as the + change in preferred port for the primary external disk. diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r63/README b/packages/nslu2-binary-only/unslung-rootfs-2.3r63/README index f4ffe4d29b..9dd101c426 100644 --- a/packages/nslu2-binary-only/unslung-rootfs-2.3r63/README +++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r63/README @@ -1,8 +1,8 @@ Unslung-6.x Family Release README INSTALLATION You must follow the steps in this README *exactly*. Do not skip any steps, and -do not skip ahead thinking you know what you are doing and don't need to follow -instructions step by step. +do not skip ahead thinking you know what you are doing and that therefore you +don't need to follow instructions step by step. If at any time you have any questions concerning the installation or operation of Unslung firmware, your first port of call should be the NSLU2-Linux wiki at: @@ -10,8 +10,8 @@ of Unslung firmware, your first port of call should be the NSLU2-Linux wiki at: http://www.nslu2-linux.org If you are looking for further Unslung notes - including ipkg usage, diversion -script details, or ChangeLog information, please consult the associated NOTES -file. +script details, or ChangeLog information, please consult the associated Unslung +NOTES file. ------------------------------------------------------------------------------- @@ -42,10 +42,37 @@ PRE-INSTALLATION CONSIDERATIONS It is possible to make changes to the root filesystem in the internal flash storage, but the space is very limited. In fact, just running "ipkg update" on an NSLU2 which does not have an external disk attached - will most likely render the NSLU2 unusable due to filling up the flash (if - this happens then you will need to follow the recovery instructions in - the previous step). So unless you are an expert, then use an external - disk. + will most likely render the NSLU2 unusable due to filling up the flash + (if this happens then you will need to follow the recovery instructions + in the previous step). So unless you are an expert, then use an external + disk. The remainder of these instructions assume that you have a + suitable external disk or flash disk you will be using for this purpose. + + [A word on ports: completely contrary to previous versions of Unslung, + the preferred port for the Unslung external disk as of Unslung 6.x is + often port 2. This will free up the far-more-flexible port number 1 + for other uses. + + However, this "feature" (part of the Linksys R63 firmware) may cause some + small consternation for users upgrading from earlier versions of Unslung. + But in general, leaving the drives plugged in as-is will likely be the + least painful solution. The basic challenge faced by upgraders is that + *something* must change: if the drive remains in port 1, then it will + remain mounted at "/share/hdd/..." but the drive nomenclature will change + from "/dev/sda" to "/dev/sdb". On the other hand, if the drive is moved + to port 2, then it will remain "/dev/sda" but it will then be mounted at + "/share/flash/...". What difference this might make depends on each + individual configuration; check the wiki for possible assistance for your + particular configuration. + + For new users, the following guidelines can help: + - if you have only a single drive, use port 2. + - if you have a single drive that will be formatted by the NSLU2, and + all other drives or flash devices will be either FAT or NTFS, use + port 2. + - if you have two drives, and both will be formatted by the NSLU2, then + unsling to the drive in port 1. + ] 3) The external disk that you use as the target for package installation must be (or have previously been) formatted by the NSLU2. It is possible to @@ -54,9 +81,21 @@ PRE-INSTALLATION CONSIDERATIONS disk, so make sure all your file modifications are in those directories, as you were warned in the README file in all previous Unslung versions :-) + [Note: Since this point qualifies as a "frequently asked question", it + is worth some clarification here. It is only possible to unsling to + a disk that has been formatted by the NSLU2 - you cannot unsling to a + FAT or NTFS disk. In fact, it is not sufficient to format the disk + using another UNIX system -- in order to be recognized as a "Formatted + (ext3)" disk by the NSLU2, and hence be suitable for unslinging, the + disk must be specifically partitioned, formatted, and the partitions + must contain a specific set of configuration files created by the + NSLU2. So the simple rule is that if the NSLU2 web interface "Disk" + page does not list the disk as "Formatted (ext3)", you will be unable + to unsling to that disk.] + 4) If you want to use a flash disk as the target for package installation, - ensure that it is at least 256MB, plugged into port 1, and formatted - via the Linksys web interface. + ensure that it is at least 256MB, and formatted as above via the + Linksys web interface. 5) Please verify that any disks you are going to connect to the NSLU2 are recognized and working properly *before* updating your firmware (including @@ -175,10 +214,18 @@ NOTE: There are two root-passwords. One is saved in a internal file called without a attached harddisk) the other is stored in a external file called /share/hdd/conf/passwd (we don't know this one - it's used when you boot with a external harddisk attached). Later in the process you can change both of -them. That means: Everytime you boot WITHOUT a attached harddisk you gain +them. That means: Everytime you boot WITHOUT an attached harddisk you gain root-access with the "uNSLUng" password. If you boot WITH an attached harddisk, you won't have access until you change the file /share/hdd/conf/passwd. +NOTE about the NOTE: New in Unslung 6.x is that by default the "unsling" +script will prompt for a new password. This new password will become the +new password used whenever the NSLU2 is booted without it's disk (replacing +the "uNSLUng" password), and it will also be the new root password used when +the NSLU2 boots up with it's disk. If you are upgrading, or wish to preserve +your passwords just the way they are, use the "-nopw" option with the unsling +script. + 1) Power up the NSLU2 without any disks connected. - This only has to be done when you update the firmware. @@ -187,15 +234,18 @@ you won't have access until you change the file /share/hdd/conf/passwd. If you powered up your NSLU2 with a disk attached, shutdown the NSLU2, unplug the disks, and power up again. -2) Enable telnet by going to "http://192.168.1.77/Management/telnet.cgi", and - press the enable button. +2) Enable telnet by going to the NSLU2's web interface and clicking on the + "Manage Telnet" link (right-hand side), then on the "Enable/Disable + NSLU2 telnet Service" page, click on the "Enable" button to turn on + the telnet service. + + (You can browse directly to the enable/disable telnet page in your + browser: "http://192.168.1.77/Management/telnet.cgi".) - - If you had previously changed the IP address of your NSLU2 from - 192.168.1.77 to something else, then you should use that new IP - address to enable telnet. Again note that you should use the username - "admin" and password "admin" for the web interface at this point (as - no disks are attached, the default username and password is the only - way to access the Management web pages). + - Note that you should use the username "admin" and password "admin" for + the web interface at this point (as no disks are attached, the + default username and password is the only way to access the + Management web pages). - Make sure you have **** NO DISKS ATTACHED AT THIS TIME **** @@ -217,33 +267,29 @@ you won't have access until you change the file /share/hdd/conf/passwd. the time to do that. Make sure that the drive is recognized in the web interface. -5) In the telnet session, run "/sbin/unsling disk1" or "/sbin/unsling disk2" - (depending upon whether you want to unsling to a disk connected to the - Disk1 port or the Disk2 port). + Be patient - it make take several minutes for the NSLU2 to recognize + the hardware, mount the partitions, and verify that the drive is correctly + configured to be considered "Formatted". Do not continue if the drive + is not marked as "Formatted (ext3)" in the NSLU2 web interface. + +5) In the telnet session, run "/sbin/unsling disk2". + If you've decided to unsling to a device connected to port 1, you'll run + "/sbin/unsling disk1", of course. Which port to which you should connect + the device you intend to unsling depends on many factors. - Once you "unsling" to an external disk on a particular port (Disk 1 or Disk 2), it is important that you keep that disk continually plugged into that same port whenever the NSLU2 is turned on. - ***** Unsling will not change the password on your disk, so if you had - previously changed the password on a disk, then your password will - not be changed. Also note that simply editing the /etc/passwd file - is not enough to permanently change a password. See: + ***** By default, unsling WILL prompt you for a new root password, and it + will change the password on your disk as well. If this is NOT what + you wish it to do, use the "-nopw" flag with the "unsling" command: + "/sbin/unsling -nopw disk2" for example. + For more information on changing passwords and all the places where + the NSLU2 stores passwords, please see the following wiki article: http://www.nslu2-linux.org/wiki/HowTo/ChangePasswordsFromTheCommandLine - NOTE: There are two root-passwords. One is saved in a internal - file called /usr/local/passwd (we know this one - it's "uNSLUng" - and used when you boot without a attached harddisk) the other is - stored in a external file called /share/hdd/conf/passwd (we don't - know this one - it's used when you boot with a external harddisk - attached). That means: Everytime you boot WITHOUT a attached harddisk - you gain root-access with the "uNSLUng" password. If you boot - WITH an attached harddisk, you won't have access until you change - the file /share/hdd/conf/passwd. So you should change this file - as soon as you unsling to an external disk, before you exit the - telnet session that you are using to unsling to the disk. - 6) If you wish to migrate your packages from the old Unslung 3.x location in the /share/hdd/conf (disk1) or /share/flash/conf (disk2) partitions to the new Unslung 4.x, 5.x and 6.x location on the data partition, then run: @@ -269,11 +315,20 @@ you won't have access until you change the file /share/hdd/conf/passwd. 8) Wait for the NSLU2 to boot, telnet in, and confirm that the root filesystem is being loaded from the external disk. -***** Congratulations, you're now Unslung! ***** + You can verify that your NSLU2 is unslung by checking the NSLU2 web admin + GUI - you are unslung if the text at the bottom reads something like: + "uNSLUng status: Unslung to disk2, /dev/sda1" + + Also, when you login to the NSLU2, the login message printed will clearly + indicate if you are unslung, or if something went awry and you are still + running on the internal flash. Make sure you add an entry to the "The Unslung 6.x" table in the Yahoo group. Just use the next free integer for your Unslung number. +http://groups.yahoo.com/group/nslu2-linux/database?method=reportRows&tbl=12 + + If you make no further changes, your NSLU2 will continue to operate normally. But to customize things, you'll be downloading packages and adding stuff to the /unslung directory using diversion scripts. @@ -281,4 +336,3 @@ But to customize things, you'll be downloading packages and adding stuff to the Read the NOTES file to expand the capabilities of your Unslung NSLU2! Enjoy! - diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r63/unsling b/packages/nslu2-binary-only/unslung-rootfs-2.3r63/unsling index bda65a01ce..51fa7ed871 100755 --- a/packages/nslu2-binary-only/unslung-rootfs-2.3r63/unsling +++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r63/unsling @@ -137,7 +137,12 @@ if [ "$nopw" = 0 ] ; then exit 1 fi cp /etc/passwd /usr/local/passwd - cp /etc/passwd $targconf/passwd +# cp /etc/passwd $targconf/passwd + grep "^root:" /etc/passwd >$targconf/passwd.new + grep -v "^root:" $targconf/passwd >>$targconf/passwd.new + mv $targconf/passwd $targconf/passwd.save + mv $targconf/passwd.new $targconf/passwd + chmod 644 $targconf/passwd fi # Start at the root directory |