Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 86673 Details for
Bug 111551
Request documentation: Additional storage guide
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
external-devices.xml
external-devices.xml (text/plain), 11.53 KB, created by
Łukasz Damentko (RETIRED)
on 2006-05-12 15:55:22 UTC
(
hide
)
Description:
external-devices.xml
Filename:
MIME Type:
Creator:
Łukasz Damentko (RETIRED)
Created:
2006-05-12 15:55:22 UTC
Size:
11.53 KB
patch
obsolete
><?xml version="1.0" encoding="UTF-8"?> ><!-- $Header$ --> ><!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> > ><guide link="/doc/en/external-devices.xml"> ><title>Gentoo Documentation Guide</title> > ><author title="Author"> > <mail link="diox@swords.be">Dimitry bradt</mail> ></author> > ><abstract> >This howto will show you how to use external (usb/firewire) storage devices. ></abstract> > ><!-- The content of this document is licensed under the CC-BY-SA license --> ><!-- See http://creativecommons.org/licenses/by-sa/2.5 --> ><license/> > ><version>1.0</version> ><date>2006-05-12</date> > ><chapter> ><title>HAL/pmount</title> ><section> ><title>Info</title> ><body> > ><p> >HAL is a hardware abstraction layer, which is a piece of software that provides >a view of the various hardware attached to a system. In addition to this, HAL >keeps detailed metadata for each piece of hardware and provides hooks such that >system and desktop-level software can react to changes in the hardware >configuration in order to maintain system policy. ></p> > ><p> >The most important goal of HAL is to provide plug-and-play facilities for >UNIX-like desktops with focus on providing a rich and extensible description of >device characteristics and features. One example of the functionality provided >by HAL is when you plug in a USB storage device. HAL can automatically create >an appropriate entry in the /etc/fstab file and create the corresponding mount >point in <path>/mnt</path>. Extra info: ><uri>http://www.ometer.com/hardware.html</uri> ></p> > ></body> ></section> ><section> ><title>configuring HAL</title> ><body> > ><p> >Before emerging the needed programs you should enable <c>KOBJECT_UEVENT</c> and ><c>CONFIG_HOTPLUG</c> in your kernel. Search after these options with <c>/</c>, >or adapt the <path>.config</path> located in ><path>/usr/src/linux/.config</path>. ></p> > ><pre caption="/usr/src/linux/.config"> ><var>KOBJECT_UEVENT=y</var> ><var>CONFIG_HOTPLUG=y</var> ></pre> > ><p> >Before emerging you need to enable the <c>hal</c> USE flag. ></p> > ><note> >You could also emerge <c>kde-base/kioslaves</c> with the <c>hal</c> USE flag. >KDE Has make some nice hal support. Read more at ><uri>http://wiki.kde.org/tiki-index.php?page=DBUS</uri> ></note> > ><pre caption="Enable 'hal' use flag"> ># <i>euse -E hal</i> ># <i>emerge -v hal dbus hotplug</i> ># <i>rc-update add dbus default</i> ># <i>/etc/init.d/dbus start</i> ># <i>rc-update add hald default</i> ># <i>/etc/init.d/hald start</i> ></pre> > ><p> >Instead of configuring our software; we could just use some applications to do >this for us. ></p> > ><pre caption="Autoconf software"> ># <i>echo "sys-apps/pmount ~x86" >> /etc/portage/package.keywords</i> ># <i>emerge -v pmount</i> ># <i>emerge -v ivman</i> ></pre> > ><note> >At this point you may test this by typing <c>media:/</c> in your Konqueror. >(You will need to insert an external storage device into your USB-port.) ></note> > ><note> >We put <c>sys-apps/ivman</c> in this howto because it gives the user a nice >pup-up window and asks the user where he'd like to mount the <e>new</e> >hardware. ></note> > ><p> >Now your window manager automatically asks you where he has to mount your >external devices. The only thing we could renice is let hal make symlinks of >our devices. We do this by making sure it is owned by group hal. ></p> > ><pre caption="/etc/udev/rules.d/hal.rules"> >BUS=="usb", >SYSFS{serial}=="123456789011121314", SYSFS{product}=="JUMPDRIVE",\ >KERNEL=="sd?1", NAME="%k", SYMLINK="usbdrive", GROUP="hal" >BUS=="usb", SYSFS{manufacturer}=="Sony", SYSFS{product}=="PSP Type A",\ >KERNEL=="sd?1", NAME="%k", SYMLINK="psp", GROUP="hal" >BUS=="usb", SYSFS{manufacturer}=="Apple", SYSFS{product}=="iPod",\ >KERNEL=="sd?2", NAME="%k", SYMLINK="ipod", GROUP="hal" ></pre> > ><p> >and also edit <path>/etc/fstab</path>: ></p> > ><pre caption="/etc/fstab"> >/dev/usbdrive /mnt/usbdrive auto noauto,rw,user 0 0 >/dev/ipod /mnt/ipod auto noauto,rw,user 0 0 >/dev/psp /mnt/psp auto noauto,rw,user 0 0 ></pre> > ></body> ></section> ></chapter> > ><chapter> ><title>External storage posibilities</title> ><section> ><title>Configuring the kernel</title> ><body> > ><p> >Make sure the options below are marked like said below in your kernel config >that is found at <path>/usr/src/linux/.config</path>. ></p> > ><note> >These kernel-options are just generally. You should really look fist at your ><c>lspci</c> output and see for yourself if you need OHCI or UHCI. The options >below are set for UHCI. ></note> > ><pre caption="configuring your kernel"> ># <i>vim /usr/src/linux/.config</i> >MSDOS_FS=y >VFAT_FS=y >BLK_DEV_SD=y >CHR_DEV_ST=y >CHR_DEV_SG=y >USB_STORAGE=y >USB_UHCI_HCD=y >USB_OHCI_HCD=n ></pre> > ></body> ></section> ><section> ><title>Build the kernel</title> ><body> > ><pre caption="Installing your new kernel"> ># <i>make</i> ># <i>mount /boot/</i> ># <i>cp arch/<const>your arch</const>/boot/bzImage ># /boot/linux-<const>$ver</const>-gentoo-<const>$release</const></i> ></pre> > ><p> >Now you should reboot and move further from this point after you reboot. ></p> > ></body> ></section> ><section> ><title>Checking if hotplug detected your devices well</title> ><body> > ><pre caption="Check dmesg"> ># <i>dmesg | grep usb-storage</i> ></pre> > ><pre caption="modprobe your device if not loaded"> >usb.c: USB device 4 (vend/prod 0xdda/0x2005) is not claimed by any active >driver. ></pre> > ><note> >If this happens, it means you did not configure your kernel well. You should >look at your lspci and restart from where you started after the reboot. ></note> > ><p> >You can do this automatically by putting your driver name in ><path>/etc/modules.autoload.d/kernel-2.{4|6}</path>. ></p> > ><pre caption="For scsi interface"> ># <i>emerge sg3_utils</i> ># Description: apps for querying the sg SCSI interface >(contains rescan_scsi_bus.sh) ></pre> > ><p> >And right after that: ></p> > ><pre caption="Mounting the drive"> ># <i>mkdir /mnt/usbstick</i> ># <i>mount -t vfat /dev/sda1 /mnt/usbstick</i> ></pre> > ><p> >If you can't mount then try the alternative kernel config above that enables >SCSI generic support. Then run the following that should give you the correct >device name. You can now mount with the correct name (Eg. ><path>/dev/sdb1</path>). You can also try with auto or msdos (for small cards) >as the filesystem type (<c>mount -t msdos /dev/x /mnt/x</c>). ></p> > ><pre caption="Looking for firewire devices"> ># <i>sg_scan -i</i> ># <i>sg_map</i> ></pre> > ></body> ></section> ></chapter> > ><chapter> ><title>Editing your fstab</title> ><section> ><title>Mounting your external usb-devices</title> ><body> > ><pre caption="/etc/fstab"> ># MY USB STICK >/dev/sda1 /mnt/stick vfat noauto,user,exec,sync 0 0 ></pre> > ><p> >Please note that you have to use vfat in the fstab file, because if you choose >auto you won't get the full name but only the first 8 chars. Add the option >"sync" to have synchronous changes between the actual usb mass storage device >and the place that it's been mounted. Otherwise it would be done while you >unmount it. This has the advantage of not losing data if you forgot to unmount >a device and also you would see how long it will take when you are transferring >data to it. You don't need to use vfat in the fstab file as long as ><path>/etc/filesystems</path> is set up properly. ></p> > ></body> ></section> ><section> ><title>Configuring your filesystems</title> ><body> > ><p> >Specifically, if vfat exists in <path>/etc/filesystems</path> before other fat >file systems or by itself with an asterisk on the last line, it will be tried >first during a mount. Read the mount (8) man page for more details. ></p> > ><pre caption="/etc/filesystems"> ># ># This file defines the filesystems search order used by a ># 'mount -t auto' command. ># ># Uncomment the following line if your modular kernel has vfat ># support and you want mount to try vfat. >vfat ># Uncomment the following line if your modular kernel has udf ># support and you want mount to try udf before iso9660. >udf ># Keep the last '*' intact as it directs mount to use the ># filesystems list available at /proc/filesystems also. ># Don't remove it unless you REALLY know what you are doing! ></pre> > ></body> ></section> ></chapter> > ><chapter> ><title>Mounting your Windows partitions</title> ><section> ><title>The different filesystem types</title> ><body> > ><pre caption="mount -t type device mountpoint"> ># <i>mount -t ntfs /dev/hda1 /mnt/win</i> ># <i>mount -t vfat /dev/hda2 /mnt/data</i> ></pre> > ></body> ></section> ><section> ><title>user permissions</title> ><body> > ><p> >On all three filesystems (MS-DOS, VFAT, NTFS), mount lets you pass the uid and >gid options, which let you set the user and group IDs of who the files are >chown'd to when the filesystem is mounted. To find out the values for uid and >gid, run <c>id $user</c>. ></p> > ><p> >umask: octal file permissions<br /> >You can change permissions using the parameter umask. But be aware that it must >be the bitmask of permissions that are not present for the mountpoint. It is an >octal number, formed like this: ></p> > ><ul> > <li> > Character '0': Indicates that this is an octal number, not decimal > </li> > <li>First digit: owner user permissions</li> > <li>Second digit: owner group permissions</li> > <li> > Third digit: world permissions (every other user on the system). > </li> ></ul> > ><note> >M | R W X >------------- >0 | * * * >1 | * * - >2 | * - * >3 | * - - >4 | - * * >5 | - * - >6 | - - * >7 | - - - ></note> > ><pre caption="/etc/fstab"> ># my windows partition >/dev/hda1 /mnt/ntfs ntfs uid=1000,gid=100 0 0 ></pre> > ><p> ><b>utf8</b><br /> >You may also add utf8 option, if you can't see some files with international >characters in filenames. ></p> > ><pre caption="/etc/fstab"> >/etc/fstab /dev/hda1 /mnt/vfat vfat ro,utf8 0 0 ></pre> > ><p> >For more options: ></p> > ><pre caption="See more?"> ># <i>man mount 8</i> ></pre> > ></body> ></section> ><section> ><title>Captive NTFS</title> ><body> > ><p> >We need <c>sys-fs/captive</c> (Description: Captive uses binary Windows drivers >for full NTFS r/w access.) to get this to work. For now Captive is masked so >you need to unmask it first: ></p> > ><pre caption="Unmasking captive"> ># <i>echo "sys-fs/captive ~x86" >> /etc/portage/package.keywords</i> ></pre> > ><p> >Let's emerge captive now: ></p> > ><pre caption="emerge captive"> ># <i>emerge captive</i> ></pre> > ><p> >Now load the appropriate kernel module and make it load at boot ></p> > ><pre caption="Loading the ap[ropriate kernel module"> ># <i>modules-update</i> ># <i>modprobe fuse</i> ># <i>echo "fuse" >> /etc/modules.autoload.d/kernel-2.6</i> ></pre> > ><p> >Congrats; Captive is now installed. To acquire the necessary filesystems >drivers you should run the following command to locate your ntfs drives in a >nice wizard. You should choose to download the appropriate drivers from ><uri>http://microsoft.com</uri> (You need a Windows SP2 license to do this >legal.) (It doens't matter if your partitions are mounted or not; The program >looks for itself after the right partitions.) Caution: you need X-windows for >this app. ></p> > ><pre caption="Acquiring the necessary filesystems"> ># <i>captive-install-acquire</i> ></pre> > ><p> >After you walked through the wizard you should now be able to mount your >windows partitions read/write. ></p> > ><pre caption="remount your windows partitions"> ># <i>umount /mnt/win</i> ># <i>mount -t captive-ntfs /dev/hda1 /mnt/win</i> ></pre> > ><p> >If the following works without errors you may want to put it in your /etc/fstab ></p> > ><pre caption="/etc/fstab"> >/dev/hda2 /windows captive-ntfs users 0 0 ></pre> > ><p> >Caution: You'll need to recompile fuse if you update your kernel! ></p> > ><pre caption="After kernel update"> ># <i>modprobe -r fuse</i> ># <i>emerge sys-fs/fuse</i> ># <i>modules-update</i> ># <i>modprobe fuse</i> ></pre> > ></body> ></section> ></chapter> ></guide>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 111551
:
86657
|
86658
|
86660
|
86661
|
86662
|
86663
|
86664
|
86665
|
86671
|
86672
|
86673
|
91810
|
91823
|
91834
|
91841
|
92348
|
92655
|
92656
|
92708
|
92712