Announcement

Collapse
No announcement yet.

Mount drive at boot up problem.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mount drive at boot up problem.

    Hi ,

    Just a small problem on a drive that always mounted at boot up and now have to manually mount from terminal.

    Have tried to write the drive`s UUID into /etc/fstab/ but gets thrown out.

    The commands used to mount the drive are :

    This creates the mount point -

    Code:
    [B]sudo mkdir /media/hd3[/B]
    This mounts the drive :

    Code:
    [B]sudo mount -vs -t jfs -o ro,nointegrity,errors=remount-ro /dev/sdc1 /media/hd3
    [/B]
    Every time have to enter these commands into terminal.

    Print of df -h :

    Code:
    reel@BM2LTSR66RBin:/media/hd/home/reel$ df -h 
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda1        13G  8.4G  3.7G  70% /
    none            4.0K     0  4.0K   0% /sys/fs/cgroup
    udev            2.0G   12K  2.0G   1% /dev
    tmpfs           406M  1.4M  404M   1% /run
    none            5.0M     0  5.0M   0% /run/lock
    none            2.0G  148K  2.0G   1% /run/shm
    none            100M   28K  100M   1% /run/user
    /dev/sda4       445G  4.8G  417G   2% /media/hd
    /dev/sdd1       1.9T  1.8T   49G  98% /media/hd1
    /dev/sdb1       1.9T  1.3T  557G  71% /media/hd2
    tmpfs            10M     0   10M   0% /media
    /dev/sdc1       2.8T  2.4T  385G  87% /media/hd3
    Print of cat/etc/fstab/ :

    Code:
    reel@BM2LTSR66RBin:/media/hd/home/reel$ cat /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>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    
    # / was on /dev/sda1 during installation
    /dev/sda1 	/               ext4    errors=remount-ro 0       1
    
    # swap was on /dev/sda3 during installation
    /dev/sda3	 none            swap    sw              0       0
    UUID=eb459c80-7168-4749-aab3-36ae9d4eb6e8	/media/hd	auto	defaults,nofail	0	2
    UUID=77dcd436-432a-43d1-8a74-789bb27a672e	/media/hd1	auto	defaults,nofail	0	2
    UUID=c36f1885-62ea-4fcc-9570-1cf15d96bc3a	/media/hd2	auto	defaults,nofail	0	2
    reel@BM2LTSR66RBin:/media/hd/home/reel$
    Here, fstb is showing 3 drives, i just manually mounted the offending drive and it`s not in there ?

    Thanks for all your help on this.
    Last edited by kdeuser; Feb 17, 2015, 01:19 PM.

    #2
    Originally posted by kdeuser View Post
    Hi ,

    Just a small problem on a drive that always mounted at boot up and now have to manually mount from terminal.

    Have tried to write the drive`s UUID into /etc/fstab/ but gets thrown out.

    The commands used to mount the drive are :

    This creates the mount point -

    Code:
    [B]sudo mkdir /media/hd3[/B]
    this only has to be run one time , the command "mkdir" creates a directory at the specified location with the specified name and remains until removed by you .

    Originally posted by kdeuser View Post
    This mounts the drive :

    Code:
    [B]sudo mount -vs -t jfs -o ro,nointegrity,errors=remount-ro /dev/sdc1 /media/hd3
    [/B]
    you are shure you are using the JFS file system for this drive ? ,,,,,, and you do realize you are mounting it "read only" > ro<


    Originally posted by kdeuser View Post
    Every time have to enter these commands into terminal.

    Print of df -h :

    Code:
    reel@BM2LTSR66RBin:/media/hd/home/reel$ df -h 
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda1        13G  8.4G  3.7G  70% /
    none            4.0K     0  4.0K   0% /sys/fs/cgroup
    udev            2.0G   12K  2.0G   1% /dev
    tmpfs           406M  1.4M  404M   1% /run
    none            5.0M     0  5.0M   0% /run/lock
    none            2.0G  148K  2.0G   1% /run/shm
    none            100M   28K  100M   1% /run/user
    /dev/sda4       445G  4.8G  417G   2% /media/hd
    /dev/sdd1       1.9T  1.8T   49G  98% /media/hd1
    /dev/sdb1       1.9T  1.3T  557G  71% /media/hd2
    tmpfs            10M     0   10M   0% /media
    /dev/sdc1       2.8T  2.4T  385G  87% /media/hd3
    yup it mounted ................


    Originally posted by kdeuser View Post
    Print of cat/etc/fstab/ :

    Code:
    reel@BM2LTSR66RBin:/media/hd/home/reel$ cat /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>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    
    # / was on /dev/sda1 during installation
    /dev/sda1     /               ext4    errors=remount-ro 0       1
    
    # swap was on /dev/sda3 during installation
    /dev/sda3     none            swap    sw              0       0
    UUID=eb459c80-7168-4749-aab3-36ae9d4eb6e8    /media/hd    auto    defaults,nofail    0    2
    UUID=77dcd436-432a-43d1-8a74-789bb27a672e    /media/hd1    auto    defaults,nofail    0    2
    UUID=c36f1885-62ea-4fcc-9570-1cf15d96bc3a    /media/hd2    auto    defaults,nofail    0    2
    reel@BM2LTSR66RBin:/media/hd/home/reel$
    Here, fstb is showing 3 drives, i just manually mounted the offending drive and it`s not in there ?

    Thanks for all your help on this.
    you manualy mounting the drive will not automatically add it to /etc/fstab ,,,,,,,, you must add it your self .

    post the output of
    Code:
    sudo parted -l
    and we will give you the correct line to add ...........if you want to use UUID's allso post the output of
    Code:
    sudo blkid
    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      Hi VINNY ,

      Yes , i do know that the drive mounts in ro , want it in rw. The mkdir command should only be required once but nooooo......... nothing is ever straight forward is it ? or is it ?

      Ok, output of `sudo parted - l`

      Code:
      reel@BM2LTSR66RBin:/media/hd/home/reel$ sudo parted -l
      [sudo] password for reel: 
      Model: ATA TOSHIBA MQ01ABD0 (scsi)
      Disk /dev/sda: 500GB
      Sector size (logical/physical): 512B/4096B
      Partition Table: msdos
      
      Number  Start   End     Size    Type     File system     Flags
       1      32.3kB  14.0GB  14.0GB  primary  ext4            boot
       2      14.0GB  14.0GB  8225kB  primary  ext3
       3      14.0GB  15.5GB  1497MB  primary  linux-swap(v1)
       4      15.5GB  500GB   485GB   primary  ext4
      
      
      Model: ATA WDC WD20EARS-00M (scsi)
      Disk /dev/sdb: 2000GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      
      Number  Start   End     Size    File system  Name                Flags
       1      17.4kB  2000GB  2000GB  jfs          Linux/Windows data  msftdata
      
      
      Model: ATA WDC WD30EZRS-00J (scsi)
      Disk /dev/sdc: 3001GB
      Sector size (logical/physical): 512B/4096B
      Partition Table: gpt
      
      Number  Start   End     Size    File system  Name                Flags
       1      17.4kB  3001GB  3001GB  jfs          Linux/Windows data  msftdata
      
      
      Model: ATA ST32000542AS (scsi)
      Disk /dev/sdd: 2000GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      
      Number  Start   End     Size    File system  Name                Flags
       1      17.4kB  2000GB  2000GB  jfs          Linux/Windows data  msftdata
      reel@BM2LTSR66RBin:/media/hd/home/reel$
      Output of blkid :

      Code:
      reel@BM2LTSR66RBin:/media/hd/home/reel$ sudo blkid
      [sudo] password for reel: 
      /dev/sda1: UUID="dbfcd848-5a9e-43dd-bbf7-179679e21be7" TYPE="ext4" 
      /dev/sda2: UUID="ffe33e8a-9853-4af2-b73e-392912da6bcb" SEC_TYPE="ext2" TYPE="ext3" 
      /dev/sda3: UUID="ad73c128-bd08-4cd6-ab6c-a4524165c271" TYPE="swap" 
      /dev/sda4: LABEL="Reel Media Drive" UUID="eb459c80-7168-4749-aab3-36ae9d4eb6e8" TYPE="ext4" 
      /dev/sdb1: LABEL="Reel Media Drive" UUID="c36f1885-62ea-4fcc-9570-1cf15d96bc3a" TYPE="jfs" 
      /dev/sdd1: LABEL="Reel Media Drive" UUID="77dcd436-432a-43d1-8a74-789bb27a672e" TYPE="jfs" 
      /dev/sdc1: LABEL="Reel Media Drive" UUID="41c3909e-78ab-4bf7-b2dc-5d541a6aa8b9" TYPE="jfs" 
      reel@BM2LTSR66RBin:/media/hd/home/reel$

      Comment


        #4
        do
        Code:
        kdesudo kate /etc/fstab
        or if in unity or Gnome
        Code:
        gksudo gedit /etc/fstab
        (or gksu depending on how the sys is set up)and add to the bottom of the file

        Code:
        /dev/sdc1     /media/hd3       jfs              defaults        0   0
        or for UUID use 41c3909e-78ab-4bf7-b2dc-5d541a6aa8b9 in place of , "/dev/sdc1"


        VINNY
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment


          #5
          @ VINNY,

          Doesn`t work , again the line gets thrown out at boot.

          UUID=41c3909e-78ab-4bf7-b2dc-5d541a6aa8b9 /media/hd3 jfs defaults 0 0

          UUID=41c3909e-78ab-4bf7-b2dc-5d541a6aa8b9 /media/hd3 jfs defaults,nofail 0 0


          UUID=eb459c80-7168-4749-aab3-36ae9d4eb6e8 /media/hd auto defaults,nofail 0 2

          Which of the commands in bold do i use ? Are those spaces significant ?

          Comment


            #6
            Originally posted by kdeuser View Post

            Print of df -h :

            Code:
            reel@BM2LTSR66RBin:/media/hd/home/reel$ df -h 
            Filesystem      Size  Used Avail Use% Mounted on
            /dev/sda1        13G  8.4G  3.7G  70% /
            none            4.0K     0  4.0K   0% /sys/fs/cgroup
            udev            2.0G   12K  2.0G   1% /dev
            tmpfs           406M  1.4M  404M   1% /run
            none            5.0M     0  5.0M   0% /run/lock
            none            2.0G  148K  2.0G   1% /run/shm
            none            100M   28K  100M   1% /run/user
            /dev/sda4       445G  4.8G  417G   2% /media/hd
            /dev/sdd1       1.9T  1.8T   49G  98% /media/hd1
            /dev/sdb1       1.9T  1.3T  557G  71% /media/hd2
            tmpfs            10M     0   10M   0% /media
            /dev/sdc1       2.8T  2.4T  385G  87% /media/hd3
            Wait ... you have tmpfs mounted on /run and /media? That seems very very odd. Does this seem normal to anyone else?
            I'd rather be locked out than locked in.

            Comment


              #7
              Originally posted by kdeuser View Post
              @ VINNY,

              Doesn`t work , again the line gets thrown out at boot.
              how are you editing the file ,,,,,,,,,,,do you save and close ,,,,,,,,,then reopen and see if your edit took .

              strange

              and yes @SecretCode ,,,, that seems strange .

              VINNY
              i7 4core HT 8MB L3 2.9GHz
              16GB RAM
              Nvidia GTX 860M 4GB RAM 1152 cuda cores

              Comment


                #8
                Originally posted by SecretCode View Post
                Wait ... you have tmpfs mounted on /run and /media? That seems very very odd. Does this seem normal to anyone else?
                Mounting /media as tmpfs explains why none of the subdirectories inside it persist across reboots. /media should be a standard subdirectory in /.

                Comment


                  #9
                  Originally posted by vinnywright View Post
                  how are you editing the file ,,,,,,,,,,,do you save and close ,,,,,,,,,then reopen and see if your edit took .

                  strange

                  and yes @SecretCode ,,,, that seems strange .

                  VINNY
                  The answer is yes, i check to see by closing fstab and then reopening .

                  The edit is there , on reboot it is not.

                  @SteveRiley,

                  Can this /media as tmps anomaly be solved ?
                  Last edited by kdeuser; Feb 18, 2015, 04:36 AM.

                  Comment


                    #10
                    I'm sure it can be solved - but from what you've posted it's not obvious where this is being triggered.

                    Can you do a fresh boot, and before mounting anything or indeed running anything manually, copy and post the output of mount?
                    And maybe the /etc/fstab as it is straight after booting.
                    And output of ls -ld /media

                    If mount shows /media as tmpfs right from boot time I'm guessing we might have to go digging through startup scripts.
                    Last edited by SecretCode; Feb 18, 2015, 10:27 AM.
                    I'd rather be locked out than locked in.

                    Comment


                      #11
                      Originally posted by SecretCode View Post
                      I'm sure it can be solved - but from what you've posted it's not obvious where this is being triggered.

                      Can you do a fresh boot, and before mounting anything or indeed running anything manually, copy and post the output of mount?
                      And maybe the /etc/fstab as it is straight after booting.
                      And output of ls -ld /media

                      If mount shows /media as tmpfs right from boot time I'm guessing we might have to go digging through startup scripts.
                      If I remember correctly, kdeuser is not using Kubuntu. He's using Kodi or XMBC or something with Kubuntu-desktop installed on top of it. No doubt the /media as tmpfs originates there. I'd start with XSession scripts and see what's there.

                      An alternate solution would be to mount all the HDs to subfolders of /mnt then use bind mounts via a login script to mount them to /media. What a PITA though.

                      Please Read Me

                      Comment


                        #12
                        Originally posted by oshunluvr View Post
                        If I remember correctly, kdeuser is not using Kubuntu. He's using Kodi or XMBC or something with Kubuntu-desktop installed on top of it. No doubt the /media as tmpfs originates there. I'd start with XSession scripts and see what's there.
                        Or, as suggested in another thread I read after posting last night, rebuild with Kubuntu as the base (to obtain a standard Ubuntu setup) and then install the multimedia bits on top of that. Reverse engineering this weird build so that Kubuntu will run sounds brittle and will likely be a continual source of problems.

                        Comment


                          #13
                          @SecretCode,

                          Readout of mount right after boot :

                          Code:
                          reel@BM2LTSR66RBin:/media/hd/home/reel$ mount
                          /dev/sda1 on / type ext4 (rw,errors=remount-ro)
                          proc on /proc type proc (rw,noexec,nosuid,nodev)
                          sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
                          none on /sys/fs/cgroup type tmpfs (rw)
                          none on /sys/fs/fuse/connections type fusectl (rw)
                          none on /sys/kernel/debug type debugfs (rw)
                          none on /sys/kernel/security type securityfs (rw)
                          udev on /dev type devtmpfs (rw,mode=0755)
                          devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
                          tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
                          none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
                          none on /run/shm type tmpfs (rw,nosuid,nodev)
                          none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
                          none on /sys/fs/pstore type pstore (rw)
                          tmpfs on /media type tmpfs (rw,relatime,size=10240k)
                          /dev/sda4 on /media/hd type ext4 (rw,_netdev)
                          /dev/sdb1 on /media/hd1 type jfs (rw,_netdev)
                          /dev/sdd1 on /media/hd2 type jfs (rw,_netdev)
                          binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
                          rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
                          systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
                          nfsd on /proc/fs/nfsd type nfsd (rw)
                          gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=reel)
                          Readout from /etc/fstab :

                          Code:
                          reel@BM2LTSR66RBin:/media/hd/home/reel$ cat /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>
                          proc            /proc           proc    nodev,noexec,nosuid 0       0
                          
                          # / was on /dev/sda1 during installation
                          /dev/sda1 	/               ext4    errors=remount-ro 0       1
                          
                          # swap was on /dev/sda3 during installation
                          /dev/sda3	 none            swap    sw              0       0
                          UUID=eb459c80-7168-4749-aab3-36ae9d4eb6e8	/media/hd	auto	defaults,nofail	0	2
                          UUID=c36f1885-62ea-4fcc-9570-1cf15d96bc3a	/media/hd1	auto	defaults,nofail	0	2
                          UUID=77dcd436-432a-43d1-8a74-789bb27a672e	/media/hd2	auto	defaults,nofail	0	2
                          Readout from ls -ld /media :

                          Code:
                          reel@BM2LTSR66RBin:/media/hd/home/reel$ ls -ld /media
                          drwxrwxrwt 8 root root 160 Feb 18 20:03 /media
                          @oshunluvr,

                          "An alternate solution would be to mount all the HDs to subfolders of /mnt then use bind mounts via a login script to mount them to /media. What a PITA though."

                          If no solution is found , this seems feasible but would need some guidance.

                          @SteveRiley,

                          "rebuild with Kubuntu as the base (to obtain a standard Ubuntu setup) and then install the multimedia bits on top of that. Reverse engineering this weird build so that Kubuntu will run sounds brittle and will likely be a continual source of problems."

                          Don`t really want to go that route.
                          Last edited by kdeuser; Feb 18, 2015, 01:49 PM.

                          Comment


                            #14
                            So. /media is in RAM (because it's a tmpfs). It has no subdirectories according to ls -ld /media. Yet according to mount three devices are mounted to subdirectories in /media.

                            What is this I don't even

                            Originally posted by kdeuser View Post
                            Don`t really want to go that route.
                            If you want a Kubuntu that is in a predictable state and that we can help you with, I don't think you have an alternate option. That other distro deviates so much from normal Ubuntu that trying to shoehorn Kubuntu onto it is likely to be fraught with problems.

                            Comment


                              #15
                              Originally posted by SteveRiley View Post
                              It has no subdirectories according to ls -ld /media.
                              How do you deduce that? I'd say it has 8 hard links therefore 6 subdirectories.

                              Not that this makes the puzzle any simpler.
                              I'd rather be locked out than locked in.

                              Comment

                              Working...
                              X