You are Here:
Download Linux Lite 5.4 RC1 today - See Release Announcements



Can I Mount HD on Startup?

Author (Read 4418 times)

0 Members and 1 Guest are viewing this topic.

Can I Mount HD on Startup?
« on: November 08, 2014, 07:47:15 PM »
 

CaperAsh

  • Occasional Poster
  • **
  • 80
    Posts
  • Country: mx
  • Reputation: 1
  • Retired

  • Linux Lite: 4.2 64bit
I have system(s) on 128GB SSD. Most files and data are on 1 TB HD. I would like this to mount automatically each time on startup rather than having to mount manually, input PW etc. each time.

Is this possible and if so how?
Last Edit: February 10, 2015, 11:12:45 AM by Scott(0)
 


Re: can I mount HD on startup?
« Reply #1 on: November 08, 2014, 09:29:35 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 7913
    Posts
  • Country: nz
  • Reputation: 744
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 5.2 64bit

  • CPU: Intel Xeon Dual CPU's E5645 2.4GHz 12 Cores

  • MEMORY: 16Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
Covered in the Help Manual under - Install Guide, Mounting drives & partitions. I'm assuming that drive uses ntfs, if so follow the ntfs guide.
 

Re: can I mount HD on startup?
« Reply #2 on: November 09, 2014, 03:22:16 PM »
 

CaperAsh

  • Occasional Poster
  • **
  • 80
    Posts
  • Country: mx
  • Reputation: 1
  • Retired

  • Linux Lite: 4.2 64bit
Yes, it is covered, but I have been unable - after many attempts - to do it. I also installed Disks and tried a GUI solution but that didn't work either. Frustrating since I did it successfully a few days ago but cannot find the right search result which walked me through it.

I am sure the problem involves a little word here or there. I am simply trying to have my main data HD mounted automatically at startup. It's a 1 TB Sata Drive. Here is the blk output:
dev/sda1: UUID="7886cc4c-02f0-4dff-a51f-98338d1daf9f" TYPE="ext4"
/dev/sda2: UUID="222cd123-de88-46e2-917e-3d0b12a910cf" TYPE="ext4"
/dev/sda3: UUID="22f4d75f-62b5-4a23-94e8-5b4691e3783a" TYPE="ext4"
/dev/sda5: LABEL="XTRA" UUID="681b604c-0dad-43b4-9fdc-731290644acb" TYPE="ext4"
/dev/sda6: UUID="455af578-e1c7-437f-a5c8-338440805338" TYPE="swap"
/dev/sdb1: LABEL="BIG HD" UUID="2d15b124-0435-43ad-a876-18cac765f7e3" TYPE="ext4"


