Installing firmware on a fresh disk. (Edmini V2)

From NAS-Central Lacie Wiki
Revision as of 11:15, 27 April 2012 by Mijzelf (Talk | contribs) (/dev/sdb6 (kernel))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Connecting the disk

Connect the new disk to a Linux PC. (A windows PC booted from a Linux Live CD or -usb stick is fine). You can use an USB-SATA converter, or connect the disk on an in- or extern SATA port.
You'll need xfstools. Puppy Linux doesn't support xfs

Find device name

Find the device name of the disk:

cat /proc/partitions

I'll assume the disk is sdb for the rest of the story.

Collect files

Download the files here
There are two different sda8 dumps, the original containing fw 1.0.8, and one in which fw is integrated.

Become root

You'll need to have root rights to do the next steps. In Ubuntu or Knoppix you can get these by executing

sudo su

In most other flavors you just execute


Create partitions

Use fdisk to generate this partition table:

   Device    Boot   Start         End      Blocks   Id  System
/dev/sdb1               1         125     1004031    5  Extended
/dev/sdb2             126       30401   243191970   83  Linux
/dev/sdb5               1          16      128457   82  Linux swap
/dev/sdb6              17          17        8001   83  Linux
/dev/sdb7              18          18        8001   83  Linux
/dev/sdb8              19          34      128488+  83  Linux
/dev/sdb9              35         125      730926   83  Linux

/dev/sdb2 is the data partition, it uses all remaining space.
/dev/sdb2 is a primary partition, /dev/sdb1 is an extended partition, and all other partitions are logical.

fdisk is started by:

fdisk /dev/sdb

and use 'm' to get further help.

preparing the partitions

/dev/sdb5 (swap)

mkswap /dev/sdb5

/dev/sdb7 (initfs)

mke2fs -j /dev/sdb7
mkdir -p /tmp/mountpoint
mount /dev/sdb7 /tmp/mountpoint
cd /tmp/mountpoint
tar xzf /full/path/to/sda7.tgz
cd ..
umount /tmp/mountpoint

/dev/sdb8 (ro layer rootfs)

mke2fs -j /dev/sdb8
mount /dev/sdb8 /tmp/mountpoint
cd /tmp/mountpoint
tar xzf /full/path/to/sda8.tgz
cd ..
umount /tmp/mountpoint

/dev/sdb9 (rw layer rootfs)

mke2fs -j /dev/sdb9

/dev/sdb2 (data partition)

mkfs.xfs /dev/sdb2

/dev/sdb6 (kernel)

gzip -cd /full/path/to/sdb6.gz | dd of=/dev/sdb6

When you use 'sudo' commands, this should be

gzip -cd /full/path/to/sdb6.gz | sudo dd of=/dev/sdb6