LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Help mounting a USB HD (https://www.linuxquestions.org/questions/linux-hardware-18/help-mounting-a-usb-hd-211635/)

Kyral Retsam 07-30-2004 06:18 PM

Help mounting a USB HD
 
Okay, this is a stupid question, but what do I add to my fstab so I can mount my USB HD? Linux detects both its partitions (One NTFS, the other Ext2) on /dev/sda1 and /dev/sda2, but when I type "mount /dev/sda2" I get "mount: can't find /dev/sda2 in /etc/fstab or /etc/mtab" but I don't know what to add to my fstab...

Andrew Benton 07-30-2004 08:00 PM

You don't need to put an entry in fstab if you tell the kernel where to mount it. If you make a folder /mnt/usb2 you can mount it there.
mount /dev/sda2 /mnt/usb2
if you want to automatically mount it when you reboot you could put something like this in /etc/fstab, but you might get an error if it's not plugged in when you reboot.
/dev/sda1 /mnt/usb1 ntfs umask=0 0 0
/dev/sda2 /mnt/usb2 ext2 defaults 1 1
I use the supermount patch to allow users to mount removable media. All my USB things (camera, mp3 player, portable hard disk) get mounted on /dev/sda1 so this entry in /etc/fstab catches them all
none /mnt/mp3 supermount dev=/dev/sda1,fs=auto,--, 0 0


All times are GMT -5. The time now is 09:05 PM.