debian 化(2)

LS-HGL

実験用 HDD の準備

実験用 HDD として、転がっていた 6.5GB IDE HDD を使う。
もちろん、LS-HGL には SATA でつながないといけないので、 IDE HDD を USB で接続するためのアダプタを使用する。

実験用 HDD の接続

USB で HDD を接続し、LS-HGL を起動する。
root@LS-HGL487:~# dmesg
	:
	:
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
  Vendor: Maxtor 9  Model: 0651U2            Rev: 0811
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdb: 12594960 512-byte hdwr sectors (6449 MB)
sdb: test WP failed, assume Write Enabled
sdb: assuming drive cache: write through
SCSI device sdb: 12594960 512-byte hdwr sectors (6449 MB)
sdb: test WP failed, assume Write Enabled
sdb: assuming drive cache: write through
 sdb: sdb1 sdb2 sdb3
sd 2:0:0:0: Attached scsi disk sdb
sd 2:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
	:
	:
古い HDD なので、Write Protect(?) のテストに失敗しているが、 まあ、気にしないでおく。

実験用 HDD のアンマウント

root@LS-HGL487:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root.old            15351     14652       699  95% /initrd
/dev/sda2              4994004    243972   4750032   5% /
/dev/ram1                15360       100     15260   1% /mnt/ram
/dev/sda1               988212     24220    963992   2% /boot
/dev/usbdisk1_1        1968872    986796    882060  53% /mnt/usbdisk1
/dev/sda6            237067816      1020 237066796   0% /mnt/disk1
root@LS-HGL487:~#
/mnt/usbdisk1 に自動的にマウントされたので、 アンマウントする。
root@LS-HGL487:~# umount /mnt/usbdisk1
/sbin/hotplug [block]
root@LS-HGL487:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root.old            15351     14652       699  95% /initrd
/dev/sda2              4994004    243972   4750032   5% /
/dev/ram1                15360       100     15260   1% /mnt/ram
/dev/sda1               988212     24220    963992   2% /boot
/dev/sda6            237067816      1020 237066796   0% /mnt/disk1
root@LS-HGL487:~#

パーティションの設定

fdisk を起動、p コマンドでパーティションの様子を見る。
root@LS-HGL487:~# fdisk  /dev/sdb

The number of cylinders for this disk is set to 12495.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 6448 MB, 6448619520 bytes
16 heads, 63 sectors/track, 12495 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3969     2000344+  83  Linux
/dev/sdb2            3970        4466      250488   82  Linux swap
/dev/sdb3            4467       12495     4046616   83  Linux

Command (m for help): 
以前、HD-HGLAN で使っていた HDD なので、 パーティションが切ってある。
パーティションを消す。
Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Partition number (1-4): 2

Command (m for help): d
Selected partition 3

Command (m for help): 
続いて、パーティションを切っていく。
sdb1 は /boot 用。200MB
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-12495, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-12495, default 12495): +200M

Command (m for help):
sdb2 は / 用。2GB
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (390-12495, default 390):
Using default value 390
Last cylinder or +size or +sizeM or +sizeK (390-12495, default 12495): +2096M

Command (m for help):
sdb3 は swap。256MB
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (4452-12495, default 4452):
Using default value 4452
Last cylinder or +size or +sizeM or +sizeK (4452-12495, default 12495): +256M

Command (m for help):
sdb4 は /mnt。残り全部
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Selected partition 4
First cylinder (4949-12495, default 4949):
Using default value 4949
Last cylinder or +size or +sizeM or +sizeK (4949-12495, default 12495):
Using default value 12495

Command (m for help): p

Disk /dev/sdb: 6448 MB, 6448619520 bytes
16 heads, 63 sectors/track, 12495 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         389      196024+  83  Linux
/dev/sdb2             390        4451     2047248   83  Linux
/dev/sdb3            4452        4948      250488   83  Linux
/dev/sdb4            4949       12495     3803688   83  Linux

Command (m for help):
sdb3 の Id を Linux swap (82)にする。
Command (m for help): t
Partition number (1-4): 3
Hex code (type L to list codes): 82
Changed system type of partition 3 to 82 (Linux swap)

Command (m for help): p

