NSLU2-Linux
view · edit · print · history

Unslung.WhatIsANativeUnslungDisk History

Hide minor edits - Show changes to markup

January 14, 2007, at 07:54 PM by fcarolo -- Revision and cleanup
Changed lines 1-59 from:

Is there supposed to be information here? - NAvAP?

(Yes, as a matter of fact. This page is waiting for a volunteer to put together a brief writeup on the details of what makes up a natively-formatted disk for the Linksys firmware. - mwester)

This is a START, but there's much more that needs adding.

A native Unlsung (or Linksys V2.3R63) disk has:

- Three partitions, probably in a fixed order:

 Partition 1 is ext3 and gets mounted as /share/[flash|hdd]/data
 Partition 2 is ext3 and gets mounted as /share/[flash|hdd]/conf
 Partition 3 is the swap partition.

I don't know whether further partitions are allowed.

- Certain files on Partition 2.

see also http://www.nslu2-linux.org/wiki/HowTo/CustomSizedPartitions

Example from "fdisk /dev/sda -l" for a 160GB drive.

 Disk /dev/sda: 255 heads, 63 sectors, 19457 cylinders
 Units = cylinders of 16065 * 512 bytes

    Device Boot    Start       End    Blocks   Id  System
 /dev/sda1             1     19427 156047346   83  Linux
 /dev/sda2         19428     19442    120487+  83  Linux
 /dev/sda3         19443     19457    120487+  82  Linux swap

It is permissible to alter these partitions

Files on partion 2 (/share/[flash|hdd]/conf)

The Linksys firmware requires some of this. I have not yet determined how much, nor how important the partitions are. It is possible to "tar" it all off, partition your disk, and tar it back. The "hidden" file .dongle is known to be vital.

 # ls /share/flash/conf/ -altr
 total 30
 -rw-r--r--  1 root root    98 Apr 16 16:22 usrgrp.info
 -rw-------  1 root root   732 Apr 16 16:22 smbpasswd
 -rw-r--r--  1 root root   544 Apr 16 16:22 passwd
 -rw-r--r--  1 root root   162 Apr 16 16:22 group
 drwxrwxr-x  7 root root  1024 Apr 20 23:13 .
 drwxrwxr-x  4 root root  4096 Apr 20 23:13 ..
 drwx------  2 root root 12288 Apr 21 03:40 lost+found
 drwxrwxr-x  2 root root  1024 Apr 21 03:53 upgrade
 -rw-r--r--  1 root root   817 Apr 21 03:53 smb.conf
 -rw-r--r--  1 root root    81 Apr 21 03:53 share.info
 drwxrwxr-x  2 root root  1024 Apr 21 03:53 share
 -rw-r--r--  1 root root   346 Apr 21 03:53 passwd.save
 drwxrwxr-x  2 root root  1024 Apr 21 03:53 config
 -rw-r--r--  1 root root     0 Apr 21 03:53 backup_sh.conf
 -rw-r--r--  1 root root    20 Apr 21 03:57 .htpasswd
 -rw-rw-rw-  1 root root     0 Apr 21 03:57 .dongle
 -rw-r--r--  1 root root   816 Aug  9 12:36 server.log
 drwxrwxr-x  2 root root  1024 Sep 13 21:35 tmp
to:

A native Unslung (or Linksys V2.3R63) disk means a disk that has been formatted by the Linksys web interface, using a closed-source utility from Linksys. This utility will partition the disk and create filesystems, in order to let the disk be recognized by the firmware as a formatted disk. In the web interface, this disk will show up as 'Formatted (EXT3)' and it will be able to store configuration data managed by other Linksys utilites, most notably the information about shares, users and groups created though the web interface.

Disk partitions

A native formatted disk has three mandatory partitions, in a fixed order:

  • Partition 1 is formatted as ext3 and gets mounted as /share/[flash|hdd]/data
  • Partition 2 is formatted as ext3 and gets mounted as /share/[flash|hdd]/conf
  • Partition 3 is a swap partition.

We still neeed some info about the standard sizes for partitons 2 and 3, the information at CustomSizedPartitions may not be accurate for V2.3R63 and Unslung 6.8. Partition 1 ends up using the remaining space on the disk.

Standard files on Partition 2

