Pumpernickel
asked on
Linux auto mount second drive
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=c211da5c-e709-4975-af51-4b96128 7f0dc / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
#UUID=ee6d75c3-ba7c-4518-af06-b1016d 6f02e4 none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
I'm trying to auto mount /etc/sdb . What would I have to add for it to do this?
Hi
You can also mount it by uuid.
ls -al /dev/disk/by-uuid/ | grep sdb
You will see the uuid points to the specific partition like
0841fc25-19b1-4d6e-aeb5-3c 1013648450 -> ../../sdb1
Then you can add it to /etc/fstab
0841fc25-19b1-4d6e-aeb5-3c 1013648450 /YOURMOUNTPOINT ext4 errors=remount-ro 0 1
You can also mount it by uuid.
ls -al /dev/disk/by-uuid/ | grep sdb
You will see the uuid points to the specific partition like
0841fc25-19b1-4d6e-aeb5-3c
Then you can add it to /etc/fstab
0841fc25-19b1-4d6e-aeb5-3c
ASKER
wesly chan: I tried this but when I boot up, it gives me an error that the file system on that hdd2 isn't ex4. This is a windows drive, so can I do:
/dev/sdb1 /HDD2 ntfs errors=remount-ro 0 1
/dev/sdb1 /HDD2 ntfs errors=remount-ro 0 1
can you post
fdisk -l /dev/sdb
fdisk -l /dev/sdb
ASKER
You mean
fdisk -l /dev/sdb1
???? or would it be sdb
fdisk -l /dev/sdb1
???? or would it be sdb
No
fdisk -l /dev/sdb
not sdb1
fdisk -l /dev/sdb
not sdb1
ASKER
sudo fdisk -l /dev/sdb
Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf26953d4
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2 13 38914 312466432 7 HPFS/NTFS
Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf26953d4
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2 13 38914 312466432 7 HPFS/NTFS
Does this command work?
mkdir -p /ntfs1 /ntfs2
# mount /dev/sdb1 /ntfs1
What's your Linux distribution? RedHat/CentOS 5.x, Ubuntu 10.x, Fedora, OpenSuSE?
mkdir -p /ntfs1 /ntfs2
# mount /dev/sdb1 /ntfs1
What's your Linux distribution? RedHat/CentOS 5.x, Ubuntu 10.x, Fedora, OpenSuSE?
ASKER
Ubuntu 11.04
sudo apt-get install ntfs-config
Then
sudo mount -t ntfs /dev/sdb1 /ntfs1
or
sudo mount -t ntfs-3g /dev/sdb1 /ntfs1
and which one works for you?
Then
sudo mount -t ntfs /dev/sdb1 /ntfs1
or
sudo mount -t ntfs-3g /dev/sdb1 /ntfs1
and which one works for you?
ASKER
christopher@cmbubuntu:~$ sudo mount -t ntfs /dev/sdb1 /ntfs1
[sudo] password for christopher:
fuse: failed to access mountpoint /ntfs1: No such file or directory
christopher@cmbubuntu:~$ sudo mount -t ntfs-3g /dev/sdb1 /ntfs1
fuse: failed to access mountpoint /ntfs1: No such file or directory
christopher@cmbubuntu:~$
[sudo] password for christopher:
fuse: failed to access mountpoint /ntfs1: No such file or directory
christopher@cmbubuntu:~$ sudo mount -t ntfs-3g /dev/sdb1 /ntfs1
fuse: failed to access mountpoint /ntfs1: No such file or directory
christopher@cmbubuntu:~$
> fuse: failed to access mountpoint /ntfs1: No such file or directory
Please read this carefully.
https://www.experts-exchange.com/questions/27242910/Linux-auto-mount-second-drive.html?cid=1572&anchorAnswerId=36355065#a36355065
Please read this carefully.
https://www.experts-exchange.com/questions/27242910/Linux-auto-mount-second-drive.html?cid=1572&anchorAnswerId=36355065#a36355065
ASKER
sudo mount -t ntfs /dev/sdb1 /ntfs1
command worked. I'm going to reboot to see if it auto mounts
command worked. I'm going to reboot to see if it auto mounts
ASKER
It didn't auto mount.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
/ntfs1/ folder contains my ntfs partition files. Thanks!!!!!!!!!!!!!!!!!!!! !!!
ASKER
I mean /ntfs2/ folder has my ntfs partition files.
fdisk /dev/sdb
2. added into /etc/fstab
/dev/sdb1 /HDD2 ext4 errors=remount-ro 0 1