次の手として、別パーティションに Debian の / を
置く方法をとってみる。
まずは手動で
[root@LS410D06E ~]# ls /mnt/disk1/ mt-daapd/ share/ spool/ [root@LS410D06E ~]#若干のゴミがあるが、、、
[root@LS410D06E ~]# tail -f /var/log/messages : : Oct 6 09:39:54 LS410D06E user.info kernel: usb 1-1: new high-speed USB device number 2 using ehci_marvell Oct 6 09:39:54 LS410D06E user.info kernel: scsi2 : usb-storage 1-1:1.0 Oct 6 09:39:55 LS410D06E user.notice kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Oct 6 09:39:55 LS410D06E user.notice kernel: sd 2:0:0:0: [sdb] 488397168 512-byte logical blocks: (250 GB/232 GiB) Oct 6 09:39:55 LS410D06E user.notice kernel: sd 2:0:0:0: [sdb] Write Protect is off Oct 6 09:39:55 LS410D06E user.debug kernel: sd 2:0:0:0: [sdb] Mode Sense: 21 00 00 00 Oct 6 09:39:55 LS410D06E user.err kernel: sd 2:0:0:0: [sdb] No Caching mode page present Oct 6 09:39:55 LS410D06E user.err kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through Oct 6 09:39:55 LS410D06E user.err kernel: sd 2:0:0:0: [sdb] No Caching mode page present Oct 6 09:39:55 LS410D06E user.err kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through Oct 6 09:39:55 LS410D06E user.info kernel: sdb: sdb1 sdb2 sdb3 sdb4 Oct 6 09:39:55 LS410D06E user.err kernel: sd 2:0:0:0: [sdb] No Caching mode page present Oct 6 09:39:55 LS410D06E user.err kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through Oct 6 09:39:55 LS410D06E user.notice kernel: sd 2:0:0:0: [sdb] Attached SCSI disk Oct 6 09:39:55 LS410D06E daemon.err udevd[2565]: symlink '../../sdb' '/dev/disk/by-id/ata-ST3250310AS_6RY0Y1VK.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2565]: symlink '../../sdb' '/dev/disk/by-id/scsi-SViPowER_VP-89118_SD1__6RY0Y1VK.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2565]: symlink '../../sdb' '/dev/disk/by-path/platform-ehci_marvell.0-usb-0:1:1.0-scsi-0:0:0:0.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2567]: symlink '../../sdb2' '/dev/disk/by-id/ata-ST3250310AS_6RY0Y1VK-part2.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2567]: symlink '../../sdb2' '/dev/disk/by-id/scsi-SViPowER_VP-89118_SD1__6RY0Y1VK-part2.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2567]: symlink '../../sdb2' '/dev/disk/by-partlabel/primary.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2567]: symlink '../../sdb2' '/dev/disk/by-partuuid/65d5e470-26fe-4f89-acdc-d006defbf4bf.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2567]: symlink '../../sdb2' '/dev/disk/by-path/platform-ehci_marvell.0-usb-0:1:1.0-scsi-0:0:0:0-part2.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2567]: symlink '../../sdb2' '/dev/disk/by-uuid/94e695f9-b1df-44a3-a204-574ea057c4b0.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[4712]: symlink '../../sdb3' '/dev/disk/by-id/ata-ST3250310AS_6RY0Y1VK-part3.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[4712]: symlink '../../sdb3' '/dev/disk/by-id/scsi-SViPowER_VP-89118_SD1__6RY0Y1VK-part3.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[4712]: symlink '../../sdb3' '/dev/disk/by-partlabel/primary.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[4712]: symlink '../../sdb3' '/dev/disk/by-partuuid/d4861451-bab3-4415-9959-f2e7788c80be.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[4712]: symlink '../../sdb3' '/dev/disk/by-path/platform-ehci_marvell.0-usb-0:1:1.0-scsi-0:0:0:0-part3.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[4712]: symlink '../../sdb3' '/dev/disk/by-uuid/ae446028-13ad-4a99-9acb-86dce1b5c4b0.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2565]: symlink '../../sdb1' '/dev/disk/by-id/ata-ST3250310AS_6RY0Y1VK-part1.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2565]: symlink '../../sdb1' '/dev/disk/by-id/scsi-SViPowER_VP-89118_SD1__6RY0Y1VK-part1.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2565]: symlink '../../sdb1' '/dev/disk/by-partlabel/primary.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2565]: symlink '../../sdb1' '/dev/disk/by-partuuid/3e1a59e6-078a-4774-a2e9-f5997c7c5de5.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2565]: symlink '../../sdb1' '/dev/disk/by-path/platform-ehci_marvell.0-usb-0:1:1.0-scsi-0:0:0:0-part1.udev-tmp' failed: Not a directory Oct 6 09:39:55 LS410D06E daemon.err udevd[2565]: symlink '../../sdb1' '/dev/disk/by-uuid/d95e5d40-55cc-4ec5-b532-24ef2e77f3fc.udev-tmp' failed: Not a directory Oct 6 09:39:56 LS410D06E daemon.err udevd[4713]: symlink '../../sdb4' '/dev/disk/by-id/ata-ST3250310AS_6RY0Y1VK-part4.udev-tmp' failed: Not a directory Oct 6 09:39:56 LS410D06E daemon.err udevd[4713]: symlink '../../sdb4' '/dev/disk/by-id/scsi-SViPowER_VP-89118_SD1__6RY0Y1VK-part4.udev-tmp' failed: Not a directory Oct 6 09:39:56 LS410D06E daemon.err udevd[4713]: symlink '../../sdb4' '/dev/disk/by-partlabel/primary.udev-tmp' failed: Not a directory Oct 6 09:39:56 LS410D06E daemon.err udevd[4713]: symlink '../../sdb4' '/dev/disk/by-partuuid/3bb43898-1321-4154-aac5-c7ff734f6335.udev-tmp' failed: Not a directory Oct 6 09:39:56 LS410D06E daemon.err udevd[4713]: symlink '../../sdb4' '/dev/disk/by-path/platform-ehci_marvell.0-usb-0:1:1.0-scsi-0:0:0:0-part4.udev-tmp' failed: Not a directory Oct 6 09:39:56 LS410D06E daemon.err udevd[4713]: symlink '../../sdb4' '/dev/disk/by-uuid/bf023385-a04c-4c84-aaf5-32ca4b1b03d7.udev-tmp' failed: Not a directory
[root@LS410D06E ~]# mkdir /tmp/root [root@LS410D06E ~]# mount /dev/sdb2 /tmp/root [root@LS410D06E ~]#
[root@LS410D06E ~]# (cd /tmp/root; tar cf - . )|(cd /mnt/disk1; tar xvf -) ./ ./srv/ ./media/ ./bin/ ./bin/mountpoint : : ./run/sendsigs.omit.d/ ./run/motd.dynamic ./run/network/ ./mnt/ [root@LS410D06E ~]#
[root@LS410D06E ~]# cd / [root@LS410D06E /]# umount /tmp/root
[root@LS410D06E ~]# cd /mnt/disk1/etc/ [root@LS410D06E etc]# cat fstab /dev/sda2 / xfs defaults,noatime 0 0 proc /proc proc defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/sda1 /boot ext3 defaults,noatime 0 1 /dev/sda4 /mnt xfs defaults,noatime 0 2 [root@LS410D06E etc]# vi fstab : : [root@LS410D06E etc]# cat fstab /dev/sda6 / xfs defaults,noatime 0 0 proc /proc proc defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/sda1 /boot ext3 defaults,noatime 0 1 [root@LS410D06E etc]#
initramfs から HDD を / にして起動する時に使用している swich_root を使ってみる。
[root@LS410D06E etc]# ls /sbin/switch_root /sbin/switch_root* [root@LS410D06E etc]# ls -l !$ ls -l /sbin/switch_root -rwxr-xr-x 1 root root 6624 Jul 5 00:43 /sbin/switch_root* [root@LS410D06E etc]#あるある。
[root@LS410D06E ~]# df Filesystem Size Used Available Use% Mounted on udev 10.0M 0 10.0M 0% /dev /dev/sda2 4.7G 837.0M 3.6G 18% / tmpfs 249.0M 76.0K 248.9M 0% /tmp /dev/ram1 15.0M 104.0K 14.9M 1% /mnt/ram /dev/sda1 968.8M 237.5M 731.2M 25% /boot /dev/disk1_6 283.8G 327.0M 283.4G 0% /mnt/disk1 [root@LS410D06E ~]# umount /dev umount: can't umount /dev: Device or resource busy [root@LS410D06E ~]# umount /tmp umount: can't umount /tmp: Device or resource busy [root@LS410D06E ~]# umount /mnt/ram umount: can't umount /mnt/ram: Device or resource busy [root@LS410D06E ~]# umount /boot [root@LS410D06E ~]# df Filesystem Size Used Available Use% Mounted on udev 10.0M 0 10.0M 0% /dev /dev/sda2 4.7G 837.0M 3.6G 18% / tmpfs 249.0M 76.0K 248.9M 0% /tmp /dev/ram1 15.0M 104.0K 14.9M 1% /mnt/ram /dev/disk1_6 283.8G 327.0M 283.4G 0% /mnt/disk1 [root@LS410D06E ~]#がー。ほとんどアンマウントできない
[root@LS410D06E ~]# /sbin/switch_root /mnt/disk1 /sbin/init switch_root: failed to mount moving /run to /mnt/disk1/run: Invalid argument switch_root: forcing unmount of /run Usage: init {-e VAR[=VAL] | [-t SECONDS] {0|1|2|3|4|5|6|S|s|Q|q|A|a|B|b|C|c|U|u}} [root@LS410D06E ~]# switch_root: failed to unlink mnt: Directory not empty [root@LS410D06E ~]#失敗。
[root@LS410D06E ~]# ls /mnt -sh: /bin/ls: No such file or directory [root@LS410D06E ~]# ls / -sh: /bin/ls: No such file or directory [root@LS410D06E ~]# pwd pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory [root@LS410D06E ~]# df -sh: df: command not found [root@LS410D06E ~]# [root@LS410D06E ~]# [root@LS410D06E ~]# [root@LS410D06E ~]#ふげぇ
switch_root は何をしてくれたの??
前途多難。。
|
← 敗北宣言(悲 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ HDD はどうなった? |
Copyright (C) 2003-2013 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市