How to Mount a Hard Drive in Linux on Startup

Поділитися
Вставка
  • Опубліковано 2 лис 2024

КОМЕНТАРІ • 104

  • @Toblehrone
    @Toblehrone 4 роки тому +29

    For the people that complain about the tutorial being too difficult or complex; here's a quick way to do it using a graphical user interface.
    1. Open up your Disk Utility of choice (I use GNOME's disk utility that can be found in Ubuntu/Fedora/Pop_OS!) - it'll be named something along the lines of "Disks" or "Disk Utility".
    2. Select the hard drive of your choice that you want to mount
    3. Look for the option to edit the mount options (in the GNOME utility, you click the gear icon on the left underneath the bar showing all of your partitions, it should be the second button and beside the square stop icon; then, click "Edit Mount Options")
    4. If your disk utility has a switch for user session defaults (like GNOME does), disable it (in GNOME's utility, user session defaults disables editing the rest of the mount options)
    5. There should be options to mount the drive at system startup, show the drive in the user interface, have additional authorization, etc
    6. Apply the settings! (provide user/root password when it prompts you)
    Please recognize that there are MUCH easier ways to edit/set up something for the home user. It may be in settings or in disk utility, but IT DOES EXIST! The only real problem is that due to the customizability of Linux and the amount of distros available, the simple graphical tools available (that Windows and MacOS users may be used to) can be different for each person (like the exact details of where each button is, how something is described should be similar, but can still have different wording or placements depending on distro).
    The reason why most Linux tutorials (to the detriment of novice Linux users, as most of them imply - due to failing to mention GUI tools - that you think that this is the ONLY way Linux users do something on their computers) use the command line is to (mostly) get around this fragmentation and avoid dealing with each individual's graphical setup. However, for the "basic things" like secondary drives, *THERE IS ALWAYS A GUI OPTION FOR THINGS LIKE THIS!!!* Stop assuming that every Linux user has to dive deep into the command line to do basic tasks! The power of Linux is that it gives you choices - GUIs for the users who want a quick and simple way to edit things, and the command line for users who gain more experience! Command line is REALLY useful, but for day-to-day activities, you can choose whether or not you deal with the GUI or the command line.

    • @williamrepp9232
      @williamrepp9232 2 роки тому

      Thank you so much! I am new to this and the tutorial lost me. Your instructions were simple and nailed it.

    • @scottstewart3123
      @scottstewart3123 5 днів тому

      I think this will be the way I do it

  • @RachelLondon-zl7ql
    @RachelLondon-zl7ql 3 місяці тому

    Years later and this still stands today. Shows how robust unix really is. Thanks a bunch Titus, this helped me.

  • @samuelitooooo
    @samuelitooooo Рік тому

    I followed another tutorial that's easy to follow and added no weird options to anything in the fstab entry, but didn't address the permissions. This video filled in the missing pieces. Thank you!

  • @DoverTyson
    @DoverTyson 3 роки тому +1

    Great video, just watched another UA-camr on how to do this and it crashed my system. Your way is much easier to follow and actually works! Cheers!

  • @nellos4ever
    @nellos4ever 2 роки тому +2

    Dear Chris, thank you very much! I somehow missed this back in 2018.

  • @bdnoobsingers3094
    @bdnoobsingers3094 4 роки тому +4

    This is what I was looking for. Applied and worked like a charm. Thanks for making this precious video :)

  • @vimdiesel
    @vimdiesel 6 місяців тому

    I have watched this video more times than I'd like to admit.
    Great work chris

  • @davoudarsalani1888
    @davoudarsalani1888 6 років тому +5

    The chown command helped me alot. Thanks.

  • @willprince643
    @willprince643 Рік тому +1

    Man, you saved my ass again, your videos are so helpfull, so much knowledge, one of best things Linux newbie like me can get, I noticed I wasn't subscribed to you, I don't know why, but I'm subscribing now, and thanks again for all these great videos you make!

  • @2l8baby65
    @2l8baby65 4 роки тому +1

    Great video, hard to find how to do this simply from command line. Simple but spot on!

  • @saifsiddique-yl8uu
    @saifsiddique-yl8uu 2 роки тому

    You are a lifesaver, sir. Thank you very much. Changing permission for user form root was very hard for a newbe like me. Thanks a lot again.

  • @ashfaq7812638
    @ashfaq7812638 5 років тому +1

    Thanks a lot mate. You make doing things on linux so simple . Keep up the good work.

  • @leondennis4659
    @leondennis4659 5 років тому +15

    I wish you would of zoomed in on the screen so I could see what you are doing otherwise good vid.

    • @ghostbuster8894
      @ghostbuster8894 3 роки тому

      Change the video settings to a higher resolution. That will help some.

  • @DigBipper188
    @DigBipper188 5 років тому

    Thanks for this!! I borked my FSTab file at least 4 times prior and didn't know right up until I rebooted to test it... Now I can be safe in the knowledge that my edits to fstab are correct because it automounts when I do "$sudo mount -a"

  • @gregorydayton5428
    @gregorydayton5428 7 місяців тому

    That was easy, Thank You Chis.

  • @HeliusM112
    @HeliusM112 2 роки тому

    thanks a lot Chris. Had to auto mount my SSD for Steam library

  • @monemperor1559
    @monemperor1559 3 роки тому

    this video has helped me at least 3 times. thank you

  • @frankalvareziii8289
    @frankalvareziii8289 4 роки тому +1

    You Rock in so many way's Titus! soo glad you went linux.

  • @noob4reel
    @noob4reel 4 роки тому +1

    Finally found a tutorial for dummies :) thanks a lot!!

  • @joshpayne4015
    @joshpayne4015 5 років тому +12

    Appreciate the info but jeeze, Linux! Why is this so difficult? Why wouldn't Linux automatically mount all attached local drives automatically... This is why Linux won't achieve wide adoption.

    • @Toblehrone
      @Toblehrone 4 роки тому

      And yet Windows doesn't? Especially when you have to format a new drive, you still have to use Windows' Disk Utility! And don't assume that this is the only way to do things on Linux! Here's a quick guide on how to do it through a graphical user interface.
      1. Open up your Disk Utility of choice (I use GNOME's disk utility that can be found in Ubuntu/Fedora/Pop_OS!) - it'll be named something along the lines of "Disks" or "Disk Utility".
      2. Select the hard drive of your choice that you want to mount
      3. Look for the option to edit the mount options (in the GNOME utility, you click the gear icon on the left underneath the bar showing all of your partitions, it should be the second button and beside the square stop icon; then, click "Edit Mount Options")
      4. If your disk utility has a switch for user session defaults (like GNOME does), disable it (in GNOME's utility, user session defaults disables editing the rest of the mount options)
      5. There should be options to mount the drive at system startup, show the drive in the user interface, have additional authorization, etc
      6. Apply the settings! (provide user/root password when it prompts you)
      Please recognize that there are MUCH easier ways to edit/set up something for the home user. It may be in settings or in disk utility, but IT DOES EXIST! The only real problem is that due to the customizability of Linux and the amount of distros available, the simple graphical tools available (that Windows and MacOS users may be used to) can be different for each person (like the exact details of where each button is, how something is described should be similar, but can still have different wording or placements depending on distro).
      The reason why most Linux tutorials (to somewhat of a detriment, as you're saying that you think that this is the ONLY way Linux users do something on their computers) use the command line is to (mostly) get around this fragmentation and avoid dealing with each individual's graphical setup. However, for the "basic things" like secondary drives, *THERE IS ALWAYS A GUI OPTION FOR THINGS LIKE THIS!!!* Stop assuming that every Linux user has to dive deep into the command line to do basic tasks! The power of Linux is that it gives you choices - GUIs for the users who want a quick and simple way to edit things, and the command line for users who gain more experience! Command line is REALLY useful, but for day-to-day activities, you can choose whether or not you deal with the GUI or the command line.

    • @hansreynders6853
      @hansreynders6853 4 роки тому

      Linux does mount a drive automatically. In my Ubuntu 18.04 after adding a 2nd internal sata harddrive, formatting and partitioning (ext4) the drive mounts automatically on startup (/ mnt / UUID) which is the default setting. You can check/change that following the instruction Tobleh gives here.

  • @davidglen6172
    @davidglen6172 3 роки тому

    Hi mate. Great to the sudo nano /etc/fstab and it just gives
    Overlay / overlay RW 0 0
    Then line 2
    Tmpfs /tmp tmpfs nosuid,nodev 0 0
    Just 2 lines but I was trying to make persistence on usb.
    I'm running Kali full on the same laptop but wanted the use to take with me to anywhere I go. Never know when you'll need it

  • @englundm50
    @englundm50 5 років тому +3

    Thank you very much. This helped me out a lot.

  • @bacchuspdx
    @bacchuspdx 4 роки тому +17

    I can never understand why these tutorials never go STEP BY STEP EXACTLY how to do this. Maybe if you really want to help others take the time to actually follow your own directions and see if it works. How can you just post something and not test it? STEP BY STEP EXACTLY HOW. DO NOT ASSUME WE HAVE ANY IDEA WHAT YOU ARE SHOWING US.

    • @StrangeIndeed
      @StrangeIndeed 4 роки тому

      Are you saying that he did not go step by step how to do things? I just followed this tutorial and had no problems. It's short, straight to the point and everything's explained pretty well.
      Or that's not what you meant and you're saying the opposite, that this is the tutorial that explaines everythings correctly and you're ranting about other tutorials.
      Because I genuinely can't tell which of these two options is correct

    • @LinuxNetwork
      @LinuxNetwork 4 роки тому +2

      This guy is well known to make partial tutorials ... so I'm not surprised is not working ... it's not the first time and i am sure is not the last time.

  • @bacchuspdx
    @bacchuspdx 4 роки тому

    @joey redmon thank you you gave me more direction than this whole tutorial in just 2 or 3 lines

  • @shaddysnot9901
    @shaddysnot9901 2 роки тому

    You are a hero sir thank you so much for the help.

  • @ronsafranic5177
    @ronsafranic5177 3 роки тому

    Worked like a charm but I have 2 external USB Drives that I am not sure will work or not? when I do the Mount -a I either get an error saying it is already mounted or it can't find it after I eject it!

  • @alkhadherahmed
    @alkhadherahmed Рік тому

    thank you so much that was very helpful.

  • @User-sdjowije-92771
    @User-sdjowije-92771 3 роки тому

    Thank you for sharing!
    I bought a brand new Seagate Expansion Desktop Drive 16TB, when I plugged it into my Ubuntu 20.04 Desktop, it doesn't turn on, the LED doesn't turn on but it works on my windows 10 laptop. What should I do?
    Thanks for your help!

  • @voodoovinny7125
    @voodoovinny7125 2 роки тому

    I am looking for a simple file server that will allow you to use a cache system for file transfers with the ability yo automatically mount and share CD/DVD/Bluray drives, USB drives, and Hot Swap Drives. This way the media can be used in other systems both through this system or by itself directly connected to the client system. This seems to be an extremely difficult setup to do with Linux and the many NAS systems out there. That fstab is great for non removable drives but sucks for removable.

  • @maxliu4992
    @maxliu4992 4 роки тому +2

    I dont have the folder i made in fstab? where can I get it

  • @fosstera
    @fosstera 10 місяців тому

    If your system refuses to mount your ntfs drive(s), check if you have "ntfs-3g" and "fuse" installed. You need both of these packages for your system to mount ntfs file systems c:

  • @JimLorbetski
    @JimLorbetski Рік тому

    Perfect and easy.

  • @bhushansurve3503
    @bhushansurve3503 3 роки тому +1

    This is good, but is there a way to do this with Network shared folders on NAS?

  • @InmobiliariaPromueve
    @InmobiliariaPromueve 2 роки тому

    Hi! Great Video!
    I am using Ubuntu Core in a Pi 3 for NextCloud. Is there other option for "sudo nano /etc/fstab"??
    Thank you

  • @BobDoe_69
    @BobDoe_69 3 роки тому

    works nicely, I wonder if I can mount this automatically on multiple distros on the same disk hmm

  • @olsonkp
    @olsonkp 4 роки тому +1

    Newbie alert! Could you speak to where the best place to mount drives is and why? Elsewhere someone said, "anywhere you want to," technically correct perhaps, but not helpful. I think you kind of addressed that a bit, but perhaps you could expand on it a bit.

  • @andrewjones3606
    @andrewjones3606 5 років тому +2

    I'm trying to mount USB hard drive for plex on the pi can you do a video on that please

  • @dianaalyssa8726
    @dianaalyssa8726 2 роки тому

    Installed a program named Disks, used take ownership (Manjaro XFCE).

  • @TheGogogogogogo
    @TheGogogogogogo 3 роки тому

    Now it's mounted, but I can't make folders or do anything with that drive. I always get Error "could not make folder"

  • @redstonesparrow399
    @redstonesparrow399 5 років тому +6

    My fstab is completely empty. What should I do?

    • @RomusRussianMapper
      @RomusRussianMapper 4 роки тому +4

      i know this is a late reply but whatever.
      You probably typed "sudo nano etc/fstab". if so try to type "sudo nano /etc/fstab". that should work

    • @vishxl
      @vishxl 4 роки тому

      have you tried with sudo

    • @jonathansloan334
      @jonathansloan334 3 роки тому

      @@RomusRussianMapper Thanks!

  • @georgepetrakis7703
    @georgepetrakis7703 2 роки тому

    You can do it from GUI using gnome-disks utility (DISKS in the desktop). No terminal needed

    • @jasonbourne757
      @jasonbourne757 Рік тому

      I dont know why but but everytime I play a video from this hard drive it unmounts automatically and I have to type the password to mount it again, even after doing what you said. If I play a video and seek further, video player just can't play any further and throws errors, tried with all the video players same problem, drive keep unmounting

  • @viking1au
    @viking1au 4 роки тому +1

    It is past time this sort of thing could be done with GUI. Too many things to go wrong in terminal.

  • @johnaweiss
    @johnaweiss Рік тому

    You said you chown so you don't need root privileges. So I don't understand why you still have to sudo rmdir after becoming owner of the drive. How to NOT require sudo?

  • @KevinBerard
    @KevinBerard 3 роки тому

    Chris, thanks so much for this video! Is there any way to show this but with a shared networked Windows drive on the same network?

  • @TheMyname707
    @TheMyname707 2 роки тому

    Hi!
    Great video! Is it possible to make an update or an extension on how to mount an encrypted file system?
    I have no errors after mount -a but it got stuck after a reboot.

  • @peacemekka
    @peacemekka 3 роки тому +1

    Nope. Doesn't work for me. As soon as I mount the drive it suddenly changes all the permissions of the mounted folders and I'm unable to write or create anything.
    Edit: For those whom even setting correct umask and other options dont work. The solution is using ntfs-3g. I spent 3 days trying to figure out why I didnt have write permissions despite having everything correct.

  • @pranavbhaskaran2030
    @pranavbhaskaran2030 3 роки тому

    I did all this but the permissions for the folder goes back to Own-root, Grp-root. @Titus please help

  • @voodoovinny7125
    @voodoovinny7125 2 роки тому

    What is your fix for slow read writes to and from your ntfs partitions while in Linux?

  • @cptbrncls7050
    @cptbrncls7050 Рік тому

    how come when you made yourself owner of the data2 directory you still required sudo to delete it?

  • @multifandomawesomeness
    @multifandomawesomeness 2 роки тому

    I have a question:
    Which hard drive do you use on your linux pc?

  • @gonz5846
    @gonz5846 5 років тому

    okay i guess it sort of worked. i don't see the neme of the hard drive on the side panel. second, i can't seem to move my stuffs around. for example, i had a folder of videos, but i accidentally put a folder of documents in there (i did this mistake on windows but i wanted to cut it and make a new folder) but it doesn't let me cut. unlike the other hard drive that i have that i didn't do the autumount it lets me move folders around.

  • @bertvantol9669
    @bertvantol9669 3 роки тому

    Is this work the same way for a NAS ???

  • @vicckdk2389
    @vicckdk2389 5 років тому +1

    How do these steps change to do this with a network drive?

  • @Noir_SD
    @Noir_SD 4 роки тому

    It just mounts my ntfs drives in read format only. Ohh I get it after running sudo mount -a it shows NTFS partitions are in unsafe state please properly shutdown your windows no hibernation.... Like that so it refused to mount in read write mode...

  • @gameraiders4749
    @gameraiders4749 2 роки тому

    Thank you so much.

  • @gustavomachado3488
    @gustavomachado3488 7 місяців тому

    Thanks!

  • @BlenderBurst
    @BlenderBurst 4 роки тому +2

    5:00 What did you do here? You didn't say what buttons you pressed.

  • @thatPranav
    @thatPranav 4 роки тому

    Thank you!

  • @Success1981-
    @Success1981- 4 роки тому

    I named my drive but when I go to fstab, the uuid is not was is labeled on the drive when I do the blkid command.

    • @tyrotrainer765
      @tyrotrainer765 4 роки тому

      Hi - try (cut and paste into terminal) sudo lsblk -o name,label,size,uuid - for your label use this command: tune2fs -L MY NEW LABEL NAME /dev/sdaX - OR : e2label /dev/sdaX MY NEW LABEL NAME - tune2fs works on my Mint 19 &20 installations.

  • @WilliamKim
    @WilliamKim 4 роки тому

    Thanks a lot!

  • @mooaaron
    @mooaaron 4 роки тому

    Im having heck... I followed your instructions to a t... Made a Media file or /media
    Changed the owner to me. And it mounts once i put the info in fstap
    But everytime it is owned by root... Ive tried chown
    Ive tried sudo Nautilus and manual change it be it says i dont gave permissions
    I have the same problem in ubuntu and in pop! Os 20.04... I've tried looking up a solution but I'm plum lost

    • @spooky3669
      @spooky3669 4 роки тому

      Menu - systemconfig - Disks - Left window click on the partition - Right window click/check the correct volume - just below click on the cogs - remove standard settings - click OK - Done

  • @spooky3669
    @spooky3669 4 роки тому

    Why make it complicated Chris???
    Menu - systemconfig - Disks - Left window click on the partition - Right window click/check the correct volume - just below click on the cogs - remove standard settings - click OK - Done

  • @molonlabe8792
    @molonlabe8792 4 роки тому

    One question. My raspbian linux system auto mounts an external usb drive but will not mount an external sata ssd with an adapter. What do I do to mount this ssd through the usb connector port?

  • @BlenderBurst
    @BlenderBurst 4 роки тому

    Hello. I did this tutorial, but I got stuck at 5:00. I dont know what button you pressed after that. I restarted my computer and now my second hard drive wont mount. and I can't figure out how to mount it. can anyone help? thanks.

    • @tyrotrainer765
      @tyrotrainer765 4 роки тому

      Hi - you press Ctrl-o to select save - press enter to accept - then press Ctrl-X to exit to terminal prompt. Yyou can always mount using disk manager - select disks in start menu. Click on the disk (left panel) then on the pictorial on the main screen. Click the small arrow bottom left to mount
      (arrow turns to a square). Click the small gear icon for more mount options, including auto-mount.

  • @N1Zer0
    @N1Zer0 3 роки тому

    ohh nice!

  • @jasmeet2365
    @jasmeet2365 4 роки тому

    in fstab my drive is not coming listed
    what do i do ?

  • @theodorbjorkman3064
    @theodorbjorkman3064 3 роки тому

    I dont have a media folder

  • @PsicologoJulioNieto
    @PsicologoJulioNieto 3 роки тому

    Make the letters bigger, please.

  • @AtaraxiaaixaratA
    @AtaraxiaaixaratA 5 років тому +4

    Wait a minute. You have people editing their FSTAB...when all you have to do is click on the gear / option of the volume in gnome disk editor and tell it to auto mount on startup? WHAT IN THE HELL?

    • @jmshrv
      @jmshrv 4 роки тому +1

      /etc/fstab is universal and works on every distro. If you're using Gnome, you could use Gnome Disk Editor though.

    • @cives
      @cives 4 роки тому

      Trying to install games with Lutris didn't work properly with the Gnome Disks program. Just to automount the auxiliary disks, it can work. For other issues a bit more complex, maybe not.

    • @mwiza
      @mwiza 3 роки тому

      that GUI interface is not available on server editions

  • @MouseHunteR77n
    @MouseHunteR77n 3 роки тому

    Great

  • @mnk4allcaps
    @mnk4allcaps 3 місяці тому

    ty ty ty

  • @yuriw777
    @yuriw777 4 роки тому

    I see the owner changed back to root after disk mounted. Why ?

    • @tonyrums
      @tonyrums 4 роки тому

      Mine did too. Did you figure this out? I'm guessing it was b/c we're mounting as sudo. My directories are owned by user xps but after a reboot it shows root. Any suggestions?

    • @mbaker82
      @mbaker82 4 роки тому

      @@tonyrums if you really want to do this in terminal then at the command line type sudo -i to go into root. Then cd into the media folder with cd /media, then run the command chown data/
      that should do the trick! reboot, cd into the media folder and run ll command in terminal and you should see the user stay the same. from there you can create new folder and files to your hearts content assuming you done everything else right.

    • @yuriw777
      @yuriw777 4 роки тому

      @@mbaker82 interesting I will try this
      So sudo will not do it but becoming root will ?!

  • @hamstersniffer
    @hamstersniffer 4 роки тому +2

    Great tutorial but Linux drives me nuts over crap like this. Something so basic as a secondary drive on your computer should NOT require this much stuff. If the gods of Linux distros ever want it to be the prevailing OS they have got to address the basics to make it user friendly for those who do not want to be a super user.

    • @Toblehrone
      @Toblehrone 4 роки тому +4

      Why would you assume that this is the one and only way to mount local drives? Here's a much more simple GUI option.
      1. Open up your Disk Utility of choice (I use GNOME's disk utility that can be found in Ubuntu)
      2. Select the hard drive of your choice that you want to mount
      3. Look for the option to edit the mount options (in the GNOME utility, you click the gear icon on the left underneath the bar showing all of your partitions, it should be the second button and beside the square stop icon; then, click "Edit Mount Options")
      4. If your disk utility has a switch for user session defaults (like GNOME does), disable it (in GNOME's utility, user session defaults disables editing the rest of the mount options)
      5. There should be options to mount the drive at system startup, show the drive in the user interface, have additional authorization, etc
      6. Apply the settings! (provide user/root password when it prompts you)
      Please recognize that there are MUCH easier ways to edit/set up something for the home user. It may be in settings or in disk utility, but IT DOES EXIST! The only real problem is that due to the customizability of Linux and the amount of distros available, the simple graphical tools available (that Windows and MacOS users may be used to) can be different for each person (like the exact details of where each button is, how something is described should be similar, but can still have different wording or placements depending on distro).
      The reason why most Linux tutorials (to somewhat of a detriment, as you're saying that you think that this is the ONLY way Linux users do something on their computers) use the command line is to (mostly) get around this fragmentation and avoid dealing with each individual's graphical setup. However, for the "basic things" like secondary drives, **THERE IS ALWAYS A GUI OPTION FOR THINGS LIKE THIS!!!** Stop assuming that every Linux user has to dive deep into the command line to do basic tasks! The power of Linux is that it gives you choices - GUIs for the users who want a quick and simple way to edit things, and the command line for users who gain more experience! Command line is *REALLY* useful, but for day-to-day activities, you can choose whether or not you deal with the GUI or the command line.

  • @ozgurdemir8929
    @ozgurdemir8929 4 роки тому

    Do you still use this chanal?

  • @jinyingzhan927
    @jinyingzhan927 2 роки тому

    don't understand.

  • @CG-sv2nw
    @CG-sv2nw 3 роки тому

    Lol does not do anything, I'm using debian

  • @yoitsFEARS
    @yoitsFEARS 3 роки тому

    not helpful

  • @medusa569
    @medusa569 4 роки тому

    Doing an instructional video means adjusting your screen and fonts large enough to be able to SEE what you're doing. I gained little from your vid.