Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

New Swap partition not being re-enabling automatically


  • Please log in to reply
10 replies to this topic

#1 cat1092

cat1092

    Bleeping Cat


  • BC Advisor
  • 6,875 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:10:38 PM

Posted 04 January 2015 - 12:04 AM

I was a couple of days ago that I successfully installed VMware Player, with a couple of assists from here. 

 

Now I have another related issue. When I open the Windows 7 VM, even though it has 8GiB of my physical RAM, and it's own pagefile that's larger, plus has 4 cores of my CPU to run on, now it's looking for a 4GiB Swap partition to be there. I thought this was going to be a simple job, because I've extended my /home partition w/no troubles. 

 

What I did was, using GParted while the OS was running, shrank the Windows Backup partition 3GiB, toggled the Swapoff tab to adjust the Swap partition, but it wouldn't allow a resize. So I deleted it, created another of 4GiB, and it looked like it was OK. Switched Swapon back on, rebooted, and have had to manually with GParted enable Swapon at every reboot. Though I don't bother unless running a VM. 

 

I don't understand this, why with 24GiB physical RAM, and the VM having it's own pagefile larger than the 8GiB assigned, does having a 1GiB or 4GiB (or no) Swap space matter? Have been under evidently wrong impression that adding more RAM doesn't mean that apps will always go to it first, and seek Swap only as a last resort, if there were zero RAM available. 

 

Here are a couple of snapshots of what's going on. 

 

Screenshot-Terminal.png

 

Screenshot-Terminal-1.png

 

And here's some of the advice that I followed, including mkswap and swapon as sudo, using dev/sdb9 (my Swap partition) for the commands. 

 

http://www.softpanorama.org/Internals/Unix_filesystems/linux_swap_filesystem.shtml

 

Finally, a GParted snapshot of the actual drive, Swap is at the right end. 

 

Screenshot--dev-sdb-GParted.png

 

So, how am I supposed to get this back to working automatically? I'd prefer not to perform a reinstall of my OS to fix this, but if there's a way to begin the process, make the partition as Swap & back out after it's created (can one do this?), I would go that far. 

 

Thanks for any provided assistance.  :)

 

EDIT: Corrected installed RAM spec, it's 24GIB, not 32. 

 

Maybe the Easter Bunny can deliver the final 16GiB set to make it that. :)

 

Cat


Edited by cat1092, 05 January 2015 - 12:52 AM.

Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


BC AdBot (Login to Remove)

 


m

#2 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 04 January 2015 - 04:11 PM

I cannot understand most of your post (sorry), but it sounds to me like you're saying that the issue is that your host operating system (Linux Mint?) isn't automatically mounting its swap partition at boot? Is this correct?

Assuming I've understood correctly, then
the reason why your swap partition isn't mounting at boot would be due to the fact that you deleted it and created a new one. The new swap partition will have a new UUID, but your fstab will still be using the UUID from the swap partition that was on /dev/sdb10. You can confirm this by running "sudo blkid", and comparing the UUID listed for the current swap partition on /dev/sdb9 to the one in your fstab. Assuming I'm correct and the UUIDs do not match, you will need to edit the UUID in your fstab swap entry to match the UUID of your new swap partition.

By the way, I'm really jealous of how much ram you have.


Edited by hollowface, 04 January 2015 - 04:48 PM.


#3 NickAu

NickAu

    Bleepin' Fish Doctor


  • Moderator
  • 11,676 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:127.0.0.1 Australia

Posted 04 January 2015 - 04:18 PM

 

then the reason why your swap partition isn't mounting at boot would be due to the fact that you deleted it and created a new one. The new swap partition will have a new UUID, but your fstab will still be using the UUID

Yes he needs to update that.



#4 cat1092

cat1092

    Bleeping Cat

  • Topic Starter

  • BC Advisor
  • 6,875 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:02:38 PM

Posted 05 January 2015 - 01:26 AM

It's fixed, there were some things that needed cleaning, and I wasn't about to risk any issues with expanding the root partition (which also needed it), so I reinstalled, growing my 20GiB root partition to 40GiB, and making the 4GiB Swap partition I tried to create official. Now all is fine, and for the most part, everything's back in order. 

 

Though I still don't understand, if a /home partition can be resized w/out all of this trouble, then why not the Swap? It refused to be resized, maybe because of the way I done it, while the OS was running. 

 

