Announcement

Collapse
No announcement yet.

Linux machine won't come out of hibernation...

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

  • Linux machine won't come out of hibernation...

    I'm running a newer version (18.04, I think). It's a self-built machine.

    The problem is, it's in "hibernate" mode, and won't come out of it unless I reboot. Something's definitely wrong.

    What can I do to fix this?
    Skilled programmers aren't cheap. Cheap programmers aren't skilled.

  • #2
    Turn off hibernate? It may not be compatible.

    https://www.linuxandubuntu.com/home/...n-ubuntu-linux
    says a lot of hardware and distros don't support it properly, and the test is basically do what you've done - try and hibernate, and if it doesn't come back, it's probably not supported. There's some other stuff there too about how to configure things, if you've done all that and no joy then it's likely your PC is not bear-friendly.
    This was one of those times where my mouth says "have a nice day" but my brain says "go step on a Lego". - RegisterAce
    I can't make something magically appear to fulfill all your hopes and dreams. Believe me, if I could I'd be the first person I'd help. - Trixie

    Comment


    • #3
      I agree with RealUnimportant. I never allow my Linux boxes to hibernate.
      Just sliding down the razor blade of life.

      Comment


      • #4
        I'll give that a shot and report back.
        Skilled programmers aren't cheap. Cheap programmers aren't skilled.

        Comment


        • #5
          If it goes into hibernation and doesn't come out, I'll let you know.

          But this brings me to another question. I'm running Ubuntu 20.04, and I have three drives, A Solid State that contains the OS, and a 3TB and a 6TB. For some reason, the 3 and 6 don't show up in file explorer (or whatever it's called).

          However, running fdisk -l shows me the three drives. It shows my 6TB on /dev/sda and my 3TB on /dev/sdb

          So how can I get those drives to show up in my file explorer?
          Skilled programmers aren't cheap. Cheap programmers aren't skilled.

          Comment


          • #6
            Without sitting at your computer and poking around, I couldn't even guess why the disks aren't showing up, but assuming the drives are properly partitioned and formatted -- usually meaning there exists, at the very least, /dev/sda1 and /dev/sdb1 -- you can just mount them in a convenient spot. From the terminal:

            Code:
            mount /dev/sda1 /mnt/data
            mount /dev/sdb1 /mnt/NAS_DRIVE
            If you do it this way, the kernel will try to determine the partition's file system and mount it with the default options, which are suitable for most people (although the defaults for FAT and NTFS drive me nuts). Mounting drives in this way just attaches them to the file system in a seamless manner that makes them appear essentially as one large drive. If you want them to mount at every boot, you'll need to add entries to /etc/fstab:

            Code:
            /dev/sda1 /mnt/data      auto defaults 0 0
            /dev/sdb1 /mnt/NAS_DRIVE auto defaults 0 0
            (The extra spaces between "data" and "auto" are for readability and aren't needed by the system.)

            ...where "auto" is the file system type (e.g. ntfs, ext4, fat, etc) and "defaults" are the options to use (and each file system has its own options; for NTFS I typically use "fmask=133,ro" but for ext* I just use "defaults"). Note that doing this does not automatically mount the drives when you write the entries; you need to either mount them manually this one time or else restart the system.

            Note that this is not the same as mounting them using whatever methods the GUI uses, which I believe mounts them under something like "/media" or whatever. (Can't remember, I don't do Ubuntu.)

            If they aren't properly partitioned, e.g. no sda1 or whatever, you'll need to do so. There should be tools to do so somewhere on your system; if all else fails you can use gdisk (not fdisk; gdisk is needed for disks larger than ~2TB) but that is rather non-user-friendly. Note: Partitioning and/or formatting erases data. Do not do this to a drive with data you want to keep. Also, don't do this if you don't know what you're doing.

            Edit: Add my vote for not hibernating.
            Fool me once, shame on you. Fool me twice, you speak with the Fraud department. -- CrazedClerkthe2nd
            OW! Rolled my eyes too hard, saw my brain. -- Seanette
            she seems to top me in crazy, and I'm enough crazy for my family. -- Cooper
            Yes, I am evil. What's your point? -- Jester

            Comment


            • #7
              @Deserted:

              I ran fdisk -l and got the following:


              Disk /dev/loop0: 9.14 MiB, 9580544 bytes, 18712 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

              ... skip a few...

              Disk /dev/loop7: 117.95 MiB, 123658240 bytes, 241520 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


              Disk /dev/nvme0n1: 465.78 GiB, 500107862016 bytes, 976773168 sectors
              Disk model: WDC WDS500G2B0C-00PXH0
              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: gpt
              Disk identifier: 9C2E3AD9-8772-46C2-A840-2065EC2F2D6B

              Device Start End Sectors Size Type
              /dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
              /dev/nvme0n1p2 1050624 976771071 975720448 465.3G Linux filesystem


              Disk /dev/sda: 5.47 TiB, 6001175126016 bytes, 11721045168 sectors
              Disk model: TOSHIBA HDWR160
              Units: sectors of 1 * 512 = 512 bytes
              Sector size (logical/physical): 512 bytes / 4096 bytes
              I/O size (minimum/optimal): 4096 bytes / 4096 bytes


              Disk /dev/sdb: 2.75 TiB, 3000592982016 bytes, 5860533168 sectors
              Disk model: WDC WD30EZRX-00D
              Units: sectors of 1 * 512 = 512 bytes
              Sector size (logical/physical): 512 bytes / 4096 bytes
              I/O size (minimum/optimal): 4096 bytes / 4096 bytes
              Disklabel type: dos
              Disk identifier: 0xd6ad236e

              Device Boot Start End Sectors Size Id Type
              /dev/sdb1 2048 4294967294 4294965247 2T 83 Linux


              Disk /dev/sdc: 465.78 GiB, 500107862016 bytes, 976773168 sectors
              Disk model: WDC WD5000AAKX-0
              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: 0x000e82d4

              Device Boot Start End Sectors Size Id Type
              /dev/sdc1 2048 970631167 970629120 462.9G 83 Linux
              /dev/sdc2 970633214 976771071 6137858 2.9G 5 Extended
              /dev/sdc5 970633216 976771071 6137856 2.9G 82 Linux swap / Solaris


              Disk /dev/loop8: 187.3 MiB, 196116480 bytes, 383040 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

              ... a whole lot more of these...

              Disk /dev/loop71: 132.75 MiB, 139182080 bytes, 271840 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
              Skilled programmers aren't cheap. Cheap programmers aren't skilled.

              Comment


              • #8
                As I don't know which file explorer you are using, I can't be 100% sure, but the file explorer usually sows the files in the file systems. It does not display disk info. There is only one directory tree in Linux. Each drive is part of the tree, Unlike Windows were you have a directory tree for each drive.
                Life is too short to not eat popcorn.
                Save the Ales!
                Toys for Tots at Rooster's Cafe

                Comment


                • #9
                  Quoth csquared View Post
                  As I don't know which file explorer you are using, I can't be 100% sure, but the file explorer usually sows the files in the file systems. It does not display disk info. There is only one directory tree in Linux. Each drive is part of the tree, Unlike Windows were you have a directory tree for each drive.
                  Don't know if it's helpful, but I think it's the one that comes with Ubuntu 20.04. I have the "icons" along the left side, one looks like a HDD. If I click that, I get a "file explorer" that has the following down the left side:

                  Recent
                  Starred
                  Home
                  Desktop
                  Documents
                  Downloads
                  Music
                  Pictures
                  Videos
                  Trash
                  --------------
                  <cell phone>
                  efi
                  Filesystem root
                  <mp3 player>
                  ---------------
                  + Other Locations

                  Under my old version, I had an entry for my main HDD (where ubuntu was installed) and a separate entry for a different HDD. This time I don't have that.

                  And when I look at the properties of "Filesystem root", it only gives me the 500 GB drive, which is where Ubuntu is stored.
                  Skilled programmers aren't cheap. Cheap programmers aren't skilled.

                  Comment


                  • #10
                    Do you have a folder anywhere called Mounts?
                    This was one of those times where my mouth says "have a nice day" but my brain says "go step on a Lego". - RegisterAce
                    I can't make something magically appear to fulfill all your hopes and dreams. Believe me, if I could I'd be the first person I'd help. - Trixie

                    Comment


                    • #11
                      Quoth RealUnimportant View Post
                      Do you have a folder anywhere called Mounts?
                      Is there any specific place I should look for it?
                      Skilled programmers aren't cheap. Cheap programmers aren't skilled.

                      Comment


                      • #12
                        NM, I was going from older knowledge which is either outdated or just misremembered. Deserted's post seems to offer the best info, using his commands they'd all be in a root folder called mnt. We can see that your system is seeing three drives at dev/sda, dev/sdb, and dev/sdc, and judging from that format info I assume the half-gig drive has your OS on it. what happens if you just go to them directly through those paths?
                        This was one of those times where my mouth says "have a nice day" but my brain says "go step on a Lego". - RegisterAce
                        I can't make something magically appear to fulfill all your hopes and dreams. Believe me, if I could I'd be the first person I'd help. - Trixie

                        Comment


                        • #13
                          Late to the party again. Sorry, vacation and all that.

                          Quoth mjr View Post
                          @Deserted:

                          I ran fdisk -l and got the following:
                          None of the loop devices, the SSD, or sdc are really relevant. ¯\_(ツ)_/¯

                          Quoth mjr View Post
                          Disk /dev/sda: 5.47 TiB, 6001175126016 bytes, 11721045168 sectors
                          Disk model: TOSHIBA HDWR160
                          Possibly not partitioned, due to a lack of /dev/sda1, but try 'ls -l /dev/sda*' ("ell ess dash ell") and see what shows up. There's a chance that your distro's version of fdisk doesn't recognize large (>2TB) partitions; that's what gdisk is for. If you see anything beyond just sda, you can mount them wherever you want. (But note that the mount point needs to be an already existing folder/directory, preferably empty. /mnt/whatever, where 'whatever' is the directory to mount the partition on.)

                          Quoth mjr View Post
                          Disk /dev/sdb: 2.75 TiB, 3000592982016 bytes, 5860533168 sectors
                          Disk model: WDC WD30EZRX-00D

                          Device Boot Start End Sectors Size Id Type
                          /dev/sdb1 2048 4294967294 4294965247 2T 83 Linux
                          Already partitioned with a single Linux partition. My above notes about your distro's fdisk apply; that partition should be about 2.9 746 ??? GB bigger if it covers the entire disk, or there might be another partition after that one. (Or just blank space.) May or may not have a file system already.

                          Try running this:

                          Code:
                          mount | grep '/sd'
                          Look to see which drives show up on the list -- those are already in use somewhere. Specifically, check to see if sdb1 has been automounted. And sda, for that matter.


                          If sdb1 is already mounted, just take note of where the system put it. If not, go ahead and mount it somewhere. If it refuses to mount:

                          Code:
                          sudo file -s /dev/sdb1
                          If it doesn't mention a recognizable file system in the data dump -- something like ext2/3/4 or JFS or whatever -- and you're expecting there to be data on it, there's a chance the partition has been corrupted, and you'll need to either perform some data recovery act of God on it, or just consider the data lost and create a new partition:

                          (Note: below here, you will lose all data on the affected partition(s). If you don't want to run that risk, stop.)

                          Code:
                          sudo mkfs.ext4 /dev/sdb1
                          Then mount it wherever you want and/or add a new entry to /etc/fstab as I previously mentioned.


                          If sda is mounted... well... it's not how most people do things, but... take note of where it's mounted, and there you go, I guess. If it's not mounted (which is what I expect) and there's no sda1, then:

                          (Note: more data loss.)

                          Code:
                          sudo gdisk /dev/sda
                          You might need to create a new GPT table; gdisk will let you know whether or not one exists. You'll also need to see if a partition already exists. If one does, note what they are, then quit and don't save changes, and try mounting it somewhere. If not, create a new primary partition, make it type 83 (Linux), write changes, exit, and (to be safe) reboot. When the system comes back up:

                          (Note: data loss again.)

                          Code:
                          sudo mkfs.ext4 /dev/sda1
                          Then mount it and you're good.


                          A side note:

                          Quoth mjr View Post
                          /dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
                          You generally don't want to mount any EFI partitions. Just a head's up.
                          Last edited by Deserted; 07-01-2021, 02:53 AM.
                          Fool me once, shame on you. Fool me twice, you speak with the Fraud department. -- CrazedClerkthe2nd
                          OW! Rolled my eyes too hard, saw my brain. -- Seanette
                          she seems to top me in crazy, and I'm enough crazy for my family. -- Cooper
                          Yes, I am evil. What's your point? -- Jester

                          Comment


                          • #14
                            @Deserted

                            Running ls -l /dev/sda* gives me the following:

                            brw-rw---- 1 root disk 8, 0 Jul 1 07:17 /dev/sda

                            running mount | grep '/sd' just sent me back to the terminal prompt.

                            I'm reluctant to go past that, since the mount command didn't return anything.

                            I do know that my previous version (this current version is 20.04 on a custom built computer) allowed for > 2TB, because I had a 3TB drive with no issues, I just don't recall what I did to get it to show up.

                            Although I might have missed something earlier, because I ran fdisk -l again, and noticed this:

                            /dev/sdc1 (this is a 4.62.9GB drive, the type is listed as Linux)
                            /dev/sdc2 (2.9G, type is listed as "Extended")
                            /dev/sdc5 (2.9G, type listed as "Linux swap / Solaris")

                            But I also see this:

                            dev/sda (this is a 5.47 TB drive)
                            dev/sdb (this is a 2.75 TB drive)
                            dev/sdc (this is a 500 GB drive)
                            Last edited by mjr; 07-01-2021, 12:45 PM.
                            Skilled programmers aren't cheap. Cheap programmers aren't skilled.

                            Comment


                            • #15
                              Oh come one now! I have been assured it is impossible to summon Azathoth with a Linux script. ...you have to use Python.

                              "Why are there entrails all over our walls?" "I typed import "outer.gods" into the Python interpreter. Sorry."
                              I am not an a**hole. I am a hemorrhoid. I irritate a**holes!
                              Procrastination: Forward planning to insure there is something to do tomorrow.
                              Derails threads faster than a pocket nuke.

                              Comment

                              Working...
                              X