作りなおしたハックキットのインストール(2)LS-VL

Debian LS-VL

armel と armhf とのハックキットを一気に作るスクリプトで アーカイブを作ったので、インストールして確認する。

つぎは、シングルドライブの代表(笑)LS-VL

準備(LS-XHL, LS-VL の場合)

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

標準ファームで起動

ログイン

時計を合わせる

root@LS-VL815:~# date
Mon Nov  4 21:00:30 JST 2013
root@LS-VL815:~#
あってる

ハックキットのファイルを置く

root@LS-VL815:~# cd /mnt/disk1/share/hackkit/
root@LS-VL815:/mnt/disk1/share/hackkit# ls -l
-rw-r--r--    1 root     root           77 Mar 11  2012 hackkit_config
-rwxrw-rw-    1 yasunari hdusers     19938 Nov  4 15:40 hackkit_wheezy_131104.sh
-rwxrw-rw-    1 yasunari hdusers 102307216 Nov  4 18:10 hackkit_wheezy_armel_131104.tar.gz
-rwxrw-rw-    1 yasunari hdusers 100029705 Nov  4 19:10 hackkit_wheezy_armhf_131104.tar.gz
-rwxrw-rw-    1 yasunari hdusers      2254 Nov  4 17:41 makehackkit_131104.sh
-rwxr-xr-x    1 root     root        15920 Oct 26  2008 mkimage
-rwxrw-rw-    1 nobody   nogroup      1014 Jul 17  2009 setup_090717.sh
root@LS-VL815:/mnt/disk1/share/hackkit#

インストールする HDD の準備

root@LS-VL815:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda2              4923420   1214512   3458812  26% /
udev                     10240       108     10132   1% /dev
/dev/ram1                15360       160     15200   1% /mnt/ram
/dev/sda1               992036     33292    908748   4% /boot
/dev/usbdisk1_1         992036     29772    912268   3% /mnt/usbdisk1
/dev/disk1_6         237023872   1000840 236023032   0% /mnt/disk1
tmpfs                     8192      1800      6392  22% /mnt/ram/com.kernel.org
root@LS-VL815:~# umount /dev/usbdisk1_1
umount: cannot umount /dev/usbdisk1_1: Invalid argument
root@LS-VL815:~# umount /mnt/usbdisk1/
root@LS-VL815:~# parted -s /dev/sdb print
Model: ViPowER VP-89118(SD1) (scsi)
Disk /dev/sdb: 157GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  1024MB  1024MB  ext3         primary
 2      1024MB  6144MB  5120MB  xfs          primary
 3      6144MB  7168MB  1024MB  linux-swap   primary
 4      7168MB  157GB   150GB   xfs          primary

root@LS-VL815:~#
すでにハックキットをインストールしたHDDを使うので、

インストール

時計を合わせる

カスタマイズ

hackkit_config がおいてある
root@LS-VL815:/mnt/disk1/share/hackkit# cat hackkit_config
ADDRESS=192.168.2.55
HOSTNAME=vl
GATEWAY=192.168.2.96
NAMESERVER=192.168.1.5
root@LS-VL815:/mnt/disk1/share/hackkit#

インストーラの実行

