インストール

Debian LS-SL

続いて、 インストール の手順。

時計を合わせる

root@LS-SL-EM9AF:~# date
Fri Jan  3 00:48:21 JST 2014
root@LS-SL-EM9AF:~#
あってる

カスタマイズ

hackkit_config を作る。
root@LS-SL-EM9AF:~# cat /mnt/disk1/share/hackkit/hackkit_config
ADDRESS=192.168.2.53
HOSTNAME=sl
GATEWAY=192.168.2.96
NAMESERVER=192.168.1.5
root@LS-SL-EM9AF:~#

インストーラの実行

root@LS-SL-EM9AF:~# cd /mnt/disk1/share/hackkit/
root@LS-SL-EM9AF:/mnt/disk1/share/hackkit# ls
busybox-telnetd_static              hackkit_wheezy_armel_131104.tar.gz
hackkit_config                      mkimage
hackkit_config.sample               ramroot_131208.sh
hackkit_wheezy_131222.sh
root@LS-SL-EM9AF:/mnt/disk1/share/hackkit# 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.53
++ HOSTNAME=sl
++ 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=0x00000013
+ echo PRODUCTID = 0x00000013
PRODUCTID = 0x00000013
+ case "$PRODUCTID" in
+ MACHINE=LSSL
+ BOOTPARTITION=/dev/md0
+ BOOTPARTITIONTYPE=ext3
+ ROOTPARTITION=/dev/md1
+ ROOTPARTITIONTYPE=ext3
+ SWAPPARTITION=/dev/md10
+ DATAPARTITION=
+ RAID=yes
+ echo MACHINE LSSL
MACHINE LSSL
+ 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 --
md: md10 stopped.
md: bind
raid1: raid set md10 active with 1 out of 2 mirrors
mdadm: /dev/md/10 has been started with 1 drive (out of 2).
md: md1 stopped.
md: bind
raid1: raid set md1 active with 1 out of 2 mirrors
mdadm: /dev/md/1 has been started with 1 drive (out of 2).
md: md0 stopped.
md: bind
raid1: raid set md0 active with 1 out of 2 mirrors
mdadm: /dev/md0 has been started with 1 drive (out of 2).
-- 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
kjournald starting.  Commit interval 5 seconds
EXT3-fs warning: checktime reached, running e2fsck is recommended
EXT3 FS on md1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
+ '[' yes = yes ']'
+ mkdir /mnt/disk1/debinst/.buffalo
+ mkdir /mnt/disk1/debinst/.buffalo/modules
++ uname -r
+ mv /mnt/disk1/debinst/lib/modules/2.6.22.7-88f5182 /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/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/2.6.22.7-88f5182 /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/
	:
	:
./srv/
./opt/
./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'
+ '[' LSSL = LSWSGL ']'
+ copy_miconapl
+ echo copying miconapl ...
copying miconapl ...
+ cd /
+ tar cf - usr/local/sbin/miconapl
+ cd /mnt/disk1/debinst
+ tar xvf -
usr/local/sbin/miconapl
+ chmod +x /mnt/disk1/debinst/usr/local/sbin/miconapl
+ tar cf - usr/local/lib/libbuffalo_bin.so usr/local/lib/libbuffalo_bin.so.1
+ cd /mnt/disk1/debinst
+ tar xvf -
usr/local/lib/libbuffalo_bin.so
usr/local/lib/libbuffalo_bin.so.1
+ chroot /mnt/disk1/debinst ldconfig
FATAL: kernel too old
Segmentation fault
+ 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
FATAL: kernel too old
+ 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
FATAL: kernel too old
+ '[' LSSL = LSGL -o LSSL = 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
FATAL: kernel too old
+ network_interfaces
+ cat
+ echo '        address 192.168.2.53'
+ 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.53    sl'
+ hostname
+ echo sl
+ 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)
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: 20/62720 files (20.0% non-contiguous), 14225/250096 blocks
+ echo mounting /boot ...
mounting /boot ...
+ cd /
+ '[' '!' -d /mnt/disk1/debinst/boot ']'
+ mount -t ext3 /dev/md0 /mnt/disk1/debinst/boot
kjournald starting.  Commit interval 5 seconds
EXT3 FS on md0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
+ 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
155062+1 records in
155062+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:      Fri Jan  3 00:58:21 2014
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    9923175 Bytes = 9690.60 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
root@LS-SL-EM9AF:/mnt/disk1/share/hackkit#

電源 OFF



LS-SL
楽天市場




次は、LS-SL。準備
ハックの記録
LinkStation/玄箱 をハックしよう

ハックキットで起動

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

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