起動する状態と /boot の容量、使用量が違うので、それが原因と推測。
差を探す。
root@LS-XHL-EM8DF:~# parted GNU Parted 1.8.8 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Model: Hitachi HDP725050GLA360 (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 1024MB 1024MB ext3 primary 2 1024MB 6144MB 5120MB xfs primary 3 6144MB 6144MB 512B primary 4 6144MB 6144MB 512B primary 5 6144MB 7168MB 1024MB linux-swap primary 6 7168MB 500GB 493GB xfs primary (parted)パーティション1の削除
(parted) rm 1 (parted) print Model: Hitachi HDP725050GLA360 (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 2 1024MB 6144MB 5120MB xfs primary 3 6144MB 6144MB 512B primary 4 6144MB 6144MB 512B primary 5 6144MB 7168MB 1024MB linux-swap primary 6 7168MB 500GB 493GB xfs primary (parted)パーティション1の Start を 0 にして再作成
(parted) mkpart Partition name? []? primary File system type? [ext2]? ext3 Start? 0 End? 1024MB (parted) print Model: Hitachi HDP725050GLA360 (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 1024MB 1024MB ext3 primary 2 1024MB 6144MB 5120MB xfs primary 3 6144MB 6144MB 512B primary 4 6144MB 6144MB 512B primary 5 6144MB 7168MB 1024MB linux-swap primary 6 7168MB 500GB 493GB xfs primary (parted) quit Information: You may need to update /etc/fstab. root@LS-XHL-EM8DF:~#フォーマットしてマウントしてみる
root@LS-XHL-EM8DF:~# mke2fs -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 30 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-XHL-EM8DF:~# mkdir /tmp/boot root@LS-XHL-EM8DF:~# mount /dev/sda1 /tmp/boot root@LS-XHL-EM8DF:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/root.old 31729 21386 10343 67% / /dev/ram1 15360 448 14912 3% /mnt/ram /dev/sda1 984228 17652 916580 2% /mnt/ram/boot root@LS-XHL-EM8DF:~#WD2600 の sdb1 は
/dev/sdb1 992036 136000 856036 14% /sdb/bootやっぱり違う。
root@LS-XHL-EM8DF:~# fdisk /dev/sda The number of cylinders for this disk is set to 60801. 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/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 60802 488386583+ ee EFI GPT Command (m for help): d 1 Selected partition 1 Command (m for help): p Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes 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 fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy root@LS-XHL-EM8DF:~# parted /dev/sda GNU Parted 1.8.8 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Warning: /dev/sda contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table? Yes/No? n (parted) quit root@LS-XHL-EM8DF:~#
しばらくして正常に終了した。
root@LS-XHLA1F:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989760 336384 4653376 7% / /dev/ram1 15360 120 15240 1% /mnt/ram /dev/sda1 992036 136000 856036 14% /boot /dev/disk1_6 141368380 612 141367768 0% /mnt/disk1 /dev/usbdisk1_1 992036 136008 856028 14% /mnt/usbdisk1 root@LS-XHLA1F:~#sda1 も sdb1(usbdisk1_1) も 992036。
root@LS-XHLA1F:/usr/local/bin# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989760 336300 4653460 7% / /dev/ram1 15360 116 15244 1% /mnt/ram /dev/sda1 992036 136000 856036 14% /boot /dev/disk1_6 141368380 612 141367768 0% /mnt/disk1 /dev/usbdisk1_1 992036 136008 856028 14% /mnt/usbdisk1 root@LS-XHLA1F:/usr/local/bin# umount /mnt/usbdisk1/ root@LS-XHLA1F:/usr/local/bin# mkfs.ext3 -j /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 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 37 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-XHLA1F:/usr/local/bin# mount /dev/sdb1 /mnt/usbdisk1/ root@LS-XHLA1F:/usr/local/bin# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989760 336356 4653404 7% / /dev/ram1 15360 116 15244 1% /mnt/ram /dev/sda1 992036 136000 856036 14% /boot /dev/disk1_6 141368380 612 141367768 0% /mnt/disk1 /dev/sdb1 984228 17652 916580 2% /mnt/usbdisk1 root@LS-XHLA1F:/usr/local/bin#これや。
パーティションの切り方ではなく、 フォーマットの仕方の違い。
root@LS-XHLA1F:/usr/local/bin# (cd /boot; tar cf - . )|(cd /mnt/usbdisk1/; tar xvf -) : :
E06
やっぱりエラー。
なんで、自分でフォーマットしたらサイズが違うの?
天使の分け前か!
root@LS-XHLA1F:~# umount /mnt/usbdisk1/ root@LS-XHLA1F:~# mkfs.ext3 -j -m 0 -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 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 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 37 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-XHLA1F:~# mount /dev/sdb1 /mnt/usbdisk1 root@LS-XHLA1F:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989760 336320 4653440 7% / /dev/ram1 15360 116 15244 1% /mnt/ram /dev/sda1 992036 136000 856036 14% /boot /dev/disk1_6 141368380 612 141367768 0% /mnt/disk1 /dev/sdb1 992036 17652 974384 2% /mnt/usbdisk1 root@LS-XHLA1F:~#せいむ!
パーティションのサイズはいっしょになった。
root@LS-XHLA1F:/mnt/usbdisk1# ls -al drwxr-xr-x 3 root root 4096 Nov 1 00:08 . drwxrwxrwx 11 root root 126 Nov 1 00:00 .. drwx------ 2 root root 16384 Nov 1 00:08 lost+foundlost+found(忘れ物扱い所)かぁ。
消す。ええのか?
root@LS-XHLA1F:~# rm -fr /mnt/usbdisk1/lost+found root@LS-XHLA1F:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989760 336316 4653444 7% / /dev/ram1 15360 116 15244 1% /mnt/ram /dev/sda1 992036 136000 856036 14% /boot /dev/disk1_6 141368380 612 141367768 0% /mnt/disk1 /dev/sdb1 992036 17636 974400 2% /mnt/usbdisk1 root@LS-XHLA1F:~#あんまりかわらない。
root@LS-XHLA1F:~# (cd /boot;tar cf - .) |(cd /mnt/usbdisk1/; tar xvf -) ./ ./u-boot.buffalo tar: ./u-boot.buffalo: time stamp 2009-02-06 16:06:36 is 40060298.744102345 s in the future ./conf_save.tgz tar: ./conf_save.tgz: time stamp 2007-11-01 02:22:42 is 7664.73863692 s in the future ./initrd.buffalo tar: ./initrd.buffalo: time stamp 2009-01-21 20:18:05 is 38692987.449868665 s in the future ./hddrootfs.buffalo.updated.done tar: ./hddrootfs.buffalo.updated.done: time stamp 2009-01-21 20:19:28 is 38693065.59635709 s in the future ./uImage.buffalo tar: ./uImage.buffalo: time stamp 2009-02-06 16:06:39 is 40060296.50908737 s in the future root@LS-XHLA1F:~#これで一致したはず。
root@LS-XHLA1F:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989760 336320 4653440 7% / /dev/ram1 15360 116 15244 1% /mnt/ram /dev/sda1 992036 136000 856036 14% /boot /dev/disk1_6 141368380 612 141367768 0% /mnt/disk1 /dev/sdb1 992036 136000 856036 14% /mnt/usbdisk1 root@LS-XHLA1F:~#◯
立ち上がってきた!。。。
でも、telnetd を起動させるのを忘れていた。。。。(藁)
やり直し。
まずは、アンマウント
root@LS-XHLA1F:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989760 336272 4653488 7% / /dev/ram1 15360 120 15240 1% /mnt/ram /dev/sda1 992036 136000 856036 14% /boot /dev/disk1_6 141368380 612 141367768 0% /mnt/disk1 /dev/usbdisk1_1 992036 136012 856024 14% /mnt/usbdisk1 root@LS-XHLA1F:~# umount /mnt/usbdisk1/ root@LS-XHLA1F:~#フォーマット。
root@LS-XHLA1F:~# mkfs.ext3 -j -m 0 -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 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 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 21 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@LS-XHLA1F:~#マウント
root@LS-XHLA1F:~# mount /dev/usbdisk1_1 /mnt/usbdisk1 root@LS-XHLA1F:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989760 336240 4653520 7% / /dev/ram1 15360 116 15244 1% /mnt/ram /dev/sda1 992036 136000 856036 14% /boot /dev/disk1_6 141368380 612 141367768 0% /mnt/disk1 /dev/usbdisk1_1 992036 17652 974384 2% /mnt/usbdisk1 root@LS-XHLA1F:~# ls /mnt/usbdisk1/ lost+found root@LS-XHLA1F:~#lost+found は残したまま(消さずに)コピー
root@LS-XHLA1F:~# (cd /boot;tar cf - .)|(cd /mnt/usbdisk1/; tar xvf -) ./ ./u-boot.buffalo ./conf_save.tgz ./initrd.buffalo ./hddrootfs.buffalo.updated.done ./uImage.buffalo root@LS-XHLA1F:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989760 336220 4653540 7% / /dev/ram1 15360 116 15244 1% /mnt/ram /dev/sda1 992036 136000 856036 14% /boot /dev/disk1_6 141368380 612 141367768 0% /mnt/disk1 /dev/usbdisk1_1 992036 136016 856020 14% /mnt/usbdisk1 root@LS-XHLA1F:~#Used が 16KB 違う。
Deskstar から再起動
起動してきた。lost+found は無関係。
|
← RAID 0 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ ES ? |