At any rate, lesson learned, some of the old rules that many have discarded may still be of value. There was a time when if one had 4GiB of RAM or more (not many had more then), then 4GiB was the size of Swap. Anything below that amount, the rules are different, normally 2x the amount of RAM when below 2GiB. 

 

From here on out, on all but one of my computers, 4GiB it will be. Though for the life of me, cannot understand why an app (VMware Player) would prefer to have a 4GiB Swap space, when there was more than ample physical RAM, 3x of that assigned to the VM itself. I've not seen any VM's by home users with 8GiB RAM & 4 CPU cores in action, though this is likely common in the workplace. 

 

It's the only app that to date has balked of having a 1GiB Swap partition. Strange, when it gave the VM itself a load of a pagefile to work with. 

 

Though to be fair, there was one occasion when Windows threw a warning of being low on RAM, only around 6GiB out of 12 was in use, and my pagefile was set to a minimum of 200MiB and max of 1024MiB. The minimum of 200MiB was a result of Samsung Magician's settings, and I feel what caused the incident. All of my pagefiles are set to 1024MiB, one even at 512MiB, and no troubles from those. 

 

The notebook my wife uses with Mint 17.1 has no Swap partition, but no high performance software is installed either, so I don't expect to see errors with 8GiB RAM installed. 

 

Anyway, it's fixed. I refuse to up the Swap above 4GiB, no matter what asks for the increase. VirtualBox did perform decent after installing the experimental (I suppose Beta?) 3-D drivers, and if VMware Player balks again, will stick with proven VBox, which has served me well over the years. Had I known about those 3-D drivers, likely wouldn't had bothered with VMware Player. Didn't bother with them because on XP, it was required to boot into Safe Mode for installation. This has been some time back. 

 

Thanks to those who assisted! :)

 

Cat


Edited by cat1092, 05 January 2015 - 01:30 AM.

Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


#5 Al1000

Al1000

  • Global Moderator
  • 6,678 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:10:38 PM

Posted 05 January 2015 - 06:42 AM

Though I still don't understand, if a /home partition can be resized w/out all of this trouble, then why not the Swap?

Good question. Perhaps it has something to do with your bootloader loading the operating system by directing the computer to load certain files, while swap is mounted by the operating system on the basis of its UUID.

If your bootloader also used UUIDs, as they sometimes do, then I suspect you would also have had to edit or run Grub after resizing your home partition.

I have resized the swap partition on my laptop when I grew it from 1GiB to 1.5GiB, and had to edit the UUID in fstab on both operating systems on the computer, Kubuntu and Puppy, before they would recognise the new partition.

EDIT: thinking back to when I resized the swap partition, for some reason both operating systems still loaded the swap partition on boot, perhaps because I resized it rather than deleting it and creating a new one like you did; but recognised it as the old size of 1GiB instead of 1.5GiB, and editing fstab with the new UUID fixed that.

Switched Swapon back on, rebooted, and have had to manually with GParted enable Swapon at every reboot.

For future reference, a quicker way of manually mounting swap on the computer in question, when the computer hasn't recognised it at all, would be:

sudo swapon /dev/sdb9

Edited by Al1000, 05 January 2015 - 08:06 AM.


#6 bmike1

bmike1

  • Members
  • 596 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Gainesville, Florida, USA
  • Local time:03:38 AM

Posted 06 January 2015 - 12:57 AM

 

 

then the reason why your swap partition isn't mounting at boot would be due to the fact that you deleted it and created a new one. The new swap partition will have a new UUID, but your fstab will still be using the UUID

Yes he needs to update that.

 

Apply a label with 'e2label' and mount via label with the 'L' option (-L<label>) and the file fstab is ignored. Oh, and that is not an error. You can enter an option and not put a space between the option and it's argument.


Edited by bmike1, 06 January 2015 - 01:01 AM.

A/V Software? I don't need A/V software. I've run Linux since '98 w/o A/V software and have never had a virus. I never even had a firewall until '01 when I began to get routers with firewalls pre installed. With Linux if a vulnerability is detected a fix is quickly found and then upon your next update the vulnerability is patched.  If you must worry about viruses  on a Linux system only worry about them in the sense that you can infect a windows user. I recommend Linux Mint or, if you need a lighter weight operating system that fits on a cd, MX14 or AntiX.


#7 cat1092