The Linksys firmware requires some files to be present on the conf partition (partition 2). Some of these files are copies of files found in other places of the filesystem, such as the .htpasswd file from /home/httpd/html/Management, and are kept in sync with their counterparts by the Linksys utilities. A list of the standard contents of this partition is:

 SLUG conf # ls -la /share/flash/conf/
 total 34
 drwxrwxr-x 7 root  root      1024 Sep  2 16:03 .
 drwxrwxr-x 4 admin everyone  1024 Sep  2 16:03 ..
 -rw-rw-rw- 1 root  root         0 Sep  2 16:00 .dongle
 -rw-r--r-- 1 root  root        20 Sep  2 16:00 .htpasswd
 -rw-r--r-- 1 root  root         0 Sep  2 16:00 backup_sh.conf
 drwxrwxr-x 2 root  root      1024 Sep  2 16:00 config
 -rw-r--r-- 1 root  root       149 Dec 12 06:12 group
 drwx------ 2 root  root     12288 Sep  2 16:00 lost+found
 -rw-r--r-- 1 root  root       346 Dec 12 06:12 passwd
 -rw-r--r-- 1 root  root       346 Sep  2 16:00 passwd.save
 -rw-r--r-- 1 root  root      7671 Jan 12 17:32 server.log
 drwxrwxr-x 2 root  root      1024 Sep  2 16:00 share
 -rw-r--r-- 1 root  root       124 Dec 12 05:32 share.info
 -rw-r--r-- 1 root  root       817 Sep  2 16:00 smb.conf
 -rw------- 1 root  root       209 Dec 12 06:12 smbpasswd
 drwxrwxr-x 2 root  root      1024 Jan 12 17:32 tmp
 drwxrwxr-x 2 root  root      1024 Sep  2 16:00 upgrade
 -rw-r--r-- 1 root  root        56 Dec 12 06:12 usrgrp.info

A backup of the configuration data can be done using tar to copy the entire contents of the partition. Such a copy can later be used to restore the configuration. The .dongle hidden file seems to be important to let Linksys utilities correctly identify this partition.

September 22, 2006, at 07:57 AM by mbogelund -- Corrected typo: partitionn -> partition
Changed lines 32-33 from:

Files on partionn 2 (/share/[flash|hdd]/conf)

to:

Files on partion 2 (/share/[flash|hdd]/conf)

September 14, 2006, at 06:53 PM by Steve G -- Started to add some information
Changed lines 11-13 from:

Partition 1 is ext3 and gets mounted as /share/[flash|hdd]/data Partition 2 is ext3 and gets mounted as /share/[flash|hdd]/conf Partition 3 is the swap partition.

to:
 Partition 1 is ext3 and gets mounted as /share/[flash|hdd]/data
 Partition 2 is ext3 and gets mounted as /share/[flash|hdd]/conf
 Partition 3 is the swap partition.
Changed lines 22-29 from:

Disk /dev/sda: 255 heads, 63 sectors, 19457 cylinders Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System

/dev/sda1 1 19427 156047346 83 Linux /dev/sda2 19428 19442 120487+ 83 Linux /dev/sda3 19443 19457 120487+ 82 Linux swap

to:
 Disk /dev/sda: 255 heads, 63 sectors, 19457 cylinders
 Units = cylinders of 16065 * 512 bytes

    Device Boot    Start       End    Blocks   Id  System
 /dev/sda1             1     19427 156047346   83  Linux
 /dev/sda2         19428     19442    120487+  83  Linux
 /dev/sda3         19443     19457    120487+  82  Linux swap
Changed lines 39-59 from:
  1. ls /share/flash/conf/ -altr

total 30 -rw-r--r-- 1 root root 98 Apr 16 16:22 usrgrp.info -rw------- 1 root root 732 Apr 16 16:22 smbpasswd -rw-r--r-- 1 root root 544 Apr 16 16:22 passwd -rw-r--r-- 1 root root 162 Apr 16 16:22 group drwxrwxr-x 7 root root 1024 Apr 20 23:13 . drwxrwxr-x 4 root root 4096 Apr 20 23:13 .. drwx------ 2 root root 12288 Apr 21 03:40 lost+found drwxrwxr-x 2 root root 1024 Apr 21 03:53 upgrade -rw-r--r-- 1 root root 817 Apr 21 03:53 smb.conf -rw-r--r-- 1 root root 81 Apr 21 03:53 share.info drwxrwxr-x 2 root root 1024 Apr 21 03:53 share -rw-r--r-- 1 root root 346 Apr 21 03:53 passwd.save drwxrwxr-x 2 root root 1024 Apr 21 03:53 config -rw-r--r-- 1 root root 0 Apr 21 03:53 backup_sh.conf -rw-r--r-- 1 root root 20 Apr 21 03:57 .htpasswd -rw-rw-rw- 1 root root 0 Apr 21 03:57 .dongle -rw-r--r-- 1 root root 816 Aug 9 12:36 server.log drwxrwxr-x 2 root root 1024 Sep 13 21:35 tmp

