お知らせ

  • 利用規約を守って投稿してください。また、よくある質問および投稿の手引きも参照してください。
  • メッセージの投稿にはアカウントが必要です。未登録の方は、ユーザ登録ページからアカウントを作成することができます。

#1 2006-11-02 18:27:42

oryaaaaa
メンバ
From: Aichi, Japan
登録日: 2006-10-31

USBのHDDデバイス名称を変えるには?

USB HDDを利用するにあたって、大きな問題は /dev/sdN と同じ名称で
ブート時管理されるために、未知のPC環境に接続したとき問題が発生しうる
ことです。

現在私の環境ではNvidiaのチップセットで、IDEとSATAが有効になってます。
今後SATA中心になっていくため、SCSIとして認識してるラインを探しにいく
方法が恐くなってます。

カーネル起動後の処理手続きで、指定したデバイス名称でなければ
ファイルシステムとしてアクセスしない、そういうコードはあるのでしょうか?

ここからUSB機器の認証が始まります(SATAドライブに異常があると困るのでSATAを無効にしてます)
[17179583.040000] usbcore: registered new driver usbfs
[17179583.040000] usbcore: registered new driver hub
[17179583.040000] ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
[17179583.040000] ACPI: PCI Interrupt Link [APCF] enabled at IRQ 23
[17179583.040000] ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [APCF] -> GSI 23 (level, low) -> IRQ 201
[17179583.040000] PCI: Setting latency timer of device 0000:00:0b.0 to 64
[17179583.040000] ohci_hcd 0000:00:0b.0: OHCI Host Controller
[17179583.040000] ohci_hcd 0000:00:0b.0: new USB bus registered, assigned bus number 1
[17179583.056000] forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.54.
[17179583.060000] ieee1394: Initialized config rom entry `ip1394'
[17179591.040000] ohci_hcd 0000:00:0b.0: USB HC takeover failed!  (BIOS/SMM bug)
[17179591.040000] ohci_hcd 0000:00:0b.0: can't setup
[17179591.040000] ohci_hcd 0000:00:0b.0: USB bus 1 deregistered
[17179591.040000] ACPI: PCI interrupt for device 0000:00:0b.0 disabled
[17179591.040000] ohci_hcd 0000:00:0b.0: init 0000:00:0b.0 fail, -16
[17179591.040000] ohci_hcd: probe of 0000:00:0b.0 failed with error -16
[17179591.040000] ACPI: PCI Interrupt Link [APCL] enabled at IRQ 22
[17179591.040000] ACPI: PCI Interrupt 0000:00:0b.1[b] -> Link [APCL] -> GSI 22 (level, low) -> IRQ 209
[17179591.040000] PCI: Setting latency timer of device 0000:00:0b.1 to 64
[17179591.040000] ehci_hcd 0000:00:0b.1: EHCI Host Controller
[17179591.040000] ehci_hcd 0000:00:0b.1: new USB bus registered, assigned bus number 1
[17179591.040000] ehci_hcd 0000:00:0b.1: debug port 1
[17179591.040000] PCI: cache line size of 64 is not supported by device 0000:00:0b.1
[17179591.040000] ehci_hcd 0000:00:0b.1: irq 209, io mem 0xfe02e000
[17179591.040000] ehci_hcd 0000:00:0b.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[17179591.040000] usb usb1: configuration #1 chosen from 1 choice
[17179591.040000] hub 1-0:1.0: USB hub found
[17179591.040000] hub 1-0:1.0: 8 ports detected
[17179591.144000] ACPI: PCI Interrupt Link [APCH] enabled at IRQ 21
[17179591.144000] ACPI: PCI Interrupt 0000:00:14.0[A] -> Link [APCH] -> GSI 21 (level, low) -> IRQ 217
[17179591.144000] PCI: Setting latency timer of device 0000:00:14.0 to 64
[17179591.144000] forcedeth: using HIGHDMA
[17179591.384000] usb 1-1: new high speed USB device using ehci_hcd and address 2
[17179591.516000] usb 1-1: configuration #1 chosen from 1 choice
[17179591.516000] hub 1-1:1.0: USB hub found
[17179591.516000] hub 1-1:1.0: 4 ports detected
[17179591.664000] eth0: forcedeth.c: subsystem: 0105b:0caf bound to 0000:00:14.0
[17179591.664000] ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19
[17179591.664000] ACPI: PCI Interrupt 0000:03:06.0[A] -> Link [APC4] -> GSI 19 (level, low) -> IRQ 225
[17179591.712000] ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[225]  MMIO=[fdbff000-fdbff7ff]  Max Packet=[2048]  IR/IT contexts=[4/8]
[17179591.860000] usb 1-4: new high speed USB device using ehci_hcd and address 3
[17179591.992000] usb 1-4: configuration #1 chosen from 1 choice
[17179592.232000] usb 1-5: new high speed USB device using ehci_hcd and address 4
[17179592.376000] usb 1-5: configuration #1 chosen from 1 choice
[17179592.944000] usb 1-1.3: new full speed USB device using ehci_hcd and address 7
[17179592.984000] ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00016c200011edb1]
[17179593.040000] usb 1-1.3: configuration #1 chosen from 1 choice
[17179593.244000] usb 1-1.4: new low speed USB device using ehci_hcd and address 8
[17179593.348000] usb 1-1.4: configuration #1 chosen from 1 choice
[17179593.352000] usbcore: registered new driver libusual
[17179593.352000] usbcore: registered new driver hiddev
[17179593.352000] Initializing USB Mass Storage driver...
[17179593.352000] scsi0 : SCSI emulation for USB Mass Storage devices
[17179593.352000] usb-storage: device found at 3
[17179593.352000] usb-storage: waiting for device to settle before scanning
[17179593.352000] scsi1 : SCSI emulation for USB Mass Storage devices
[17179593.352000] usb-storage: device found at 4
[17179593.352000] usb-storage: waiting for device to settle before scanning
[17179593.356000] input: Topre Corporation Realforce 106 as /class/input/input0
[17179593.356000] input: USB HID v1.11 Keyboard [Topre Corporation Realforce 106] on usb-0000:00:0b.1-1.3
どうでもいいことですが「リアルフォース派」です
[17179593.360000] usbcore: registered new driver usb-storage
[17179593.360000] USB Mass Storage support registered.
[17179593.368000] input: Microsoft Microsoft Trackball Explorerョ as /class/input/input1
[17179593.368000] input: USB HID v1.00 Mouse [Microsoft Microsoft Trackball Explorerョ] on usb-0000:00:0b.1-1.4
どうでもいいはなしですが「トラックボール派」です
[17179593.368000] usbcore: registered new driver usbhid
[17179593.368000] drivers/usb/input/hid-core.c: v2.6:USB HID core driver
[17179598.352000] usb-storage: device scan complete
[17179598.352000] usb-storage: device scan complete
[17179598.352000]   Vendor: HTS54104  Model: 0G9AT00           Rev: MB2O
[17179598.352000]   Type:   Direct-Access                      ANSI SCSI revision: 00
[17179598.356000]   Vendor: Generic   Model: STORAGE DEVICE    Rev: 9228
[17179598.356000]   Type:   Direct-Access                      ANSI SCSI revision: 00
[17179598.360000] SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
[17179598.360000] sda: Write Protect is off
[17179598.360000] sda: Mode Sense: 00 14 00 00
[17179598.360000] sda: assuming drive cache: write through
[17179598.360000]   Vendor: Generic   Model: STORAGE DEVICE    Rev: 9228
[17179598.364000]   Type:   Direct-Access                      ANSI SCSI revision: 00
[17179598.364000] SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
[17179598.364000] sda: Write Protect is off
[17179598.364000] sda: Mode Sense: 00 14 00 00
[17179598.364000] sda: assuming drive cache: write through
ここでHDDドライブはアクセスLEDの点滅を始めます、永遠に
sdaのラインにはNTFSのRAID用HDDが2基ストライピング状態で電源ONの待機状態になってます
でもSATAのBIOS設定とRAIDのBIOS設定をDisableにしています。

いったんUSBケーブルを外します。そして取り付けます
[17179598.364000]  sda:<6>usb 1-4: USB disconnect, address 3
[17179618.648000] sd 0:0:0:0: SCSI error: return code = 0x10000
[17179618.648000] end_request: I/O error, dev sda, sector 0
[17179618.648000] Buffer I/O error on device sda, logical block 0
[17179618.648000] sd 0:0:0:0: rejecting I/O to device being removed
[17179618.648000] Buffer I/O error on device sda, logical block 0
[17179618.648000]  unable to read partition table
[17179618.648000] sd 0:0:0:0: Attached scsi disk sda
[17179618.656000] sd 1:0:0:0: Attached scsi removable disk sda
[17179618.660000] sd 1:0:0:1: Attached scsi removable disk sdb
[17179625.152000] usb 1-4: new high speed USB device using ehci_hcd and address 9
[17179625.296000] usb 1-4: configuration #1 chosen from 1 choice
[17179625.296000] scsi2 : SCSI emulation for USB Mass Storage devices
[17179625.296000] usb-storage: device found at 9
[17179625.296000] usb-storage: waiting for device to settle before scanning
[17179630.296000] usb-storage: device scan complete
[17179630.300000]   Vendor: HTS54104  Model: 0G9AT00           Rev: MB2O
[17179630.300000]   Type:   Direct-Access                      ANSI SCSI revision: 00
[17179630.300000] SCSI device sdc: 78140160 512-byte hdwr sectors (40008 MB)
[17179630.304000] sdc: Write Protect is off
[17179630.304000] sdc: Mode Sense: 00 14 00 00
[17179630.304000] sdc: assuming drive cache: write through
[17179630.304000] SCSI device sdc: 78140160 512-byte hdwr sectors (40008 MB)
[17179630.308000] sdc: Write Protect is off
[17179630.308000] sdc: Mode Sense: 00 14 00 00
[17179630.308000] sdc: assuming drive cache: write through
[17179630.308000]  sdc: sdc1 sdc2 sdc3 sdc4
正しい状態で認識しました

オフライン

 

#2 2006-11-02 21:29:48

oryaaaaa
メンバ
From: Aichi, Japan
登録日: 2006-10-31

Re: USBのHDDデバイス名称を変えるには?

forum.ubuntu.orgでも、同じことを聞いてみます。

オフライン

 

#3 2006-11-04 13:39:00

gmax
メンバ
From: 兵庫県
登録日: 2006-10-24

Re: USBのHDDデバイス名称を変えるには?

edgyの/etc/fstabの記述が変わってることから、調べた途中経過なんですが、moutでは従来の/dev/sd*のような形ではなくGUID形式でのデバイス指定が可能です。ディスクの一意なIDを指定することで、デバイス名の変動があっても起動をすることが可能になります。もし参考になれば。

http://d.hatena.ne.jp/gmaxlab/20061104/1162609696

オフライン

 

#4 2006-11-04 18:05:59

oryaaaaa
メンバ
From: Aichi, Japan
登録日: 2006-10-31

Re: USBのHDDデバイス名称を変えるには?

vstab がこうなってたら

# /dev/sdc3
UUID=c184cff1-8097-45a2-b053-82a62361d081 /               ext2    defaults,errors=remount-ro 0       1
# /dev/sdc1
UUID=8cbac0a8-6701-49cd-a16e-a54c5c34ef89 /boot           ext2    defaults        0       2
# /dev/sdc2
UUID=feb53137-efcf-4d7b-8ae0-bf03536fb11d none            swap    sw              0       0

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=c184cff1-8097-45a2-b053-82a62361d081 ro
# kopt_2_6=root=/dev/sdc3 ro
このように書いてあるため

title        Ubuntu, kernel 2.6.17-10-generic
root        (hd0,0)
kernel        /vmlinuz-2.6.17-10-generic root=UUID=c184cff1-8097-45a2-b053-82a62361d081 ro quiet splash locale=ja_JP
#kernel          /vmlinuz-2.6.17-10-generic root=/dev/sdc3 ro locale=ja_JP
initrd        /initrd.img-2.6.17-10-generic
savedefault
boot

このように書けばHDDを特定してデバイス状態によらず起動できるようです。
/dev/sdc3 から書き換えて起動しましたが、問題ありませんでした。
でもUSBケーブルを抜くと言う回避は必要でした。

オフライン

 

#5 2006-11-09 00:31:57

oryaaaaa
メンバ
From: Aichi, Japan
登録日: 2006-10-31

Re: USBのHDDデバイス名称を変えるには?

USB-HD boot stop by 2 sata hdd - Ubuntu Forums
http://www.ubuntuforums.org/showthread.php?p=1731467

分かる限りの部分、カーネル再構築などやってみて、それでも問題解決に
ならなかったので質問を投稿しました。

オフライン

 

Board footer

Powered by FluxBB