cat1092

    Bleeping Cat

  • Topic Starter

  • BC Advisor
  • 6,875 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:10:38 PM

Posted 06 January 2015 - 02:53 AM

 

 

If your bootloader also used UUIDs, as they sometimes do, then I suspect you would also have had to edit or run Grub after resizing your home partition.

 

Actually my bootloader is a custom one, EasyBCD 2.2, this allows for the booting of Windows w/out a double boot, which would be the case if Grub2 was controlling everything. Though when booting into Mint, the Grub menu still shows. 

 

I noticed when opening the etc/fstab Terminal, that the /home partition once was /dev/sdb5 during the install, but in the GParted snapshot, it clearly shows that as being a Windows partition for VM's. Of course, this was all before the reinstall a couple of days ago. However, I didn't have to edit anything, just deleted a couple of unneeded Windows partitions & resized /home with GParted. Mint kept on running. 

 

This (the reinstall) could really have been for the best, as it happened not long post install, Mint hadn't been on this PC for a couple of months after swapping some SSD's around. It allowed me to double my root partition, which at 20GiB was too small for long term usage (at less than two weeks over a third full), SSD's perform better with less data on each partition, and I feel that it'll never grow past 20GiB, which still leaves a good 50% cushion. 

 

On the other hand, the /home is filling fast, will decide soon which Windows 7 VM to ditch. Obviously, VMware Player is a better performer, but I still have time to use it for over 3 weeks before mandatory activation is needed. Also have an XP Pro install on there that's smoking with dual cores assigned and the max of 3.5GiB RAM assigned. Never have I had a bare metal XP install perform as well. For the safety of the computer, shared folders is disabled on that one. 

 

 

Apply a label with 'e2label' and mount via label with the 'L' option (-L<label>) and the file fstab is ignored. Oh, and that is not an error. You can enter an option and not put a space between the option and it's argument.

 

In the unlikely event this happens again, I'll give that a shot. I don't think it'll happen again on mine (unless a drive failure forces me to make a change), but it's good to know. A few other Mint users brings their computers to me if there's an issue, normally self-inflicted. One deleted his Swap to make space for another Windows partition, but he didn't want to perform a "fresh upgrade" as I did, leaving the /home partition intact, but having to update the OS, reinstall software & redo tweaks, as I did. Being that he has 8GiB RAM installed, and doesn't perform resource intensive tasks, I advised him to run w/out Swap & see how it goes, he's had no problem. 

 

Cat


Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


#8 Al1000

Al1000

  • Global Moderator
  • 6,678 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:10:38 PM

Posted 06 January 2015 - 05:49 PM

Actually my bootloader is a custom one, EasyBCD 2.2, this allows for the booting of Windows w/out a double boot, which would be the case if Grub2 was controlling everything. Though when booting into Mint, the Grub menu still shows.


That's interesting. So what do you do to tell the computer to bypass the Grub menu and boot straight into Windows?

I primarily use Grub4Dos, and discovered today that all I had to do to boot into Mint using the script in the Grub4Dos configuration file that I used to use for Kubuntu, is change the UUID number to match the new one, as it must have changed when I formatted the partition. The only other thing I changed was the text in the menu entry from Kubuntu to Mint. Didn't even have to run the bootloader again. I like the simplicity of Grub4Dos. :)

I never use the home directory for much, so have never bothered to make it a separate partition. When I was using XP as my primary operating system I hardly used My Documents either, and instead had a separate partition on which I created my own directories to keep files in. So I continued to do the same out of habit when I started using Linux.

#9 cat1092

cat1092

    Bleeping Cat

  • Topic Starter

  • BC Advisor
  • 6,875 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:03:38 AM

Posted 07 January 2015 - 02:36 AM

 

 

That's interesting. So what do you do to tell the computer to bypass the Grub menu and boot straight into Windows?

 

Nothing, other than install the software on Windows 7, and then edit my two other Windows OS's boot order, and finally add Linux Mint 17.1 to the list. Though to avoid a mistake I made three times straight in 2013, had to select Grub2 from the drop down menu, name the OS, I chose "Linux MInt 17.1 MATE x64", and choose "Auto Detect & Install". In seconds, it's added to Windows 7's boot menu. 

 

Now, when it does boot into Mint, the Grub2 menu is still there. 

 

