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

Thread: Help activating Swap partition

Hybrid View

  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
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    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 ubuntu'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
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    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 ubuntu'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
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    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 ubuntu'n !

  8. #8
    Join Date
    Aug 2012
    Beans
    Hidden!

    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
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    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 ubuntu'n !

  10. #10
    Join Date
    Aug 2012
    Beans
    Hidden!

    Re: Help activating Swap partition

    Quote Originally Posted by Bashing-om View Post
    @ 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 ?


    I often do not know, but I can be led to understand.
    inquiring minds want to know
    OP, what is on /dev/sda6 & /dev/sda7 (anything data wise ?) your gparted shows /dev/sda6 as unknown but terminal shows it as HPFS etc as Bashing-om notes, also /dev/sda7 on your gparted output shows as ext4 but once again the terminal shows HPFS (???) How did you install the system in such circumstances; was wubi involved in any way OP ?; ubuntu on a NTFS filesystem ?; (it is not the same as "bare metal" dual booting) and may be important to know if it is used here.

    @ Bashing-om, I think this is a bit deeper than I first noted . fdisk isn't noting a GPT table so sda6 sda7 and sda8 are logical partitions and as such Windows can't boot from there (the OS itself, ok for storage though). Unless they are storage volumes it seems they are being detected wrong either in terminal or gparted (they differ for the same device) or may be wrongly formatted. Interesting .

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
  •