LS-XHL, LS-QL 対応ハックキットの LS-WSGL へのインストール

Debian LS-WSGL/R1

LS-XHL, LS-QL に対応したハックキットができたので、 全機種で確認していく。

最初は、LS-WSGL。
LS-QL 対応で、initrd の /linuxrc を変更したので、 LS-WSGL に悪影響が出ていないか確認をするために、 最初に確認する。

準備(LS-WSGL の場合)

標準ファームに root でログインできるようにする

済み

標準ファームの HDD のコピー

(a) データ領域に RAID が設定されていると何かと面倒なので、 RAID は解除しておきます

済み

(b) ハックキットをインストールする1台目の HDD に 標準ファームをコピーします。

(b-1) SATA2 にのみ HDD を接続し、起動します。
(b-2) root でログインします。
(b-3) ハックキットをインストールする1台目の HDD を USB で接続します。
root@LS-WSGL678:~# /sbin/hotplug [usb]
/sbin/hotplug [usb]
/sbin/hotplug [scsi_host]
/sbin/hotplug [usb_device]
[/etc/hotplug.d/usb_device/buffalo.hotplug] usb_device
!*** /usr/local/bin/DirectCopy_wait.sh [usb_device]
  Vendor: WDC WD25  Model:  WD-WXE508EV3494  Rev: 1A01
  Type:   Direct-Access                      ANSI SCSI revision: 02
/sbin/hotplug [scsi]
SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB)
sdb: Write Protect is off
sdb: assuming drive cache: write through
SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB)
sdb: Write Protect is off
sdb: assuming drive cache: write through
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
sd 2:0:0:0: Attached scsi disk sdb
/sbin/hotplug [block]
/sbin/hotplug [scsi_device]
sd 2:0:0:0: Attached scsi generic sg1 type 0
/sbin/hotplug [scsi_generic]
SUPPORT_DIRECT_COPY=on
*** /usr/local/bin/DirectCopy_wait.sh [stop]
DEVNAME=sdb
hotplug: make_list() fail.
BASENAME=usbdisk1
MPT=/mnt/usbdisk1/
try vfat(usbdisk)
/sbin/hotplug [module]
/sbin/hotplug [module]
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
FAT: bogus number of reserved sectors
/sbin/hotplug [block]
ext3: No journal on filesystem on sdb1
/sbin/hotplug [block]
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
/sbin/hotplug [block]
## STATE_CHANGED ##
*** [/etc/hotplug.d/scsi_device/usb-buffalo.hotplug 3138] Restarting Daemons...
*** /usr/local/bin/DirectCopy_wait.sh []
1 USB_DEVICE=/mnt/usbdisk1
direct copy mode : ready
clearing printer queue
clearing printer queue
clearing printer queue
direct copy mode : done

root@LS-WSGL678:~# 
(b-4) /mnt/usbdisk1 に自動的にマウントされた場合はアンマウントします。
root@LS-WSGL678:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md1               4993920    292244   4701676   6% /
/dev/ram1                15360       108     15252   1% /mnt/ram
/dev/md0                988064    126436    861628  13% /boot
/dev/disk1_6         187419092    142100 187276992   0% /mnt/disk1
/dev/usbdisk1_1         988064    137436    850628  14% /mnt/usbdisk1
root@LS-WSGL678:~# umount /mnt/usbdisk1/
/sbin/hotplug [block]
root@LS-WSGL678:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md1               4993920    292244   4701676   6% /
/dev/ram1                15360       108     15252   1% /mnt/ram
/dev/md0                988064    126436    861628  13% /boot
/dev/disk1_6         187419092    142100 187276992   0% /mnt/disk1
root@LS-WSGL678:~#

(b-5) sdb にパーティションを切ります。
root@LS-WSGL678:~# fdisk -l /dev/sdb

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         125     1004031   83  Linux
/dev/sdb2             126         748     5004247+  83  Linux
/dev/sdb4             749       30401   238187722+   5  Extended
/dev/sdb5             749         873     1004031   82  Linux swap
/dev/sdb6             874       30295   236332183+  83  Linux
root@LS-WSGL678:~#
既に切ってある。
(b-6) フォーマットします(不要かも)
とりあえずフォーマットしないでみる。
(b-7) RAID をリビルドします
root@LS-WSGL678:~# mdadm -a /dev/md0 /dev/sdb1
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:0, o:1, dev:sda1
 disk 1, wo:1, o:1, dev:sdb1
