Author Topic: swap partition or file? [SOLVED]  (Read 1116 times)

Offline Lew

  • Newly Subscribed
  • *
  • Posts: 10
  • Karma: 2
  • New To PeppermintOS
    • View Profile
  • Peppermint version(s): 10
swap partition or file? [SOLVED]
« on: June 12, 2020, 04:32:56 am »
New member, and my first post here  :)
Today I put 2x2GB of RAM in my old Toshiba Satelite L350, which dates from about 2009, I believe.
Now I have to set my swap to 8GB, but since the laptop is so old, I'm not sure which is best - enlarge the swap partition or delete it and use a swap file, as is advised in more modern machines?

While I'm at it, here's some additional info that is relevant; in Disk Utility I see that the swap partition of 1,6GB is not active!
and in the terminal I just found out that
Code: [Select]
sudo swapon -show gave me this output:
Code: [Select]
/swapfile file 642M 9,8M -2which confuses me, since I never made a swapfile..

« Last Edit: June 18, 2020, 01:39:04 pm by Lew »

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2391
  • Karma: 633
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: swap partition or file?
« Reply #1 on: June 12, 2020, 06:40:08 am »
Hi Lew,

Could you please open a terminal window and enter the following:


Code: [Select]
inxi -Fz

then copy the output and post it here in your reply. Also post the contents of this file:

Code: [Select]
/etc/fstab

which can be easily accessed with this command in a terminal window:

Code: [Select]
xed /etc/fstab 

Thank you.

Regards,

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline Lew

  • Newly Subscribed
  • *
  • Posts: 10
  • Karma: 2
  • New To PeppermintOS
    • View Profile
  • Peppermint version(s): 10
Re: swap partition or file?
« Reply #2 on: June 12, 2020, 07:18:36 am »
Hi Slim,

Here's the output:
Code: [Select]
System:    Host: ludo-Satellite-L350 Kernel: 5.3.0-59-generic x86_64 bits: 64
           Desktop: N/A Distro: Peppermint Ten
Machine:   Device: laptop System: TOSHIBA product: Satellite L350 v: PSLD8E-01Y004BT serial: N/A
           Mobo: TOSHIBA model: Portable PC serial: N/A
           BIOS: INSYDE v: 1.70 date: 02/13/2009
CPU:       Dual core Intel Pentium Dual T3400 (-MCP-) cache: 1024 KB
           clock speeds: max: 2166 MHz 1: 1335 MHz 2: 1565 MHz
Graphics:  Card: Intel Mobile 4 Series Integrated Graphics Controller
           Display Server: x11 (X.Org 1.20.5 )
           drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1440x900@60.00hz
           OpenGL: renderer: Mesa DRI Mobile Intel GM45 Express
           version: 2.1 Mesa 19.2.8
Audio:     Card Intel 82801I (ICH9 Family) HD Audio Controller
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k5.3.0-59-generic
Network:   Card-1: Realtek RTL810xE PCIE Fast Ethernet controller driver: r8169
           IF: enp2s0 state: down mac: <filter>
           Card-2: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter (PCI-Express)
           driver: ath5k
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: 320.1GB (8.9% used)
           ID-1: /dev/sda model: ST9320320AS size: 320.1GB
Partition: ID-1: / size: 141G used: 27G (20%) fs: ext4 dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 46.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 183 Uptime: 6:17 Memory: 1347.9/3806.3MB
           Client: Shell (bash) inxi: 2.3.56
and this is from  /etc/fstab
Code: [Select]
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda7 during installation
UUID=d007a0e7-32cd-4180-b47f-0cc7565d8dff /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2391
  • Karma: 633
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: swap partition or file?
« Reply #3 on: June 12, 2020, 12:53:55 pm »
Hi Lew,

