: : 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: /demd: bind<sda5> v/disk1_2 has wrong 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<sda2> raid1: raid set md1 active with 1 out of 2 mirrors mdadm: /dev/md1 has been started with 1 drive (out of 2). : :これは、/etc/init.d/startSysMd.sh が出している。
mounting root file system ... Filesystem "md1": Disabling barriers, not supported by the underlying device XFS mounting filesystem md1単にマウントしているだけなのに。。。
/dev/md0 is mounted. WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage. Do you really want to continue (y/n)?これも良くわからない。
Checking file systems...fsck 1.41.3 (12-Oct-2008) /dev/sda1: clean, 17/62720 files, 44717/249968 blocks (check in 3 mounts) /sbin/fsck.xfs: XFS file system. done. Setting kernel variables (/etc/sysctl.conf)...done. Mounting local filesystems...kjournald starting. Commit interval 5 seconds EXT3 FS on sda1, internal journal EXT3-fs: mounted filesystem with ordered data mode. attempt to access beyond end of device sda4: rw=0, want=8, limit=1 XFS: SB read failed mount: /dev/sda4: can't read superblock failed. Activating swapfile swap...Unable to find swap-space signature done.sda1 とか sda4 とか、fstab がおかしいように見える。
Debian GNU/Linux 5.0 sl ttyS0 sl login: root Password: Last login: Tue Nov 3 09:54:43 JST 2009 on ttyS0 Linux sl 2.6.22.7 #436 Sun Jun 14 22:44:37 JST 2009 armv5tejl 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. sl:~# cat /etc/fstab # /etc/fstab: static file system information. # #これは、RAID 機じゃないパターン。/dev/sda2 / xfs defaults,noatime 0 0 proc /proc proc defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/sda1 /boot ext3 defaults,noatime 0 1 /dev/sda4 /mnt xfs defaults,noatime 0 2 sl:~#
インストーラを見る。
yasunari@ude:/home/linkstation/HackKit/unified/current$ less hackkit_091103.sh : : # fstab の修正(LS-WSGL,LS-QL,LS-SL のみ) create_fstab() { if [ $MACHINE != LSWSGL -a $MACHINE != LSQL -o $MACHINE = LSSL ] then return fi : :駄目だコリャ。
yasunari@ude:/home/linkstation/HackKit/unified/current$ vi hackkit_091103.sh : : # fstab の修正(LS-WSGL,LS-QL,LS-SL のみ) create_fstab() { if [ $MACHINE != LSWSGL -a $MACHINE != LSQL -a $MACHINE != LSSL ] then return fi : :起動時のエラーはこれだけのはず。ザルでなければ
もう一回最初からインストールして確認する。
以下、 準備(LS-QL の場合)の手順
とりあえずハックキット化した LS-SL に USB で接続。
usb 1-1: new high speed USB device using ehci_marvell and address 2 usb 1-1: configuration #1 chosen from 1 choice scsi2 : SCSI emulation for USB Mass Storage devices Nov 3 11:05:16 sl kernel: usb 1-1: new high speed USB device using ehci_marvell and address 2 Nov 3 11:05:16 sl kernel: usb 1-1: configuration #1 chosen from 1 choice Nov 3 11:05:16 sl kernel: scsi2 : SCSI emulation for USB Mass Storage devices scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 sd 2:0:0:0: [sdb] 488397168 512-byte hardware sectors (250059 MB) sd 2:0:0:0: [sdb] Write Protect is off sd 2:0:0:0: [sdb] Assuming drive cache: write through sd 2:0:0:0: [sdb] 488397168 512-byte hardware sectors (250059 MB) sd 2:0:0:0: [sdb] Write Protect is off sd 2:0:0:0: [sdb] Assuming drive cache: write through sdb: sdb1 sdb2 sdb4 < sdb5 sdb6 > sd 2:0:0:0: [sdb] Attached SCSI disk sd 2:0:0:0: Attached scsi generic sg1 type 0 Nov 3 11:05:21 sl kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Nov 3 11:05:21 sl kernel: sd 2:0:0:0: [sdb] 488397168 512-byte hardware sectors (250059 MB) Nov 3 11:05:21 sl kernel: sd 2:0:0:0: [sdb] Write Protect is off Nov 3 11:05:21 sl kernel: sd 2:0:0:0: [sdb] 488397168 512-byte hardware sectors (250059 MB) Nov 3 11:05:21 sl kernel: sd 2:0:0:0: [sdb] Write Protect is off Nov 3 11:05:21 sl kernel: sdb: sdb1 sdb2 sdb4 < sdb5 sdb6 > Nov 3 11:05:21 sl kernel: sd 2:0:0:0: [sdb] Attached SCSI disk Nov 3 11:05:21 sl kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0USB デバイスも認識している。
パーティションを消す
sl:~# fdisk /dev/sdb The number of cylinders for this disk is set to 30401. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sdb: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 125 1004031 83 Linux /dev/sdb2 126 748 5004247+ 83 Linux /dev/sdb4 749 30401 238187722+ 5 Extended /dev/sdb5 749 873 1004031 82 Linux swap / Solaris /dev/sdb6 874 30295 236332183+ 83 Linux Command (m for help): d Partition number (1-6): 6 Command (m for help): d Partition number (1-5): 5 Command (m for help): d Partition number (1-5): 4 Command (m for help): d Partition number (1-4): 2 Command (m for help): d Selected partition 1 Command (m for help): p Disk /dev/sdb: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. sd 2:0:0:0: [sdb] 488397168 512-byte hardware sectors (250059 MB) sd 2:0:0:0: [sdb] Write Protect is off sd 2:0:0:0: [sdb] Assuming drive cache: write through sdb: sd 2:0:0:0: [sdb] 488397168 512-byte hardware sectors (250059 MB) sd 2:0:0:0: [sdb] Write Protect is off sd 2:0:0:0: [sdb] Assuming drive cache: write through sdb: Syncing disks. sl:~#電源 OFF
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 11:33:21 2009 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 8897107 Bytes = 8688.58 kB = 8.48 MB Load Address: 0x00000000 Entry Point: 0x00000000 root@LS-SL807:/mnt/disk1/share/hackkit#
BUFFALO INC. LinkStation series LS-SL-EM807 login:
BUFFALO INC. LinkStation series LS-SL-EM807 login: root No mail. root@LS-SL-EM807:~#
root@LS-SL-EM807:~# mkdir /mnt/disk1 mkdir: cannot create directory '/mnt/disk1': File exists root@LS-SL-EM807:~# mount /dev/sda6 /mnt/disk1 XFS mounting filesystem sda6 XFS resetting qflags for filesystem sda6 root@LS-SL-EM807:~#
ここまでで準備完了
続いて、 インストールの手順
root@LS-SL-EM807:/mnt/disk1/share/hackkit# cat > hackkit_config ADDRESS=192.168.2.53 HOSTNAME=sl root@LS-SL-EM807:/mnt/disk1/share/hackkit# cat !$ cat hackkit_config ADDRESS=192.168.2.53 HOSTNAME=sl root@LS-SL-EM807:/mnt/disk1/share/hackkit#
root@LS-SL-EM807:/mnt/disk1/share/hackkit# /etc/init.d/startSysMd.sh -- rebuild mdadm.conf for BOOT, ROOTFS -- md: md10 stopped. mdadm: /dev/disk1_1 has wrong uuid. mdadm: /dev/disk1_2 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 root@LS-SL-EM807:/mnt/disk1/share/hackkit#
root@LS-SL-EM807:/mnt/disk1/share/hackkit# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/root.old 31729 22402 9327 71% / /dev/ram1 15360 452 14908 3% /mnt/ram /dev/sda6 229216088 74096 229141992 0% /mnt/disk1 root@LS-SL-EM807:/mnt/disk1/share/hackkit# root@LS-SL-EM807:/mnt/disk1/share/hackkit# mkdir /mnt/debinst root@LS-SL-EM807:/mnt/disk1/share/hackkit# mount -t xfs /dev/md1 /mnt/debinst/ Filesystem "md1": Disabling barriers, not supported by the underlying device XFS mounting filesystem md1 root@LS-SL-EM807:/mnt/disk1/share/hackkit# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/root.old 31729 22403 9326 71% / /dev/ram1 15360 452 14908 3% /mnt/ram /dev/sda6 229216088 74096 229141992 0% /mnt/disk1 /dev/md1 4989696 374312 4615384 8% /mnt/debinst root@LS-SL-EM807:/mnt/disk1/share/hackkit# ls /mnt/debinst/ bin initrd proc usr boot lib root var dev lighttpd.webui sbin www etc mnt sys home modules tmp root@LS-SL-EM807:/mnt/disk1/share/hackkit#気にしないことにする
root@LS-SL-EM807:/mnt/disk1/share/hackkit# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/root.old 31729 22403 9326 71% / /dev/ram1 15360 452 14908 3% /mnt/ram /dev/sda6 229216088 74096 229141992 0% /mnt/disk1 /dev/md1 4989696 374312 4615384 8% /mnt/debinst root@LS-SL-EM807:/mnt/disk1/share/hackkit#どのタイミングでマウントされたか不明。
再起動後、もう一回インストールしてみる
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: /dev/disk1_1 has wrong uuid. mdadm: /dev/disk1_2 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 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/ ./var/lib/apt/lists/ : : ./tmp/ ./sys/ ./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) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity /lost+found not found. Create? yes Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/md0: ***** FILE SYSTEM WAS MODIFIED ***** /dev/md0: 19/62720 files (15.8% non-contiguous), 46893/249968 blocks mounting /boot ... kjournald starting. Commit interval 5 seconds EXT3 FS on md0, internal journal EXT3-fs: mounted filesystem with ordered data mode. editing initrd ... 139017+1 records in 139017+1 records out gunziping /mnt/debinst/boot/initrd.gz ... gziping /mnt/debinst/boot/initrd ... wait 5 minutes Image Name: initrd Created: Tue Nov 3 11:57:33 2009 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 8897747 Bytes = 8689.21 kB = 8.49 MB Load Address: 0x00000000 Entry Point: 0x00000000 unmount /boot ... root@LS-SL-EM807:/mnt/disk1/share/hackkit#
mdadm: cannot open device /dev/disk1_1: Device or resource busyも
/dev/md0 is mounted.も出ていない。
以下、 ハックキットで起動の手順
: : ---- in hackkit linuxrc --- XFS mounting filesystem sda2 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...Unable to find swap-space signature failed. 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...EXT3-fs: unable to read superblock mount: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error (could this be the IDE device where you in fact use ide-scsi so that sr0 or sda or so is needed?) In some cases useful info is found in syslog - try dmesg | tail or so XFS mounting filesystem sda6 failed. Activating swapfile swap...Unable to find swap-space signature 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 eth0: link up, full duplex, speed 1 Gbps 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 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:立ち上がってきたけど、、
Activating swap...Unable to find swap-space signature failed.とか、
Mounting local filesystems...EXT3-fs: unable to read superblock mount: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error (could this be the IDE device where you in fact use ide-scsi so that sr0 or sda or so is needed?) In some cases useful info is found in syslog - try dmesg | tail or so XFS mounting filesystem sda6 failed. Activating swapfile swap...Unable to find swap-space signature done.とか、fstab なおっていない?
ログインして、fstab を見る
Debian GNU/Linux 5.0 sl ttyS0 sl login: root Password: Linux sl 2.6.22.7 #436 Sun Jun 14 22:44:37 JST 2009 armv5tejl 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. sl:~# cat /etc/fstab # /etc/fstab: static file system information. # #RAID 用に書き換わってるけど、、、/dev/md1 / xfs defaults,noatime 0 0 proc /proc proc defaults 0 0 /dev/md10 swap swap defaults 0 0 /dev/md0 /boot ext3 defaults,noatime 0 0 /dev/sda6 /mnt/disk1 xfs defaults,noatime 0 0 sl:~#
sl:~# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/md1 4989696 185904 4803792 4% / tmpfs 62888 0 62888 0% /lib/init/rw tmpfs 62888 0 62888 0% /dev/shm /dev/root.old 31729 22335 9394 71% /initrd /dev/sda6 229216088 74096 229141992 1% /mnt/disk1 sl:~# free total used free shared buffers cached Mem: 125780 49240 76540 0 32768 8336 -/+ buffers/cache: 8136 117644 Swap: 0 0 0 sl:~#/dev/sda6 はマウントされている
XFS mounting filesystem sda6 failed.この failed は sda6 に対するものではないのか。
残るは、swap と md0 (/boot)
sl:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] unused devices:ない。そりゃマウントでけへんわ。sl:~#
sl:~# cat /initrd/linuxrc #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin echo "---- in hackkit linuxrc ---" exit 0 sl:~#これ、RAID 以外用。またインストーラのロジックミスか?
: : mount -o loop $MOUNTPOINT/boot/initrd /tmp/root || exit mv /tmp/root/linuxrc /tmp/root/linuxrc.orig if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ] then cat > /tmp/root/linuxrc <<EOF : :-o $MACHINE = LSSL が漏れてる。
また1からやり直し(藁)
|
← ハックキットのインストール |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ インストーラの修正、再び |