This is an old revision of the document!


How to install a root file system to a Hard Disk

Getting started

First I want to let you know that you must have serial port installed to your DSM-G600! Also I want to let you know that getting a regular (Gentoo or Debian) linux work on DSM-G600 can be extremely hard and It is recommended that you have very good knowledge about how Gentoo and Debian really work (boot process, initrd, inittab, services, runlevels).

Basic steps

  1. Install Centoo chroot or a Debian chroot into sda3 root.
  2. Apply a kernel patch. After that your kernel is going to ignore U-Boot bootargs and you will be able to set a CONFIG_CMDLINE parameter.
    --- arch/ppc/kernel/setup.c.orig        2005-04-11 05:50:07.000000000 +0300
    +++ arch/ppc/kernel/setup.c     2007-02-17 16:06:16.000000000 +0200
    @@ -607,8 +611,8 @@
            init_mm.brk = (unsigned long) klimit;
     
            /* Save unparsed command line copy for /proc/cmdline */
    -       strcpy(saved_command_line, cmd_line);
    -       *cmdline_p = cmd_line;
    +       strcpy(saved_command_line, CONFIG_CMDLINE);
    +       *cmdline_p = CONFIG_CMDLINE;
     
            /* set up the bootmem stuff with available memory */
            do_init_bootmem();
  3. Additional kernel .config entries you might want to add/change.
    CONFIG_CMDLINE_BOOL=y
    CONFIG_CMDLINE="root=/dev/sda3 console=ttyS0,9600"
    CONFIG_DEVFS_FS=y
    CONFIG_UNIX=y
    CONFIG_FILTER=y
    CONFIG_UNIX98_PTYS=y
    CONFIG_DEVPTS_FS=y
    # CONFIG_NTFS_FS is not set
    # CONFIG_NTFS_RW is not set
    # CONFIG_TULIP is not set

    If you want to also enable reiserfs then you need to disable NFS for example to get more space. Remember that maximum U-Boot formated kernel size is 936KB!

Ramdisk tips

By default you don't need to do nothing with ramdisk. Ramdisk will be loaded into memory as usual. To go around this problem you can boot with bootm FFF10000 U-Boot parameter which will only load a kernel image.

Gentoo tips

  • Remember to set a root password!
  • If you use 2005.0 stage then make sure that you update e2fsprogs first thing you get a access to emerge.
  • If you can't get to the login then press ctrl+c right after /dev and sda3 is mounted.
  • If your root file system is read-only then use mount -t ext3 -o rw,remount /dev/sda3 / to get write access.

Links


Personal Tools