to:
 # ls /share/flash/conf/ -altr
 total 30
 -rw-r--r--  1 root root    98 Apr 16 16:22 usrgrp.info
 -rw-------  1 root root   732 Apr 16 16:22 smbpasswd
 -rw-r--r--  1 root root   544 Apr 16 16:22 passwd
 -rw-r--r--  1 root root   162 Apr 16 16:22 group
 drwxrwxr-x  7 root root  1024 Apr 20 23:13 .
 drwxrwxr-x  4 root root  4096 Apr 20 23:13 ..
 drwx------  2 root root 12288 Apr 21 03:40 lost+found
 drwxrwxr-x  2 root root  1024 Apr 21 03:53 upgrade
 -rw-r--r--  1 root root   817 Apr 21 03:53 smb.conf
 -rw-r--r--  1 root root    81 Apr 21 03:53 share.info
 drwxrwxr-x  2 root root  1024 Apr 21 03:53 share
 -rw-r--r--  1 root root   346 Apr 21 03:53 passwd.save
 drwxrwxr-x  2 root root  1024 Apr 21 03:53 config
 -rw-r--r--  1 root root     0 Apr 21 03:53 backup_sh.conf
 -rw-r--r--  1 root root    20 Apr 21 03:57 .htpasswd
 -rw-rw-rw-  1 root root     0 Apr 21 03:57 .dongle
 -rw-r--r--  1 root root   816 Aug  9 12:36 server.log
 drwxrwxr-x  2 root root  1024 Sep 13 21:35 tmp
September 14, 2006, at 06:51 PM by Steve G --
Changed lines 5-6 from:

This is a START, but there's much more that needs adding.

to:

This is a START, but there's much more that needs adding.

September 14, 2006, at 06:47 PM by Steve G -- Started to add some information
Changed lines 3-59 from:

(Yes, as a matter of fact. This page is waiting for a volunteer to put together a brief writeup on the details of what makes up a natively-formatted disk for the Linksys firmware. - mwester)

to:

(Yes, as a matter of fact. This page is waiting for a volunteer to put together a brief writeup on the details of what makes up a natively-formatted disk for the Linksys firmware. - mwester)

This is a START, but there's much more that needs adding.

A native Unlsung (or Linksys V2.3R63) disk has:

- Three partitions, probably in a fixed order:

Partition 1 is ext3 and gets mounted as /share/[flash|hdd]/data Partition 2 is ext3 and gets mounted as /share/[flash|hdd]/conf Partition 3 is the swap partition. I don't know whether further partitions are allowed.

- Certain files on Partition 2.

see also http://www.nslu2-linux.org/wiki/HowTo/CustomSizedPartitions

Example from "fdisk /dev/sda -l" for a 160GB drive.

Disk /dev/sda: 255 heads, 63 sectors, 19457 cylinders Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System

/dev/sda1 1 19427 156047346 83 Linux /dev/sda2 19428 19442 120487+ 83 Linux /dev/sda3 19443 19457 120487+ 82 Linux swap

It is permissible to alter these partitions

Files on partionn 2 (/share/[flash|hdd]/conf)

The Linksys firmware requires some of this. I have not yet determined how much, nor how important the partitions are. It is possible to "tar" it all off, partition your disk, and tar it back. The "hidden" file .dongle is known to be vital.

  1. ls /share/flash/conf/ -altr

total 30 -rw-r--r-- 1 root root 98 Apr 16 16:22 usrgrp.info -rw------- 1 root root 732 Apr 16 16:22 smbpasswd -rw-r--r-- 1 root root 544 Apr 16 16:22 passwd -rw-r--r-- 1 root root 162 Apr 16 16:22 group drwxrwxr-x 7 root root 1024 Apr 20 23:13 . drwxrwxr-x 4 root root 4096 Apr 20 23:13 .. drwx------ 2 root root 12288 Apr 21 03:40 lost+found drwxrwxr-x 2 root root 1024 Apr 21 03:53 upgrade -rw-r--r-- 1 root root 817 Apr 21 03:53 smb.conf -rw-r--r-- 1 root root 81 Apr 21 03:53 share.info drwxrwxr-x 2 root root 1024 Apr 21 03:53 share -rw-r--r-- 1 root root 346 Apr 21 03:53 passwd.save drwxrwxr-x 2 root root 1024 Apr 21 03:53 config -rw-r--r-- 1 root root 0 Apr 21 03:53 backup_sh.conf -rw-r--r-- 1 root root 20 Apr 21 03:57 .htpasswd -rw-rw-rw- 1 root root 0 Apr 21 03:57 .dongle -rw-r--r-- 1 root root 816 Aug 9 12:36 server.log drwxrwxr-x 2 root root 1024 Sep 13 21:35 tmp

September 11, 2006, at 02:32 AM by mwester -- add solicitation for content
Changed lines 1-3 from:

Is there supposed to be information here?

to:

Is there supposed to be information here? - NAvAP?

(Yes, as a matter of fact. This page is waiting for a volunteer to put together a brief writeup on the details of what makes up a natively-formatted disk for the Linksys firmware. - mwester)

July 01, 2006, at 05:38 AM by NAvAP --
Added line 1:

Is there supposed to be information here?

view · edit · print · history · Last edited by fcarolo.
Based on work by mbogelund, Steve G, and mwester.
Originally by NAvAP.
Page last modified on January 14, 2007, at 07:54 PM