kuro-box
  玄箱/Linkstation
    families
  HD-LAN
    入手
      flash
      取出
      HD-LAN vs HD-HLAN
    玄箱に変身
  HD-HGLAN
hardware
  Diag LED の点滅回数
  serial console
    9-KE connection
    clock speed
    shell
    mfdisk
      # mfdisk -h
      # mfdisk -c /dev/hda
      # mfdisk -p /dev/hda
      # mfdisk -e /dev/hda
      # mfdisk -p /dev/hda
      # mfdisk -c /dev/hda
  JTAG connection
    parallel port
    USB
  flash ROM
    firmbin.img
  firmimgtool
  しくみ
    玄箱
    LinkStation
      HD-HGLAN
    TeraStation
      TS-TGL
    Alert mode
    Info
  後のボタンを押しながら
  部品
    直列通信口
    電源
    ファン
NetBSD
  URL(1)
  改造の有無
  URL(2)
  getting stuff
  入手したら
    材料の説明
      binary 形式
    区画 (fdisk)
    Linux の設置
    20061027
    EM mode
      mfdisk
      ftp
    loader/install kernel
      /boot
      tools
      kernel
      nbloader
      boot selector2
      url
      ftp-get
    sysinst 起動
    sysinst (一部)
    multi-user
    自動起動
    rc2.d
    自動起動の解除
    message
  kuro_avrd
  bootsel2
    何をするもの
    起動の操作は
    設置
      Root Login
      操作
    設定
  無改造
    全体の流れ
    OS 設置後は
    /boot を用意する
    kuro_boot.conf
    sysinst by telnet
    chroot
    single user
      sshd
      telnet
      root
    20061027
      ftp
      nbloader/kernel
      boot selector
      kuro_boot.conf
      single user
      multi-user
      kuro_boot.conf
  packages
    pkg_info
  server
    samba
    netatalk
    NFS
    cvsync
    sendmail
  panic した時
  build.sh
    20070921
    20061019
    思いつくまま
SandPoint
  手順
  手順(別法)
files
  Buffalo
    kuro_102
    TS-TGL
problems
  20070917
  20061012
  sysinst 終了
  screen
  NFS 書込異常
  質問等
  ちょっとうっかり
    single user
boot code
  compile
    cross
      NetBSD
      powerpc-gnu-linux
  たつや版
    self
  U-Boot
  ts-tgl
玄箱/pro
    20081107
    20080624
    build
    boot
    dmesg
    日記から

hardware | TeraStation | software

Kuro-Box

Last Update: "2007/06/04 09:22:18 makoto"

shell

http://spirea.ddo.jp/debian02.html
# help

Built-in commands:
-------------------
        . : alias bg break builtin cd chdir continue eval exec exit export
        false fc fg hash help jobs kill let local pwd read readonly return
        set setvar shift times trap true type ulimit umask unalias unset
        wait

mfdisk

mfdisk は PC で良く使われる fdisk を玄箱/LinkStation/TeraStation 用 にしたものと考えるのが理解しやすいでしょう。良く見れば、機能は全然違う のですが、MBR を編集するという意味では同じものです。 まず、mfdisk とのつき合い方で注意することがあります。 mfdisk は最初、HD-LAN ver 1. 用に
mfdisk /dev/hda
のようにして初期化をするために用意されたものであることです。 何が問題かと言って、「一番簡単な書式で入力すると、全て初期化してしまう」 ことです。現に僕も一度それをやってしまったことがあります。

逆に言えば、もし fdisk が使えるなら、それを使う方が簡単かも知れません。

# mfdisk -h
(説明)
Partition table manipulator for BUFFALO INC. Link Station series. ver 1.5, 2003.10.3

Usage: mfdisk DISK     Create partition tables for HD-LAN ver 1.xx
       mfdisk -f DISK  Create partition tables for HD-LAN ver 2.xx
       mfdisk -h DISK  Create partition tables for HD-HLAN
       mfdisk -g [1:2:3:5:10:20:50] DISK  Create partition tables
       mfdisk -a DISK  Create partition table for HD-HLAN's USB Disk
       mfdisk -c DISK  Create partition table(s) with menu
       mfdisk -p DISK  Check partition table(s)
       mfdisk -e DISK  Deleate all partition tables
       mfdisk -d [1:2:3:4] DISK  Create partition tables for Link Station
Here DISK is something like /dev/hda or /dev/sda
# mfdisk -c /dev/hda
区画作成の説明
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


Command (m for help): help
Partition table manipulator for BUFFALO INC. HD-LAN Series.
create partitions...
limit = 257039
start = 63, stop(limit) = 257039
limit = 771119
start = 257040, stop(limit) = 771119
limit = 321669494
start = 771120, stop(limit) = 321669494
The partition table has been altered!

Syncing disks.
# mfdisk -p /dev/hda
(確認)
Units = /dev/hda, 1417MB
/dev/hda1 = Linux, (null)
/dev/hda2 = Linux swap, (null)
/dev/hda3 = Linux, (null)
# mfdisk -e /dev/hda
(消去)
delete partition 1
delete partition 2
delete partition 3
create partitions...
deleate all partitions.
The partition table has been altered!

Syncing disks.
# mfdisk -p /dev/hda
Units = /dev/hda, 1417MB
# mfdisk -c /dev/hda
Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-20023, default 1): 
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-20023, default 20023): 600

Command (m for help): p

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

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1       600   4819468+  83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (601-20023, default 601): 
Using default value 601
Last cylinder or +size or +sizeM or +sizeK (601-20023, default 20023): 120
Value out of range.
Last cylinder or +size or +sizeM or +sizeK (601-20023, default 20023): 720

Command (m for help): p

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

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1       600   4819468+  83  Linux
/dev/hda2           601       720    963900   83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (721-20023, default 721): 
Using default value 721
Last cylinder or +size or +sizeM or +sizeK (721-20023, default 20023): 
Using default value 20023

Command (m for help): p

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

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1       600   4819468+  83  Linux
/dev/hda2           601       720    963900   83  Linux
/dev/hda3           721     20023 155051347+  83  Linux

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit

Command (m for help): w
The partition table has been altered!

Syncing disks.
# 

Last Update: Sat, 07 Jun 2014 22:16:17 GMT 1.66 2008/03/08