LS-AVL は、USB ポートがないため、
外付けの HDD が接続できない。
ハックキットは外付けの HDD にインストールすることを
前提としているため、LS-AVL にインストールするためには、
クロスインストールの方法を取っていた。
今回は、
ローカルディスクにルートツリーを作るところまではセルフで、
HDD に書きこむところだけをクロス(別マシン)で、
実行する方法を取る。
root@LS-AVLE23:~#
root@LS-AVLE23:~# date Wed Nov 23 14:12:23 JST 2011 root@LS-AVLE23:~#合ってる。
root@LS-AVLE23:~# cd /mnt/disk1/share/hackkit/ root@LS-AVLE23:/mnt/disk1/share/hackkit# ls hackkit_config.sample mkimage hackkit_squeeze_110103.tar.gz ramroot_091128.sh hackkit_squeeze_110112.sh root@LS-AVLE23:/mnt/disk1/share/hackkit#
yasunari@qube:/mnt/disk1/share/hackkit/current$ diff -u ../110112/hackkit_squeeze_110112.sh hackkit_squeeze_111123.sh
--- ../110112/hackkit_squeeze_110112.sh 2011-01-12 00:26:28.977137792 +0900
+++ hackkit_squeeze_111123.sh 2011-11-23 14:49:04.015936339 +0900
@@ -14,7 +14,7 @@
WORK=/mnt/disk1/share/hackkit
HACKKIT=$WORK/hackkit_squeeze_110103.tar.gz
-MOUNTPOINT=/mnt/debinst
+MOUNTPOINT=/mnt/disk1/debinst
cd $WORK
@@ -32,11 +32,16 @@
ETH=eth0
RAID=no
+LOCALDISK=no
#======================================================================
# 各パーティションのフォーマット(RAID 機以外)
format_disk() {
+ if [ $LOCALDISK = yes ]
+ then
+ return
+ fi
if [ $RAID = yes ]
then
return
@@ -68,6 +73,15 @@
# / のマウント
mount_root() {
+ if [ $LOCALDISK = yes ]
+ then
+ if [ ! -d $MOUNTPOINT ]
+ then
+ mkdir $MOUNTPOINT || exit
+ fi
+ return
+ fi
+
if [ $RAID = yes ]
then
echo building md...
@@ -600,6 +614,10 @@
# / のアンマウント
umount_root() {
+ if [ $LOCALDISK = yes ]
+ then
+ return
+ fi
cd /
umount $MOUNTPOINT
}
@@ -609,6 +627,15 @@
# mount_boot
mount_boot() {
+ if [ $LOCALDISK = yes ]
+ then
+ if [ ! -d $MOUNTPOINT/boot ]
+ then
+ mkdir -p $MOUNTPOINT/boot || exit
+ fi
+ return
+ fi
+
echo checking $BOOTPARTITION
fsck -f -y $BOOTPARTITION
@@ -716,6 +743,10 @@
# umount_boot
umount_boot() {
+ if [ $LOCALDISK = yes ]
+ then
+ return
+ fi
echo unmount /boot ...
sync
@@ -783,6 +814,11 @@
RAID=yes
;;
+0x00000015)
+ MACHINE=LSAVL
+
+ LOCALDISK=yes
+ ;;
0x00000016)
MACHINE=LSVL
;;
yasunari@qube:/mnt/disk1/share/hackkit/current$
root@LS-AVLE23:/mnt/disk1/share/hackkit# date Wed Nov 23 14:44:17 JST 2011 root@LS-AVLE23:/mnt/disk1/share/hackkit#合ってる
root@LS-AVLE23:/mnt/disk1/share/hackkit# mv hackkit_config.sample hackkit_config root@LS-AVLE23:/mnt/disk1/share/hackkit# vi !$ : : root@LS-AVLE23:/mnt/disk1/share/hackkit# cat !$ cat hackkit_config ADDRESS=192.168.2.54 HOSTNAME=av root@LS-AVLE23:/mnt/disk1/share/hackkit#
root@LS-AVLE23:/mnt/disk1/share/hackkit# sh hackkit_squeeze_111123.sh PRODUCTID = 0x00000015 MACHINE LSAVL extracting hackkit archive ... ./ ./var/ ./var/lib/ ./var/lib/apt/ ./var/lib/apt/lists/ ./var/lib/apt/lists/partial/ : : lib/modules/2.6.31.8/modules.pcimap lib/modules/2.6.31.8/modules.ieee1394map creating usb ... update-rc.d: using dependency based boot sequencing copying /boot ... initrd.buffalo uImage.buffalo editing initrd ... 151913+1 records in 151913+1 records out gunziping /mnt/disk1/debinst/boot/initrd.gz ... gziping /mnt/disk1/debinst/boot/initrd ... wait 5 minutes Image Name: initrd Created: Wed Nov 23 14:54:17 2011 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 9672485 Bytes = 9445.79 kB = 9.22 MB Load Address: 0x00000000 Entry Point: 0x00000000 root@LS-AVLE23:/mnt/disk1/share/hackkit# ls /mnt/disk1/debinst/ bin etc lib opt sbin sys var boot home media proc selinux tmp dev initrd mnt root srv usr root@LS-AVLE23:/mnt/disk1/share/hackkit#できていそう。
|
|
← 「リンクステーション クラウドエディション」発売 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ ハックキットのインストール(2) |