Announcement

Collapse
No announcement yet.

fstab in 3 operating systems

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

    fstab in 3 operating systems

    Hello

    I am using at present 3 Operating systems. Kubuntu 14.04, Kubuntu 18.04 and Kubuntu 19.04. The two latter ones are not yet ready to become my standard work horse.

    However I have created an «fstab» (19.04) to mount my 9 Data partitions at start, so they are ready when the Human becomes ready.

    I now would like to copy the content with the 9 partitions into the present «fstab» in the 2 other OS.

    I tried to use Kate by opening the original and then copy the part with the 9 partitions and save it again. This did not work. I did the same with Krusader (ROOT), but this did neither work, the fstabs have not accepted the changes.

    Now, I am a loss and would like to get some practical step for step help how to do this with the console. Or any other way which works.

    To show you the 3 fstabs, I have made 3 pics.
    Attached Files
    Greetings from Scotland's best holiday island – The Isle of Arran
    I keep fighting for an independent Scotland without any nuclear weapons. If the Englanders want them, they can host them. We do not.

    #2
    You don't say why this didn't work (error messages? password not working?).

    Regardless, there are a couple ways to do this.

    The only reason Kate would have failed I can think of is you had 14.04 and 18.04 mounted as read-only. Otherwise, Kate would have asked you for the root password and allowed you to save the edits. You should be able to open all three fstab files in a single Kate session and edit and save them.

    The command line way would be;
    Boot to 19.04.
    Mount 14.04 and 18.04 root partions somewhere.
    Open fstab from 19.04 with kate or kwrite.
    Highlight and Copy the desired parts of fstab (I assume 9 lines of mounts).
    Open a terminal run the nano editor as root: sudo nano <where you mounted 14.04>/etc/fstab
    Move the cursor to the bottom of fstab and paste the entries (Shift-Insert pastes in nano).
    Save and exit nano (CTRL-x, y).
    Repeat for 18.04.

    Note that fstab files require a single blank line (trailing carriage return) at the end of the file. Also, a type in fstab can prevent your system from booting so take your time and use caution.

    Please Read Me

    Comment


      #3
      Hello and a great thank you.

      1) no error messages, just not accepted.

      2) how can I check how I mounted as read-only? If possible, I prefer the gui version.
      Greetings from Scotland's best holiday island – The Isle of Arran
      I keep fighting for an independent Scotland without any nuclear weapons. If the Englanders want them, they can host them. We do not.

      Comment


        #4
        How are you mounting them?

        The easiest way to tell what mount options are used is to open a terminal and type "mount"

        Please Read Me

        Comment


          #5
          The fstab entries in the 19.04 file have a problem IMO. You've used "/media/arran", the directory used for removable media. That directory doesn't normally exist at boot time, it's created by the udev subsystem when it's needed.

          For fstab mounts the usual directory is /mnt, and the mount points should exist; you can create them with sudo mkdir.

          BTW, since you've put nice labels on the file systems, you could use "LABEL=" instead of "UUID=" in the fstab entries, to make them more readable.

          Regards, John Little
          Regards, John Little

          Comment


            #6
            The 19.04 entry for dots_and_scribbl is not complete. I'm not sure if this is related to your original problem, but it supports my point about readability. I format my fstab files so that they're a table with the columns lining up, and some errors are easily spotted.

            Regards, John Little
            Regards, John Little

            Comment


              #7
              Originally posted by jlittle View Post
              The 19.04 entry for dots_and_scribbl is not complete.
              It's missing the "ext4 nofail,users,rw,noatime,dev 0 2" that follows after "media/arran/dots-and-scribbl". It should look like this:

              Code:
              UUID=f341e5ae-6476-4b08-9680-a5ff5f7a6ebc   media/arran/dots-and-scribbl   ext4  nofail,users,rw,noatime,dev  0  2
              (assuming that partition is ext4)
              Using Kubuntu Linux since March 23, 2007
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Originally posted by jlittle View Post
                The fstab entries in the 19.04 file have a problem IMO. You've used "/media/arran", the directory used for removable media. That directory doesn't normally exist at boot time, it's created by the udev subsystem when it's needed.

                For fstab mounts the usual directory is /mnt, and the mount points should exist; you can create them with sudo mkdir.

                BTW, since you've put nice labels on the file systems, you could use "LABEL=" instead of "UUID=" in the fstab entries, to make them more readable.

                Regards, John Little
                I do use this system to mount directly via /media/arran without any problems since 2014. The big change came this time as I have reorganised all my hard disks and partitions. At the same time changed from NTFS to ext4.
                This system does also work perfectly with the 19.04, but I do need it at present also for the 14.04 and 18.04. Once the two newer OS run to my satisfaction, I will bury my faithful 14.04 with all possible honours.

                To your second remark: I did have it similar to your suggestion but decided to keep the longer way until all works.
                Greetings from Scotland's best holiday island – The Isle of Arran
                I keep fighting for an independent Scotland without any nuclear weapons. If the Englanders want them, they can host them. We do not.

                Comment


                  #9
                  To jllittle and Snowhog:

                  Thanks for seeing the error. It is now corrected.
                  Greetings from Scotland's best holiday island – The Isle of Arran
                  I keep fighting for an independent Scotland without any nuclear weapons. If the Englanders want them, they can host them. We do not.

                  Comment


                    #10
                    Thinking about your original problem, I suggest:
                    1. Boot into the OS that you want to change.
                    2. Use dolphin to navigate to the 19.04 /etc, perhaps by clicking on kubu-1904 in the places panel, and open the fstab. You might have to right-click to choose a suitable "open with" option. Any app that lets you see the contents will do.
                    3. Select the lines you want to copy.
                    4. In a konsole, type EDITOR=kate sudoedit /etc/fstab. It might ask you for your password. Use another editor instead of kate if you prefer; nano is a simple text-mode editor that is always there.
                    5. Paste the text. If ctrl-v doesn't work, ctrl-shift-v or middle-click might. Check the results.
                    6. Save and exit.

                    Using sudoedit in a konsole has a good chance of showing you what goes wrong if it doesn't work.
                    Regards, John Little

                    Comment


                      #11
                      Hello

                      Just wait a week, do not bother and a miracle happens. Since 3 days now the fstab runs smoothly. Thanks many time for your patient and your help.
                      Greetings from Scotland's best holiday island – The Isle of Arran
                      I keep fighting for an independent Scotland without any nuclear weapons. If the Englanders want them, they can host them. We do not.

                      Comment

                      Working...
                      X