代替の HDD は、いつもそこらにころがっている
小容量の IDE HDD を使っている。
今回は、Seagete の ST310212A という 10.2GB HDD を使用する。
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 30401 237183628+ 83 Linuxなので、同じようにパーティションを切る。
fdisk を起動
kup:~# fdisk /dev/sdb The number of cylinders for this disk is set to 12495. 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):まずは既存のパーティションを確認する。
Command (m for help): p Disk /dev/sdb: 10.2 GB, 10242892800 bytes 64 heads, 32 sectors/track, 9768 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 192 196592 83 Linux /dev/sdb2 193 2146 2000896 83 Linux /dev/sdb3 2147 2391 250880 82 Linux swap / Solaris /dev/sdb4 2392 9768 7554048 83 Linux Command (m for help):ハックキットのインストール用に使った HDD なので、 パーティションが切ってある。
Command (m for help): d Partition number (1-4): 4 Command (m for help): d Partition number (1-4): 3 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: 6448 MB, 6448619520 bytes 16 heads, 63 sectors/track, 12495 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Device Boot Start End Blocks Id System Command (m for help):新たにパーティションを切る。
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-9768, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-9768, default 9768): +1024M Command (m for help): p Disk /dev/sdb: 10.2 GB, 10242892800 bytes 64 heads, 32 sectors/track, 9768 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 978 1001456 83 Linux Command (m for help):標準ファームよりちょっと小さい。消して作り直す。
Command (m for help): d Selected partition 1 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-9768, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-9768, default 9768): +1030M Command (m for help): p Disk /dev/sdb: 10.2 GB, 10242892800 bytes 64 heads, 32 sectors/track, 9768 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 983 1006576 83 Linux Command (m for help):ちょっと大きいが、大は小を兼ねるからOKとする。
続いて、sdb2。5GB 程。へぇ。
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (984-9768, default 984): Using default value 984 Last cylinder or +size or +sizeM or +sizeK (984-9768, default 9768): +5120MB Command (m for help): p Disk /dev/sdb: 10.2 GB, 10242892800 bytes 64 heads, 32 sectors/track, 9768 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 983 1006576 83 Linux /dev/sdb2 984 5867 5001216 83 Linux Command (m for help):標準ファームより少々小さいが、ここは、まあよしとする。
続いて sdb4。残りを全部拡張パーティションとする。
Command (m for help): n Command action e extended p primary partition (1-4) e Partition number (1-4): 4 First cylinder (5868-9768, default 5868): Using default value 5868 Last cylinder or +size or +sizeM or +sizeK (5868-9768, default 9768): Using default value 9768 Command (m for help): p Disk /dev/sdb: 10.2 GB, 10242892800 bytes 64 heads, 32 sectors/track, 9768 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 983 1006576 83 Linux /dev/sdb2 984 5867 5001216 83 Linux /dev/sdb4 5868 9768 3994624 5 Extended Command (m for help):総容量が小さいので仕方がない。
続いて、sdb5。1GB ほど
Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (5868-9768, default 5868): Using default value 5868 Last cylinder or +size or +sizeM or +sizeK (5868-9768, default 9768): +1024MB Command (m for help): p Disk /dev/sdb: 10.2 GB, 10242892800 bytes 64 heads, 32 sectors/track, 9768 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 983 1006576 83 Linux /dev/sdb2 984 5867 5001216 83 Linux /dev/sdb4 5868 9768 3994624 5 Extended /dev/sdb5 5868 6845 1001456 83 Linux Command (m for help):Linux Swap にする。
Command (m for help): t Partition number (1-5): 5 Hex code (type L to list codes): 82 Changed system type of partition 5 to 82 (Linux swap / Solaris) Command (m for help): p Disk /dev/sdb: 10.2 GB, 10242892800 bytes 64 heads, 32 sectors/track, 9768 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 983 1006576 83 Linux /dev/sdb2 984 5867 5001216 83 Linux /dev/sdb4 5868 9768 3994624 5 Extended /dev/sdb5 5868 6845 1001456 82 Linux swap / Solaris Command (m for help):最後に残りを全部 sdb6 に割り当てる。
Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (6846-9768, default 6846): Using default value 6846 Last cylinder or +size or +sizeM or +sizeK (6846-9768, default 9768): Using default value 9768 Command (m for help): p Disk /dev/sdb: 10.2 GB, 10242892800 bytes 64 heads, 32 sectors/track, 9768 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 983 1006576 83 Linux /dev/sdb2 984 5867 5001216 83 Linux /dev/sdb4 5868 9768 3994624 5 Extended /dev/sdb5 5868 6845 1001456 82 Linux swap / Solaris /dev/sdb6 6846 9768 2993136 83 Linux Command (m for help):パーティション情報を書込んで終了。
Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. SCSI device sdb: 20005650 512-byte hdwr sectors (10243 MB) SCSI device sdb: drive cache: write back sdb: sdb1 sdb2 sdb4 < sdb5 sdb6 > SCSI device sdb: 20005650 512-byte hdwr sectors (10243 MB) SCSI device sdb: drive cache: write back sdb: sdb1 sdb2 sdb4 < sdb5 sdb6 > Syncing disks. kup:~#
sdb1 は ext3
kup:~# mkfs -j /dev/sdb1 mke2fs 1.40-WIP (14-Nov-2006) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 125952 inodes, 251644 blocks 12582 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 15744 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. kup:~#sdb2 は xfs
kup:~# mkfs.xfs /dev/sdb2 meta-data=/dev/sdb2 isize=256 agcount=8, agsize=156288 blks = sectsz=512 attr=0 data = bsize=4096 blocks=1250304, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=2560, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 kup:~#sdb5 は swap
kup:~# mkswap /dev/sdb5 Setting up swapspace version 1, size = 1025486 kB no label, UUID=18d35ab0-35e8-42dc-afa0-840afe5d1453 kup:~#sdb6 は xfs
kup:~# mkfs.xfs /dev/sdb6 meta-data=/dev/sdb6 isize=256 agcount=8, agsize=93535 blks = sectsz=512 attr=0 data = bsize=4096 blocks=748280, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=2560, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 kup:~#
kup:~# mkdir /tmp/root kup:~# mount /dev/sdb2 /tmp/root XFS mounting filesystem sdb2 kup:~# mkdir /tmp/root/boot kup:~# mount /dev/sdb1 /tmp/root/boot kjournald starting. Commit interval 5 seconds EXT3 FS on sdb1, internal journal EXT3-fs: mounted filesystem with ordered data mode. kup:~# mkdir -p /tmp/root/mnt/disk1 kup:~# mount /dev/sdb6 !$ mount /dev/sdb6 /tmp/root/mnt/disk1 XFS mounting filesystem sdb6 kup:~# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 2929652 373836 2555816 13% / tmpfs 63164 0 63164 0% /lib/init/rw tmpfs 63164 0 63164 0% /dev/shm /dev/sda1 54416 5831 45776 12% /boot /dev/sda4 114029892 103544 113926348 1% /mnt /dev/sdb2 4990976 176 4990800 1% /tmp/root /dev/sdb1 990728 17652 922748 2% /tmp/root/boot /dev/sdb6 2982880 144 2982736 1% /tmp/root/mnt/disk1 kup:~#
kup:~# cd /tmp/root kup:/tmp/root# ls boot mnt kup:/tmp/root# tar zxvf /mnt/share/LS-HGL.tar.gz : :
kup:/tmp/root# cd kup:~# umount /tmp/root/mnt/disk1 kup:~# umount /tmp/root/boot kup:~# umount /tmp/root
: : BUFFALO INC. LinkStation series LS-HGL(SUININ) LS-HGL487 login:完了
|
← 標準ファームのバックアップ |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ debian 化(6)ハックキットの作り直し |