Announcement

Collapse
No announcement yet.

Stuffed up Swap

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

    Stuffed up Swap

    In my efforts to solve other problems I have inadvertently managed to stuff up my swap. It's still there, it's just that it never gets automatically enabled whenever I restart the computer. At this point the only way I can get it working is to do it manually - ie go into System Settings --> Disk and Filesystems --> Administrator mode --> Enable partition.

    I have two 40gb Hard drives. They look like this:

    Disk WDC WD400JB-00ET
    1 Partition 13.0 gb (unmounted) /dev/sda1
    3 Partition 24.3 gb /home ext3 /dev/sda3 Enabled

    Disk WDC WD400JB-00FM
    1 Partition 29.3gb (root) /dev/sdb1 Enabled
    2 Partition 8.0gb /swap /dev/sdb2 Disabled

    I've tried a few times to make the swap enable at boot but to no avail.

    Also - I have an unounted 13.0gb section on the first drive. How do I mount this?
    P4-2.66<br />320gb HDD<br />256mb Radeon 9200 SE<br />On-Board LAN<br />2gb RAM<br />17&quot; Monitor<br />CD-RW Drive<br />DVD-R/RW Drive<br />http://www.one-salient-oversight.blogspot.com/

    #2
    Re: Stuffed up Swap

    let's see...
    pls, open up a konsole and post the result of the following commands:

    Code:
    dmesg | grep -i swap
    Code:
    sudo fdisk -l /dev/sda /dev/sdb
    Code:
    cat /etc/fstab
    Code:
    ls -l /dev/disk/by-uuid/
    gnu/linux is not windoze

    Comment


      #3
      Re: Stuffed up Swap

      neil@neil-desktop:~$ dmesg | grep -i swap
      [ 692.279084] Adding 8361820k swap on /dev/sdb2. Priority:-1 extents:1 across:8361820k

      --------------------

      neil@neil-desktop:~$ sudo fdisk -l /dev/sda /dev/sdb
      Password:

      Disk /dev/sda: 40.0 GB, 40020664320 bytes
      255 heads, 63 sectors/track, 4865 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes

      Device Boot Start End Blocks Id System
      /dev/sda1 1 1697 13631121 83 Linux
      /dev/sda3 1698 4865 25446960 83 Linux

      Disk /dev/sdb: 40.0 GB, 40020664320 bytes
      255 heads, 63 sectors/track, 4865 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes

      Device Boot Start End Blocks Id System
      /dev/sdb1 1 3824 30716248+ 83 Linux
      /dev/sdb2 3825 4865 8361832+ 82 Linux swap / Solaris

      --------------------

      neil@neil-desktop:~$ cat /etc/fstab
      # /etc/fstab: static file system information.
      #
      # <file system> <mount point> <type> <options> <dump> <pass>
      proc /proc proc defaults 0 0
      # /dev/hdb1
      UUID=04c95748-a0ef-4f0d-a713-ccc1ff83f2b9 / ext3 nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
      # /dev/hda3
      UUID=17693f6f-55e7-45eb-9fba-d7a885cf268b /home ext3 nouser,defaults,atime,auto,rw,dev,exec,suid 0 2
      # /dev/hda1
      # /dev/hdb2
      /dev/scd1 <mount\040point> auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/hdd /media/cdrom0 auto user,atime,noauto,rw,dev,exec,suid 0 0
      /dev/ /media/floppy0 auto user,atime,noauto,rw,dev,exec,suid 0 0
      /dev/scd0 <mount\040point> iso9660 noauto 0 0
      /dev/scd1 auto nouser,atime,auto,rw,nodev,noexec,nosuid 0 0
      /dev/scd1 /media/cdrom1 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/scd1 <mount\040point> auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/scd0 <mount\040point> auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/scd1 <mount\040point> iso9660 noauto 0 0
      /dev/scd1 <mount\040point> auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/scd0 /media/cdrom0 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/scd1 /media/cdrom1 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/scd0 /media/cdrom0 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/scd1 /media/cdrom1 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/sdb2 swap noauto 0 0
      /dev/sdb2 swap noauto 0 0
      /dev/scd0 /media/cdrom0 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/scd1 /media/cdrom1 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
      /dev/sdb2 swap noauto 0 0
      /dev/sdb2 swap noauto 0 0
      /dev/sdb2 /swap swap noauto 0 0

      --------------------

      neil@neil-desktop:~$ ls -l /dev/disk/by-uuid/
      total 0
      lrwxrwxrwx 1 root root 10 2007-07-10 16:52 04c95748-a0ef-4f0d-a713-ccc1ff83f2b9 -> ../../sdb1
      lrwxrwxrwx 1 root root 10 2007-07-10 16:52 17693f6f-55e7-45eb-9fba-d7a885cf268b -> ../../sda3
      lrwxrwxrwx 1 root root 10 2007-07-10 16:52 1d33c201-4f18-4bbe-a745-a0867d16cf19 -> ../../sdb2
      lrwxrwxrwx 1 root root 10 2007-07-10 16:52 7e6a585d-73cf-44fc-9bf1-50ad1f040f86 -> ../../sda1
      neil@neil-desktop:~$
      P4-2.66<br />320gb HDD<br />256mb Radeon 9200 SE<br />On-Board LAN<br />2gb RAM<br />17&quot; Monitor<br />CD-RW Drive<br />DVD-R/RW Drive<br />http://www.one-salient-oversight.blogspot.com/

      Comment


        #4
        Re: Stuffed up Swap

        Originally posted by One Salient Oversight
        /dev/sdb2 /swap swap noauto 0 0
        Remove that one completely (as well as all the "multi-entries").

        Comment


          #5
          Re: Stuffed up Swap

          wow...your fstab file is a total mess
          now, the unicornrider's suggestion will fix the swap thing.
          but your fstab file still needs cleaning.
          quite a bit of cleaning, actually.

          you can edit the file by hitting alt-f2 and then entering the following command:
          Code:
          kdesu kate /etc/fstab
          you only need 1 line like this one in fstab
          /dev/sdb2 swap noauto 0 0
          remove all the others referring to /dev/sdb2

          you only need these 2 lines:
          /dev/scd0 /media/cdrom0 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
          /dev/scd1 /media/cdrom1 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
          remove all the others referring to /dev/scd0 and /dev/scd1.

          i guess this is also a line you can get rid of:
          /dev/hdd /media/cdrom0 auto user,atime,noauto,rw,dev,exec,suid 0 0
          hth
          gnu/linux is not windoze

          Comment


            #6
            Re: Stuffed up Swap

            Okay, done all that.

            But, according to my KDE system guard, I still "no swap space available"

            I'll do all the Konsole stuff again:

            neil@neil-desktop:~$ dmesg | grep -i swap

            -------------------

            neil@neil-desktop:~$ sudo fdisk -l /dev/sda /dev/sdb
            Password:

            Disk /dev/sda: 40.0 GB, 40020664320 bytes
            255 heads, 63 sectors/track, 4865 cylinders
            Units = cylinders of 16065 * 512 = 8225280 bytes

            Device Boot Start End Blocks Id System
            /dev/sda1 1 1697 13631121 83 Linux
            /dev/sda3 1698 4865 25446960 83 Linux

            Disk /dev/sdb: 40.0 GB, 40020664320 bytes
            255 heads, 63 sectors/track, 4865 cylinders
            Units = cylinders of 16065 * 512 = 8225280 bytes

            Device Boot Start End Blocks Id System
            /dev/sdb1 1 3824 30716248+ 83 Linux
            /dev/sdb2 3825 4865 8361832+ 82 Linux swap / Solaris

            -------------------

            neil@neil-desktop:~$ cat /etc/fstab
            # /etc/fstab: static file system information.
            #
            # <file system> <mount point> <type> <options> <dump> <pass>
            proc /proc proc defaults 0 0
            # /dev/hdb1
            UUID=04c95748-a0ef-4f0d-a713-ccc1ff83f2b9 / ext3 nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
            # /dev/hda3
            UUID=17693f6f-55e7-45eb-9fba-d7a885cf268b /home ext3 nouser,defaults,atime,auto,rw,dev,exec,suid 0 2
            # /dev/hda1
            # /dev/hdb2
            /dev/sdb2 swap noauto 0 0
            /dev/scd0 /media/cdrom0 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
            /dev/scd1 /media/cdrom1 auto nouser,atime,noauto,rw,nodev,noexec,nosuid 0 0
            /dev/ /media/floppy0 auto user,atime,noauto,rw,dev,exec,suid 0 0

            -------------------

            neil@neil-desktop:~$ ls -l /dev/disk/by-uuid/
            total 0
            lrwxrwxrwx 1 root root 10 2007-07-10 23:10 04c95748-a0ef-4f0d-a713-ccc1ff83f2b9 -> ../../sdb1
            lrwxrwxrwx 1 root root 10 2007-07-10 23:10 17693f6f-55e7-45eb-9fba-d7a885cf268b -> ../../sda3
            lrwxrwxrwx 1 root root 10 2007-07-10 23:10 1d33c201-4f18-4bbe-a745-a0867d16cf19 -> ../../sdb2
            lrwxrwxrwx 1 root root 10 2007-07-10 23:10 7e6a585d-73cf-44fc-9bf1-50ad1f040f86 -> ../../sda1
            neil@neil-desktop:~$
            P4-2.66<br />320gb HDD<br />256mb Radeon 9200 SE<br />On-Board LAN<br />2gb RAM<br />17&quot; Monitor<br />CD-RW Drive<br />DVD-R/RW Drive<br />http://www.one-salient-oversight.blogspot.com/

            Comment


              #7
              Re: Stuffed up Swap

              Originally posted by One Salient Oversight
              /dev/sdb2 swap noauto 0 0
              That's supposed to read:

              Code:
              /dev/sdb2  none  swap  sw  0  0

              Comment


                #8
                Re: Stuffed up Swap

                sorry.
                my mistake.
                copied and pasted the wrong line.
                gnu/linux is not windoze

                Comment


                  #9
                  Re: Stuffed up Swap

                  Originally posted by jankushka
                  copied and pasted the wrong line
                  Not surprising as there was no right one

                  Comment


                    #10
                    Re: Stuffed up Swap

                    Originally posted by UnicornRider
                    Not surprising as there was no right one


                    now, One Salient Oversight, just out of curiosity...
                    how the heck did you end up with such a mess in fstab?

                    Originally posted by One Salient Oversight
                    Also - I have an unounted 13.0gb section on the first drive. How do I mount this?
                    easy enough.
                    assuming:
                    a)on that partition you already have an ext3 filesystem
                    b)you want to mount it under /media
                    c)you want to mount it by the name of sda1

                    open up a konsole, then do the following:
                    Code:
                    sudo -i
                    cd /media
                    mkdir sda1
                    then hit alt-f2 and type:
                    Code:
                    kdesu kate /etc/fstab
                    add the following lines, then save and exit:
                    # /dev/sda1
                    UUID=7e6a585d-73cf-44fc-9bf1-50ad1f040f86 /media/sda1 ext3 defaults 0 3
                    then go back to the konsole above and type:
                    Code:
                    mount /dev/sda1
                    next time you boot, it'll be done automatically

                    that should be all... 8)
                    gnu/linux is not windoze

                    Comment


                      #11
                      Re: Stuffed up Swap

                      Ahh tis all working now. Kudos to both of you.

                      how the heck did you end up with such a mess in fstab?

                      I was trying to find out why I was having problems somewhere else and I obviously experimented as Administrator during system settings. Since I didn't know anything about fstab, all I did to try and fix mistakes was to work with System settings via a process of trial and error. Well, we're wiser now (though not by much!)

                      Cheers
                      P4-2.66<br />320gb HDD<br />256mb Radeon 9200 SE<br />On-Board LAN<br />2gb RAM<br />17&quot; Monitor<br />CD-RW Drive<br />DVD-R/RW Drive<br />http://www.one-salient-oversight.blogspot.com/

                      Comment


                        #12
                        Re: Stuffed up Swap

                        ah...system settings...my favourite set of tools.
                        well, forget about those...
                        and take care.
                        gnu/linux is not windoze

                        Comment


                          #13
                          Re: Stuffed up Swap

                          This is how my fstab looks...
                          nitesh@Mistrys:~$ cat /etc/fstab
                          # /etc/fstab: static file system information.
                          #
                          # <file system> <mount point> <type> <options> <dump> <pass>
                          proc /proc proc defaults 0 0
                          # /dev/sda6
                          UUID=7bcb827b-bbde-4453-aae8-8be8fee91f2d / ext2 defaults,errors=remount-ro 0 1
                          # /dev/sda9
                          UUID=bbca2d22-5008-4375-ae40-07f0066077d6 /home ext2 defaults 0 2
                          # /dev/sda1
                          UUID=3221-0CD4 /media/sda1 vfat defaults,utf8,umask=007,gid=46 0 1
                          # /dev/sda5
                          UUID=16D3-2223 /media/sda5 vfat defaults,utf8,umask=007,gid=46 0 1
                          # /dev/sda8
                          UUID=5c2b6cdd-2ac4-42e2-aea1-d787a3807573 /usr ext2 defaults 0 2
                          # /dev/sda7
                          UUID=b5ca85ff-3532-4b50-a95a-40ef00a6334e none swap sw 0 0
                          /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
                          /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
                          where sda7 is my swap partition

                          looks pretty much like suggested above. Still my swap partition does not get enabled on startup. I need to go to 'Gnome Partition Editor' and from there, I enable the swap partition everytime.

                          P.S.: I would like a few more things:
                          This problem has started after I installed Elive on another partition and now it is the default OS on my computer. Also this problem does not occur when I use Elive. While installing Elive, I did not create a new swap partition as I had read somewhere that all linux systems on a computer can use common swap partition.
                          I am also posting the fstab table of Elive
                          # /dev/hda7 none swap sw 0 0
                          Triple booting Kubuntu Intrepid with XP and Ubuntu Hardy <br />Intel Pentium DualCore 2 Ghz, 1 GB RAM Intel 945GM MoBo

                          Comment


                            #14
                            Re: Stuffed up Swap

                            guess it could be caused by a wrong uuid...

                            let's see...
                            in a konsole, pls, issue the following:
                            Code:
                            findfs UUID=b5ca85ff-3532-4b50-a95a-40ef00a6334e
                            and see what is says...

                            another thing you could try is to edit your fstab file and replace
                            # /dev/sda7
                            UUID=b5ca85ff-3532-4b50-a95a-40ef00a6334e none swap sw 0 0
                            supposedly by
                            # /dev/sda7
                            /dev/sda7 none swap sw 0 0
                            and then reboot to see what happens.

                            hth
                            cheers
                            gnu/linux is not windoze

                            Comment


                              #15
                              Re: Stuffed up Swap

                              Originally posted by jankushka
                              another thing you could try is to edit your fstab file and replace
                              # /dev/sda7
                              UUID=b5ca85ff-3532-4b50-a95a-40ef00a6334e none swap sw 0 0
                              supposedly by
                              # /dev/sda7
                              /dev/sda7 none swap sw 0 0
                              and then reboot to see what happens.
                              this worked (didn't try the first option, though).
                              As an afterthought, why shouldn't I change this for all the partitions? How do UUIDs help?
                              Triple booting Kubuntu Intrepid with XP and Ubuntu Hardy <br />Intel Pentium DualCore 2 Ghz, 1 GB RAM Intel 945GM MoBo

                              Comment

                              Working...
                              X