Swap not active - Mint 13

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
lemelinm
Level 1
Level 1
Posts: 4
Joined: Tue Oct 30, 2012 6:24 pm

Swap not active - Mint 13

Post by lemelinm »

wyrdoak wrote:If you don't wish to mess with make a swap partition for one reason or another there is another option.
Debian, and Ubuntu have an incredibly convenient package that creates a swap file in any directory. Install with:
sudo apt-get install dphys-swapfile
The installation process with automatically create the swap file. Then just enable it with:
sudo swapon -a
Viola, a fully function swap file that is not on a separate partition.
After installing Linux Mint 13 Cinnamon 64 for the first time (instead of Ubuntu 12.10), I noticed that when I reboot the computer, the swap (/dev/sdb3: LABEL="Nouveau volume" UUID="b4e43f97-ee1d-4f6a-8051-3ada466a365d" TYPE="swap") was not active. I have to activate it manually by sudo swapon /dev/sdb3 at each time I start the system. It is quite annoying. Do I have to do the

Code: Select all

sudo apt-get install dphys-swapfile
? and is the

Code: Select all

sudo swapon -a
will corrected the problem?

PS. I have Ubuntu 12.04 LTS in dual boot and I have the same problem with the swap. I have to avtivate it manually. What's your thought on that?

Maybe this information will help you to decide the best thing for me:
-$ sudo blkid

/dev/sda1: LABEL="NexSatrUSB" UUID="18CA48E7CA48C32C" TYPE="ntfs"
/dev/sdb1: LABEL="Linux Mint" UUID="b10de93f-5a76-477b-be50-c769c3d03570" TYPE="ext4"
/dev/sdb3: LABEL="Nouveau volume" UUID="b4e43f97-ee1d-4f6a-8051-3ada466a365d" TYPE="swap"
/dev/sdb5: LABEL="Precise" UUID="f98b76dc-9db8-4b49-863e-b624b7c68a16" TYPE="ext4"

-$swapon -s

Filename Type Size Used Priority

-$ cat /etc/fstab

# /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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=b10de93f-5a76-477b-be50-c769c3d03570 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda3 during installation
#UUID=2f16bd14-fe9f-41fd-b973-5f64cddf40e4 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
From a newbie with Linux Mint

Thanks in advance for your help!

Mario Lemelin

lemelinm
Level 1
Level 1
Posts: 4
Joined: Tue Oct 30, 2012 6:24 pm

Re: Where is swap

Post by lemelinm »

@wyrdoak.

I will answer my own question. All I had to do is, in the terminal:

Code: Select all

sudo apt-get install dphys-swapfile
and TADA! It's done. I reboot and the swapfile is there and I don't need to activate it manually.

Thank you for this insight!

keghn
Level 2
Level 2
Posts: 55
Joined: Sat Aug 18, 2012 11:38 am

Re: Where is swap

Post by keghn »

How do tell if the swap partition is active? If is show up after typeing blkid or
fdisk -l is it on? When is see the swap disk listed in the terminal i do not see
an "on", are "active" next to them.
When I do install A linux operating system I always install a newly created
swap partition for every OS, hoppingthe install well be asigned to
the new swap partition.
Dose the Mint select the fist swap if finds on boot up?
I do not like putting a swap on SSD becouse I here they can wear out.

lemelinm
Level 1
Level 1
Posts: 4
Joined: Tue Oct 30, 2012 6:24 pm

Re: Where is swap

Post by lemelinm »

@keghn

After doing the only line of code I have written, I simply check "System Monitor" and there she was. In fact, when you will do the code in the terminal, the program will calculate itself the size dépending of the actual memory (ram) you have. And you won't have to activate it manually anymore. I know it sound so simple but, sometimes, that's all there is! :D

Don't hesitate to tell me if it works or if you have others questions about this.

Mario

breaker
Level 5
Level 5
Posts: 607
Joined: Sun Mar 16, 2008 5:28 am

Re: Where is swap

Post by breaker »

zkab wrote:At the end of the installation there is a question about installing GRUB ... my question is should GRUB be installed and if so should it be on:
sda
sda1 (/home partition)
sda2 (/ partition)
It is best for the modern GRUB (the bootstrap part) to be installed on the MBR of the disk, therefore sda. sda1 and sda2 are the partitions, it is not advisable to install the GRUB boot loader to a PBR usually. Of course this means any other MBR resident boot loader code will be overwritten at install, such as one from another OS. The same thing usually happens when you install some other OS after Linux, that OS puts its boot code in the MBR of the disk.

This is all fine and dandy as long as some kind of menu appears allowing a selection of the other OS. When the Mint installer works correctly, GRUB is installed to the MBR of the disk, and if you are dual-booting, it adds a menu entry for each OS.

Furthermore, assuming sda is the disk your BIOS is configured to load on startup, you need some kind of bootstrap code there to take over from the BIOS, it may as well be GRUB. If say, old Windows MBR bootstrap code is left behind, and you install GRUB to sda1, then GRUB may get booted by the old code by chance if it points to the partition.

Traditional PC BIOS (not UEFI/GPT) booting of a hard disk;

Power ON CPU --> ROM BIOS code loads --> BIOS loads disk specified in settings --> bootstrap code in Master Boot Record area of Hard Disk loads more bootstrap code elsewhere (such as PBR) or directly passes booting to OS

Windows PC-BIOS booting;

CPU --> BIOS --> MBR (Windows bootstrap) --> PBR --> OS specific files

Mint with GRUB;

CPU --> BIOS --> MBR (GRUB bootstrap) --> GRUB core.img located in /boot of Mint install --> GRUB modules and menu (grub.cfg) --> Linux kernel


Too much info? ;)
rtfm - read the fine manual...
Boot info script: http://ubuntuforums.org/showthread.php?t=1291280
grub2 https://help.ubuntu.com/community/Grub2
PC-BIOS based booting, mbr, boot records; http://thestarman.pcministry.com/

User avatar
Oscar799
Level 19
Level 19
Posts: 9937
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Re: Swap not active - Mint 13

Post by Oscar799 »

Split from a much older thread
Image

Post Reply

Return to “Installation & Boot”