mini:~# 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): 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. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. mini:~#sda も同様に削除しようとしたら、、、死んでいる。
yasunari@ude:~$ cd /srv/tftp/ yasunari@ude:/srv/tftp$ ls HS-DHGL_1.20 LS-CL_1.11 LS-QL_1.10b SheevaPlug_1.2 LS-CHL_1.10 LS-GL_1.15 LS-WSGL_1.06 initrd.buffalo LS-CHL_1.20 LS-HGL_1.07b LS-XHL_1.02 uImage.buffalo LS-CHL_1.21 LS-LGL_2.01 LS-XHL_1.02+telnet LS-CL+HackKit LS-QL_1.05+telnet LS-XHL_1.04b LS-CL_1.07 LS-QL_1.07b LS-XHL_1.10 yasunari@ude:/srv/tftp$ rm initrd.buffalo uImage.buffalo yasunari@ude:/srv/tftp$ ln LS-WSGL_1.06/* . yasunari@ude:/srv/tftp$ ls HS-DHGL_1.20 LS-CL_1.11 LS-QL_1.10b SheevaPlug_1.2 LS-CHL_1.10 LS-GL_1.15 LS-WSGL_1.06 initrd.buffalo LS-CHL_1.20 LS-HGL_1.07b LS-XHL_1.02 uImage.buffalo LS-CHL_1.21 LS-LGL_2.01 LS-XHL_1.02+telnet LS-CL+HackKit LS-QL_1.05+telnet LS-XHL_1.04b LS-CL_1.07 LS-QL_1.07b LS-XHL_1.10 yasunari@ude:/srv/tftp$
無事起動してきた。
HDD が1台だとインストールできないようだ。
root@LS-QL233:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 381992 4611928 8% / /dev/ram1 15360 112 15248 1% /mnt/ram /dev/md0 995928 172320 823608 17% /boot /dev/disk1_6 148376092 66344 148309748 0% /mnt/disk1 /dev/disk2_6 148376092 612 148375480 0% /mnt/disk2 /dev/usbdisk2_1 988088 131840 856248 13% /mnt/usbdisk2 root@LS-QL233:~# umount /mnt/usbdisk2/ root@LS-QL233:~# mkdir /tmp/root root@LS-QL233:~# mount /dev/sdc2 /tmp/root/ XFS mounting filesystem sdc2 root@LS-QL233:~# cd /tmp/root root@LS-QL233:/tmp/root# cd etc/ root@LS-QL233:/tmp/root/etc# cat linkstation_release VERSION=1.06 SUBVERSION=HDD 0.15 PRODUCTID=0x00003002 BUILDDATE=2008/11/10 13:35:45 root@LS-QL233:/tmp/root/etc# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4993920 381988 4611932 8% / /dev/ram1 15360 112 15248 1% /mnt/ram /dev/md0 995928 172320 823608 17% /boot /dev/disk1_6 148376092 66344 148309748 0% /mnt/disk1 /dev/disk2_6 148376092 612 148375480 0% /mnt/disk2 /dev/sdc2 4993920 291028 4702892 6% /mnt/ram/root root@LS-QL233:/tmp/root/etc# vi shadow : : root@LS-QL233:/tmp/root/etc# cd / root@LS-QL233:/# umount /tmp/root root@LS-QL233:/#
BUFFALO INC. LinkStation series LS-WSGL678 login: root root@LS-WSGL678:~#
root@LS-WSGL678:~# cd /mnt/disk1/share/hackkit/ root@LS-WSGL678:/mnt/disk1/share/hackkit# ls hackkit_091122.sh hackkit_config.sample ramroot_090225.sh hackkit_091122.tar.gz mkimage setup_090717.sh root@LS-WSGL678:/mnt/disk1/share/hackkit# sh ramroot_090225.sh Extracting initrd... dd: initrd.gz: Read-only file system gunzip: initrd.gz: No such file or directory mounting initrd... initrd: No such file or directory editing linuxrc... mv: unable to rename `linuxrc': No such file or directory sed: linuxrc.orig: No such file or directory clearing root's password... ramroot_090225.sh: line 34: cd: /tmp/root/etc: No such file or directory mv: unable to rename `shadow': No such file or directory sed: shadow.orig: No such file or directory rebuilding initrd.buffalo... umount: /tmp/root: not mounted gziping initrd ... wait 5 minutes gzip: initrd: No such file or directory mv: unable to rename `initrd.buffalo': Read-only file system /mnt/disk1/share/hackkit/mkimage: Can't open initrd.buffalo: Read-only file system root@LS-WSGL678:/mnt/disk1/share/hackkit#?
root@LS-WSGL678:/mnt/disk1/share/hackkit# mount rootfs on / type rootfs (rw) /dev/root on / type xfs (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw) /dev/ram1 on /mnt/ram type tmpfs (rw) /dev/md0 on /boot type ext3 (ro,data=ordered) usbfs on /proc/bus/usb type usbfs (rw) /dev/disk1_6 on /mnt/disk1 type xfs (rw,noatime) /dev/disk2_6 on /mnt/disk2 type xfs (rw,noatime) root@LS-WSGL678:/mnt/disk1/share/hackkit#/dev/md0 は ro でマウントされている。
ramroot_090225.sh を修正する。
ramroot_091128.sh を実行 root@LS-WSGL678:/mnt/disk1/share/hackkit# sh ramroot_091128.sh Extracting initrd... /sbin/hotplug [block] EXT3-fs warning (device md0): ext3_clear_journal_err: Filesystem error recorded from previous mount: IO failure EXT3-fs warning (device md0): ext3_clear_journal_err: Marking fs in need of filesystem check. EXT3-fs warning: mounting fs with errors, running e2fsck is recommended /sbin/hotplug [block] 89028+1 records in 89028+1 records out mounting initrd... EXT2-fs warning: checktime reached, running e2fsck is recommended /sbin/hotplug [block] editing linuxrc... clearing root's password... rebuilding initrd.buffalo... /sbin/hotplug [block] gziping initrd ... wait 5 minutes Image Name: initrd Created: Sat Nov 28 15:25:50 2009 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 5675166 Bytes = 5542.15 kB = 5.41 MB Load Address: 0x00000000 Entry Point: 0x00000000 root@LS-WSGL678:/mnt/disk1/share/hackkit# ls -l /boot -rw-r--r-- 1 root root 25416 Mar 2 2008 conf_save.tgz -rw-r--r-- 1 root root 110310320 Nov 10 2008 hddrootfs.buffalo.updated.done -rw-r--r-- 1 root root 5675230 Nov 28 15:25 initrd.buffalo -rw-r--r-- 1 root root 5697905 Nov 10 2008 initrd.buffalo.orig -rw-r--r-- 1 root root 5675166 Nov 28 15:25 initrd.gz drwxr-xr-x 2 root root 4096 Mar 2 2008 lost+found -rw-r--r-- 1 root root 245776 Mar 2 2008 u-boot.buffalo -rw-r--r-- 1 root root 1757604 Mar 2 2008 uImage.buffalo root@LS-WSGL678:/mnt/disk1/share/hackkit#できた。(3) 電源 OFF。コンセントも抜きます。
(4) コンセントを刺し、電源 ON。RamRoot モードで起動してきます。
ログイン
シリアルコンソールからログインする。BUFFALO INC. LinkStation series LS-WSGL-EM678 login: root login[1189]: root login on `ttyS0' BusyBox v1.1.1 (2008.11.04-08:25+0000) Built-in shell (ash) Enter 'help' for a list of built-in commands. #時計を合わせる
# date Sun Mar 2 03:04:46 JST 2008 # date 112815322009 Sat Nov 28 15:32:00 JST 2009 #ディスクのマウント
# mkdir /mnt/disk1 mkdir: Cannot create directory `/mnt/disk1': File exists # mount /dev/sda6 /mnt/disk1 XFS mounting filesystem sda6 # ls /mnt/disk1/share/hackkit/ hackkit_091122.sh mkimage setup_090717.sh hackkit_091122.tar.gz ramroot_090225.sh hackkit_config.sample ramroot_091128.sh #インストール
カスタマイズ
hackkit_config を書く方法で# cd /mnt/disk1/share/hackkit/ # echo ADDRESS=192.168.2.45 > hackkit_config # echo HOSTNAME=mini >> hackkit_config # cat hackkit_config ADDRESS=192.168.2.45 HOSTNAME=mini #インストーラの実行
# sh hackkit_091122.sh PRODUCTID = 0x00003002 MACHINE LSWSGL building md... -- rebuild mdadm.conf for BOOT, ROOTFS -- md: md10 stopped. mdadm: /dev/disk2_1 has wrong uuid. mdadm: /dev/disk1_1 has wrong uuid. mdadm: /dev/disk2_2 has wrong uuid. mdadm: /dev/disk1_2 has wrong uuid. md: bindmd: bind raid1: raid set md10 active with 2 out of 2 mirrors mdadm: /dev/md10md: md1 stopped. has been started with 2 drives. mdadm: /dev/disk2_1 has wrong uuid. mdadm: /dev/disk1_1 has wrong uuid. md: bind md: bind raid1: raid set md1 active with 2 out of 2 mirrors mdadm: /dev/md1 md: md0 stopped. has been started with 2 drives. md: bind md: bind raid1: raid set md0 active with 2 out of 2 mirrors mdadm: /dev/md0 has been started with 2 drives. -- 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 ... XFS mounting filesystem md1 extracting hackkit archive ... ./ ./var/ ./var/lib/ ./var/lib/apt/ ./var/lib/apt/lists/ ./var/lib/apt/lists/partial/ : : ./media/ ./initrd/ creating /etc/fstab ... creating miconapl ... creating kernelmon ... creating usb ... checking /dev/md0 fsck 1.27 (8-Mar-2002) e2fsck 1.27 (8-Mar-2002) Pass 1: Checking inodes, blocks, and sizes Deleted inode 17 has zero dtime. Fix? yes Deleted inode 19 has zero dtime. Fix? yes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Block bitmap differences: -(4606--4607) -(25969--28032) -(28040--28671) -(29112--29504) -(29512--30523) Fix? yes Free blocks count wrong for group #0 (4467, counted=8570). Fix? yes Free blocks count wrong (207177, counted=211280). Fix? yes Inode bitmap differences: -17 -19 Fix? yes Free inodes count wrong for group #0 (15691, counted=15693). Fix? yes Free inodes count wrong (125675, counted=125677). Fix? yes /dev/md0: ***** FILE SYSTEM WAS MODIFIED ***** /dev/md0: 19/125696 files (15.8% non-contiguous), 39696/250976 blocks mounting /boot ... EXT2-fs warning (device md0): ext2_fill_super: mounting ext3 filesystem as ext2 editing initrd ... 88674+1 records in 88674+1 records out gunziping /mnt/debinst/boot/initrd.gz ... EXT2-fs warning: checktime reached, running e2fsck is recommended gziping /mnt/debinst/boot/initrd ... wait 5 minutes Image Name: initrd Created: Sat Nov 28 15:39:03 2009 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 5675203 Bytes = 5542.19 kB = 5.41 MB Load Address: 0x00000000 Entry Point: 0x00000000 unmount /boot ... umount: /mnt/debinst/boot: device is busy umount: /mnt/debinst/boot: device is busy # 電源 OFF
ハックキットで起動
HDD の交換
非該当起動
問題なく起動してきた。Debian GNU/Linux 5.0 mini ttyS0 mini login:と思ったが、良く見ると、、、Mounting local filesystems...EXT2-fs warning (device md0): ext2_fill_super: mounting ext3 filesystem as ext2という警告が出ている。
上の方でも/dev/md0 on /boot type ext3 (ro,data=ordered)と、ext3 でマウントされている。以前は、ext2 だったのだが、いつの間に変わったのだろう。
LinkStation Mini
LS-WSGLバッファローダイレクト
楽天市場
Amazon
Yahoo!ショッピング
Livedoor デパート
ムラウチドットコム
ヤマダ電機WEB
←
LS-GL で GPT な HDD を使うハックの記録
LinkStation/玄箱 をハックしよう→
/boot はいつから ext3 になった?
Copyright (C) 2003-2009 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市