LS PRO modified initrd

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 16:43, 8 June 2007 by Lonniev (Talk | contribs)

Jump to: navigation, search

Contents

What is an initrd

InitRd: Initial Ram Disk image is a temporary filesystem (ext2) used by the LS during boot up. For the stock box, this system maintains many of the customised scripts installed on the LS. It also checks for system update files and acts accordingly. For the modified systems, it provides a means of entry when no root filesystem is available.

Modified Image

The modified initrd created by lb_worm provides a ram image that supports both the stock system and the modified system. The modified system can be a modified stock or completely new distribution such as Debian or Gentoo.

The modified initrd image also comes equipped with a configuration file boot_options. This file resides within the boot partition (sda1) along with the uImage (UBoot kernel image) and the initrd image. For a modified system, the control files are also placed in sda1. These files are:

  • linkstation_release
  • hddrootmode
  • rootfs_ok

Rather than go into any detail, these files simply provide information of the release, the operational mode of the LS and if the root filesystem is okay.

If hddrootmode is missing on boot-up, then the LS will boot the initrd image. If the root filesystem fails to boot more than three times, then the LS will boot the initrd image.

boot_options file

This is a script that is invoked by the initrd during its execution. This file contains the following information:

 ## Set to YES if not a stock box, comment out if stock box
 OTHER_DISTRIBUTION=YES
 ## Define root path, comment out if stock box
 ROOTPATH=/boot
 ## Advanced use only, specify system area format
 SYSTEM_FORMAT="mkfs.xfs -d agcount=4 -l size=32m"
 ## Set menu timeout (secs), default is 4.  Disable, set to 0 or OFF. For
 ## EM mode set to EM
 MENU_TIMEOUT=4
 ## Set to YES to delete hdd image following update or NO to leave it
 REMOVE_HDDROOTFS=NO
 ## Reset fan as micocontroller does not do this after reboot
 miconapl -a fan_set_speed stop
 ## Watch-dog reset to 250 secs
 miconapl -a system_set_watchdog 250
 ## Clear error LED indication
 miconapl -a led_set_code_information clear
 ## Indicate it ran
 miconapl -a bz_imhere 1 b4 a4
  • OTHER_DISTRIBUTION

Set to YES if a modified or other distribution root filesystem. Default is NO which is stock

  • ROOTPATH

Defines the logical filepath for the control files. Default is /etc under the root filesystem partition.

  • SYSTEM_FORMAT

For advanced use only. This does allow the user to modify the format used by the root filesystem. Default is XFS.

  • MENU_TIMEOUT

Provides control over the amount of time that the intercept menu is displayed. This menu is only available to those with serial connections to the LS. To improve boot time, this can be set to OFF. The default value for this is four seconds. Another use of this parameter is for entry to the initrd on boot-up rather than the root filesystem. For this, set this entry to EM and reboot.

  • REMOVE_HDDROOTFS

Set to YES so that the root filesystem upgrade image file is removed following successful installation. This effectively removes the large hddroot image filesystem from the boot partition therefore freeing valuable space.

  • Remaing commands

These turn off the fan, reset the watchdog to 240 seconds, clear the LED state and play a "I've run" tune.

How to Verify Your Installation

See the discussion tab for what should be here...