LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 12-10-2015, 06:13 AM   #16
Kevin Williams
LQ Newbie
 
Registered: Dec 2015
Location: Earth
Distribution: Linux Lite 2.4
Posts: 10

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by pan64 View Post
you may enter the following char (2) as octal too. But actually if some automounter is in use you must not alter fstab to do the same thing again. You need to configure your automounter first.
Which automounter are you referring to the Ntfs configuration tool that's in my system which detects new partitions when launched and permits me to enable write support on the external hard drive ? Is that the automounter you're referring to pan64 ? You said I need to configure my automounter first. Well I did aand when I launched the ntfs configuration tool it has two options, "Enable write support for external device [referring to the external hard drive]" and "Enable write support for internal device [referring to the internal hard drive]". I clicked on "Enable write support for external device" to enable write support on the external ahrd drive disk. I also clicked on "Enable write support for internal device" to enable write support on the internal hard drive. This I did from the live usb from which I'm typing this.

What's next then, with the external hard drive connected to my pc, mount the internal drive as root like this:

sudo mkdir /mnt/temp
sudo mount /dev/sda1 /mnt/temp
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt/temp$i; done
sudo cp /etc/resolv.conf /mnt/temp/etc/resolv.conf
sudo chroot /mnt/temp [then press enter]

which results in the root prompt: root@linux:/#

Then create the mount folders for Samsung 1 and Samsung 2. If so then please give me the proper commands ?

Last edited by Kevin Williams; 12-10-2015 at 07:34 AM.
 
Old 12-10-2015, 07:50 AM   #17
Kevin Williams
LQ Newbie
 
Registered: Dec 2015
Location: Earth
Distribution: Linux Lite 2.4
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TxLonghorn View Post
No - that mkdir command will not work.
sudo mkdir /media/el-junior/Samsung 2 will create a directory named Samsung, and a second directory named 2.
It will not create a directory named Samsung 2
It is better to eliminate the space - sudo mkdir /media/el-junior/Samsung2
If you absolutely have to have "Samsung 2" the command would be:
sudo mkdir /media/el-junior/"Samsung 2"
Oookay ! buddy now I get it but why because when I typed sudo mkdir /media/el-junior/Samsung_1 instead of sudo mkdir /media/el-junior/"Samsung 1" and sudo mkdir /media/el-junior/Samsung _2 instead of sudo mkdir /media/el-junior/"Samsung 2" It created duplicate mounting points for both partitions. That's why when I connected the external hard drive to my pc it showed double mount points on the desktop. Samsung 1 Samsung 2 and then underneath Samsung_1 and Samsung_2. Know what I mean ? Get it ? Remember, I'm trying to register an external hard drive that can auto mount correctly if connected but doesn't have entries in in etc/fstab. I'm almost afraid of going through this again because even though the external hard drive mounted correctly when I hooked it to the system, it hanged at boot once I disconnected the drive. I latter found out that it was because I hadn't used the "noauto" option after "nobootwait" so that if the external hard drive was not present the system would still boot up. If you had been more clearer about that last point you made in your first post in message #4, and would've posted both sudo commands for both partitions like this sudo mkdir /media/el-junior/"Samsung 1" and sudo mkdir /media/el-junior/"Samsung 1" then I would have followed through.

Last edited by Kevin Williams; 12-10-2015 at 09:13 AM.
 
Old 12-11-2015, 11:48 AM   #18
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
I had to go back to the beginning to refresh my memory of what you wanted to do.
You said,
Quote:
What I'd like to do is write two entries in fstab for the two partitions that are in the external hard drive so that every time I connect this device it mounts where it should without messing up the system.
Entries in fstab will mount the external drives if they are connected during boot. Entries in fstab will not automatically mount the drives if they are plugged in after the system boots. (You can run the command "sudo mount -a" to do it, but it does not happen automatically.)
If an external drive is connected after the system boots, they will be mounted by the operating system without referencing fstab, so they will mount at /media/el-junior/Samsung 1 and /media/el-junior/Samsung 2. The reason you see /media/el-junior/Samsung 2 is because it is mounted using the partition Label - which is "Samsung 2".
On the other hand, if they are already connected before booting, fstab will mount them at the mount point specified in fstab - I think you said you put /media/el-junior/Samsung_2 - right?
Maybe the command "sudo mount -a" is what you were looking for.
If the drives are plugged in, but not mounted, "sudo mount -a" will mount them according to the instructions in fstab.
Now, you understand the 2 different mounts:
1) You plug in the drive and the operating system mounts it at /media/el-junior/Samsung 2 - because "Samsung 2" is the partition Label.
2) If the drives are already plugged in when you boot, fstab mounts them at the location specified in fstab - /media/el-junior/Samsung_2
 
Old 12-12-2015, 02:18 AM   #19
Kevin Williams
LQ Newbie
 
Registered: Dec 2015
Location: Earth
Distribution: Linux Lite 2.4
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks for sticking around Longhorn, your latest posts put everything in a clear perspective [in my mind] and has showed my me how Linux handles external hard drives. So according to you I can write fstab entries for the mount points the system creates each time I connect the external hard drive to the system. So here's what I'm gonna to next, I'm going to formerly introduce myself to the devs in the Linux Lite forum [maybe buddy up with them] to get them to give me the proper fstab entries for my external hard drive including the correct 3 digit encoding digits assigned to the drive, in order to prevent myself from having to fix the system over again. Why ? because it's easy to write in the wrong fstab entries, and, possibly break the system which is a hassle to restore. Again, I appreciate you sticking around and I'll see how it goes.

Last edited by Kevin Williams; 12-12-2015 at 02:37 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot mount External Hard Drive - fstab error scottaudio Linux - Software 14 09-18-2014 06:38 AM
Question on External Drive Mount Points ervt Linux - General 1 04-15-2008 06:03 PM
creating mount points on the unused Hard disk after installation of RedHat Linux ES 4 vamsikatakam Linux - Enterprise 4 03-21-2007 12:55 PM
Mount points on usb devices (dig. camera, zip drive, external hard disk) Impaler Linux - Hardware 3 05-29-2006 11:08 PM
8 mount points on hard drive? drtydane Linux - Newbie 3 12-15-2005 09:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration