root@UDE:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 493212 169068 324144 34% / /dev/ram1 15360 104 15256 1% /mnt/ram /dev/ls_disk1_1 194443 68319 116085 37% /boot /dev/ls_disk1_6 155377036 14960 155362076 0% /mnt/disk1 /dev/ls_usbdisk1_1 19750356 32828 18714268 0% /mnt/usbdisk1 root@UDE:~# umount /mnt/usbdisk1/ root@UDE:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 493212 169068 324144 34% / /dev/ram1 15360 104 15256 1% /mnt/ram /dev/ls_disk1_1 194443 68319 116085 37% /boot /dev/ls_disk1_6 155377036 14960 155362076 0% /mnt/disk1 root@UDE:~#本当は、smb.conf を書き換えて samba の再起動をしないといけないが、 略。
まず、sda は
root@UDE:~# fdisk /dev/sda The number of cylinders for this disk is set to 19457. 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: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 25 200781 83 Linux /dev/sda2 26 87 498015 83 Linux /dev/sda4 88 19457 155589525 5 Extended /dev/sda5 88 104 136521 82 Linux swap /dev/sda6 105 19457 155452941 83 Linux Command (m for help): q root@UDE:~#とっているので、これを真似する。
root@UDE:~# fdisk /dev/sdb The number of cylinders for this disk is set to 19595. 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: 20.5 GB, 20547841536 bytes 64 heads, 32 sectors/track, 19595 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 19595 20065264 83 Linux Command (m for help): d →存在するパーティションを削除する Selected partition 1 Command (m for help): p →削除されたか確認する Disk /dev/sdb: 20.5 GB, 20547841536 bytes 64 heads, 32 sectors/track, 19595 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System Command (m for help): n →新しいパーティションを作る Command action e extended p primary partition (1-4) p →プライマリパーティション Partition number (1-4): 1 →1つ目 First cylinder (1-19595, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-19595, default 19595): +200M (1つ目のパーティションは200MB) Command (m for help): n Command action e extended p primary partition (1-4) p →プライマリパーティション Partition number (1-4): 2 →2つ目 First cylinder (193-19595, default 193): Using default value 193 Last cylinder or +size or +sizeM or +sizeK (193-19595, default 19595): +500M (2つ目のパーティションは500MB) Command (m for help): p Disk /dev/sdb: 20.5 GB, 20547841536 bytes 64 heads, 32 sectors/track, 19595 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 670 489472 83 Linux Command (m for help): n Command action e extended p primary partition (1-4) e →拡張パーティションを作成する。 Partition number (1-4): 4 →標準のHDDと同じにする First cylinder (671-19595, default 671): Using default value 671 Last cylinder or +size or +sizeM or +sizeK (671-19595, default 19595): Using default value 19595 Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l →論理パーティション First cylinder (671-19595, default 671): Using default value 671 Last cylinder or +size or +sizeM or +sizeK (671-19595, default 19595): +128M (swap は 128MB) Command (m for help): n^H Command (m for help): n^H Command action l logical (5 or over) p primary partition (1-4) l →論理パーティション First cylinder (794-19595, default 794): Using default value 794 Last cylinder or +size or +sizeM or +sizeK (794-19595, default 19595): Using default value 19595 (残り全部) Command (m for help): p →パーティション構成を見る Disk /dev/sdb: 20.5 GB, 20547841536 bytes 64 heads, 32 sectors/track, 19595 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 670 489472 83 Linux /dev/sdb4 671 19595 19379200 5 Extended /dev/sdb5 671 793 125936 83 Linux /dev/sdb6 794 19595 19253232 83 Linux Command (m for help): t → sdb5 を swap にする Partition number (1-6): 5 Hex code (type L to list codes): 82 Changed system type of partition 5 to 82 (Linux swap) Command (m for help): p →パーティション構成を見る Disk /dev/sdb: 20.5 GB, 20547841536 bytes 64 heads, 32 sectors/track, 19595 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 670 489472 83 Linux /dev/sdb4 671 19595 19379200 5 Extended /dev/sdb5 671 793 125936 82 Linux swap /dev/sdb6 794 19595 19253232 83 Linux Command (m for help): m →ヘルプを見る Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): w →パーティションテーブルを書き込んで終了 The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. root@UDE:~#
root@UDE:~# mkfs.ext2 /dev/sdb1 mke2fs 1.27 (8-Mar-2002) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 49152 inodes, 196592 blocks 9829 blocks (5.00%) reserved for the super user First data block=1 24 block groups 8192 blocks per group, 8192 fragments per group 2048 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 22 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@UDE:~# mkfs.xfs /dev/sdb2 meta-data=/dev/sdb2 isize=256 agcount=8, agsize=15296 blks = sectsz=512 data = bsize=4096 blocks=122368, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=1200, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 root@UDE:~# mkswap /dev/sdb5 Setting up swapspace version 1, size = 128954368 bytes root@UDE:~# mkfs.xfs /dev/sdb6 meta-data=/dev/sdb6 isize=256 agcount=19, agsize=262144 blks = sectsz=512 data = bsize=4096 blocks=4813308, 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 root@UDE:~#
root@UDE:/# mkdir /tmp/root mkdir: Cannot create directory `/tmp/root': File exists root@UDE:/# mount /dev/sdb2 /tmp/root root@UDE:/# mkdir /tmp/root/boot root@UDE:/# mount /dev/sdb1 /tmp/root/boot root@UDE:/# mkdir /tmp/root/mnt root@UDE:/# mkdir /tmp/root/mnt/disk1 root@UDE:/# mount /dev/sdb6 !$ mount /dev/sdb6 /tmp/root/mnt/disk1 root@UDE:/# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 493212 169104 324108 34% / /dev/ram1 15360 104 15256 1% /mnt/ram /dev/ls_disk1_1 194443 68319 116085 37% /boot /dev/ls_disk1_6 155377036 14960 155362076 0% /mnt/disk1 /dev/sdb2 484672 176 484496 0% /mnt/ram/root /dev/sdb1 190387 13 180545 0% /mnt/ram/root/boot /dev/sdb6 19242992 320 19242672 0% /mnt/ram/root/mnt/disk1 root@UDE:/#
root@UDE:/# ls bin boot dev etc home lib mnt proc root sbin share tmp usr var www root@UDE:/# tar cf - bin/ boot/ dev/ etc/ home/ lib/ root/ sbin/ share/ usr/ var/ www/ |(cd /tmp/root; tar xvf -) : : root@UDE:/# ls /mnt authtest disk1 info ram usbdisk1 usbdisk2 root@UDE:/# tar cf - mnt/authtest/ mnt/info/ mnt/usbdisk* |(cd /tmp/root; tar xvf -)
root@UDE:/# ls -l / drwxrwxrwx 2 root root 4096 Jun 21 11:12 bin drwxr-xr-x 3 root root 1024 Jul 30 10:27 boot drwxrwxrwx 6 root root 4096 Jul 30 16:53 dev drwxrwxrwx 19 root root 4096 Jul 30 10:27 etc drwxrwxrwx 2 root root 26 Jul 23 16:35 home drwxrwxrwx 4 root root 4096 Jun 21 11:12 lib drwxrwxrwx 8 root root 84 Jul 30 10:27 mnt dr-xr-xr-x 66 root root 0 Jan 1 1970 proc drwx------ 3 root root 39 Jul 23 16:51 root drwxrwxrwx 2 root root 4096 Jun 21 11:12 sbin drwxrwxrwx 2 root root 6 Mar 30 19:01 share lrwxrwxrwx 1 root root 8 Jul 30 10:27 tmp -> /mnt/ram drwxrwxrwx 9 root root 85 Jun 21 11:13 usr drwxr-xr-x 10 root root 119 Jul 30 10:27 var drwxrwxrwx 5 root root 61 Jun 21 11:13 www root@UDE:/# ln -s /mnt/ram /tmp/root/tmp root@UDE:/# mkdir /tmp/root/proc root@UDE:/# mkdir /tmp/root/mnt/ram
楽天
Yahoo Livedoor デパート TSUKUMO TWOTOP クレバリー |
IDE に作ったコピーが悪いのか、
IDE-Serial IATA 変換アダプタで接続していることが悪いのか
何かトラップがあって純正以外の HDD 以外からは立ち上がらないのか
、、、
謎。
純正の HDD に戻して再起動。 無事起動することを確認した。ふー
さて、切り分けのために S-ATA の HDD かわなあかんのか。 金かかる子やなぁ。
← LS-GL:USB HDD 接続 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-GL:ディスク交換(2) |