yasunari@ude:/home/linkstation/HackKit/unified/current$ diff -u hackkit_090917.sh hackkit_091103.sh --- hackkit_090917.sh 2009-09-17 21:50:16.372250179 +0900 +++ hackkit_091103.sh 2009-11-03 12:51:06.989982448 +0900 @@ -31,11 +31,13 @@ ETH=eth0 +RAID=no + #====================================================================== -# 各パーティションのフォーマット(LS-WSGL,LS-QL 以外) +# 各パーティションのフォーマット(RAID 機以外) format_disk() { - if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ] + if [ $RAID = yes ] then return fi @@ -66,11 +68,12 @@ # / のマウント mount_root() { - if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ] + if [ $RAID = yes ] then echo building md... /etc/init.d/startSysMd.sh fi + echo mounting root file system ... if [ ! -d $MOUNTPOINT ] @@ -79,7 +82,7 @@ fi mount -t xfs $ROOTPARTITION $MOUNTPOINT || exit - if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ] + if [ $RAID = yes ] then mkdir $MOUNTPOINT/.buffalo @@ -100,7 +103,7 @@ cd $MOUNTPOINT tar zxvf $HACKKIT - if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ] + if [ $RAID = yes ] then mkdir $MOUNTPOINT/mnt/disk1 mkdir $MOUNTPOINT/mnt/disk2 @@ -112,10 +115,10 @@ } #--------------------------------------------------------- -# fstab の修正(LS-WSGL,LS-QL のみ) +# fstab の修正(RAID 機のみ) create_fstab() { - if [ $MACHINE != LSWSGL -a $MACHINE != LSQL ] + if [ $RAID = no ] then return fi @@ -225,7 +228,7 @@ #--------------------------------------------------------- -# Fan コントロールスクリプトの作成(LS-GL/HS-DHGLのみ) +# Fan コントロールスクリプトの作成(LS-GL,HS-DHGLのみ) create_fancontrol() { if [ $MACHINE != LSGL -a $MACHINE != HSDHGL ] then @@ -364,10 +367,10 @@ } #--------------------------------------------------------- -# カーネルモジュールのコピー +# カーネルモジュールのコピー (RAID 機以外) copy_modules() { - if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ] + if [ $RAID = yes ] then return fi @@ -582,10 +585,10 @@ } #--------------------------------------------------------- -# /boot のコピー(LS-WSGL,LS-QL 以外) +# /boot のコピー(RAID 機以外) copy_boot() { - if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ] + if [ $RAID = yes ] then return fi @@ -618,7 +621,7 @@ mount -o loop $MOUNTPOINT/boot/initrd /tmp/root || exit mv /tmp/root/linuxrc /tmp/root/linuxrc.orig - if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ] + if [ $RAID = yes ] then cat > /tmp/root/linuxrc <もう一回最初からインストールして確認する。
もうこれで終りにしたい以下、 準備(LS-QL の場合)の手順
パーティションを削除した HDD の準備
HDD は今回も LS-WSGL に入っていた WD2500BEVS標準ファームの HDD のコピー
(1) ドライブ1に標準ファームの HDD をセット、 ドライブ2にパーティションを削除した HDD をセットして起動します。
SATA2 に標準ファームの HDD をセット、 SATA1 にパーティションを削除した HDD をセットして起動(2) 標準ファームの Web 管理画面を用い DISK2 を XFS でフォーマットします。
(3) 電源 OFF。コンセントも抜きます。
標準ファームで起動
SATA1 の HDD を SATA2 にセットし、 起動。ハックキットのファイルを置く
RamBoot モードへの変更
(1) 標準ファームに root でログインします。
(2) initrd.buffalo の変更
root@LS-SL807:~# cd /mnt/disk1/share/hackkit/ root@LS-SL807:/mnt/disk1/share/hackkit# sh ramroot_090225.sh Extracting initrd... 139650+1 records in 139650+1 records out mounting initrd... editing linuxrc... clearing root's password... rebuilding initrd.buffalo... gziping initrd ... wait 5 minutes Image Name: initrd Created: Tue Nov 3 13:35:02 2009 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 8895418 Bytes = 8686.93 kB = 8.48 MB Load Address: 0x00000000 Entry Point: 0x00000000 root@LS-SL807:/mnt/disk1/share/hackkit#(3) 電源 OFF。コンセントも抜きます。
(4) コンセントを刺し、電源 ON。RamRoot モードで起動してきます。
ログイン
時計を合わせる
ディスクのマウント
ここまでで準備完了
続いて、 インストールの手順
カスタマイズ
hackkit_config を使う方法を取るインストーラの実行
root@LS-SL-EM807:/mnt/disk1/share/hackkit# sh hackkit_091103.sh PRODUCTID = 0x00000013 MACHINE LSSL building md... -- rebuild mdadm.conf for BOOT, ROOTFS -- md: md10 stopped. mdadm: cannot open device /dev/disk1_1: Device or resource busy mdadm: /dev/disk1_1 has wrong uuid. mdadm: /dev/disk1_2 has wrmd: bindまた、/dev/md0 is mounted.ong uuid. raid1: raid set md10 active with 1 out of 2 mirrors mdadm: /dev/md10md: md1 stopped. has been started with 1 drive (out of 2). md: bind raid1: raid set md1 active with 1 out of 2 mirrors mdadm: /dev/md1 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 mounting root file system ... Filesystem "md1": Disabling barriers, not supported by the underlying device XFS mounting filesystem md1 extracting hackkit archive ... ./ ./var/ ./var/lib/ ./var/lib/apt/ : : ./selinux/ ./srv/ ./opt/ ./media/ ./initrd/ creating /etc/fstab ... creating miconapl ... creating kernelmon ... creating usb ... checking /dev/md0 fsck 1.40.5 (27-Jan-2008) e2fsck 1.40.5 (27-Jan-2008) /dev/md0 is mounted. WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage. Do you really want to continue (y/n)? no check aborted. mounting /boot ... editing initrd ... 138990+1 records in 138990+1 records out gunziping /mnt/debinst/boot/initrd.gz ... gziping /mnt/debinst/boot/initrd ... wait 5 minutes Image Name: initrd Created: Tue Nov 3 13:44:56 2009 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 8895623 Bytes = 8687.13 kB = 8.48 MB Load Address: 0x00000000 Entry Point: 0x00000000 unmount /boot ... root@LS-SL-EM807:/mnt/disk1/share/hackkit# 電源 OFF
以下、 ハックキットで起動の手順
HDD の交換(LS-WSGL, LS-QL 以外)
LS-SL も対象外起動
: : ---- in hackkit linuxrc --- grep: /var/tmp/devlink: No such file or directory -- rebuild mdadm.conf for BOOT, ROOTFS -- mdadm: cannot open /dev/disk2_1: No such device or address mdadm: cannot open /dev/disk2_2: No such device or address mdadm: cannot open /dev/disk2_5: No such device or address md: md10 stopped. mdadm: cannot open device /dev/disk2_1: No such device or address mdadm: /dev/disk2_1 has wrong uuid. mdadm: /dev/disk1_1 has wrong uuid. mdadm: cannot open device /dev/disk2_2: No such device or address mdadm: /dev/disk2_2 has wrong uuid. mdadm: /dev/disk1_2 has wrong uuid. mdadm: cannot open device /dev/disk2_5: No such device or address mdadm: /dev/disk2_5 has wrong uuid. md: bind立ち上がってきた。raid1: raid set md10 active with 1 out of 2 mirrors mdadm: /dev/md10md: md1 stopped. has been started with 1 drive (out of 2). mdadm: /dev/disk1_1 has wrong uuid. md: bind raid1: raid set md1 active with 1 out of 2 mirrors mdadm: /dev/md1 md: md0 stopped. has been started with 1 drive (out of 2). 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 umount: cannot open /proc/mounts Filesystem "md1": Disabling barriers, not supported by the underlying device XFS mounting filesystem md1 VFS: Mounted root (xfs filesystem). Trying to move old root to /initrd ... okay Freeing init memory: 120K INIT: version 2.86 booting Setting the system clock. Activating swap...Adding 999864k swap on /dev/md10. Priority:-1 extents:1 across:999864k done. Filesystem "md1": Disabling barriers, not supported by the underlying device Setting the system clock. Cleaning up ifupdown.... Loading kernel modules...done. Checking file systems...fsck 1.41.3 (12-Oct-2008) done. Setting kernel variables (/etc/sysctl.conf)...done. Mounting local filesystems...kjournald starting. Commit interval 5 seconds EXT3 FS on md0, internal journal EXT3-fs: mounted filesystem with ordered data mode. XFS mounting filesystem sda6 done. Activating swapfile swap...done. Setting up networking.... Configuring network interfaces...eth reg(9) val=0x0300 eth0: link down done. INIT: Entering runlevel: 2 Starting enhanced syslogd: rsyslogd. usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb ehci_marvell ehci_marvell.4523: Marvell Orion EHCI ehci_marvell ehci_marvell.4523: new USB bus registered, assigned bus number 1 ehci_marvell ehci_marvell.4523: irq 17, io base 0xf1050100 ehci_marvell ehci_marvell.4523: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected ehci_marvell ehci_marvell.167817: Marvell Orion EHCI ehci_marvell ehci_marvell.167817: new USB bus registered, assigned bus number 2 ehci_marvell ehci_marvell.167817: irq 12, io base 0xf10a0100 ehci_marvell ehci_marvell.167817: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected eth0: link up, full duplex, speed 1 Gbps USB Universal Host Controller Interface driver v3.0 Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. usbcore: registered new interface driver usblp drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver Starting internet superserver: inetd. Starting periodic command scheduler: crond. Debian GNU/Linux 5.0 sl ttyS0 sl login:
/etc/init.d/startSysMd.sh のエラーは相変わらず。mdstat を見る
sl:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sda2[1] 4999936 blocks [2/1] [_U] md10 : active raid1 sda5[1] 999872 blocks [2/1] [_U] md0 : active raid1 sda1[1] 999872 blocks [2/1] [_U] unused devices:大丈夫そう。sl:~# あとは、/dev/md0 is mounted. だけど、 これは前も解決できなかたんじゃなかったかなぁ
LS-SL 楽天市場
←
エラーつぶしハックの記録
LinkStation/玄箱 をハックしよう→
ミス
Copyright (C) 2003-2009 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市