How to Auto Mount Drives in Linux on Boot

Поделиться
HTML-код
  • Опубликовано: 20 авг 2024
  • НаукаНаука

Комментарии • 204

  • @cakes1831
    @cakes1831 2 месяца назад +4

    Thank you. Everywhere else people just said "go make the fstab entry yourself" without telling how or the risks of not knowing what you are doing

  • @icupondegrass
    @icupondegrass Год назад +16

    Summary of the video:
    `lsblk` Check for and unmount the drive if it isn't already
    Create an empty folder to mount into eg. `/media/newfolder` or `/mnt/newfolder`
    `sudo blkid` Copy UUID and remember the drive 'TYPE'
    `sudo nano /etc/fstab` Copy default formatting whilst replacing the UUID and TYPE specific to the drive
    `sudo mount -a` Make sure no errors pop up

    • @arush6778
      @arush6778 Год назад +1

      error popped up but I rebooted and faced the consequences. Make sure that error doesn't pop up 😅

  • @malcolmwest1301
    @malcolmwest1301 6 месяцев назад +10

    Excellent tutorial. I appreciate the fact that you showed how to do this with the terminal instead of just gui.

  • @EyeSpyHiFi
    @EyeSpyHiFi 3 года назад +19

    The easiest to follow tutorial I've seen. Thank you, my drive is now mounted.

    • @enkiimuto1041
      @enkiimuto1041 3 года назад

      Idk, there is no need to use the terminal.
      Just go to disks -> select partition -> mount options -> check automount.

    • @EyeSpyHiFi
      @EyeSpyHiFi 3 года назад +6

      @@enkiimuto1041 In Gnome yes. But I don't want the Gnome Disks app on my KDE

    • @Leo08x
      @Leo08x Год назад +1

      @@EyeSpyHiFi Least based KDE enjoyer

    • @kuramamizukage
      @kuramamizukage 4 месяца назад

      @@Leo08x the thing is in kde after installing gnome disk utility aka disks changes some menus in kde so i don wanna see gnome menus in my kde

  • @andyk2181
    @andyk2181 2 года назад +62

    Calling it f-stab could be confusing for beginners. It's fs-tab, which conveys the meaning that it stands for filesystem table. In linux you will frequently see the same abbreviations used. Along with fs for filesystem, there are many ls commands like lsblk (list block), blkid (block id) etc., and once you recognise the patterns they are much easier to remember.

  • @hiramabiff9138
    @hiramabiff9138 3 года назад +66

    Just a heads up for those who don't know... Depending on your version of Linux, you can change most of these settings within the GUI by using the preinstalled app called "Disks". For those interested in learning more, I provided instructions below for Lubuntu but they should also be the same for Ubuntu.
    1) After opening the application called "Disks", select your desired drive on the left..
    2) After selecting the drive; On the right, select the correct partition on the drive you want to auto-mount.
    3) Click the check-mark to open the "Additional partition options" menu. In the menu select "Edit Mount Options". *WARNING:* The options listed in this window directly edit the fstab file and should be modified with care the same as you would using the terminal.
    4) In that window, after switching off "User Session Defaults", the only two options I changed were..
    4a) Make sure "Mount at system Startup" and "Show in user Interface" are both checked. (these should be checked by default)
    4b) Change the "Mount Point" to something you wish to identify the drive as... e.g /mnt/Backup
    5) It is important that you *DO NOT* change the drop-down option that says "Identify As"; because, whats already in the box is the partition UUID matching the drive you selected in step 1 and 2, so there should be no need to change this option.
    6) After checking the checkboxes and changing your mount point name, click "OK" and input your root pass to save the changes to fstab.
    7) Restart the system and you're done.

    • @seanpaul7069
      @seanpaul7069 2 года назад +1

      Thanks for the write-up. This actually worked. I wasn't able to create a run/media/Backup folder. kept getting an error.

    • @us07251
      @us07251 2 года назад +2

      This is the best way. Thank you.

    • @clumsysandesh
      @clumsysandesh 2 года назад +1

      Thanks! This was more helpful, easy and straightforward than the video itself.

    • @estonian44
      @estonian44 2 года назад +3

      mate, tq, can u help me out, after finishing the tutorial, my debian wont reboot and shut down :)

    • @RawfunRahman
      @RawfunRahman Год назад +1

      What are you? A magician?

  • @paul9812-t3i
    @paul9812-t3i Год назад +2

    The video that made me subscribe. The details, the patience. Perfect

  • @chromerims
    @chromerims 8 месяцев назад +1

    Thank you for various methods for getting that UUID info to load into /etc/fstab
    👍

  • @arush6778
    @arush6778 Год назад +1

    For those who failed just like me and went to shock:
    type exit for maintenance
    browse this file
    sudo nano /etc/fstab
    delete whatever you have wrote ( be very careful that you might delete anything else!)
    save and exit
    then force shutdown your PC
    and you're sanity will be back after you start your device again

  • @-someone-.
    @-someone-. Месяц назад

    Thank you so much! I spent days trying to do this….🙏👍👍👍 it worked first time after following your instructions. 🥇

  • @ACCESSZERO1
    @ACCESSZERO1 Год назад +1

    I'm new to Linux and I was wondering how to fix this!
    Finally found a video! 👌🏻

  • @oseaniic
    @oseaniic 10 месяцев назад

    Reading the guides made seem this so complicated but your video was super easy to understand, thanks!

  • @p.h.sharma4132
    @p.h.sharma4132 2 года назад +2

    Thank you very much for the tutorial, i have facing this issue for a long time, but your tutorial gave exact and precise steps which required to be followed. Liked and subscribed. Thank you very much for this. :)

  • @aptminer9531
    @aptminer9531 2 месяца назад

    Thank you so much. As someone who's new to Linux, this helped a lot :D

  • @deteodskopje
    @deteodskopje 2 года назад

    I was completly new and it bugged me for days, this resolved it in a matter of seconds! Thanks

  • @rezoanhoshen2640
    @rezoanhoshen2640 19 дней назад

    I used space instead of using tab hence I was getting error for so long.
    After watching the video, finally got my system to auto mount on boot

  • @_tanzil_
    @_tanzil_ Год назад +4

    Here is a simple GUI way:
    -Open Disc program
    -Select your partition
    -Click on "Additional partition options" gear icon.
    -Edit mount options
    -Turn off the switch "User session default"
    -Check on the "Mount on system startup" mark.

  • @mekuranda
    @mekuranda 4 года назад +1

    Really detailed explanations....always had issues with Linux drives....will try some of your wisdom to see if my systems work the way I expect....subbed

  • @matheusgontijo1681
    @matheusgontijo1681 3 года назад

    Worked perfectly. Thank you so much for your time. And thank you for the commands on the blogpost. That helped and saved time having the commands for copy and paste.

  • @cyben
    @cyben 2 года назад

    This definitely help. I am working on switching to Linux but for now dual booting until I master it. Thank you very much!

  • @tylerhuestis1733
    @tylerhuestis1733 10 месяцев назад

    Thank you very much, was just setting up a plex/media storage server and new to Linux, this worked great😊

  • @warwolf333
    @warwolf333 9 месяцев назад +1

    Seems easy enough. Too sad you didn’t recall the last command by going up with «up arrow». Would have been faster...
    I just followed your instructions, it IS easy! Nice job!

  • @ignacioulloa2241
    @ignacioulloa2241 Месяц назад

    clean and straight to the point!

  • @maximofernandez196
    @maximofernandez196 Год назад +4

    IMPORTANT: if you change the disk, be sure of changing the fstab line, adding a # at the start to comment it. This will prevent the system to crash, since it will try to boot a disk that does not exist.
    If you use your disk later again, just delete the # and it will work

    • @stargazer7644
      @stargazer7644 Год назад +1

      That would be a hang, not a crash.

    • @maximofernandez196
      @maximofernandez196 Год назад

      @@stargazer7644 nice to know the difference

    • @stargazer7644
      @stargazer7644 Год назад

      @@maximofernandez196 You can put a timeout on the fstab options so it won't hang forever at boot, or you can mark it in fstab not to automatically mount at boot and put a mount command in an rc startup script that won't hang everything.

  • @sleeper5815
    @sleeper5815 5 месяцев назад

    You made this to easy for an old hack like me.... Thank you.

  • @amqx
    @amqx 5 месяцев назад

    Thank you so much, super easy to follow for a linux beginner

  • @Bergwacht
    @Bergwacht 2 года назад

    Now I understand what the fstab is for, thank you :)

  • @nicor4980
    @nicor4980 2 года назад +1

    Great tutorial, thank you!
    But an exFAT formatted drive was mounted read-only.
    It took me some searching to find that I had to specify exfat-fuse where I thought exfat would be sufficient.
    Anyway, I learned something from both the video and research ;)

  • @kendarr
    @kendarr 2 года назад

    Thanks bud!, with along with with udiskie to automount USB drives i'm golden.

  • @Netbug
    @Netbug Год назад

    Thank you! I finally have my shared NTFS drive mounting at boot. Very nice. Although save was "Ctrl-O" for me, not "0".
    Subbed. Cheers!

    • @edwardjames6070
      @edwardjames6070 8 месяцев назад

      out of all these comments, yours is the only one to point out this very important video error. to save with nano press ctrl plus small case letter o, not ctrl plus zero. in all fairness, the guy made a great video.

  • @NFTwizardz
    @NFTwizardz 6 месяцев назад

    Lol after 2 days this video finally make it all click tyvm! 🎉

  • @Zakaros1000
    @Zakaros1000 Год назад

    I always forget how to do this, and here I'm again everytime I install linux from scratch again xD

  • @gabriellworks
    @gabriellworks 3 года назад

    thank you a lot! i was worried that I would lost my games everytime i rebooted my system, but hey! guess i'll not :)
    thanks again. keep up the good work.

  • @GuyManley
    @GuyManley Год назад

    Thanks dude. Quick and easy. I watched the learn linux tv video before this but had to reinstall my OS recently. I use arch BTW. 🤣 But this was a quick refresher. Got all my steam games back from my 2nd drive. Cheers!

  • @youkilledtony
    @youkilledtony Год назад

    Thanks for the helpful video. I didn't realize that the filesystem must be written in lowercase, and though I didn't change existing text in the fstab, I was unable to boot. To repair the fstab was as simple as booting from USB to access the drive.

    • @Masta_E
      @Masta_E 11 месяцев назад

      Mine bricked hard. Hard to boot into a thumb drive and glass the drive. It was so bad my completely different windows drive had drivers mess up. It legit broke everything lol. Luckily mint was able to see this after booting into the thumb drive. Praise God. Lol I was getting nervous.

  • @rmk918
    @rmk918 2 года назад

    This was very helpful. Thank you so much for this tutorial! Cheers

  • @Manu_sl
    @Manu_sl 14 дней назад

    thanks brother. you are a saviour.

  • @timbarrett4580
    @timbarrett4580 11 месяцев назад

    Very easy to follow and very informative. Thanks!

  • @Jimbo-dn6do
    @Jimbo-dn6do Месяц назад

    Thank you sir! You helped me out big time

  • @Clippedcontentenjoyer
    @Clippedcontentenjoyer 11 месяцев назад

    This configuration broke my damn Steam Deck!

  • @mrkrex7989
    @mrkrex7989 2 года назад

    You saved me from pulling out what I have left of my hair, thanks

  • @user-ud7zt2vi5q
    @user-ud7zt2vi5q Год назад

    excellent video techhut i appreciated the help.

  • @jwalsh5764
    @jwalsh5764 2 года назад

    Thank you, this is just what I needed. 👍🏼👍🏼

  • @trinxic-music1469
    @trinxic-music1469 5 месяцев назад

    for anyone getting a 'parse error':
    your directory seemingly can NOT have spaces in it.. even if you use quotations around the directory.
    It wasn't working for me unit i ditched the quotes and just used underscores in place of spaces.
    Hope this helps!

  • @mrstanlez
    @mrstanlez 6 месяцев назад +1

    Nice tutorial. How can I automate it for 100 external ntfs-3g disks without knowing any disk-labels and without static writing in fstab file ? Any help will be very helpful. Thank you.

  • @tanstaafl5695
    @tanstaafl5695 2 месяца назад

    I love your stuff. thanks

  • @sarditime132
    @sarditime132 3 года назад +5

    Hey, what did you do to make your KDE look so different in this video? It looks very lovely and I'd like to try it out! I'm still very new to Manjaro and Linux in general.
    Also thanks a lot for the video! This finally fixed the issue I had with Steam forgetting the libraries I had on other drives.

    • @akhilmarar6546
      @akhilmarar6546 3 года назад +6

      Its the sweet-KDE theme. Hello fellow linux newbie. Welcome to Freedom.

    • @sagarkapasi099
      @sagarkapasi099 2 года назад +4

      He Just Called You A Noob

  • @udhayn822
    @udhayn822 Год назад

    It helped me
    thanks brother!

  • @anonymousperson45152
    @anonymousperson45152 Год назад

    Thumbs up bro! It works like a charm.

  • @vikramvikrant4680
    @vikramvikrant4680 3 года назад

    thankyou for the detailed explanation , it worked perfectly.

  • @voodoovinny7125
    @voodoovinny7125 2 года назад +1

    I'd like to have a way to have Linux automatically mount drives (hard drives, hot swap drives, USB drives, CD/DVD/BluRay discs) into a folder such as /media or /mnt WITHOUT using fstab. Fstab is great for a stable system, but for a system that you are constantly swapping drives in this is a problem as Linux refuses to boot if there is an entry in fstab and the drive has been removed or if it has been formatted differently. I may have stumbled upon something called Udisk2 and Udiskie which I can configure to do what I want, but Linux should have something like this default in order to help lure some people from Winblows...

  • @blackcitadel37
    @blackcitadel37 2 года назад

    Awesome. After the 'sudo mount -a' i was getting some 'Error: drive with UUID= could not be found' but i just manually unmounted and mounted it again and it's working now. No idea why :D

  • @otoolepw
    @otoolepw Год назад

    Excellent tutorial, thanks!

  • @freely124
    @freely124 Год назад

    After deleting a partition on a drive and adding a new one, my system would not boot because I did not remove the fstab entry I had for that prior partition (rescue mode shell nano to remove it and we are OK now :).

  • @EisakoTheAvali
    @EisakoTheAvali Месяц назад

    i'm a lunix noob thanks for the help :) my favorite distro so far is Kubuntu cheers. mutch better thin win 11

  • @techmanicx
    @techmanicx Год назад

    very good tutorial

  • @SosirisTseng
    @SosirisTseng 3 года назад

    You could also open and edit fstab in Kate editor (with syntax highlighting). Kate will ask for the sudo password when you hit the save button.

    • @abhi36292
      @abhi36292 3 года назад

      yes but it gets quite messy with all the UUIDS and stuff

  • @africantwin173
    @africantwin173 11 месяцев назад

    Pi4 Jellyfin Automount would be nice. I never got Jellyfin working with a external usb hdd ext4.

  • @chris-kr7gf
    @chris-kr7gf 10 дней назад

    i like the endings. :D

  • @chewfoo
    @chewfoo 2 месяца назад

    this worked for me, however, after doing this programs lost permission to write to my drive. even going through the GUI 'disk' and selecting 'mount on boot', programs can't write to drive. I have to keep my drive as 'user session default' for programs to write to it, but then it doesn't mount on boot.. ugh

  • @mortadafardan2267
    @mortadafardan2267 2 года назад

    great video friend you really helped me out here

  • @ZoneProduction448
    @ZoneProduction448 3 года назад +1

    Great tutorial. Could you do a tutorial on how to automount a network drive(NAS)?

  • @zEw0
    @zEw0 5 месяцев назад

    insane tutorial

  • @RobMonette
    @RobMonette 3 года назад

    Great tutorial ... well appreciated ...

  • @rahul875
    @rahul875 2 года назад

    When I click the mounted drive the only folder lost+found and not able to make new folder at all

  • @calemay4733
    @calemay4733 2 года назад

    Got anything on SCprime? Struggling big time on that whole process using Linux. Trying to figure out which flavor of Linux to use…..I subed…..I can only find RPi tutorials

  • @aniher4949
    @aniher4949 2 года назад

    Great job dude. Thank you

  • @ScottW2000
    @ScottW2000 3 года назад

    Utterly fantastic, thanks!

  • @ToadyEN
    @ToadyEN Год назад

    Great video thank you

  • @justkriss154
    @justkriss154 17 дней назад

    Man you saved my ass motple times.

  • @slizgi86
    @slizgi86 6 месяцев назад

    Great tutorial! However, I have a question, I added all drive/partitions I want to auto mount, and they work (mpoints I have under /mnt/), with default and with 0 2, they work OK, however after a cold boot every time when I click on those automounted partition/drive whole dolphin freeze for a couple of second and then go back to usable state, and automounted drive/partition is accessible, I guess it shouldn't be like that, I as I am new to Linux, I probably make something wrong...

  • @sandip_1698
    @sandip_1698 2 года назад +1

    how to you change titlebar like mac in linux ????????
    please Reply...................................

  • @gustavopaio7877
    @gustavopaio7877 3 года назад +2

    I'm a complete begginer, and I was thinking of trying out Manjaro as my first Linux distro, as per the recomendation of a couple of friends.
    Should I just automount every single drive I have, following the steps, and call it a day? Or is it not really that necessary? Thanks for the video and the info

    • @stargazer7644
      @stargazer7644 Год назад

      I'd recommend Linux Mint as a first distro.

  • @angadvishwakarma35
    @angadvishwakarma35 Год назад

    My external usb hdd not showing any file and folder.File manager shows 71%full of hdd.
    any help pls

  • @voidmind
    @voidmind 2 года назад

    On my system after booting the drive is mounted but I can't see the files on it. If I right click to the folder and look at permission, the owner is root. If I unmount the device and check the properties again, the owner is now my regular user account and I can see all the folders there. I use this drive to install Steam games and Stream can't see them unless I unmount the drive before loading Steam. All my drives are using btrfs and I did not encrypt them. So it look like a use permission issue but I really don't know what's happening

  • @trinxic-music1469
    @trinxic-music1469 5 месяцев назад

    I have a /mnt folder already, so I just used that instead of creating /media

  • @Prakhar_Choubey
    @Prakhar_Choubey 2 года назад +1

    I did exactly the same thing as shown just used NTFS instead ext4 but when I am trying to
    sudo mount -a
    I get this error
    mount: /etc/fstab: parse error at line 15 -- ignored
    Post reboot, it isn't mounting my partition.
    Is there something I am doing wrong?

  • @SmellvinJames
    @SmellvinJames 2 месяца назад +1

    Thanks!

  • @gunnerjoe53
    @gunnerjoe53 10 месяцев назад

    Linux Mint 21.2 mounting a second drive (EXT4 SSD /dev/sda1) to mount point /backup It does not seem to matter what I put as options in the FSTAB, users cannot write to the directory.
    Does not seem to matter who owns the mount point or what the permissions are on the folder, when you mount it with 'mount -a' it will change to drwxr-xr-x - root root backup. and users can't write to it.
    Solution, which makes no sense to me: After you run 'mount -a' do a chown username:username /backup then umount and then mount again, you should be able to write there as user.
    This does not work for systems with multiple users, makes me think my system is missing something that would allow options in FSTAB to be set and give RW to users.
    Ideas?
    Joe

  • @sidewind131258
    @sidewind131258 2 месяца назад

    So I have a disk/folder called /backup, I want to expand /backup with another disk, do your tutorial accomplish that ?

  • @estonian44
    @estonian44 2 года назад

    thank u, bro, after done what u said, my linux struggles to reboot and quite frankly i am pressing buttons to switch off - un plugging - how to fix?

  • @johnxina1681
    @johnxina1681 Год назад +2

    you should use more commandline ways instead of using kde gui, remote users can not use your methods nor is it universal across DE's

  • @jasgarsoul
    @jasgarsoul 2 года назад

    i did this but its only read only for some reason, i even tried "rw,defaults"

  • @heron619
    @heron619 2 года назад

    Great video very useful

  • @yoitsFEARS
    @yoitsFEARS 3 года назад

    what if it says i only have a PTUUID when i do blkid. I dont see any UUID for my harddrive

  • @Shamim_BD
    @Shamim_BD 8 месяцев назад

    may i know why should i make a directory (in this case) called media? will the data be temporarily stored on this particular destination? if so, then the destination size has to be larger than the mounting disk's size!

  • @JohnSmith-tz7iy
    @JohnSmith-tz7iy 10 месяцев назад

    what if it's an ntfs drive? I put ntfs in for the type but it didn't work

  • @x360videos1996x
    @x360videos1996x 5 месяцев назад

    Is there a way to auto mount using an external hard drive’s label or anything besides the UUID? My hard drive doesn’t have a UUID and I don’t want to reformat everything and lose the data.

  • @Mythologos
    @Mythologos Год назад

    This is very vague: is he using the pre-existing media directory or making a new one?

  • @leetuah
    @leetuah Год назад

    There is one issue i am facing. I have connected my external hdd with the fstab file. So, whenever i dont need the hdd, i disconnect it. But, since it is not connected, it doesnt let me log in to the system. Is there some workaround to this problen?

  • @roweltimbal9234
    @roweltimbal9234 2 года назад

    Hi thanks for the tutorial. Its a lot of help. What does mount -a do in particular? Thannks !

    • @TechHut
      @TechHut  2 года назад

      It will try to mount all the drives to your system that are available in that fstab folder. If there is an error something wasn't done correctly.

  • @ZoneProduction448
    @ZoneProduction448 4 года назад

    Great video. I’m new to Linux and really like manjaro KDE. Everything is working great.
    The only problem I’m having is with jDownloader. I can access my network folders using files viewer, I can also access them through the web browser using smb. For some reason, jDownloader can’t see my Synology network folders. I’ve been trying to solve this issue for almost two weeks.
    Thanks

    • @ZoneProduction448
      @ZoneProduction448 4 года назад

      @gilkesisking Thanks for your help. I tried Filezilla. unfortunately, jDownloader still can’t see my Synology network folders. can you try jDownloader on your manjaro set-up to see if it can see your network drive?

    • @ZoneProduction448
      @ZoneProduction448 4 года назад

      @gilkesisking I have, still waiting for replies lol. Thanks 😀

    • @TechHut
      @TechHut  4 года назад

      Have you tried using this? wiki.manjaro.org/index.php?title=Using_Samba_in_your_File_Manager

  • @RobertoStrikers
    @RobertoStrikers 10 месяцев назад

    Great video

  • @alphaomega5017
    @alphaomega5017 2 года назад

    How do I mount a drive which has windows system files on Ubuntu

  • @jinyingzhan927
    @jinyingzhan927 2 года назад +1

    for example, i use dual boot. my windows system drive is NTFS (contents) and partition type is "basic data", how do I know what to use "type"? and, for the drive of my ubuntu system, I could not see any content and partition information on Ubuntu Disks app...just a newbie question. Do I use the commend in your video to find out that information?

    • @stargazer7644
      @stargazer7644 Год назад

      NTFS is often not handled natively in Linux. if -t ntfs doesn't work, then you probably need to install a filesystem that understands NTFS such as fuse to mount those.

  • @Scadb
    @Scadb 3 года назад

    thanks for sharing this video, how can I mount an mtp device using this method?

  • @Proagusbis
    @Proagusbis 2 года назад

    thanks very help me

  • @piiyuush2001
    @piiyuush2001 Год назад

    whats the file system type for parton type ( Microsoft LDM data ) & will defaults 0,0 will work with this?

  • @julian.morgan
    @julian.morgan Год назад

    Does this approach work (editing fstab) make it so an internal drive will automount for ALL users? I have a 4TB storage drive I want to share between three family members each with their own user account.
    The files on the shared 4TB drive are things like our main family steam library (the boot SSD is only 500GB) and other shared family media so I want each user to have super simple and easy access to it when they log in.

  • @nolew
    @nolew Месяц назад

    thanks mane