標準ファームが動く HDD を作るには、/boot を
root@LS-XHLA1F:~# mkfs.ext3 -j -m 0 -I 128 /dev/sdb1とフォーマットすれば良いことはわかった。
でも、-m 0 と -I 128 と2つのオプションを与えているので、
どちらが効いているのか、悪魔の化けの皮をはいでやらないといけない。
あと、パーティションのサイズは違ってもいいのかも確認しないといけないかな?
USB で接続し、sdb と認識される。
root@LS-XHLA1F:~# mkfs.ext3 -j -m 0 /dev/sdb1 mke2fs 1.40.5 (27-Jan-2008) Warning: 256-byte inodes not usable on older systems Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 62592 inodes, 249995 blocks 0 blocks (0.00%) reserved for the super user First data block=0 Maximum filesystem blocks=260046848 8 block groups 32768 blocks per group, 32768 fragments per group 7824 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 32 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-XHLA1F:~#
root@LS-XHLA1F:~# mkdir /tmp/boot root@LS-XHLA1F:~# mount /dev/sdb1 /tmp/boot root@LS-XHLA1F:~#
root@LS-XHLA1F:~# (cd /boot ; tar cf - .)|(cd /tmp/boot/; tar xvf -) ./ ./hddrootfs.buffalo.updated.done tar: ./hddrootfs.buffalo.updated.done: time stamp 2009-01-21 20:19:28 is 38692420.122437355 s in the future ./initrd.buffalo tar: ./initrd.buffalo: time stamp 2009-01-21 20:18:05 is 38692336.65639472 s in the future ./uImage.buffalo tar: ./uImage.buffalo: time stamp 2009-02-06 16:06:39 is 40059650.582419695 s in the future ./conf_save.tgz tar: ./conf_save.tgz: time stamp 2009-02-14 19:30:07 is 40763058.580206355 s in the future ./u-boot.buffalo tar: ./u-boot.buffalo: time stamp 2009-02-06 16:06:36 is 40059647.562678325 s in the future root@LS-XHLA1F:~#
E06!
mkfs に -I 128 を付けずにフォーマットしたら起動しない。
HD103UJ は USB で接続、自動マウントされるのでアンマウント
root@LS-XHLA1F:~# mkfs.ext3 -j -I 128 /dev/sdb1 mke2fs 1.40.5 (27-Jan-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 62720 inodes, 249995 blocks 12499 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=260046848 8 block groups 32768 blocks per group, 32768 fragments per group 7840 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 36 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-XHLA1F:~#
root@LS-XHLA1F:~# mkdir /tmp/boot root@LS-XHLA1F:~# mount /dev/sdb1 /tmp/boot root@LS-XHLA1F:~#
root@LS-XHLA1F:~# (cd /boot ; tar cf - .)|(cd /tmp/boot/; tar xvf -) ./ ./hddrootfs.buffalo.updated.done tar: ./hddrootfs.buffalo.updated.done: time stamp 2009-01-21 20:19:28 is 38691826.748999225 s in the future ./initrd.buffalo tar: ./initrd.buffalo: time stamp 2009-01-21 20:18:05 is 38691743.464975065 s in the future ./uImage.buffalo tar: ./uImage.buffalo: time stamp 2009-02-06 16:06:39 is 40059057.342182575 s in the future ./conf_save.tgz ./u-boot.buffalo tar: ./u-boot.buffalo: time stamp 2009-02-06 16:06:36 is 40059054.320240855 s in the future root@LS-XHLA1F:~#
立ち上がってきた。
root@LS-XHLA1F:~# tune2fs -l /dev/sda1 tune2fs 1.40.5 (27-Jan-2008) Filesystem volume name:Last mounted on: Filesystem UUID: 881c883f-a341-4a0a-a764-b779c6470d1c Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file Filesystem flags: unsigned_directory_hash Default mount options: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 62720 Block count: 249995 Reserved block count: 12499 Free blocks: 214005 Free inodes: 62704 First block: 0 Block size: 4096 Fragment size: 4096 Reserved GDT blocks: 61 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 7840 Inode blocks per group: 245 Filesystem created: Thu Nov 1 00:34:33 2007 Last mount time: Thu Nov 1 00:39:07 2007 Last write time: Thu Nov 1 00:39:07 2007 Mount count: 3 Maximum mount count: 36 Last checked: Thu Nov 1 00:34:33 2007 Check interval: 15552000 (6 months) Next check after: Tue Apr 29 00:34:33 2008 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 128 Journal inode: 8 Default directory hash: tea Directory Hash Seed: 8e5769b4-1613-49c4-afa7-88db6274c0b0 Journal backup: inode blocks root@LS-XHLA1F:~#
root@LS-XHLA1F:~# mkfs.ext3 -j -I 128 /dev/sda1 mke2fs 1.40.5 (27-Jan-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 62720 inodes, 249995 blocks 12499 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=260046848 8 block groups 32768 blocks per group, 32768 fragments per group 7840 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 31 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-XHLA1F:~# tune2fs -l /dev/sda1 > /tmp/withI128 root@LS-XHLA1F:~# mkfs.ext3 -j /dev/sda1 mke2fs 1.40.5 (27-Jan-2008) Warning: 256-byte inodes not usable on older systems Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 62592 inodes, 249995 blocks 12499 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=260046848 8 block groups 32768 blocks per group, 32768 fragments per group 7824 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 34 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-XHLA1F:~# tune2fs -l /dev/sda1 > /tmp/withoutI128 root@LS-XHLA1F:~#比べてみる
root@LS-XHLA1F:~# diff -u /tmp/withI128 /tmp/withoutI128 --- /tmp/withI128 Thu Nov 1 00:58:25 2007 +++ /tmp/withoutI128 Thu Nov 1 00:58:35 2007 @@ -1,7 +1,7 @@ tune2fs 1.40.5 (27-Jan-2008) Filesystem volume name:標準ファームの mkfs.ext3 のデフォルトは -I 256 のよう。Last mounted on: -Filesystem UUID: a9aeaffb-18ba-4c6d-a645-ea1711c382c1 +Filesystem UUID: 39aae16d-4ba4-432f-80e9-1e9ef059fe1c Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext_attr resize_inode dir_index filetype sparse_super large_file @@ -10,32 +10,32 @@ Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux -Inode count: 62720 +Inode count: 62592 Block count: 249995 Reserved block count: 12499 -Free blocks: 243596 -Free inodes: 62709 +Free blocks: 241644 +Free inodes: 62581 First block: 0 Block size: 4096 Fragment size: 4096 Reserved GDT blocks: 61 Blocks per group: 32768 Fragments per group: 32768 -Inodes per group: 7840 -Inode blocks per group: 245 -Filesystem created: Thu Nov 1 00:58:17 2007 +Inodes per group: 7824 +Inode blocks per group: 489 +Filesystem created: Thu Nov 1 00:58:31 2007 Last mount time: n/a -Last write time: Thu Nov 1 00:58:17 2007 +Last write time: Thu Nov 1 00:58:31 2007 Mount count: 0 -Maximum mount count: 31 -Last checked: Thu Nov 1 00:58:17 2007 +Maximum mount count: 34 +Last checked: Thu Nov 1 00:58:31 2007 Check interval: 15552000 (6 months) -Next check after: Tue Apr 29 00:58:17 2008 +Next check after: Tue Apr 29 00:58:31 2008 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 -Inode size: 128 +Inode size: 256 Journal inode: 8 Default directory hash: tea -Directory Hash Seed: 593b2854-39b1-477a-a9e5-5385c1992374 +Directory Hash Seed: abbd17c4-b203-4362-9c0c-bec225a0bad6 Journal backup: inode blocks root@LS-XHLA1F:~#
カーネル、mkfs.ext3 は Inode size: 256 に対応できているが、
U-Boot は Inode size: 128 でないと読めないので、
-I 128 を付けて mkfs しないとブートできない。
といったところか。
Buffalo のトラップでもなんでもなくて、寄せ集めた材料の不整合。
Buffalo はそれに気が付いていて libbuffalo.bin では -I 128 をつけている。
さて、すっきりしたので、ようやくハックキットのインストールだぁ!
おまちどうさま
|
← 標準ファーム入り HDD の作成3回目 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ ハックキットのインストール |