However it happened, you have a swap file (it is about 3.8 GB large and, having 4 GB of RAM, that actually is sufficient -- don't get caught up in the 2x RAM info being passed around unless you are doing very memory-intensive tasks such as kernel compilation, video processing, etc.) and it is being used. So you do not need to do anything more. Also, unless you are dual booting with other linux distros, you can delete the existing swap partition and merge that extra space into your PeppermintOS partition (using the program gparted).

Regards,

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline Lew

  • Newly Subscribed
  • *
  • Posts: 10
  • Karma: 2
  • New To PeppermintOS
    • View Profile
  • Peppermint version(s): 10
Re: swap partition or file?
« Reply #4 on: June 13, 2020, 08:26:59 am »
Thank you Slim. I dual boot this machine with Haiku, so don't need any swap partition for that.
I deleted the partition and then tried to resize Peppermint, but Gparted gave me a warning - something about the boot sector being at the beginning of the partition I'm about to resize - so I quit that and tried to reboot.
Now I'm stuck with Linux's screen of death:
Code: [Select]
error: no such partition.
Entering rescue mode..
grub rescue>
:o
Unfortunately I don't have the Peppermint live CD at hand here, which I believe do I need to fix the boot error.
(not possible somehow with the Gparted cd, right?)
 


Offline murraymint

  • Trusted User
  • Veteran
  • *****
  • Posts: 2199
  • Karma: 458
  • soft boiled with a yolk of gold
    • View Profile
  • Peppermint version(s): 7, 8, 9
Re: swap partition or file?
« Reply #5 on: June 13, 2020, 10:34:12 am »
Presumably if it just has GParted on it, no. I didn't know there was such a thing.

Offline spence

  • Administrator
  • Hero
  • *****
  • Posts: 3026
  • Karma: 345
  • peppermint user since 2010
    • View Profile
  • Peppermint version(s): Peppermint 10 Respin
Re: swap partition or file?
« Reply #6 on: June 13, 2020, 10:49:17 am »
(not possible somehow with the Gparted cd, right?)

I still have a gParted cd, but no longer have a machine with a cd/dvd player but I seem to recollect the ability to repair grub...

check here: https://gparted.org/faq.php

 ;)
spence
PeppermintOS 10 Respin currently installed  on:
'16 Antec Aria rebuild
& '18 Asus VivoBook


Do not despair, grasshopper...
    with patience all will be revealed...
       Through pain, enlightenment will come.

Offline Lew

  • Newly Subscribed
  • *
  • Posts: 10
  • Karma: 2
  • New To PeppermintOS
    • View Profile
  • Peppermint version(s): 10
Re: swap partition or file?
« Reply #7 on: June 14, 2020, 02:58:38 am »
.. seem to recollect the ability to repair grub...

check here: https://gparted.org/faq.php
That looked promising, but I didn't get further than:
Code: [Select]
sudo mkdir /tmp/mydir
sudo mount /dev/sda5 /tmp/mydir
after which I get an error.

I guess I'll have to wait till I'm at my friends house, where the Peppermint-DVD is, and then try to recover with that.

Offline murraymint

  • Trusted User
  • Veteran
  • *****
  • Posts: 2199
  • Karma: 458
  • soft boiled with a yolk of gold
    • View Profile
  • Peppermint version(s): 7, 8, 9
Re: swap partition or file?
« Reply #8 on: June 14, 2020, 05:44:59 am »
sda5 is the partition in the example. Is that the same partition number on your system?

Code: [Select]
sudo blkid

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2391
  • Karma: 633
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: swap partition or file?
« Reply #9 on: June 14, 2020, 06:38:45 am »
.. seem to recollect the ability to repair grub...

check here: https://gparted.org/faq.php
That looked promising, but I didn't get further than:
Code: [Select]
sudo mkdir /tmp/mydir
sudo mount /dev/sda5 /tmp/mydir
after which I get an error.


Hi Lew,

Whenever you get errors, you need to copy them and post them here! There are a great number of possible errors, but we can only help you when we discover which error you have.  ;)

It also appears (from the contents of your fstab file) that /dev/sda7 is the correct partition and not /dev/sda5.


