My partition mounted at /home keep getting unmounted after every restart. How to stop this?

5,823

Add your /dev/sda6 to your /etc/fstab and it will be automatically mounted during start up.

Find out your UUID of the partition: sudo blkid /dev/sda6

Then add this line below the
#/home was on /dev/sda6 during installation
UID=inserthereUUID /home ext4 defaults 0 0

you can try if it worked if you unmount it manually and then type in the terminal sudo mount -a if it was mounted correctly it will always be mounted during start up.

Share:
5,823

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I have recently started using Ubuntu 16.04 and I made a fresh installation. Whenever I restart my computer the /dev/sda gets unmounted. As a result I can't login through the UI and I have to manually mount my disk and login every single time

    Following is the result mount -l command

        sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
        proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
        udev on /dev type devtmpfs (rw,nosuid,relatime,size=1956636k,nr_inodes=489159,mode=755)
        devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
        tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=395132k,mode=755)
        /dev/sda5 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
        securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
        tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
        tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
        tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
        cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd,nsroot=/)
        pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
        cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids,nsroot=/)
        cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio,nsroot=/)
        cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices,nsroot=/)
        cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory,nsroot=/)
        cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio,nsroot=/)
        cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct,nsroot=/)
        cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb,nsroot=/)
        cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event,nsroot=/)
        cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,nsroot=/)
        cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer,nsroot=/)
        systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
        mqueue on /dev/mqueue type mqueue (rw,relatime)
        hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
        debugfs on /sys/kernel/debug type debugfs (rw,relatime)
        fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
        tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=395132k,mode=700,uid=1000,gid=1000)
        /dev/sda6 on /home type ext4 (rw,relatime,data=ordered)
        gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
    

    Here is the output of: fdisk -l

        Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
        Units: sectors of 1 * 512 = 512 bytes
        Sector size (logical/physical): 512 bytes / 512 bytes
        I/O size (minimum/optimal): 512 bytes / 512 bytes
        Disklabel type: dos
        Disk identifier: 0x8365a1f1
    
        Device     Boot     Start       End          Sectors         Size         Id    Type
        /dev/sda1  *           63     80324            80262           39.2M       de  Dell Utility
        /dev/sda2           81920   8081407          7999488           3.8G        82  Linux swap / Solaris
        /dev/sda3         8083454 976771071        968687618          461.9G        5  Extended
        /dev/sda5         8083456 105738239        97654784            46.6G       83  Linux
        /dev/sda6       105740288 976771071       871030784           415.3G       83  Linux
    

    /etc/fstab

    # /etc/fstab: static file system information.
    
     Use 'blkid' 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>
     / was on /dev/sda5 during installation
    UID=5396e03e-8e0a-4845-95da-31290534e988 /               ext4    errors=remount-ro 0       1
     /home was on /dev/sda6 during installation
     swap was on /dev/sda2 during installation
    UID=ded1a4ee-5091-46c2-8be8-a537f11a53c3 none            swap    sw              0       0
    

    Thanks in Advance!

    • Ziazis
      Ziazis almost 8 years
      Can you post your /etc/fstab?
    • Ziazis
      Ziazis almost 8 years
      Well you see that your home is not listed as a mountpoint in fstab, if you add it in the file it will be mounted automatically during boot.