mdadm: added /dev/sdb1
root@LS-WSGL678:~# KERNELMOn (raidrecovery 0 1 1 1 8 17)
mdadm -a /dev/md1 /dev/sdb2
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:0, o:1, dev:sda2
 disk 1, wo:1, o:1, dev:sdb2
mdadm: added /dev/sdb2
root@LS-WSGL678:~# mdadm -a /dev/md10 /dev/sdb5
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:0, o:1, dev:sda5
 disk 1, wo:1, o:1, dev:sdb5
mdadm: added /dev/sdb5
root@LS-WSGL678:~# cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 sdb2[2] sda2[0]
      5004160 blocks [2/1] [U_]
        resync=DELAYED

md10 : active raid1 sdb5[2] sda5[0]
      1003904 blocks [2/1] [U_]
        resync=DELAYED

md0 : active raid1 sdb1[2] sda1[0]
      1003904 blocks [2/1] [U_]
      [=============>.......]  recovery = 67.0% (674048/1003904) finish=0.2min speed=18675K/sec

unused devices: <none>
root@LS-WSGL678:~#
待つ。
root@LS-WSGL678:~# !cat
cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 sdb2[1] sda2[0]
      5004160 blocks [2/2] [UU]

md10 : active raid1 sdb5[1] sda5[0]
      1003904 blocks [2/2] [UU]

md0 : active raid1 sdb1[1] sda1[0]
      1003904 blocks [2/2] [UU]

unused devices: <none>
root@LS-WSGL678:~#
(b-8) 電源 OFF。コンセントも抜きます。

(c) ハックキットをインストールする2台目の HDD に標準ファームをコピーします。

(c-1) 上記 (b) でコピーした HDD を SATA2 に接続し、起動します。
(c-2) root でログインします。
BUFFALO INC. LinkStation series
LS-WSGL678 login: root
root@LS-WSGL678:~#
(c-3) ハックキットをインストールする2台目の HDD を USB で接続します。
以下、(b-4) ~ (b-8) を繰り返し。
root@LS-WSGL678:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md1               4993920    292392   4701528   6% /
/dev/ram1                15360       104     15256   1% /mnt/ram
/dev/md0                988064    126436    861628  13% /boot
/dev/usbdisk1_1         988064    137436    850628  14% /mnt/usbdisk1
/dev/disk1_6         236216784       960 236215824   0% /mnt/disk1
root@LS-WSGL678:~# umount /mnt/usbdisk1/
/sbin/hotplug [block]
root@LS-WSGL678:~# fdisk -l /dev/sdb

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         125     1004031   83  Linux
/dev/sdb2             126         748     5004247+  83  Linux
/dev/sdb4             749       30401   238187722+   5  Extended
/dev/sdb5             749         873     1004031   82  Linux swap
/dev/sdb6             874       30295   236332183+  83  Linux
root@LS-WSGL678:~# mdadm -a /dev/md0 /dev/sdb1
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sdb1
 disk 1, wo:0, o:1, dev:sda1
mdadm: added /dev/sdb1
root@LS-WSGL678:~# KERNELMOn (raidrecovery 0 1 1 1 8 17)
mdadm -a /dev/md1 /dev/sdb2
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sdb2
 disk 1, wo:0, o:1, dev:sda2
mdadm: added /dev/sdb2
root@LS-WSGL678:~# mdadm -a /dev/md10 /dev/sdb5
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sdb5
 disk 1, wo:0, o:1, dev:sda5
mdadm: added /dev/sdb5
root@LS-WSGL678:~# cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 sdb2[2] sda2[1]
      5004160 blocks [2/1] [_U]
        resync=DELAYED

md10 : active raid1 sdb5[2] sda5[1]
      1003904 blocks [2/1] [_U]
        resync=DELAYED

md0 : active raid1 sdb1[2] sda1[1]
      1003904 blocks [2/1] [_U]
      [===============>.....]  recovery = 79.6% (800512/1003904) finish=0.1min speed=19107K/sec

unused devices: <none>
root@LS-WSGL678:~# RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sdb1
 disk 1, wo:0, o:1, dev:sda1
