Announcement

Collapse
No announcement yet.

Adding extra ssd causing problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding extra ssd causing problems

    Hi,
    My new-to-me refurbished Thinkcentre Tiny came with a 128GB nvme, which is fine. I didn't want any larger because I've got a 1TB SSD that was in my old computer. I created a new partition table and an ext4 partition on the SSD then put it in and followed these instructions to mount it (missing out the 'Partition' section, since I'd already done that.

    Alas, when I entered this:

    Code:
    sudo mount /hdd
    ​
    I got this:

    Code:
    mount: /hdd: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error.
          dmesg(1) may have more information after failed mount system call.
    mount: (hint) your fstab has been modified, but systemd still uses
          the old version; use 'systemctl daemon-reload' to reload.
    ​
    I tried
    Code:
    systemctl daemon reload
    and got this:

    Code:
    mount: /hdd: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error.
          dmesg(1) may have more information after failed mount system call.[/FONT]
    ​
    The SSD is showing up in the sidebar of Dolphin as an internal drive -sda1 - and I can open it. It contains a locked lost and found folder but I can't put anything in it. I get an 'Access denied' error message.

    I am at a loss. Any web searches I do give me very old stuff and seem to deal a lot with mounting external hard drives.

    I'd be grateful for some pointers.

    #2
    I've just realised that I've put this in the wrong section. I'm really sorry. I meant to put it in Newbie Support but did a search in this one and forgot to navigate back before starting the topic.

    Again, my apologies.

    Comment


    • claydoh
      claydoh commented
      Editing a comment
      This is fixable

    #3
    When mounting manually , you need to specify the full partition as well as the location. So sudo mount /dev/sda1 /media/username/some_directory, for example.
    This is what Plasma is doing via its autoumount settings.


    The issue you are seeing with not being able to access the mounted drive partition is that your user does not have ownership/permissions to be able to write to it.
    This can be annoying at first, but it is one of the core things in Linux file systems.

    if you are running Kubutnu 23.04, you can simply use Partition Manager to set this up for all user access, by creating a new partition:

    Click image for larger version

Name:	Screenshot_20230519_160350-1.png
Views:	182
Size:	63.1 KB
ID:	670903

    If you are using a previous release, you will need to do some manual intervention.

    You need to find where the partition is mounted in Dolphin, just click on the name/location just above the window there to see it. it will be something similar to this:

    /media/your-username/some-long-string-of-text/

    So, in the terminal:
    Code:
     sudo chown -R your_username:your_username /media/your-username/some-long-string-of-text
    Quick tip: if you create a label for the new partition, that label will become the folder name where it auto-mounts, and what Dolphin will show for it on the sidebar.
    You can also add a label after the fact, without losing any data.


    Comment


      #4
      Welcome!

      Probably your SSD is owned by root.

      To change the ownership you have to do the following for the mounted drive (simply mount it in Dolphin first):

      Open the Konsole terminal emulator and enter
      cd /media/$USER (this is the directory where Dolphin mounts the drive)
      ls -l (to see the permissions and name of the mounted drive)
      sudo chown $USER:$USER name_of_the_drive (to change the ownership of the [empty] drive)
      ls -l (to check that the ownership was changed to your username)

      Now you should be able to read from and write to the drive in Dolphin.

      If you want to mount the drive in Konsole instead see man mount .
      The standard form of the mount command is mount -t type device dir .

      PS:
      claydoh : Sorry, I didn't see you had already answered this. I was talking to my other half on the phone on the side…

      PPS:
      Originally posted by claydoh View Post
      […]
      Quick tip: if you create a label for the new partition, that label will become the folder name where it auto-mounts, and what Dolphin will show for it on the sidebar.
      You can also add a label after the fact, without losing any data.

      One could do this in a GUI with the KDE Partition Manager or GParted for example.
      Last edited by Schwarzer Kater; May 19, 2023, 03:04 PM. Reason: added PPS
      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

      get rid of Snap scriptreinstall Snap for release-upgrade scriptinstall traditional Firefox script

      Comment


        #5
        Thank you both,

        I'm on 23.04, so I followed your instructions, Claydoh, using partition manager.I think I may have messed up my /etc/fstab file with my inept fumblings before I asked for help, because I've got this error message in Dolphin window when I tried to mount the disk:

        An error occurred while accessing 'intssd', the system responded: The requested operation has failed: Error mounting system-managed device /dev/sda1: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error

        Comment


          #6
          Then you could post your /etc/fstab here within CODE tags - so the forum members can have a look if it is and what is messed up.

          Btw: I always recommend to backup system files before modifying them - in this case: sudo cp /etc/fstab /etc/fstab.orig .
          Last edited by Schwarzer Kater; May 19, 2023, 03:11 PM.
          Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
          Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

          get rid of Snap scriptreinstall Snap for release-upgrade scriptinstall traditional Firefox script

          Comment


            #7
            Originally posted by Danceswithcats View Post
            Thank you both,

            I'm on 23.04, so I followed your instructions, Claydoh, using partition manager.I think I may have messed up my /etc/fstab file with my inept fumblings before I asked for help, because I've got this error message in Dolphin window when I tried to mount the disk:

            An error occurred while accessing 'intssd', the system responded: The requested operation has failed: Error mounting system-managed device /dev/sda1: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error
            So, copy your fstab here, so we can see it
            as well as the output from lsblk in the terminal, so we can see the exact partitions you have.
            It should be an easy fix.The file does need a specific format and options specified, but it isn't difficult to show what you need to add.

            You can also simply ignore the fstab, or rather just remove the info you added to it, and simply use Automount -- see options for this in System Settings.

            Comment


              #8
              Originally posted by claydoh View Post

              So, copy your fstab here, so we can see it
              I should have thought of that! It's late here and I'm tired.

              # /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/nvme0n1p3 during installation
              UUID=36a319d0-97af-4a57-b29b-486ec08536ed / ext4 errors=remount-ro 0 1
              # /boot/efi was on /dev/nvme0n1p2 during installation
              UUID=C3A1-D27D /boot/efi vfat umask=0077 0 1
              /swapfile none swap sw 0 0
              LABEL=intssd /media/intssd vfat defaults 0 2



              lsblk gave me this:

              NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
              loop0 7:0 0 4K 1 loop /snap/bare/5
              loop1 7:1 0 73M 1 loop /snap/core22/607
              loop2 7:2 0 73.1M 1 loop /snap/core22/634
              loop3 7:3 0 460.6M 1 loop /snap/gnome-42-2204/102
              loop4 7:4 0 460.4M 1 loop /snap/gnome-42-2204/68
              loop5 7:5 0 91.7M 1 loop /snap/gtk-common-themes/1535
              loop6 7:6 0 49.8M 1 loop /snap/snapd/18596
              sda 8:0 0 953.9G 0 disk
              └─sda1 8:1 0 953.9G 0 part
              nvme0n1 259:0 0 119.2G 0 disk
              ├─nvme0n1p1 259:1 0 1M 0 part
              ├─nvme0n1p2 259:2 0 513M 0 part /boot/efi
              └─nvme0n1p3 259:3 0 118.7G 0 part /


              Comment


                #9
                Change it to lsblk -f -e7 to be more informative, please.

                I already can tell that you will have to change the last line in /etc/fstab .

                For your / (root) partition it should better be:
                UUID=36a319d0-97af-4a57-b29b-486ec08536ed / ext4 noatime,errors=remount-ro 0 1
                Last edited by Schwarzer Kater; May 19, 2023, 04:02 PM.
                Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                get rid of Snap scriptreinstall Snap for release-upgrade scriptinstall traditional Firefox script

                Comment


                  #10
                  Originally posted by Schwarzer Kater View Post
                  Change it to lsblk -f -e7 to be more informative, please.
                  Here it is:

                  NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
                  sda
                  └─sda1 ext2 1.0 intssd 4db94f7e-31e5-4a55-a87a-27eb8f5dc46b
                  nvme0n1
                  ├─nvme0n1p1
                  ├─nvme0n1p2 vfat FAT32 C3A1-D27D 505.9M 1% /boot/efi
                  └─nvme0n1p3 ext4 1.0 36a319d0-97af-4a57-b29b-486ec08536ed 98.2G 10% /


                  Comment


                    #11
                    Last line of you /etc/fstab should be:
                    UUID=4db94f7e-31e5-4a55-a87a-27eb8f5dc46b /mnt/intssd ext2 noatime,defaults 0 2
                    One could also use label, but for consistency I would use UUID as *Ubuntu does it this way.

                    You will have to sudo mkdir /mnt/intssd before and also should unmount you SSD.
                    Afterwards you can sudo mount -av to check.

                    You also should consider re-formatting the drive with ext4 and changing the /etc/fstab accordingly afterwards…

                    PS: /media is preferably for removable media and also used by systems for auto-mount.
                    Last edited by Schwarzer Kater; May 19, 2023, 04:08 PM. Reason: added PS etc.
                    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                    get rid of Snap scriptreinstall Snap for release-upgrade scriptinstall traditional Firefox script

                    Comment


                      #12
                      Originally posted by Schwarzer Kater View Post
                      PS: /media is preferably for removable media and also used by systems for auto-mount.
                      yes,which takes most of this alien and weird stuff out of the picture for new folks
                      1. remove all added fstab info you edited.
                      2. reboot
                      3. access the drive, after changing ownership of /media/my-name/some-drive-name
                      4. profit
                      5. Then start experimenting and learning.
                      Of course, replacing 1. with 5. is a heck of a lot of fun, and saves steps. maybe
                      Last edited by claydoh; May 19, 2023, 04:32 PM.

                      Comment


                        #13
                        Thanks again claydoh and Schwarzer Kater.

                        I have cheated and reinstalled the OS. Sorry. However, it's playing nicely with the SSD now and my Nextcloud folder is syncing as I type.

                        claydoh, I appreciate what you say about experimenting and learning. All is not wasted. I have learnt how to use kde partition manager to auto mount a disk. I have learnt what the best partition table format and partition formats are for a new install of linux. I have also learnt that fstab is beyond my competence level. Knowing one's limits is, after all, an essential part of wisdom, particularly for an old man.

                        I seem to have a lovely computer that will be able to do what I need it for. I do have to get to grips with changing the virtualisation settings in Lenovo BIOS, which will, no doubt, be another battle, but that's probably not a question for this forum.

                        Anyway, my sincere thanks. It can't be easy dealing with question after question. I am always extremely grateful to forum volunteers.

                        Comment


                          #14
                          Originally posted by Danceswithcats View Post
                          fstab is beyond my competence level.
                          But less so now, even if just a little

                          Originally posted by Danceswithcats View Post
                          Knowing one's limits is, after all, an essential part of wisdom, particularly for an old man.
                          I think you might be surprised at the general age level of us in here, which in my casual guess-timation, quite........umm....wise?

                          Originally posted by Danceswithcats View Post
                          I do have to get to grips with changing the virtualisation settings in Lenovo BIOS, which will, no doubt, be another battle, but that's probably not a question for this forum.
                          Don't let that stop you, we can try helping if we can.

                          What model do you have?

                          Comment


                            #15
                            I think he has a Lenovo ThinkCentre M710q Tiny with Intel i7-6700T.
                            For this model one can find some UEFI/BIOS settings in chapter 5/page 21: https://download.lenovo.com/pccbbs/t..._201702_en.pdf
                            Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                            Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                            get rid of Snap scriptreinstall Snap for release-upgrade scriptinstall traditional Firefox script

                            Comment

                            Working...
                            X