Disk /dev/sdb: 6448 MB, 6448619520 bytes
16 heads, 63 sectors/track, 12495 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         389      196024+  83  Linux
/dev/sdb2             390        4451     2047248   83  Linux
/dev/sdb3            4452        4948      250488   82  Linux swap
/dev/sdb4            4949       12495     3803688   83  Linux

Command (m for help):
パーティション情報を書込んで、fdisk 終了。
Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
SCSI device sdb: 12594960 512-byte hdwr sectors (6449 MB)
sdb: test WP failed, assume Write Enabled
sdb: assuming drive cache: write through
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
SCSI device sdb: 12594960 512-byte hdwr sectors (6449 MB)
sdb: test WP failed, assume Write Enabled
sdb: assuming drive cache: write through
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
Syncing disks.
root@LS-HGL487:~#
?

LS-GL ハックキットのファイルの転送

順番は前後するが、 LS-GL/HS-DHGL ハックキットのファイル
・LS-GL_hackkit_2.10.sh
・LS-GL_hackkit_2.10.tar.gz
を Windows エクスプローラで、 LS-HGL の /mnt/disk1/share/debian に転送する。

LS-GL_hackkit_2.10.sh の変更

とりあえず、
・miconapl 関連は操作しない
・usr/local/lib/libbuffalo_bin.* は無いので、コピーしない
・カーネルモジュールは、/lib ではなく /usr/local/buffalo/lib に コピーする
とりあえずこれだけ。

プリンタサーバにするには、もう少し必要だが、とりあえず。

インストールスクリプトの実行

root@LS-HGL487:/mnt/disk1/share/debian# sh LS-HGL_hackkit_1.00.sh
formating hard drive ...
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
49152 inodes, 196024 blocks
9801 blocks (5.00%) reserved for the super user
First data block=1
24 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information:
	:
	:

creating network_interfaces ...
creating resolv.conf ...
creating hosts ...
creating hostname ...
/sbin/hotplug [block]
root@LS-HGL487:/mnt/disk1/share/debian#
終わった。

ハックキットの起動

実験用 HDD を SATA で接続し、LS-HGL を起動する。
Orion1   CPU =  Low

> Checking hardware info ...
=== Strap status : 0x00800030 ===
=== H/W boardId  :       0x23 ===
=== boardId      :       0x1b ===
=== micon_support:        off ===
> OK.
=== BUFFALO LS-HGL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_HGL LE (CFG_ENV_ADDR=fffff000)


U-Boot 1.1.1 (Feb  4 2008 - 20:03:55) Marvell version: 1.12.1 - TINY
Buffalo Version: 1.13-1.00

DRAM CS[0] base 0x00000000   size 128MB
DRAM Total size 128MB
[256kB@fffc0000] Flash: 256 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz
Orion 1 streaming disabled
SysClock = 250Mhz , TClock = 166Mhz


USB 0: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]
Using 88E1118 phy
buffalo_change_power_status > Read 0x3a
buffalo_IsStopAtUbootStatus > MagicKey=0x3a
buffalo_change_power_status > Read 0x3a
buffalo_change_power_status > Read 0x3a
buffalo_change_power_status > Writing 0x5c

Please Press HDD power button to continue ...
buffalo_change_power_status > Read 0x5c
buffalo_change_power_status > Writing 0x3a

Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: Maxtor 90651U2                           Firm: FA520S60 Ser#: G22PJWKC
            Type: Hard Disk
            Capacity: 6149.8 MB = 6.0 GB (12594960 x 512)

Using device ide0, partition 1

Loading from block device ide device 0, partition 1: Name: hda1
  Type: U-Boot  File:/initrd.buffalo

5944613 bytes read
Using device ide1, partition 1
** Bad partition 1 **
Booting from Device 0
hit any key to switch tftp boot.
Hit any key to stop autoboot:  0
Hit any key to stop autoboot:  0

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: Maxtor 90651U2                           Firm: FA520S60 Ser#: G22PJWKC
            Type: Hard Disk
            Capacity: 6149.8 MB = 6.0 GB (12594960 x 512)

Using device ide0, partition 1

Loading from block device ide device 0, partition 1: Name: hda1
  Type: U-Boot  File:/uImage.buffalo