The other thing, and one we have discussed with other members, for other reasons, for this trick to work, the native Grub bootloader cannot be on the same device as where EasyBCD 2.2 is, but rather the root partition if on the same drive. Having two other SSD's in the same PC, that's no big deal, the Samsung 840 Pro is the main & controlling SSD for the rest, and the only OS on it is 7 Pro. 

 

Here is a little more information, that may explain better than I, but really a computer wise 12 year old can do this, and many of the other things we do on Linux. Probably better in most cases, as long as their minds hasn't been polluted with MS Windows propaganda. Not having to get Windows out of the back of one's head & comparing apples to oranges all the time during the 1st year, would greatly enhance the Linux learning experience. 

 

http://thpc.info/dual/7/db_mint17_bcd_on_win7.html

 

Cat


Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


#10 Al1000

Al1000

  • Global Moderator
  • 6,678 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:10:38 PM

Posted 07 January 2015 - 04:03 AM

Nothing, other than install the software on Windows 7, and then edit my two other Windows OS's boot order, and finally add Linux Mint 17.1 to the list. Though to avoid a mistake I made three times straight in 2013, had to select Grub2 from the drop down menu, name the OS, I chose "Linux MInt 17.1 MATE x64", and choose "Auto Detect &amp; Install". In seconds, it's added to Windows 7's boot menu.

Ah right, you have a Windows boot menu. That's what I was wondering. I didn't think your computer would know which operating system you wanted to boot into without you selecting it from some menu or another. :)

Isn't it possible to configure the Windows boot menu so that it boots straight into Mint, bypassing the Grub2 menu, so that you only have to go through one menu to boot into Mint?

As well as having two Grub4Dos scripts to boot straight into Kubuntu, I also used to have another script that I put in the advanced options menu which booted to the Grub2 menu, just in case I wanted to select any of the other options. It will probably work with Mint as well, although I haven't got around to trying it yet.

Edited by Al1000, 07 January 2015 - 04:04 AM.


#11 cat1092

cat1092

    Bleeping Cat

  • Topic Starter

  • BC Advisor
  • 6,875 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:03:38 AM

Posted 07 January 2015 - 04:15 PM

 

Isn't it possible to configure the Windows boot menu so that it boots straight into Mint, bypassing the Grub2 menu, so that you only have to go through one menu to boot into Mint?

 

Yes, using EasyBCD 2.2, I can set MInt to default if I want, on two computers that's how I set it, 10 seconds after pressing the power button, Mint loads. The default is 30, but with SSD's that's too much time.

 

EDIT: After booting into Linux Mint (or any LInux) via EasyBCD 2.2, the Grub2 boot menu will still be there, no way to do way with that, in fact shows the other OS's if one decides to boot into another instead. No way of getting rid of Grub w/out getting rid of the Linux install altogether, it's required to boot into the OS. It's just that EastBCD 2.2 makes a good tool for Windows/Linux dual booters to have, to avoid two boots to get into Windows (negating the boot times of the SSD). If I have to go through Grub2 to get to Windows 7, boot times goes right back up to 45 or more seconds, 10 years of progress gone over a Linux boot menu. That time would be longer on a platter drive, like that of booting into Windows versions predating 2000 (W2K Pro). 

 

I'm keeping my 15 second boot to loading of OS times on Windows. The 2nd boot into Grub2 for Mint is very fast, not much speed penalty there. Maybe 10 extra seconds total. 

 

It's just that on my main PC. everything is controlled from the main SSD (as described above), on that one, have Mint 17.1 in the 2nd position. Then my second Windows 7 install (tester), Windows 8 (the OS which shipped with the PC, and finally that of my backup software (EaseUS Todo Workstation). It has an option to add it to the boot menu, which auto loads the WinPE backup/restore console. Much better than messing with CD's & Flash drive backup/recovery options. It can backup Windows & Linux, only deal with Linux is that those partitions will be sector to sector backups.

 

I'll be posting a similar issue about another Swap partition on another computer later, just found out yesterday that Swap isn't enabled on it, and I assigned 4GiB. I never touched the Swap partition in anyway, but did delete the XP Pro x64 install, enlarged the Windows 7 & Data partitions, that was it. So I take it that Swap can be disengaged if there's changes with the partitions.

 

Will give more detial later, it's getting to be time for dinner. Dirty Rice w/Sausage. :chef:

 

Cat


Edited by cat1092, 08 January 2015 - 01:55 AM.

Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users