Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Help activating Swap partition

  1. #1
    Join Date
    Jan 2014
    Beans
    15

    Help activating Swap partition

    When I was laying out my hard drive for a dual boot with Windows 7 64 bit, I created a swap partition and I just realized I have to activate t first.

    I tried following this guide and I got kind of lost.

    I got to the step 3 without a problem. Here's the info the terminal yielded.
    nick@PUTER:~$ gksu gedit /etc/fstab &
    [1] 5891
    The text editor brought me this:
    # /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/sda6 during installation
    UUID=9dcaf243-3947-46db-9b16-33c781759ee6 / ext4 errors=remount-ro 0 1
    /dev/sda7 none swap sw 0 0

    A bit lost to say the least now
    Attached Images Attached Images

  2. #2
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    6,484
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Help activating Swap partition

    9173; Hi !

    Not a problem, all that is required is to edit that file and add the entry for the swap partition.
    Need to get the UUID so we know what to add:
    Code:
    sudo blkid
    And carry on from there.

    ain't nothing but a thing
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubutu'n !

  3. #3
    Join Date
    Jan 2014
    Beans
    15

    Cool Re: Help activating Swap partition

    When I run
    sudo blkid
    I get the UUID and stuff for all the other partitions, but all that is listed for the Swap is
    /dev/sda8: TYPE="swap"
    No UUID or any other info.

    After I get the UUID I add it into the document? But where in the document do I paste it? Probably a dumb question, but it isn't obvious for me. Re-uploaded document for easier viewing
    Screenshot from 2014-01-21 22:42:56.jpg

    In case it isn't obvious, I've only had Ubuntu for about a week now. Loving it so far though

  4. #4
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    6,484
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Help activating Swap partition

    9173, well !

    Should be something like this:
    Code:
    /dev/sda5: UUID="192a4783-56fa-4fd0-a62f-c45a14c08482" TYPE="swap
    we will find that UUID, so we are sure of what we are doing post the out put of terminal code:
    Code:
    sudo fdisk -lu
    And welcome to the club, it is a steep learning curve, but I assure you, well worth the effort !

    Kinda busy right now, but I will

    be back
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubutu'n !

  5. #5
    Join Date
    Jan 2014
    Beans
    15

    Re: Help activating Swap partition

    sudo fdisk -lu results


    Screenshot from 2014-01-22 18:12:00.jpg

    Thanks for your patience
    Last edited by 9173; January 23rd, 2014 at 01:13 AM.

  6. #6
    Join Date
    Sep 2010
    Beans
    898

    Re: Help activating Swap partition

    What's the output from:

    Code:
    swapon -s

  7. #7
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    6,484
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Help activating Swap partition

    9173; Sit down, take deep breath;

    Format is presently HPFS, that is proprietary to Windows, Linux (ubuntu) will not touch it.

    There are no good ways around it except to reformat the drive(s) to some other. Now If there is valuable data, and there is no way to back up that data, I am aware that there is a risky way to convert the dynamic partitioning back to basic, But never been there never done it and I understand it is risky ( as in any partitioning operations).

    Best bet is to reformat the drive(s) and re-install Windows in say GPT format. Then ubuntu can cope with it,

    We did not make the situation
    we just got to work with it
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubutu'n !

  8. #8
    Join Date
    Aug 2012
    Location
    Queensland, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Help activating Swap partition

    One more bit of code to check the UUID on /dev/sda8 OP.
    Code:
    sudo tune2fs -l /dev/sda8 | grep UUID
    If that gives an output, I'd recommend edit /etc/fstab (gksu gedit /etc/fstab) and use uuid= in fstab like has been done for the root partition but for swap, removing the /dev/sda8 (see edit below sda7 is the wrong partition for fstab and swap in your case) bit. UUIDs are a far more flexible means of mounting.
    Once the uuid is added to the /etc/fstab file use,
    Code:
    sudo mount -a
    the swap partition will now be mounted.
    To use as swap,
    Code:
    sudo swapon /dev/sda8
    If you can't find the UUID on /dev/sda8, ie no output above you will need to set one
    Code:
    sudo tune2fs -U random /dev/sda8
    This will actually set a new UUID to the partition. Find what it is for use in /etc/fstab from the first tune2fs command above.
    Good luck.

    @ Bashing-om, /dev/sda8 shows as linux swap / solaris in that attachement not windows, check again please. Cheers.

    Edit: your /etc/fstab points to /dev/sda7 the swap partition is /dev/sda8, first retry editting /etc/fstab to sda8 . Might be an easy fix, but UUIDs would be better imo. cheers
    Last edited by coldcritter64; January 23rd, 2014 at 01:56 AM.

  9. #9
    Join Date
    Jan 2014
    Beans
    15

    Re: Help activating Swap partition

    Quote Originally Posted by Dave_L View Post
    What's the output from:

    Code:
    swapon -s
    Filename:/dev/sda8
    Type: Partition
    Size: 4229116
    Used: 0
    Priority: -1
    Last edited by 9173; January 23rd, 2014 at 02:18 AM.

  10. #10
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    6,484
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Help activating Swap partition

    @ coldcritter64; appreciate watching my back.

    I did catch that the swap partition was made, however - and I may be jumping at conclusions, that maybe ubuntu is to be installed onto another drive - but, There is no provision on the sda drive for ubuntu. As the drive is HPFS, there is no way. The current fstab references sda6 as "/", that partition is also Windows proprietary HPFS partitioned, not ext4 (or other linux schemes).

    Am I missing something here, or do I have a failure to comprehend ?
    When I was laying out my hard drive for a dual boot with Windows 7 64 bit
    I often do not know, but I can be led to understand.

    inquiring minds want to know
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubutu'n !

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •