Connecting àn external harddisk via usb to Redhat Linux
Sorry if this has been asked before, but I couldn't find it.
I am a Linux newbie. I'm logged in as root to an installation of Red Hat Enterprise ES (2.4.21-4 EL). I didn't install it. There don't seem to be that many useful tools around and I'm not familiar with working at the terminal? prompt. I've connected an external hard disk by a usb port. It's got an ntfs primary partition. I want to copy some files into a partition. I can open the directory I want to copty the files into, I know drag and drop works! I can't find the USB partition anywhere! Should it be somewhere like /dev/, it isn't. Should it be somewhere like /mnt/, it isn't. If there was something like disk administrator/management I'd be able to see where it was, but there isn't. Help! |
On my CentOS5 box (the equivalent of RH5), a usb drive appears as /dev/sdc or similar. This then needs to be mounted at the relevant spot
I use mount -a /dev/sdc /mnt/usb but I guess you would need to use mount -t ntfs /dev/sdc /mnt (replace the relevant drive for sdc) You should then be able to copy across Note - fdisk -l should give you an idea of what device your usb drive is |
Quote:
|
The mount command posted above isn't quite right because the device of a partition will look like /dev/sdc1 for the first partition on the /dev/sdc drive.
You can enter the root command "fdisk -l" to list the partitions detected. Since this is an ntfs drive, you might consider re-formatting it to another filesystem if you aren't using this drive for an xp computer. The vfat filesystem is better for sharing files between windows and Linux. A native filesystem should be used if you use drive for Linux. Otherwise, check if you have the ntfs kernel module loaded: /sbin/lsmod | grep ntfs You may need to load the kernel module if not: sudo /sbin/modprobe ntfs Another way to find out which device is used is to monitor the kernel messages and then plug in the usb cable. sudo tail -f /var/log/messages It should mention which device was used. Of course you could simply list the possible devices: ls /dev/sd* Typing "mount" by itself will show you which devices are currently mounted, so a process of elimination should tell you which device it is. |
Quote:
BTW is there a quick way of repeating what you type in a terminal window? Like f8 in windows? There is a problem however which is it says fs type ntfs not supported by the kernel |
Quote:
It looks like its not been included as when issuing the above command (do I need sudo as I'm logged in as root?) I get Can't locate module ntfs |
jschiwal, the command works fine for a typical fat drive with only one partition (that is how I mount mine), but point taken
|
jasee, linux is way better than windows for repeats. Hit the up arrow key - page up takes you to the first retained entry, page down to the last. How many depends on the distro, but there are 10's of previous commands available.
Rgds |
Quote:
|
You don't use sudo if you are root. I will use sudo as a regular user to mount directories, but I must admit that I will su to root before examining log files in /var/log. Are you certain that you didn't use capital letters when you tried "modprobe ntfs".
I'm not familiar with your version of Red Hat. At one time, with Fedora Core 1, ntfs support was not enabled in the kernel by default. Since you didn't install it yourself, it could also be the case that the compiler was compiled from source by the previous user. You might want to search in the kernel's configuration file. If the kernel source is installed, look at the .config file. If this is the stock kernel, there may be a copy in /boot called config-<version>. Also if enabled there may be a /proc/config.gz file: "zcat /proc/config.gz | grep NTFS". Below is how my stock SuSE kernel is configured for NTFS: If you want to write to the drive as well, use ntfs-3g as the filetype instead of ntfs. I think you need to first modprobe the fuse module, I'm not certain whether you need the ntfs module if you use ntfs-3g. Code:
# DOS/FAT/NT Filesystems --- I just mounted the Windows XP partition on my harddrive. It is /dev/sda1, and the mount-point is /mnt/xp. Code:
sudo mount -t ntfs-3g /dev/sda1 /mnt/xp -o rw,uid=jschiwal,gid=jschiwal,fmask=0117,dmask=0007 Code:
/dev/sda1 on /mnt/xp type fuseblk (rw,nosuid,nodev,noatime,allow_other,default_permissions,blksize=4096) Good Luck! |
Quote:
So it looks as though I have to "recompile the kernel", whatever that is? Help! |
hi jasee,
I understand you are a newbie.... I will put it simply - you donot have ntfs support in your default linux instln (kernel) . Either you fix it or get a new kernel. If you wish to upgrade your kernel let me know , I will walk you through that and you will have ntfs support. Then you can think of the fdisk -l and the partition stuff to mount it. bye nishith |
Quote:
(not get a new kernel as this means a whole new version?, which I don't want). I did realise that I (the operating system) didn't have ntfs support. I don't know whether it's important, but I don't have any disks. |
yeah sound's difficult at first but trust me it's simple.
Just go to kernel.org site and download the linux-2.6.22.6.tar.bz2 file from it. This is all you need. Then cd to /usr/src and execute the following command tar -jxvf linux-2.6.22.6.tar.bz2 A lot of things will scroll past on your screen and when that stops you will have a dir linux-2.6.22.6 under /usr/src cd to the dir and do the following make menuconfig it shall open up a menu driven program now scroll down to the filesystems item in the list and navigate in it to find out the FAT32 and NTFS support . you got to press Y to enable it. once you are done just save and exit. the commands to navigate and save and exit can be easily found by reading the prompts at the end of the screen. next do make this will take some time and things will go past your screen next do make modules next make modules_install next make install that's all reboot your system, you will see in grub or lilo a option called linux-2.6.22.6 just choose it and boot up you are almost there and if you have been able to do this much get back here and we shall see you through the rest. Is that okay ? nishith |
Quote:
Can you tell me what I'm doing after this step, am I replacing the kernel or will I be able to boot into the alternative configurations when I boot up? |
All times are GMT -5. The time now is 03:14 AM. |