I’m trying to understand what happens with optical drives in general, and failing.

Backstory: I still have a SATA burner mounted in an expansion bay. I’ve been upgrading my pc for 15+ years and that bad boy is still kicking through all the upgrades. I bought a brand new ssd. When I went to plug it in, I realized I had run out of sata ports on my motherboard. I do have a usb portable optical drive so I really don’t need the old burner. So I unplugged the optical drive and plugged in the new ssd into the same port.

Now I knew something would break upon boot, but I didn’t care - let’s learn. It of course hangs on boot. If I undo the optical drive/ssd swap, it boots fine. Manjaro btw. But what file knows about that optical drive that needs to change? It’s not fstab-that’s just regular hard drives (no opticals listed there). Everything says that optical drives get mounted at /dev/sr0, but clearly something somewhere else needs to be deleted ala fstab file style. But what file?

I tried searching optical drive on the arch wiki and didn’t find what I was looking for with a quick skim (maybe I need to read it closer again)

Anyways thanks!

  • Catsrules@lemmy.ml
    link
    fedilink
    arrow-up
    29
    ·
    edit-2
    1 year ago

    Sometimes adding/removing a new drive can screw with the BIOS boot order, especially on older machines. I would double check the BIOS boot setting before and after to make sure they stay the same.

    Have you tried just unplugging the optical drive without adding the new SSD in?

    • Kongar@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      1 year ago

      Oh ya, forgot to mention that. It boots fine if I just unplug the optical drive. It’s when I plug in a new ssd into the same sata motherboard port - that’s when it hangs. It’s funny - it actually makes it to the login screen, it hangs only after trying to log in. I can’t even break out to another tty terminal.

      Edit - the motherboard and chip and ram and video card are all new. It’s the old stuff I’m resuing-case, power supply, old hdds, ect

        • Kongar@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Weird.

          So I’m triple booting right now. I’ve got a windows drive and a separate manjaro drive. Those drives are older and getting small in space-so I bought a shiny new ssd.

          Windows works fine, and I moved to arch on the new drive and that is working great. It’s not a big deal - the manjaro drive will get wiped once I’m comfortable the arch install. But I’d like to fix it just for learning purposes. I feel like there’s a text file somewhere that associated the optical drive’s uuid with the sata port that identifies as /dev/sda (but I’m not even sure optical drives have a uuid?)

          Anyways - I think the new drive is fine.

          • mvirts@lemmy.world
            link
            fedilink
            arrow-up
            6
            ·
            1 year ago

            Since it boots without the optical drive I would think it’s not hanging because you swapped the drive. Can you rotate the sata ports of your other drives and try again? Unless you configured something manually all of your drives should be detected automatically on boot. These days Linux partitions are usually identified by uuid in /etc/fstab to avoid issues involving reordering of drives.

            • Kongar@lemmy.dbzer0.comOP
              link
              fedilink
              English
              arrow-up
              4
              ·
              edit-2
              1 year ago

              Did that. fstab uses uuid for identification. If I plug ANY of my drives into that sata port where the optical drive was - manjaro won’t get past login.

              Maybe my manjaro installation is borked and I don’t even know it (it’s actually been pretty good for a while now)

              • mvirts@lemmy.world
                link
                fedilink
                arrow-up
                4
                ·
                1 year ago

                Interesting… Does the optical drive work on a different port? Does your bios treat that port differently?

                • Kongar@lemmy.dbzer0.comOP
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  edit-2
                  1 year ago

                  That I have not tried. I’ll try moving them around and see if it’s an issue with that port.

                  I’ve moved drives to that one port, but I haven’t tried shuffling all the components around.

                  My understanding with sata was that I should be able to move things around all I want. What would change is sda sdb sdc etc, and that’s why you use uuids in fstab. So it was strange to me that I couldn’t plug drives into that first port.

                  I’ll shuffle things around more when I get home and see if I can detect any further patterns.

                  Edit: as far as I can tell that port is nothing special other than it’s the first one. All the same in bios.

      • empireOfLove@lemmy.one
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 year ago

        SSD is sus.

        Make an install USB of any Linux. Remove all your SATA devices and install only the new SSD. Ensure that your BIOS can see it properly, and that it can try to boot from the drive with a no os failure. Install your chosen Linux to the SSD and ensure it boots. If it does just wipe it from the live USB again and try with all your previous sata devices connected. Sounds like it’s trying to mount the drive and it’s got problems or something else electrically is wrong and it’s making rhe motherboard lose its shit.

        • Kongar@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 year ago

          Hmm lots of suspicion at the new drive. I wasn’t as deliberate as you described, but that new ssd now has arch on it and boots fine.

          I guess maybe I’ll ask this question. Should I be able to just unplug an optical drive, and plug in anything else into that sata port without linux hanging? I wouldn’t expect the new drive to DO anything until it’s partitioned/formatted/mounted etc. but can I just swap components and expect to be able to boot?

          • empireOfLove@lemmy.one
            link
            fedilink
            English
            arrow-up
            5
            ·
            1 year ago

            Yes you should be able to safely swap all drives around without any issue, unless you had an unusual setup (such as a swap file, or your bootloader, on a separate drive from your linux install partition).

            Sometimes drives can be formatted/initialized incorrectly from the factory. Most drives, especially those for internal use, are shipped uninitialized, aka they have no file table system whatsoever, which linux should handle safely (but maybe it didn’t). Less often they are shipped with a formatted file system, usually on external USB drives as fat32 or exFAT, and sometimes that FS can be corrupted real good in my experience. Idk. If its working fine now and passes all its self checks its probably just a weird fluke.

          • teft@startrek.website
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            1 year ago

            Check your boot order in your bios. Perhaps the optical drive’s sata port was first in the order and now the drive is there instead. If this drive doesn’t have a bootloader then it can’t boot. And since you are tripling booting maybe the bootloader is on a different drive which needs to be first in the boot order.

            Edit: Also I would take out all drives and try them one at a time in that first port until i could get one to boot, then I would put the other drives into the remaining slots.

            • Kongar@lemmy.dbzer0.comOP
              link
              fedilink
              English
              arrow-up
              3
              ·
              1 year ago

              The boot order is uefi hdd (which I can then pick the hard drive’s boot order in a sub menu), then uefi usb, then uefi optical drive, then network. I don’t think that’s the issue - it should always find something to boot before the optical drive.

              I’m going to try the one drive at a time in that first port thing and add/move the rest around. I haven’t been as deliberate with the troubleshooting here as I should have (I immediately went towards a software issue - fstab or something similar). I could have a port / mobo problem. Need to separate software from hardware issue better. Luckily I have three installed operating systems on three drives and plenty of bootable isos to play with. ;)

              • teft@startrek.website
                link
                fedilink
                arrow-up
                4
                ·
                1 year ago

                Need to separate software from hardware issue better.

                100%. Keep us updated. I personally love a good puzzle.

      • jsveiga
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        When you say “login screen” is it graphical or the console?

        If it’s graphical, can you drop to the console (ctrl+alt+F1 ?) and try to login there? And with a brand new user (create one without the ssd) or root? Just to check if it’s something triggered by a user config pointing to the drive.

        Also, is your fstab using UUIDs or /dev/sdXn?

        After the hang, if you boot without the ssd, can you then find any errors in the message log from the previous boot?

        • Kongar@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          I’ll have to try this

          I tried logging into gui and it hangs. While I’m at the spinning cursor of death, I cannot break out into a console. I’ll try the console first.

          I suspect you are onto the issue here - something in user config is looking for that optical drive and failing.

          Fstab has just hard drives, and it’s by uuid.

          I’m at work now, I can boot into manjaro by unplugging the drive - I’ll check the logs and see if there’s any clues there.

      • Catsrules@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Oh, in that case it sounds like it is having issues reading the SSD drive for some reason. I have seen system hang trying to read a drive over and over again. Usually the drive is bad when that happens. But it could be a bad SATA cable or maybe some kind of a weird format.

        • Kongar@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          It does not-that was the first thing I went after. I thought (incorrectly) that optical drives were in fstab and I was surprised to see only my hard drives there. Then I learned a bit more, sr0, etc and was like hmm, I’m missing something. ;)

  • Kongar@lemmy.dbzer0.comOP
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    Thanks for all the help! Lots of good suggestions in this thread I can try for further troubleshooting. Most importantly, you all confirmed I should be able to unplug an optical drive, put in a new unformatted ssd, and generally move drives around - and linux should still boot. I did not think things would behave that way, so when I had issues I figured it’s of course pilot error. Also explains why I was having such a hard time finding information on the arch wiki ;)

    Now I know something ain’t right, and my guess is its some user configuration (because it does boot, it just hangs later). This has now turned into a side project (what the heck did I break), I’ll update the thread if I figure it out. It’s a pretty clean install, very few AUR packages (mostly flatpaks), and has been otherwise pretty stable-it’ll be interesting to see how it actually broke.

    Thanks for the suggestions!