1715664 bytes read
Using device ide1, partition 1
** Bad partition 1 **
## Booting image at 00100000 ...
   Image Name:   Linux-2.6.16.16-arm1
   Created:      2008-02-21   2:41:51 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1715600 Bytes =  1.6 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00800000 ...
   Image Name:   initrd
   Created:      2007-10-31  15:48:40 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5944549 Bytes =  5.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

arg:console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 func=0 BOOTVER=1.13
CONFIG_BUFFALO_PLATFORM CONFIG_BUFFALO_LINKSTATION_LSHGL ---
Uncompressing Linux................................................................................................................ done, booting the kernel.
Linux version 2.6.16.16-arm1 (root@build.dd-hot24.nas.buffalo.local) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #304 Thu Feb 21 11:41:19 JST 2008
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
Machine: MV-88fxx81
Using UBoot passing parameters structure
Sys Clk = 250000000, Tclk = 166664740


- Warning - This LSP release was tested only with U-Boot release 1.7.3

Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 func=0 BOOTVER=1.13
PID hash table entries: 1024 (order: 10, 16384 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 128MB 0MB 0MB 0MB = 128MB total
Memory: 110720KB available (2912K code, 550K data, 108K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 15360K
NET: Registered protocol family 16
FLASH boardId = 1a
Flash bankwidth 1, base ff800000, size 40000
BUFFALO LS_HGL FLASH size 256[KB]

  Marvell Development Board (LSP Version 1.7.8_NAS)-- BUFFALO_BOARD_LS_HGL

 Detected Tclk 166664740 and SysClk 250000000
Marvell USB EHCI Host controller #0: c16f5e00
Marvell USB EHCI Host controller #1: c16f5c00
pexBarOverlapDetect: winNum 2 overlap current 0
mvPexInit:Warning :Bar 2 size is illigal
it will be disabled
please check Pex and CPU windows configuration
PCI: bus0: Fast back to back transfers enabled
PCI: bus1: Fast back to back transfers enabled
SCSI subsystem initialized
use IDMA acceleration in copy to/from user buffers. used channels 2 and 3
Done.
cesadev_init(c0011434)
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
SGI XFS with large block numbers, no debug enabled
Initializing Cryptographic API
io scheduler noop registered (default)
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 4) is a 16550A
RAMDISK driver initialized: 3 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
Marvell Gigabit Ethernet Driver 'egiga':
  o Ethernet descriptors in DRAM
  o DRAM SW cache-coherency
  o Checksum offload enabled
  o Loading network interface ** egiga_init_module (0)
'eth0'
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
** BUFFALO Disable Command Queuing Function [0 0] **
  Vendor: Maxtor    Model: 90651U2           Rev: FA52
  Type:   Direct-Access                      ANSI SCSI revision: 03
Linux IAL (ERROR) : retry command host=0, bus=0 SCpnt = c142fba0
SCSI device sda: 12594960 512-byte hdwr sectors (6449 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
SCSI device sda: 12594960 512-byte hdwr sectors (6449 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
physmap flash device: 40000 at ff800000
>jedec_probe
Found: SST 39LF020
phys_mapped_flash: Found 1 x8 devices at 0x0 in 8-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
mice: PS/2 mouse device common for all mice
Kernel event proc (C) BUFFALO INC. V.1.00 installed.
MICON ctrl (C) BUFFALO INC. V.1.00 installed.
Buffalo CPU Inerupts Driver (C) BUFFALO INC. Ver.0.01 alpha1 installed.
mvGppValueSet: Err. An attempt to set output value to GPP 2 in input mode.
Buffalo Gpio Control Driver (C) BUFFALO INC. Ver.0.01 installed.
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
---- in modified linuxrc ---
XFS mounting filesystem sda2
Starting XFS recovery on filesystem: sda2 (logdev: internal)
Ending XFS recovery on filesystem: sda2 (logdev: internal)
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... okay
Freeing init memory: 108K
INIT: version 2.86 booting
Activating swap:swapon on /dev/sda3
Adding 250480k swap on /dev/sda3.  Priority:-1 extents:1 across:250480k
.
Setting the system clock..
System Clock set. Local time: Thu Nov  1 01:08:44 JST 2007.
Cleaning up ifupdown....
Loading device-mapper support.
Will now check all file systems.
fsck 1.40-WIP (14-Nov-2006)
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /boot] fsck.ext3 -a -C0 /dev/sda1

ここで長時間止まる。
我慢できずに シリアルコンソールから CTRL-C を押す。
Setting kernel variables...done.
Will now mount local filesystems:kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda4
.
Will now activate swapfile swap:done.
Cleaning /tmp...done.
Cleaning /var/run...done.
Cleaning /var/lock...done.
Setting up networking....
Configuring network interfaces...eth0: link down
done.
Setting console screen modes and fonts.
eth0: link up<5>, full duplex<5>, speed 1 Gbps<5>
Initializing random number generator...done.
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting MTA: exim4.
Starting internet superserver: inetd.
Starting deferred execution scheduler: atdStarting periodic command scheduler: crond.
Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 4.0 hackkit ttyS0

hackkit login: root
Password:
Linux hackkit 2.6.16.16-arm1 #304 Thu Feb 21 11:41:19 JST 2008 armv5tejl

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
hackkit:~# uname -a
Linux hackkit 2.6.16.16-arm1 #304 Thu Feb 21 11:41:19 JST 2008 armv5tejl GNU/Linux
hackkit:~# cat /etc/debian_version
4.0
hackkit:~#
とりあえず、動いたな。

電源SW を OFF

電源SW を OFF にしても、何もおこらない。
kernelmon が修正できていないので、当たり前。

shutdown

電源SW を OFF にしておいて、shutdown -h now を実行してみる。
hackkit:~# shutdown -h now

Broadcast message from root@hackkit (ttyS0) (Thu Nov  1 01:27:21 2007):

The system is going down for system halt NOW!
INIT: Sending processeStopping periodic command scheduler: crond
.
Stopping MTA: exim4_listener.
Stopping internet superserver: inetd.
Saving the system clock..
Hardware Clock updated to Thu Nov  1 01:27:27 JST 2007.
Stopping deferred execution scheduler: atd.
Stopping kernel log daemon: klogd.
Stopping system log daemon: syslogd.
Asking all remaining processes to terminate...done.
Killing all remaining processes...done.
Saving random seed...done.
Deconfiguring network interfaces...done.
Cleaning up ifupdown....
Will now deactivate swap:swapoff on /dev/sda3
.
Will now unmount local filesystems:/dev/root.old umounted
/dev/sda1 umounted
/dev/sda4 umounted
.
Mounting root filesystem read-only...done.
Will now halt.
Synchronizing SCSI cache for disk sda:
System halted.
BuffaloChangePowerStatusBeforeHalt > Check power status. MagicKey = 58
Orion1   CPU =  Low

> Checking hardware info ...
=== Strap status : 0x00800030 ===
=== H/W boardId  :       0x23 ===
=== boardId      :       0x1b ===
=== micon_support:        off ===
> OK.
=== BUFFALO LS-HGL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_HGL LE (CFG_ENV_ADDR=fffff000)


U-Boot 1.1.1 (Feb  4 2008 - 20:03:55) Marvell version: 1.12.1 - TINY
Buffalo Version: 1.13-1.00

DRAM CS[0] base 0x00000000   size 128MB
DRAM Total size 128MB
[256kB@fffc0000] Flash: 256 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz
Orion 1 streaming disabled
SysClock = 250Mhz , TClock = 166Mhz


USB 0: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]
Using 88E1118 phy
buffalo_change_power_status > Read 0x3a
buffalo_IsStopAtUbootStatus > MagicKey=0x3a
buffalo_change_power_status > Read 0x3a
buffalo_change_power_status > Read 0x3a
buffalo_change_power_status > Writing 0x5c

Please Press HDD power button to continue ...
やっぱり、System halted. では止まらない。

LS-H250GL
楽天市場
livedoor デパート
Sofmap
TSUKUMO ネットショップ
TWO TOP
Yahoo!ショッピング
パソQ
ムラウチドットコム
ヤマダ電機WEB
アット・ニフティストア icon
Joshin インターネットショッピング icon


debian 化構想
ハックの記録
LinkStation/玄箱 をハックしよう

debian 化(3)課題の整理

Copyright (C) 2003-2008 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市