KERNELMOn (raidrecovery 0 0 0 1 8 17)
KERNELMOn (raidrecovery 10 1 1 1 8 21)
KERNELMOn (raidrecovery 1 1 1 1 8 18)
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sdb2
 disk 1, wo:0, o:1, dev:sda2
KERNELMOn (raidrecovery 1 0 0 1 8 18)

root@LS-WSGL678:~# cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 sdb2[0] sda2[1]
      5004160 blocks [2/2] [UU]

md10 : active raid1 sdb5[0] sda5[1]
      1003904 blocks [2/2] [UU]

md0 : active raid1 sdb1[0] sda1[1]
      1003904 blocks [2/2] [UU]

unused devices: <none>
root@LS-WSGL678:~#

(d)接続

標準ファームで起動

ハックキットのファイルを置きます

RamBoot モードへの変更

(1) telnet して、もしくはシリアルコンソールから root でログインします。

(2) initrd.buffalo の変更

root@LS-WSGL678:/mnt/disk1/share/hackkit# sh ramroot_081213.sh
Extracting initrd...
89028+1 records in
89028+1 records out
mounting initrd...
/sbin/hotplug [block]
editing linuxrc...
clearing root's password...
rebuilding initrd.buffalo...
/sbin/hotplug [block]
gziping initrd ... wait 5 minutes
ramroot_081213.sh: line 50: /mnt/disk1/share/hackkit/mkimage: Permission denied
root@LS-WSGL678:/mnt/disk1/share/hackkit# ls -l /mnt/disk1/share/hackkit/mkimage
-rw-rw-r--    1 1001     1001        15920 Oct 26 14:46 /mnt/disk1/share/hackkit/mkimage
root@LS-WSGL678:/mnt/disk1/share/hackkit#
あかんやん、実行ビットが立っていない。

実行前に実行ビットを立てるように修正する。

yasunari@ude:/mnt/home/linkstation/HackKit/unified$ cp ramroot_081213.sh ramroot_090225.sh
yasunari@ude:/mnt/home/linkstation/HackKit/unified$ vi !$
	:
	:
yasunari@ude:/mnt/home/linkstation/HackKit/unified$ diff -c ramroot_0*
*** ramroot_081213.sh   2008-12-13 09:11:15.000000000 +0900
--- ramroot_090225.sh   2009-02-25 22:20:46.701116565 +0900
***************
*** 47,50 ****
--- 47,51 ----
  then
        mv initrd.buffalo initrd.buffalo.orig
  fi
+ chmod +x /mnt/disk1/share/hackkit/mkimage
  /mnt/disk1/share/hackkit/mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd -d initrd.gz initrd.buffalo
yasunari@ude:/mnt/home/linkstation/HackKit/unified$
やり直し。
root@LS-WSGL678:/mnt/disk1/share/hackkit# sh ramroot_090225.sh
Extracting initrd...
89028+1 records in
89028+1 records out
mounting initrd...
mkdir: Cannot create directory `/tmp/root': File exists
/sbin/hotplug [block]
editing linuxrc...
clearing root's password...
rebuilding initrd.buffalo...
/sbin/hotplug [block]
gziping initrd ... wait 5 minutes
Image Name:   initrd
Created:      Wed Feb 25 22:24:04 2009
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    5674658 Bytes = 5541.66 kB = 5.41 MB
Load Address: 0x00000000
Entry Point:  0x00000000
root@LS-WSGL678:/mnt/disk1/share/hackkit#
できた。

(3) 電源 OFF。コンセントも抜きます。

(4) コンセントを刺し、電源 ON。RamRoot モードで起動してきます。

ログイン

BUFFALO INC. LinkStation series
LS-WSGL-EM678 login: root
login[1187]: root login  on `ttyS0'