Could someone kindly write out the line I need to insert into fstab?
The only example in the manual is for the Home folder. (It would be helpful to have several examples and that way you can better understand how the language works and actually understand what you are inputting vs. simply copying and pasting.

This is what I attempted last which didn't work at all:

# BIG HD by Ash on /dev/sdb1 during installation
UUID=2d15b124-0435-43ad-a876-18cac765f7e3/    ext4   discard, defaults   0   3



Thanks in advance.
 

Re: can I mount HD on startup?
« Reply #3 on: November 09, 2014, 04:00:10 PM »
 

CaperAsh

  • Occasional Poster
  • **
  • 80
    Posts
  • Country: mx
  • Reputation: 1
  • Retired

  • Linux Lite: 4.2 64bit
I think I now understand that I didn't input the mount point correctly, but don't know how to determine what that should be.

Could that mount point be: 
/media/BIG HD

?
 

Re: can I mount HD on startup?
« Reply #4 on: November 09, 2014, 04:01:13 PM »
 

bobw

  • Occasional Poster
  • **
  • 85
    Posts
  • Country: 00
  • Reputation: 19
  • Linux Lite Member

  • Linux Lite: 3.0 64bit
A drive can be mounted at startup by crontab using the command:
@reboot mount -------
 

Re: can I mount HD on startup?
« Reply #5 on: November 09, 2014, 04:11:12 PM »
 

CaperAsh

  • Occasional Poster
  • **
  • 80
    Posts
  • Country: mx
  • Reputation: 1
  • Retired

  • Linux Lite: 4.2 64bit
thxs bobw, but that's over my experience level to know what to put instead of ---- !

I changed it to the above and it didn't reboot.
Although the drive name displays as BIG HD, it has to be BIGHD in fstab. I noticed in the text display whilst booting up in recovery mode that it had an error trying to mount the drive BIG. So luckily, by simply erasing out the space, now it works.

So NOW I can make a system backup file with this clean install which has all basic programs running and simple things like being able to have the Data HD mount on startup so that programs which reference folders/files therein will work immediately without my having to remember to manually mount the HD, enter PW etc. etc.

Thank you for help.
 

Re: can I mount HD on startup?
« Reply #6 on: November 09, 2014, 04:50:41 PM »
 

bobw

  • Occasional Poster
  • **
  • 85
    Posts
  • Country: 00
  • Reputation: 19
  • Linux Lite Member

  • Linux Lite: 3.0 64bit
Glad you've solved it, CaperAsh.

Re your question about what to put instead of -----, when you mount a drive by right-clicking the desktop icon or selecting it in Thunar, the system, by default, creates a directory in /media/user using the drive label as the directory name, then mounts the drive at that point.  If you want to mimic that, and assuming that you are user CaperAsh, the mount point should be /media/CaperAsh/BIG HD.

If using crontab as I suggested, you would need two commands in the root crontab:
@reboot mkdir /media/CaperAsh/"BIG HD"/
@reboot mount /dev/sdb1 /media/CaperAsh/"BIG HD"/

The inverted commas in the commands are needed because of the space in the directory name.
 

Re: can I mount HD on startup?
« Reply #7 on: November 10, 2014, 01:08:27 PM »
 

CaperAsh

  • Occasional Poster
  • **
  • 80
    Posts
  • Country: mx
  • Reputation: 1
  • Retired

  • Linux Lite: 4.2 64bit
Thank you bobw.

I have never heard of crontab before so that is why I was so flummoxed. Have since googled it and not sure if I need/want to learn another interface whilst still have so much to understand in terms of Linux basics.

I did what you explained already. On re-reading what I had input I realised that there was no mount point entry (because the line above was for the swap file). So then I input media/ash/BIGHD and it worked, although the first time it didn't work because I put in BIG HD which is how it is labelled in partition manager and displays in File Manager. In fstab, though, nospacesallowedthat'showitthinksIguess.

Thanks.

Again, though, I think the manual should slightly improve that section by giving just 2-3 more examples of different fstab lines because the ones they give are just for /home which nearly all systems are going to have already, so good to see how to set up a partition on a different HD, which I suspect is often what people want to do first thing in order to access all their saved data files.
 

Re: can I mount HD on startup?
« Reply #8 on: November 10, 2014, 02:59:19 PM »
 

Wirezfree

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1484
    Posts
  • Country: gb
  • Reputation: 404
  • Linux Lite "Advocate"

  • Linux Lite: 2.8 64bit

  • CPU: i7-4790S

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD4600 (Integrated)
I think the manual should slightly improve that section by giving just 2-3 more examples of different fstab lines because the ones they give are just for /home which nearly all systems are going to have already, so good to see how to set up a partition on a different HD, which I suspect is often what people want to do first thing in order to access all their saved data files.

Hi,

I had some similar issues when I started..
I initially couldn't get my head around mount points and putting them in fstab.
I got some really good help and guidance from "gold_finger"
He's also got this:
https://www.linuxliteos.com/forums/index.php?topic=203.msg997#msg997
It's about a separate data partition, but it applies to doing more.
Go through the above, it also covers "binding" so you can have the partitions folders
linked directly to folders in your /home directory.

I have 4 partitions on my 2nd drive:
/home (keep my home separate ease of backup/recovery)
/data (keep my data separate ease of backup/recovery)
/vbox (keep Virtualbox VMS separate, easy to omit from backups)
/vault (keep a local backup of key things, just in case)

Dave
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks :)

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
 


Tags:
 


Download Linux Lite 5.4 RC1 today - See Release Announcements