Boot Option

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search


This article shows how to boot terastation from a different location than /dev/md0.


  1. You need a modified firmware: Fail Safe Firmware
  2. You need an additional boot device: Emergency Boot
  3. You need a partition to boot from, e.g. extra disk (internal or external) or from /dev/hd'x'4, example with /dev/md3:
    1. boot from sda1
    2. copy system and set start configuration
mdadm -C -n 4 -l raid1 /dev/md3 /dev/hda4 /dev/hdc4 /dev/hde4 /dev/hdg4
mkfs.xfs -f /dev/md3
mkdir /mnt/md3
mount /dev/md3 /mnt/md3
cp -a /mnt/teraroot/* /mnt/md3
vi /mnt/md3/etc/fstab 

# /etc/fstab: static file system information.                                   
# <file system> <mount point>   <type>  <options>               <dump>  <pass>  
/dev/md3        /               auto    defaults,noatime                0 0     
/dev/md0        /mnt/teraroot   auto    defaults,ro                     0 0     
proc            /proc           proc    defaults                        0 0     
/dev/hda2      swap            swap    defaults                        0 0     
/dev/hdc2      swap            swap    defaults                        0 0     
/dev/hde2      swap            swap    defaults                        0 0     
/dev/hdg2      swap            swap    defaults                        0 0     

mkdir /mnt/md3/teraroot

Setting boot partition option

If you have a bootable partion simply set the device you want to boot from in /etc/BOOTPART of the md0 partition, i.e. /mnt/teraroot/etc/BOOTPART after booting from sda1:

mount -o remount,rw /dev/md0
echo md3 > /mnt/teraroot/etc/BOOTPART

After boot:

root@TERASTATION:~# mount
/dev/md3 on / type auto (rw,noatime)
proc on /proc type proc (rw)
/dev/shm on /mnt/ram type tmpfs (rw,mode=1777,size=15m)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/md0 on /mnt/teraroot type xfs (ro)
/dev/md1 on /mnt/array1 type xfs (rw,noatime)
/dev/md2 on /mnt/array2 type xfs (rw,noatime)
/proc/bus/usb on /proc/bus/usb type usbdevfs (rw)


If you set up your system booting from a different location e.g. md4 and this partition is not mountable,

  • the system boots with md0
  • the yellow power led blinks

If the booting of md0 fails

  • the system boots EM
  • the yellow power led is on

... and of course all other leds behaviour as you know it.

Courtesy of André [1]