hackkit_wheezy_131104.sh を実行する。
root@LS-VL815:/mnt/disk1/share/hackkit# sh -x hackkit_wheezy_131104.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.55
++ HOSTNAME=vl
++ GATEWAY=192.168.2.96
++ NAMESERVER=192.168.1.5
+ 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=0x00000016
+ echo PRODUCTID = 0x00000016
PRODUCTID = 0x00000016
+ case "$PRODUCTID" in
+ MACHINE=LSVL
+ echo MACHINE LSVL
MACHINE LSVL
+ format_disk
+ '[' no = yes ']'
+ '[' no = yes ']'
+ echo formating hard drive ...
formating hard drive ...
+ '[' ext3 = ext3 ']'
+ mke2fs -j -I 128 /dev/sdb1
mke2fs 1.40.5 (27-Jan-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
62720 inodes, 249995 blocks
12499 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=260046848
8 block groups
32768 blocks per group, 32768 fragments per group
7840 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376

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

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
+ mkfs.xfs -f /dev/sdb2
meta-data=/dev/sdb2              isize=256    agcount=4, agsize=312500 blks
         =                       sectsz=512   attr=2, projid32bit=0
data     =                       bsize=4096   blocks=1250000, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
+ mkswap /dev/sdb3
Setting up swapspace version 1, size = 1023995904 bytes
+ '[' /dev/sdb4 '!=' '' ']'
+ mkfs.xfs -f /dev/sdb4
meta-data=/dev/sdb4              isize=256    agcount=4, agsize=9135967 blks
         =                       sectsz=512   attr=2, projid32bit=0
data     =                       bsize=4096   blocks=36543868, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=17843, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
+ mount_root
+ '[' no = yes ']'
+ '[' no = yes ']'
+ echo mounting root file system ...
mounting root file system ...
+ '[' '!' -d /mnt/disk1/debinst ']'
+ mount -t xfs /dev/sdb2 /mnt/disk1/debinst
+ '[' no = yes ']'
+ 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/
	:
	:
./selinux/
./srv/
./opt/
./media/
./initrd/
+ '[' no = yes ']'
+ create_fstab
+ echo creating /etc/fstab ...
creating /etc/fstab ...
+ cat
+ '[' no = no ']'
+ cat
+ return
+ copy_miconapl
+ '[' LSVL '!=' LSGL -a LSVL '!=' HSDHGL ']'
+ return
+ create_miconapl
+ echo creating miconapl ...
creating miconapl ...
+ cd /mnt/disk1/debinst
+ '[' LSVL '!=' LSGL -a LSVL '!=' HSDHGL ']'
+ 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
+ '[' LSVL = LSGL -o LSVL = HSDHGL ']'
+ cat
+ chmod +x /mnt/disk1/debinst/usr/local/sbin/kernelmon
+ copy_modules
+ '[' no = yes ']'
+ echo copying /lib/modules ...
copying /lib/modules ...
+ cd /
+ cd /mnt/disk1/debinst
+ tar xvf -
++ uname -r
+ tar cf - lib/modules/3.3.4-88f6281
lib/modules/3.3.4-88f6281/
lib/modules/3.3.4-88f6281/modules.alias
	:
	:
lib/modules/3.3.4-88f6281/kernel/net/ipv4/ah4.ko
lib/modules/3.3.4-88f6281/modules.dep
+ 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.55'
+ 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.1.5'
+ hosts
+ echo '192.168.2.55    vl'
+ hostname
+ echo vl
+ mount_boot
+ '[' no = yes ']'
+ echo checking /dev/sdb1
checking /dev/sdb1
+ fsck -f -y -t ext3 /dev/sdb1
fsck 1.40.5 (27-Jan-2008)
e2fsck 1.40.5 (27-Jan-2008)
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/sdb1: 11/62720 files (9.1% non-contiguous), 6399/249995 blocks
+ echo mounting /boot ...
mounting /boot ...
+ cd /
+ '[' '!' -d /mnt/disk1/debinst/boot ']'
+ mount -t ext3 /dev/sdb1 /mnt/disk1/debinst/boot
+ copy_boot
+ '[' no = yes ']'
+ echo copying /boot ...
copying /boot ...
+ cd /mnt/disk1/debinst/boot
+ tar xvf -
+ cd /boot
+ tar cf - initrd.buffalo uImage.buffalo
initrd.buffalo
uImage.buffalo
+ 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
152971+1 records in
152971+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
+ '[' no = 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:      Mon Nov  4 21:17:59 2013
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    9738825 Bytes = 9510.57 kB = 9.29 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
root@LS-VL815:/mnt/disk1/share/hackkit#
問題なし。

電源 OFF

ハックキットで起動

続いて、 ハックキットで起動

HDD の交換(LS-WSGL, LS-QL 以外)

起動

動作確認

無事起動したようなので、続いて 動作確認

LED の確認

POWER が青点灯

ログイン

TeraTerm でログイン

Linux 3.3.4-88f6281 (shinjuw.yamasita.jp) (pts/0)

vl login: guest
Password:
Linux vl 3.3.4-88f6281 #1 Thu May 16 13:46:55 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@vl:/$

root になる

guest@vl:/$ su - root
パスワード:
root@vl:~#

時計を合わせる

root@vl:~# date
2013年 11月  4日 月曜日 21:20:26 JST
root@vl:~#
あってる

USB メモリの認識

root@vl:~# tail -f /var/log/messages
	:
	:
Nov  4 21:21:09 vl kernel: usb 1-1: new full-speed USB device number 2 using ehci_marvell
Nov  4 21:21:09 vl kernel: usb-storage 1-1:1.0: Quirks match for vid 0ea0 pid 6828: 20
Nov  4 21:21:09 vl kernel: scsi2 : usb-storage 1-1:1.0
Nov  4 21:21:10 vl kernel: scsi 2:0:0:0: Direct-Access     BUFFALO  ClipDrive        1.88 PQ: 0 ANSI: 2
Nov  4 21:21:10 vl kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Nov  4 21:21:11 vl kernel: ready
Nov  4 21:21:11 vl kernel: sd 2:0:0:0: [sdb] 64000 512-byte logical blocks: (32.7 MB/31.2 MiB)
Nov  4 21:21:11 vl kernel: sd 2:0:0:0: [sdb] Write Protect is off
Nov  4 21:21:11 vl kernel: sdb: sdb1
Nov  4 21:21:11 vl kernel: sd 2:0:0:0: [sdb] Attached SCSI removable disk

Nov  4 21:21:18 vl kernel: usb 1-1: USB disconnect, device number 2

OK

プリンタの認識(LS-GL 以外)


Nov  4 21:22:38 vl kernel: usb 1-1: new high-speed USB device number 3 using ehci_marvell
Nov  4 21:22:38 vl kernel: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0007


Nov  4 21:22:43 vl kernel: usb 1-1: USB disconnect, device number 3
Nov  4 21:22:43 vl kernel: usblp0: removed
OK

リブートの確認

root@vl:~# shutdown -r now
無事再起動してきた。

シャットダウンの確認

電源SWをOFFにして無事シャットダウン。

Oh key!



LS-VL

楽天市場
Amazon
livedoor デパート
バッファローダイレクト
Yahoo!ショッピング


関西オープンフォーラム参画 #kof2013
ハックの記録
LinkStation/玄箱 をハックしよう

ファームウェア 1.30 のインストール

ツイート Tweet to @yasunari_y @yasunari_yをフォロー

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