Regards,

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline Lew

  • Newly Subscribed
  • *
  • Posts: 10
  • Karma: 2
  • New To PeppermintOS
    • View Profile
  • Peppermint version(s): 10
Re: swap partition or file?
« Reply #10 on: June 16, 2020, 02:14:31 pm »
sda5 is the partition in the example. Is that the same partition number on your system?

Code: [Select]
sudo blkid
It is indeed. I can see it, including boot flag, in the GUI of the Gparted live-cd and sudo blkid confirmed that Haiku is on sda2 and that there is an ext4 partition on sda5.

Offline Lew

  • Newly Subscribed
  • *
  • Posts: 10
  • Karma: 2
  • New To PeppermintOS
    • View Profile
  • Peppermint version(s): 10
Re: swap partition or file?
« Reply #11 on: June 16, 2020, 02:25:37 pm »
..Whenever you get errors, you need to copy them and post them here! There are a great number of possible errors, but we can only help you when we discover which error you have.  ;)

It also appears (from the contents of your fstab file) that /dev/sda7 is the correct partition and not /dev/sda5...
Thanks Slim, but unfortunately I can't figure out how to copy the output to a usb when the machine is running on the gparted live-cd.

So for now I have to resort to re-typing the output.
As you can see in my post above here in reply to Murraymint, sda5 is the correct partition. I even tested to be 100% sure:
Code: [Select]
sudo mount /dev/sda7 /tmp/mydir
mount: special device /dev/sda7 does not exist
when trying again with sda5, this is the output:
Code: [Select]
mount: wrong fs type, bad option, bad superblock on /dev/sda5, missingcodepage or helper program, or other error
In some cases useful info is found in syslog - try dmesg | tail or so

Offline spence

  • Administrator
  • Hero
  • *****
  • Posts: 3026
  • Karma: 345
  • peppermint user since 2010
    • View Profile
  • Peppermint version(s): Peppermint 10 Respin
Re: swap partition or file?
« Reply #12 on: June 17, 2020, 12:30:22 pm »
Whilst my other half was napping, I snuck my gparted into one of his computers. I had forgotten that gparted's LiveCD does give access to the internet...  clunkily, but it does...

 ;)
« Last Edit: June 17, 2020, 02:42:43 pm by spence »
spence
PeppermintOS 10 Respin currently installed  on:
'16 Antec Aria rebuild
& '18 Asus VivoBook


Do not despair, grasshopper...
    with patience all will be revealed...
       Through pain, enlightenment will come.

Offline Lew

  • Newly Subscribed
  • *
  • Posts: 10
  • Karma: 2
  • New To PeppermintOS
    • View Profile
  • Peppermint version(s): 10
Re: swap partition or file?
« Reply #13 on: June 17, 2020, 02:44:16 pm »
Whilst my other half was napping, I snuck my gparted live cd into one of his computers. I had forgotten that gPartedLiveCD does give access to the internet...  clunkily, but it does...

 ;)
Sorry if I come across as ignorant here, but I don't see what you're trying to say.

Offline spence

  • Administrator
  • Hero
  • *****
  • Posts: 3026
  • Karma: 345
  • peppermint user since 2010
    • View Profile
  • Peppermint version(s): Peppermint 10 Respin
Re: swap partition or file?
« Reply #14 on: June 17, 2020, 03:35:00 pm »
Whilst my other half was napping, I snuck my gparted live cd into one of his computers. I had forgotten that gPartedLiveCD does give access to the internet...  clunkily, but it does...

 ;)
Sorry if I come across as ignorant here, but I don't see what you're trying to say.

Previously, you noted:

Quote from: Lew
Thanks Slim, but unfortunately I can't figure out how to copy the output to a usb when the machine is running on the gparted live-cd.

just a way to successfully connect to your internet & then perhaps into this forum whilst in the gparted live...

 ;)

spence
PeppermintOS 10 Respin currently installed  on:
'16 Antec Aria rebuild
& '18 Asus VivoBook


Do not despair, grasshopper...
    with patience all will be revealed...
       Through pain, enlightenment will come.