yasunari@qube:/mnt/disk1/share/hackkit/current$ cp hackkit_wheezy_1312{15,22}.sh yasunari@qube:/mnt/disk1/share/hackkit/current$ vi hackkit_wheezy_131222.sh : : yasunari@qube:/mnt/disk1/share/hackkit/current$ !cp:s/cp/diff -u/ diff -u hackkit_wheezy_1312{15,22}.sh --- hackkit_wheezy_131215.sh 2013-12-15 22:56:41.311091509 +0900 +++ hackkit_wheezy_131222.sh 2013-12-22 01:14:25.642900174 +0900 @@ -177,10 +177,6 @@ # miconapl のコピー(LS-GL,HS-DHGLのみ) copy_miconapl() { - if [ $MACHINE != LSGL -a $MACHINE != HSDHGL ] - then - return - fi echo copying miconapl ... cd / @@ -197,9 +193,6 @@ echo creating miconapl ... cd $MOUNTPOINT - if [ $MACHINE != LSGL -a $MACHINE != HSDHGL ] - then - cat > etc/init.d/miconapl <<EOF #!/bin/sh ### BEGIN INIT INFO @@ -214,34 +207,6 @@ # Description: This script initialize LEDs. ### END INIT INFO -if [ -d /proc/buffalo/gpio/led ] -then - LED=/proc/buffalo/gpio/led -else - LED=/proc/buffalo/led -fi - -case "\$1" in - start) - echo off > \$LED/power_blink - echo on > \$LED/power - echo on > \$LED/eth - ;; - stop) - echo on > \$LED/power_blink - ;; - *) - echo "Usage: \$0 {start|stop}" - exit 1 -esac - -exit 0 -EOF - else - - cat > etc/init.d/miconapl <<EOF -#!/bin/sh - [ -f /usr/local/sbin/miconapl ] || exit 0 case "\$1" in @@ -260,7 +225,6 @@ exit 0 EOF - fi chmod +x etc/init.d/miconapl chroot $MOUNTPOINT update-rc.d miconapl defaults } yasunari@qube:/mnt/disk1/share/hackkit/current$結局 LS-GL, HS-DHGL のコードをそのまま使うことに。
略
sh-3.2# date Sun Dec 22 10:42:49 JST 2013 sh-3.2# date 122218102013 Sun Dec 22 18:10:00 JST 2013 sh-3.2#
sh-3.2# cd /mnt/disk1/share/hackkit/ sh-3.2# cat > hackkit_config ADDRESS=192.168.2.56 HOSTNAME=qvl GATEWAY=192.168.2.96 NAMESERVER=192.168.2.39 sh-3.2# cat hackkit_config ADDRESS=192.168.2.56 HOSTNAME=qvl GATEWAY=192.168.2.96 NAMESERVER=192.168.2.39 sh-3.2#
sh-3.2# sh -x hackkit_wheezy_131222.sh + ADDRESS=192.168.2.47 + NETWORK=192.168.2.0 + NETMASK=255.255.255.0 + BROADCAST=192.168.2.255 + GATEWAY=192.168.2.1 + NAMESERVER=192.168.1.2 + HOSTNAME=hackkit + WORK=/mnt/disk1/share/hackkit + MOUNTPOINT=/mnt/disk1/debinst + VERSION=wheezy + ARCH=armel + cd /mnt/disk1/share/hackkit + '[' -f /mnt/disk1/share/hackkit/hackkit_config ']' + . /mnt/disk1/share/hackkit/hackkit_config ++ ADDRESS=192.168.2.56 ++ HOSTNAME=qvl ++ GATEWAY=192.168.2.96 ++ NAMESERVER=192.168.2.39 + BOOTPARTITION=/dev/sdb1 + BOOTPARTITIONTYPE=ext3 + ROOTPARTITION=/dev/sdb2 + ROOTPARTITIONTYPE=xfs + SWAPPARTITION=/dev/sdb3 + DATAPARTITION=/dev/sdb4 + ETH=eth0 + RAID=no + LOCALDISK=no + INITRD=loop + '[' '!' -r ']' + '[' '!' -r /mnt/disk1/share/hackkit/mkimage ']' + '[' '!' -f /proc/buffalo/firmware ']' ++ sed -n -e 's/^PRODUCTID=\(.*\)$/\1/p' /proc/buffalo/firmware + PRODUCTID=0x00004001 + echo PRODUCTID = 0x00004001 PRODUCTID = 0x00004001 + case "$PRODUCTID" in + MACHINE=LSQVL + BOOTPARTITION=/dev/md0 + BOOTPARTITIONTYPE=ext3 + ROOTPARTITION=/dev/md1 + ROOTPARTITIONTYPE=ext3 + SWAPPARTITION=/dev/md10 + DATAPARTITION= + RAID=yes + echo MACHINE LSQVL MACHINE LSQVL + format_disk + '[' no = yes ']' + '[' yes = yes ']' + return + mount_root + '[' no = yes ']' + '[' yes = yes ']' + echo building md... building md... + /etc/init.d/startSysMd.sh -- rebuild mdadm.conf for BOOT, ROOTFS -- mdadm: /dev/md/10 has been started with 1 drive (out of 4). mdadm: /dev/md/1 has been started with 1 drive (out of 4). mdadm: /dev/md0 has been started with 1 drive (out of 4). -- 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 + echo mounting root file system ... mounting root file system ... + '[' '!' -d /mnt/disk1/debinst ']' + mkdir /mnt/disk1/debinst + mount -t ext3 /dev/md1 /mnt/disk1/debinst + '[' yes = yes ']' + mkdir /mnt/disk1/debinst/.buffalo + mkdir /mnt/disk1/debinst/.buffalo/modules ++ uname -r + mv /mnt/disk1/debinst/lib/modules/3.3.4-88f6281 /mnt/disk1/debinst/.buffalo/modules + rm -fr /mnt/disk1/debinst/bin /mnt/disk1/debinst/boot /mnt/disk1/debinst/dev /mnt/disk1/debinst/etc /mnt/disk1/debinst/home /mnt/disk1/debinst/initrd /mnt/disk1/debinst/lib /mnt/disk1/debinst/lost+found /mnt/disk1/debinst/mnt /mnt/disk1/debinst/proc /mnt/disk1/debinst/resources /mnt/disk1/debinst/root /mnt/disk1/debinst/sbin /mnt/disk1/debinst/sys /mnt/disk1/debinst/tmp /mnt/disk1/debinst/usr /mnt/disk1/debinst/var /mnt/disk1/debinst/www + mkdir /mnt/disk1/debinst/lib + mkdir /mnt/disk1/debinst/lib/modules ++ uname -r + mv /mnt/disk1/debinst/.buffalo/modules/3.3.4-88f6281 /mnt/disk1/debinst/lib/modules + rmdir /mnt/disk1/debinst/.buffalo/modules + rmdir /mnt/disk1/debinst/.buffalo + extract_hackkit + echo extracting hackkit archive ... extracting hackkit archive ... + cd /mnt/disk1/debinst + tar zxvf /mnt/disk1/share/hackkit/hackkit_wheezy_armel_131104.tar.gz ./ ./var/ ./var/lib/ ./var/lib/apt/ ./var/lib/apt/lists/ ./var/lib/apt/lists/partial/ : : ./media/ ./initrd/ + '[' yes = yes ']' + mkdir /mnt/disk1/debinst/mnt/disk1 + mkdir /mnt/disk1/debinst/mnt/disk2 + mknod /mnt/disk1/debinst/dev/md0 b 9 0 + mknod /mnt/disk1/debinst/dev/md1 b 9 1 + mknod /mnt/disk1/debinst/dev/md10 b 9 10 + create_fstab + echo creating /etc/fstab ... creating /etc/fstab ... + cat + '[' yes = no ']' + cat + echo '/dev/md0 /boot ext3 defaults,noatime 0 0' + echo '/dev/sda6 /mnt/disk1 xfs defaults,noatime 0 0' + '[' LSQVL = LSWSGL ']' + copy_miconapl + echo copying miconapl ... copying miconapl ... + cd / + cd /mnt/disk1/debinst + tar xvf - + tar cf - usr/local/sbin/miconapl usr/local/sbin/miconapl + chmod +x /mnt/disk1/debinst/usr/local/sbin/miconapl + cd /mnt/disk1/debinst + tar xvf - + tar cf - usr/local/lib/libbuffalo_bin.so usr/local/lib/libbuffalo_bin.so.1 usr/local/lib/libbuffalo_bin.so usr/local/lib/libbuffalo_bin.so.1 + chroot /mnt/disk1/debinst ldconfig + create_miconapl + echo creating miconapl ... creating miconapl ... + cd /mnt/disk1/debinst + cat + chmod +x etc/init.d/miconapl + chroot /mnt/disk1/debinst update-rc.d miconapl defaults update-rc.d: using dependency based boot sequencing + create_fancontrol + echo creating fancontrol ... creating fancontrol ... + cd /mnt/disk1/debinst + cat + cat + echo '*/5 * * * * nice /bin/sh /usr/local/sbin/fancontrol 2>/dev/null 1>/dev/null' + chmod 600 var/spool/cron/crontabs/root + create_kernelmon + echo creating kernelmon ... creating kernelmon ... + cd /mnt/disk1/debinst + cat + chmod +x /mnt/disk1/debinst/etc/init.d/kernelmon + chroot /mnt/disk1/debinst update-rc.d kernelmon defaults update-rc.d: using dependency based boot sequencing + '[' LSQVL = LSGL -o LSQVL = HSDHGL ']' + cat + chmod +x /mnt/disk1/debinst/usr/local/sbin/kernelmon + copy_modules + '[' yes = yes ']' + return + create_usb + echo creating usb ... creating usb ... + cd /mnt/disk1/debinst + cat + chmod +x etc/init.d/usb + chroot /mnt/disk1/debinst update-rc.d usb defaults update-rc.d: using dependency based boot sequencing + network_interfaces + cat + echo ' address 192.168.2.56' + echo ' network 192.168.2.0' + echo ' netmask 255.255.255.0' + echo ' broadcast 192.168.2.255' + echo ' gateway 192.168.2.96' + resolv_conf + echo 'nameserver 192.168.2.39' + hosts + echo '192.168.2.56 qvl' + hostname + echo qvl + mount_boot + '[' no = yes ']' + echo checking /dev/md0 checking /dev/md0 + fsck -f -y -t ext3 /dev/md0 fsck 1.40.5 (27-Jan-2008) e2fsck 1.40.5 (27-Jan-2008) Superblock last mount time is in the future. Fix? yes Superblock last write time is in the future. Fix? yes Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/md0: ***** FILE SYSTEM WAS MODIFIED ***** /dev/md0: 20/62720 files (20.0% non-contiguous), 14414/250096 blocks + echo mounting /boot ... mounting /boot ... + cd / + '[' '!' -d /mnt/disk1/debinst/boot ']' + mount -t ext3 /dev/md0 /mnt/disk1/debinst/boot + copy_boot + '[' yes = yes ']' + return + edit_initrd + '[' loop = loop ']' + edit_initrd_loop + echo editing initrd ... editing initrd ... + dd if=/mnt/disk1/debinst/boot/initrd.buffalo of=/mnt/disk1/debinst/boot/initrd.gz bs=64 skip=1 155053+1 records in 155053+1 records out + echo gunziping /mnt/disk1/debinst/boot/initrd.gz ... gunziping /mnt/disk1/debinst/boot/initrd.gz ... + gunzip /mnt/disk1/debinst/boot/initrd.gz + '[' '!' -d /tmp/root ']' + mkdir /tmp/root + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop0 ']' + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop1 ']' + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop2 ']' + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop3 ']' + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop4 ']' + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop5 ']' + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop6 ']' + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop7 ']' + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop8 ']' + mknod /dev/loop8 b 7 8 + for minor in 0 1 2 3 4 5 6 7 8 9 + '[' '!' -e /dev/loop9 ']' + mknod /dev/loop9 b 7 9 + mount -o loop /mnt/disk1/debinst/boot/initrd /tmp/root + mv /tmp/root/linuxrc /tmp/root/linuxrc.orig + '[' yes = yes ']' + cat + chmod 700 /tmp/root/linuxrc + umount /tmp/root + echo gziping /mnt/disk1/debinst/boot/initrd ... wait 5 minutes gziping /mnt/disk1/debinst/boot/initrd ... wait 5 minutes + gzip /mnt/disk1/debinst/boot/initrd + chmod 755 /mnt/disk1/share/hackkit/mkimage + chown root.root /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 /mnt/disk1/debinst/boot/initrd.gz /mnt/disk1/debinst/boot/initrd.buffalo Image Name: initrd Created: Sun Dec 22 18:20:58 2013 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 9922500 Bytes = 9689.94 kB = 9.46 MB Load Address: 0x00000000 Entry Point: 0x00000000 + rm -f /mnt/disk1/debinst/boot/initrd.gz + umount_boot + '[' no = yes ']' + echo unmount /boot ... unmount /boot ... + sync + umount /mnt/disk1/debinst/boot + umount_root + '[' no = yes ']' + cd / + umount /mnt/disk1/debinst sh-3.2#念の為に見ておく
sh-3.2# mount -t ext3 /dev/md1 /mnt/disk1/debinst sh-3.2# more /mnt/disk1/debinst/etc/init.d/miconapl #!/bin/sh ### BEGIN INIT INFO # Provides: miconapl # Required-Start: # Required-Stop: # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Initialize LEDs. # Description: This script initialize LEDs. ### END INIT INFO [ -f /usr/local/sbin/miconapl ] || exit 0 case "$1" in start) ldconfig /usr/local/sbin/miconapl -b -a boot_flash_ok /usr/local/sbin/miconapl -a boot_end ;; stop) /usr/local/sbin/miconapl -a shutdown_wait ;; *) echo "Usage: $0 {start|stop}" exit 1 esac exit 0 sh-3.2#なんか、インデントが変だが、まぁ良し。
落ちた!!
再起動して残りを順番に確認していく
OK
Linux 3.3.4-88f6281 (shinjuw.yamasita.jp) (pts/0) qvl login: guest Password: Linux qvl 3.3.4-88f6281 #1 Tue Jul 9 14:48:53 JST 2013 armv5tel 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@qvl:/$OK
guest@qvl:/$ su - root パスワード: root@qvl:~#OK!
root@qvl:~# date 2013年 12月 22日 日曜日 11:08:53 JST root@qvl:~# date 122218352013 2013年 12月 22日 日曜日 18:35:00 JST root@qvl:~#OK。ちょっと嫌な予感。
root@qvl:~# tail -f /var/log/messages : : Dec 22 18:35:44 qvl kernel: usb 1-1.1: new full-speed USB device number 3 using ehci_marvell Dec 22 18:35:44 qvl kernel: usb-storage 1-1.1:1.0: Quirks match for vid 0ea0 pid 6828: 20 Dec 22 18:35:44 qvl kernel: scsi2 : usb-storage 1-1.1:1.0 Dec 22 18:35:45 qvl kernel: scsi 2:0:0:0: Direct-Access BUFFALO ClipDrive 1.88 PQ: 0 ANSI: 2 Dec 22 18:35:45 qvl kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0 Dec 22 18:35:46 qvl kernel: ready Dec 22 18:35:46 qvl kernel: sd 2:0:0:0: [sdb] 64000 512-byte logical blocks: (32.7 MB/31.2 MiB) Dec 22 18:35:46 qvl kernel: sd 2:0:0:0: [sdb] Write Protect is off Dec 22 18:35:46 qvl kernel: sdb: sdb1 Dec 22 18:35:46 qvl kernel: sd 2:0:0:0: [sdb] Attached SCSI removable disk Dec 22 18:36:02 qvl kernel: usb 1-1.1: USB disconnect, device number 3OK!!
Dec 22 18:37:01 qvl kernel: usb 1-1.1: new high-speed USB device number 4 using ehci_marvell Dec 22 18:37:01 qvl kernel: usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0007 Dec 22 18:37:06 qvl kernel: usb 1-1.1: USB disconnect, device number 4 Dec 22 18:37:06 qvl kernel: usblp0: removedOK!!!
root@qvl:~# shutdown -r nowOK!!!!
ということで、
LS-QVL にハックキットのインストールと動作確認完了。
インストーラを触ったので
確認済みの LS-VL, LS-WSXL も再確認が必要(先は長ひ
|
← トラブルシュート |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 最初の設定~ |
Copyright (C) 2003-2013 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市