ここまで来たなら、 armhf だけではなく armel のアーカイブまで作れるようにする。
[root@LS410D06E hackkit]# cat makehackkit_131104.sh #!/bin/sh # # Copyright (C) 2013 Yasunari YAMASHITA. All Rights Reserved. # set -x DEBINST=/mnt/disk1/debinst VERSION=wheezy makehackkit() { # make working directory rm -fr $DEBINST mkdir -p $DEBINST # exec debootstrap cd / date /usr/sbin/debootstrap --arch $ARCH $VERSION $DEBINST http://ftp.jp.debian.org/debian date # copy /dev (cd / ; tar cf - dev)|(cd $DEBINST; tar xvf -) # mount /proc chroot $DEBINST mount -t proc /proc proc # reconfigure TimeZone chroot $DEBINST dpkg-reconfigure tzdata # edit /etc/apt/sources.list ( echo deb-src http://ftp.jp.debian.org/debian $VERSION main echo echo deb http://security.debian.org/ $VERSION/updates main echo deb-src http://security.debian.org/ $VERSION/updates main ) >> $DEBINST/etc/apt/sources.list # update package lists chroot $DEBINST apt-get update chroot $DEBINST apt-get -y -f install chroot $DEBINST apt-get -y upgrade # install & reconfigure locales chroot $DEBINST apt-get -y install locales chroot $DEBINST dpkg-reconfigure locales # install ssh chroot $DEBINST apt-get -y install ssh # update password of root ( echo hack echo hack ) | chroot $DEBINST passwd root # install some packages chroot $DEBINST apt-get -y install xfsprogs psmisc sudo inetutils-telnetd # edit /etc/inetd.conf TARGETFILE=$DEBINST/etc/inetd.conf mv $TARGETFILE{,.orig} sed \ -e 's/^#<off># telnet/telnet/' \ $TARGETFILE.orig > $TARGETFILE rm $TARGETFILE.orig # add guest user ( echo hack echo hack ) | chroot $DEBINST adduser --gecos "" guest rm -fr $DEBINST/home/guest # create /initrd mkdir $DEBINST/initrd # edit /etc/inittab TARGETFILE=$DEBINST/etc/inittab mv $TARGETFILE{,.orig} sed \ -e 's/^\([0-9]:[0-9]*:respawn:.*\)$/#\1/' \ -e '/^#T1/aT0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100' \ $TARGETFILE.orig > $TARGETFILE rm $TARGETFILE.orig # clean up chroot $DEBINST apt-get clean # create /etc/adjtime ( echo 0.0 0 0.0 echo 0 echo LOCAL ) > /mnt/disk1/debinst/etc/adjtime # umount /proc chroot $DEBINST umount /proc # make archive cd $DEBINST tar zcvf /mnt/disk1/share/hackkit/hackkit_"$VERSION"_"$ARCH"_`date +%y%m%d`.tar.gz . } for ARCH in armel armhf do echo $ARCH makehackkit done [root@LS410D06E hackkit]#
[root@LS410D06E hackkit]# sh makehackkit_131104.sh : : [root@LS410D06E hackkit]# ls -l total 197644 -rwxrw-rw- 1 nobody nogroup 81 Aug 17 11:51 hackkit_config* -rwxr--r-- 1 root root 19938 Nov 4 15:40 hackkit_wheezy_131104.sh* -rw-r--r-- 1 root root 102307216 Nov 4 18:10 hackkit_wheezy_armel_131104.tar.gz -rw-r--r-- 1 root root 100029705 Nov 4 19:10 hackkit_wheezy_armhf_131104.tar.gz -rwxr--r-- 1 root root 2254 Nov 4 17:41 makehackkit_131104.sh* -rwxr-xr-x 1 root root 15920 Oct 26 2008 mkimage* [root@LS410D06E hackkit]#一つ、ピッタリ1時間か、、、
|
← armhf でハックキット(2)インストール |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 作りなおしたハックキットのインストール(1)LS410D |
Copyright (C) 2003-2013 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市