BusyBox v1.1.1 (2008.11.04-08:25+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

#

時計を合わせる

# date
Wed Feb 25 22:29:05 JST 2009
#
あってる。

ディスクのマウント

# mkdir /mnt/disk1
mkdir: Cannot create directory `/mnt/disk1': File exists
# mount /dev/sda6 /mnt/disk1
XFS mounting filesystem sda6
#

インストール

カスタマイズ

スクリプトを修正するのではなく、今回追加した機能 hackkit_config に書く方法を取る。
# cd /mnt/disk1/share/hackkit
# vi hackkit_config
	:
	:
# cat hackkit_config
ADDRESS=192.168.2.45
HOSTNAME=mini
#

インストーラの実行

# cd /mnt/disk1/share/hackkit
# sh hackkit_090224.sh
hackkit_090224.sh: .: 18: hackkit_config: not found
#
がー。
busybox の sh って、. でカレントのファイル読めないの?

修正する。

yasunari@ude:/mnt/home/linkstation/HackKit/unified$ cp hackkit_090224.sh hackkit
_090225.sh
yasunari@ude:/mnt/home/linkstation/HackKit/unified$ vi !$
	:
	:
yasunari@ude:/mnt/home/linkstation/HackKit/unified$ diff -c hackkit_090224.sh hackkit_090225.sh
*** hackkit_090224.sh   2009-02-24 22:55:20.042114591 +0900
--- hackkit_090225.sh   2009-02-25 22:41:35.646229967 +0900
***************
*** 12,26 ****
  NAMESERVER=192.168.1.2
  HOSTNAME=hackkit

- if [ -f hackkit_config ]
- then
-       . hackkit_config
- fi
-
  WORK=/mnt/disk1/share/hackkit
  HACKKIT=$WORK/hackkit_090224.tar.gz
  MOUNTPOINT=/mnt/debinst

  BOOTPARTITION=/dev/sdb1
  BOOTPARTITIONTYPE=ext3
  ROOTPARTITION=/dev/sdb2
--- 12,28 ----
  NAMESERVER=192.168.1.2
  HOSTNAME=hackkit

  WORK=/mnt/disk1/share/hackkit
  HACKKIT=$WORK/hackkit_090224.tar.gz
  MOUNTPOINT=/mnt/debinst

+ cd $WORK
+
+ if [ -f $WORK/hackkit_config ]
+ then
+       . $WORK/hackkit_config
+ fi
+
  BOOTPARTITION=/dev/sdb1
  BOOTPARTITIONTYPE=ext3
  ROOTPARTITION=/dev/sdb2
yasunari@ude:/mnt/home/linkstation/HackKit/unified$
やり直し。
# sh hackkit_090225.sh
PRODUCTID = 0x00003002
building md...
-- rebuild mdadm.conf for BOOT, ROOTFS --
md: md10 stopped.
mdadm: /dev/disk2_1 has wrong uuid.
mdadm: /dev/disk1_1 has wrong uuid.
mdadm: /dev/disk2_2 has wrong uuid.
mdadm: /dev/disk1_2 has wrong uuid.
md: bind
md: bind
raid1: raid set md10 active with 2 out of 2 mirrors
mdadm: /dev/md10md: md1 stopped.
 has been started with 2 drives.
mdadm: /dev/disk2_1 has wrong uuid.
mdadm: /dev/disk1_1 has wrong uuid.
md: bind
md: bind
raid1: raid set md1 active with 2 out of 2 mirrors
mdadm: /dev/md1 md: md0 stopped.
has been started with 2 drives.
md: bind
md: bind
raid1: raid set md0 active with 2 out of 2 mirrors
mdadm: /dev/md0 has been started with 2 drives.
-- setup max error counts --
/sys/block/md0/md/maxerr_cnt is setted to -1
/sys/block/md1/md/maxerr_cnt is setted to -1
/sys/block/md10/md/maxerr_cnt is setted to -1
mounting root file system ...
XFS mounting filesystem md1
extracting hackkit archive ...
./
./var/
./var/lib/
./var/lib/apt/
./var/lib/apt/lists/
./var/lib/apt/lists/partial/
./var/lib/apt/lists/partial/.delete-me-later
./var/lib/apt/lists/ftp.jp.debian.org_debian_dists_lenny_Release
	:
	:
./media/
./initrd/
creating /etc/fstab ...
creating miconapl ...
creating kernelmon ...
copying /lib/modules ...
lib/modules/
lib/modules/2.6.16.16-arm1/
	:
	:
lib/modules/2.6.16.16-arm1/modules.symbols
creating usb ...
checking /dev/md0
fsck 1.27 (8-Mar-2002)
e2fsck 1.27 (8-Mar-2002)
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 11 has zero dtime.  Fix? yes

Deleted inode 15 has zero dtime.  Fix? yes

Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(12288--14335) -(15731--16383) -(16391--17790) -(24576--26623) -(30720--32767) -(33264--33268)
Fix? yes

Free blocks count wrong for group #0 (18109, counted=26306).
Fix? yes

Free blocks count wrong for group #1 (29457, counted=29462).
Fix? yes

Free blocks count wrong (207167, counted=215369).
Fix? yes

Inode bitmap differences:  -11 -15
Fix? yes

Free inodes count wrong for group #0 (15690, counted=15692).
Fix? yes

Free inodes count wrong (125674, counted=125676).
Fix? yes


/dev/md0: ***** FILE SYSTEM WAS MODIFIED *****
/dev/md0: 20/125696 files (5.0% non-contiguous), 35607/250976 blocks
mounting /boot ...
editing initrd ...
88666+1 records in
88666+1 records out
gunziping /mnt/debinst/boot/initrd.gz ...
gziping /mnt/debinst/boot/initrd ... wait 5 minutes
Image Name:   initrd
Created:      Wed Feb 25 22:49:55 2009
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    5674707 Bytes = 5541.71 kB = 5.41 MB
Load Address: 0x00000000
Entry Point:  0x00000000
unmount /boot ...
umount: /mnt/debinst/boot: device is busy
umount: /mnt/debinst/boot: device is busy
#
相変わらず umount できていないが、とりあえず終わった。

電源 OFF

ハックキットで起動

HDD の交換(LS-WSGL 以外)

非該当。

起動

	:
	:
---- in hackkit linuxrc ---
-- rebuild mdadm.conf for BOOT, ROOTFS --
md: md10 stopped.
mdadm: /dev/disk2_1 has wrong uuid.
mdadm: /dev/disk1_1 has wrong uuid.
mdadm: /dev/disk2_2 has wrong uuid.
mdadm: /dev/disk1_2 has wrong uuid.
md: bind<sdb5>
md: bind<sda5>
raid1: raid set md10 active with 2 out of 2 mirrors
mdadm: /dev/md10md: md1 stopped.
 has been started with 2 drives.
mdadm: /dev/disk2_1 has wrong uuid.
mdadm: /dev/disk1_1 has wrong uuid.
md: bind<sdb2>
md: bind<sda2>
raid1: raid set md1 active with 2 out of 2 mirrors
mdadm: /dev/md1 md: md0 stopped.
has been started with 2 drives.
md: bind<sdb1>
md: bind<sda1>
raid1: raid set md0 active with 2 out of 2 mirrors
mdadm: /dev/md0 has been started with 2 drives.
-- setup max error counts --
/sys/block/md0/md/maxerr_cnt is setted to -1
/sys/block/md1/md/maxerr_cnt is setted to -1
/sys/block/md10/md/maxerr_cnt is setted to -1
XFS mounting filesystem md1
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... okay
Freeing init memory: 112K
INIT: version 2.86 booting
Setting the system clock.
Activating swap...Adding 1003896k swap on /dev/md10.  Priority:-1 extents:1 across:1003896k
done.
Setting the system clock.
Cleaning up ifupdown....
Loading kernel modules...done.
Checking file systems...fsck 1.41.3 (12-Oct-2008)
done.
Setting kernel variables (/etc/sysctl.conf)...Unknown HZ value! (114) Assume 100.
done.
Mounting local filesystems...EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
XFS mounting filesystem sda6
XFS mounting filesystem sdb6
done.
Activating swapfile swap...done.
Setting up networking....
Configuring network interfaces...eth0: link down
done.
chown: failed to get attributes of `/var/log/dmesg': No such file or directory
chmod: failed to get attributes of `/var/log/dmesg': No such file or directory
INIT: Entering runlevel: 2
Starting enhanced syslogd: rsyslogdeth0: link up<5>, full duplex<5>, speed 1 Gbps<5>
.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ehci_platform ehci_platform.4523: EHCI Platform Host Controller
ehci_platform ehci_platform.4523: new USB bus registered, assigned bus number 1
ehci_platform ehci_platform.4523: irq 17, io mem 0x00000000
ehci_platform ehci_platform.4523: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_platform ehci_platform.16781: EHCI Platform Host Controller
ehci_platform ehci_platform.16781: new USB bus registered, assigned bus number 2
ehci_platform ehci_platform.16781: irq 12, io mem 0x00000000
ehci_platform ehci_platform.16781: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Starting internet superserver: inetd.
Starting periodic command scheduler: crond.

Debian GNU/Linux 5.0 mini ttyS0

mini login: BuffaloSwPollingCheck> SW_POWER_ON
とりあえず、
chmod: failed to get attributes of `/var/log/dmesg': No such file or directory
と言うエラーは出ているものの、問題なく起動してきた。
/linuxrc の変更も悪影響は無さそう。

最初の設定

ログイン

Debian GNU/Linux 5.0 mini ttyS0

mini login: guest
Password:
Linux mini 2.6.16.16-arm1 #383 Mon Nov 10 13:33:20 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.
No directory, logging in with HOME=/
guest@mini:/$

root になる

guest@mini:/$ su - root
Password:
mini:~#

時計を合わせる

mini:~# date
Wed Feb 25 22:56:51 JST 2009
mini:~#
あっている。

以降は、スクリプトを使う。

mini:/mnt/disk1/share/hackkit# cat setup_090203.sh
#!/bin/sh

echo passwd root
passwd root
addgroup --gid 1001 yamasita

echo adduser yasunari
adduser --home /home/yamasita/yasunari --ingroup yamasita --uid 1001 --gecos "Yasunari Yamashita" yasunari

deluser guest

apt-get update
apt-get upgrade

apt-get install ntp
mv /etc/ntp.conf /etc/ntp.conf.orig
sed -e 's/^server/# server/' \
-e '/ntp.your-provider.example/aserver ntp3.jst.mfeed.ad.jp\
server ntp2.jst.mfeed.ad.jp\
server ntp1.jst.mfeed.ad.jp' /etc/ntp.conf.orig > /etc/ntp.conf

apt-get install samba
(
echo
echo '[share]'
echo '  comment = hackkit share'
echo '  path = /mnt'
echo '  writable = Yes'
echo '  create mask = 0660'
echo '  directory mask = 0770'
) >> /etc/samba/smb.conf
/etc/init.d/samba reload

echo smbpasswd -a yasunari
smbpasswd -a yasunari
mkdir /mnt/share
chgrp yamasita /mnt/share/
chmod g+w /mnt/share

apt-get clean
mini:/mnt/disk1/share/hackkit# sh -x setup_090203.sh
+ echo passwd root
passwd root
+ passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
+ addgroup --gid 1001 yamasita
Adding group `yamasita' (GID 1001) ...
Done.
+ echo adduser yasunari
adduser yasunari
+ adduser --home /home/yamasita/yasunari --ingroup yamasita --uid 1001 --gecos 'Yasunari Yamashita' yasunari
Adding user `yasunari' ...
Adding new user `yasunari' (1001) with group `yamasita' ...
Creating home directory `/home/yamasita/yasunari' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
+ deluser guest
Removing user `guest' ...
Warning: group `guest' has no more members.
userdel: user guest is currently logged in
/usr/sbin/deluser: `/usr/sbin/userdel guest' returned error code 8. Exiting.
+ apt-get update
Hit http://ftp.jp.debian.org lenny Release.gpg
Hit http://security.debian.org lenny/updates Release.gpg
Hit http://ftp.jp.debian.org lenny Release
Hit http://security.debian.org lenny/updates Release
Ign http://ftp.jp.debian.org lenny/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://ftp.jp.debian.org lenny/main Sources/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Hit http://security.debian.org lenny/updates/main Packages
Hit http://ftp.jp.debian.org lenny/main Packages
Hit http://security.debian.org lenny/updates/main Sources
Hit http://ftp.jp.debian.org lenny/main Sources
Reading package lists... Done
+ apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ apt-get install ntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcap1 libedit2 perl perl-modules
Suggested packages:
  ntp-doc perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl
The following NEW packages will be installed:
  libcap1 libedit2 ntp perl perl-modules
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 8257kB of archives.
After this operation, 29.2MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main libedit2 2.11~20080614-1 [64.5kB]
Get:2 http://ftp.jp.debian.org lenny/main perl-modules 5.10.0-19 [3189kB]
Get:3 http://ftp.jp.debian.org lenny/main perl 5.10.0-19 [4535kB]
Get:4 http://ftp.jp.debian.org lenny/main libcap1 1:1.10-14 [9074B]
Get:5 http://ftp.jp.debian.org lenny/main ntp 1:4.2.4p4+dfsg-8 [459kB]
Fetched 8257kB in 19s (423kB/s)
Selecting previously deselected package libedit2.
(Reading database ... 8591 files and directories currently installed.)
Unpacking libedit2 (from .../libedit2_2.11~20080614-1_armel.deb) ...
Selecting previously deselected package perl-modules.
Unpacking perl-modules (from .../perl-modules_5.10.0-19_all.deb) ...
Selecting previously deselected package perl.
Unpacking perl (from .../perl_5.10.0-19_armel.deb) ...
Selecting previously deselected package libcap1.
Unpacking libcap1 (from .../libcap1_1%3a1.10-14_armel.deb) ...
Selecting previously deselected package ntp.
Unpacking ntp (from .../ntp_1%3a4.2.4p4+dfsg-8_armel.deb) ...
Processing triggers for man-db ...
Setting up libedit2 (2.11~20080614-1) ...
Setting up libcap1 (1:1.10-14) ...
Setting up ntp (1:4.2.4p4+dfsg-8) ...
Starting NTP server: ntpd.
Setting up perl-modules (5.10.0-19) ...
Setting up perl (5.10.0-19) ...
E: Directory '/var/log/apt/' missing
ログをクリアしたからなぁ。。。
+ mv /etc/ntp.conf /etc/ntp.conf.orig
+ sed -e 's/^server/# server/' -e '/ntp.your-provider.example/aserver ntp3.jst.mfeed.ad.jp\
server ntp2.jst.mfeed.ad.jp\
server ntp1.jst.mfeed.ad.jp' /etc/ntp.conf.orig
+ apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcups2 libkeyutils1 libkrb53 libldap-2.4-2 libtalloc1 libwbclient0
  samba-common ucf
Suggested packages:
  cups-common krb5-doc krb5-user smbldap-tools ldb-tools
The following NEW packages will be installed:
  libcups2 libkeyutils1 libkrb53 libldap-2.4-2 libtalloc1 libwbclient0 samba
  samba-common ucf
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 8603kB of archives.
After this operation, 23.0MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main libkeyutils1 1.2-9 [5228B]
Get:2 http://ftp.jp.debian.org lenny/main libkrb53 1.6.dfsg.4~beta1-5 [448kB]
Get:3 http://ftp.jp.debian.org lenny/main libldap-2.4-2 2.4.11-1 [179kB]
Get:4 http://ftp.jp.debian.org lenny/main ucf 3.0016 [64.4kB]
Get:5 http://ftp.jp.debian.org lenny/main libcups2 1.3.8-1lenny4.1 [157kB]
Get:6 http://ftp.jp.debian.org lenny/main libtalloc1 1.2.0~git20080616-1 [13.3kB]
Get:7 http://ftp.jp.debian.org lenny/main libwbclient0 2:3.2.5-4 [78.1kB]
Get:8 http://ftp.jp.debian.org lenny/main samba-common 2:3.2.5-4 [3366kB]
Get:9 http://ftp.jp.debian.org lenny/main samba 2:3.2.5-4 [4292kB]
Fetched 8603kB in 21s (404kB/s)
Preconfiguring packages ...

Package configuration





   lqqqqqqqqqqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
   x Please specify the workgroup you want this server to appear to be in   x
   x when queried by clients. Note that this parameter also controls the    x
   x domain name used with the security=domain setting.                     x
   x                                                                        x
   x Workgroup/Domain Name:                                                 x
   x                                                                        x
   x YAMASITA______________________________________________________________ x
   x                                                                        x
   x                                                                    x
   x                                                                        x
   mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj


































Package configuration



 lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
 x                                                                           x
 x If your computer gets IP address information from a DHCP server on the    x
 x network, the DHCP server may also provide information about WINS servers  x
 x ("NetBIOS name servers") present on the network.  This requires a change  x
 x to your smb.conf file so that DHCP-provided WINS settings will            x
 x automatically be read from /etc/samba/dhcp.conf.                          x
 x                                                                           x
 x The dhcp3-client package must be installed to take advantage of this      x
 x feature.                                                                  x
 x                                                                           x
 x Modify smb.conf to use WINS settings from DHCP?                           x
 x                                                                           x
 x                                                                  x
 x                                                                           x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj



Selecting previously deselected package libkeyutils1.
(Reading database ... 9843 files and directories currently installed.)
Unpacking libkeyutils1 (from .../libkeyutils1_1.2-9_armel.deb) ...
Selecting previously deselected package libkrb53.
Unpacking libkrb53 (from .../libkrb53_1.6.dfsg.4~beta1-5_armel.deb) ...
Selecting previously deselected package libldap-2.4-2.
Unpacking libldap-2.4-2 (from .../libldap-2.4-2_2.4.11-1_armel.deb) ...
Selecting previously deselected package ucf.
Unpacking ucf (from .../archives/ucf_3.0016_all.deb) ...
Moving old data out of the way
Selecting previously deselected package libcups2.
Unpacking libcups2 (from .../libcups2_1.3.8-1lenny4.1_armel.deb) ...
Selecting previously deselected package libtalloc1.
Unpacking libtalloc1 (from .../libtalloc1_1.2.0~git20080616-1_armel.deb) ...
Selecting previously deselected package libwbclient0.
Unpacking libwbclient0 (from .../libwbclient0_2%3a3.2.5-4_armel.deb) ...
Selecting previously deselected package samba-common.
Unpacking samba-common (from .../samba-common_2%3a3.2.5-4_armel.deb) ...
Selecting previously deselected package samba.
Unpacking samba (from .../samba_2%3a3.2.5-4_armel.deb) ...
Processing triggers for man-db ...
Setting up libkeyutils1 (1.2-9) ...
Setting up libkrb53 (1.6.dfsg.4~beta1-5) ...
Setting up libldap-2.4-2 (2.4.11-1) ...
Setting up ucf (3.0016) ...
Setting up libcups2 (1.3.8-1lenny4.1) ...
Setting up libtalloc1 (1.2.0~git20080616-1) ...
Setting up libwbclient0 (2:3.2.5-4) ...
Setting up samba-common (2:3.2.5-4) ...

Creating config file /etc/samba/smb.conf with new version
Setting up samba (2:3.2.5-4) ...
Generating /etc/default/samba...
tdbsam_open: Converting version 0 database to version 3.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
Importing account for root...ok
Importing account for daemon...ok
Importing account for bin...ok
Importing account for sys...ok
Importing account for sync...ok
Importing account for games...ok
Importing account for man...ok
Importing account for lp...ok
Importing account for mail...ok
Importing account for news...ok
Importing account for uucp...ok
Importing account for proxy...ok
Importing account for www-data...ok
Importing account for backup...ok
Importing account for list...ok
Importing account for irc...ok
Importing account for gnats...ok
Importing account for nobody...ok
Importing account for libuuid...ok
Importing account for guest...ok
Importing account for telnetd...ok
Importing account for yasunari...ok
Importing account for ntp...ok
Adding group `sambashare' (GID 105) ...
Done.
Starting Samba daemons: nmbd smbd.
E: Directory '/var/log/apt/' missing
+ echo
+ echo '[share]'
+ echo '        comment = hackkit share'
+ echo '        path = /mnt'
+ echo '        writable = Yes'
+ echo '        create mask = 0660'
+ echo '        directory mask = 0770'
+ /etc/init.d/samba reload
Reloading /etc/samba/smb.conf: smbd only.
+ echo smbpasswd -a yasunari
smbpasswd -a yasunari
+ smbpasswd -a yasunari
New SMB password:
Retype new SMB password:
+ mkdir /mnt/share
+ chgrp yamasita /mnt/share/
+ chmod g+w /mnt/share
+ apt-get clean
mini:/mnt/disk1/share/hackkit#
エラーは、
chown: failed to get attributes of `/var/log/dmesg': No such file or directory
と、
E: Directory '/var/log/apt/' missing
アーカイブ作り直すか。。。。余計なことしなきゃよかった。

LinkStation Mini
LS-WSGL
バッファローダイレクト
楽天市場
Amazon
Yahoo!ショッピング
Livedoor デパート
Sofmap
ムラウチドットコム
ヤマダ電機WEB
パソQ


LS-XHLシリーズ ファームウェア アップデータ Ver.1.04β
ハックの記録
LinkStation/玄箱 をハックしよう

アーカイブの作り直し

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