Solved Swap partition is not available

Hi,
On FreeBSD lasted version, the swap partition is not available, I'm checked that the partition swap are existing with Gparted, I've declared the system / and swap on my harddrive, that well.
My question is How-to activate the swap partition ?

Regards
Philippe
 
What does swapon -a and swapinfo do?

I've noticed an issue with the installer where it doesn't correctly name the partition in /etc/fstab. Can you post the contents?
 
What does swapon -a and swapinfo do?
I've noticed an issue with the installer where it doesn't correctly name the partition in /etc/fstab. Can you post the contents?

Hi,
i aI understand that you describe in your post, this the answers of yours questions!

1/ swapon -a
Code:
root@sta-viper:~ # swapon -a
root@sta-viper:~ #

2/ swapinfo
Code:
root@sta-viper:~ # swapinfo
Device  1K-blocks  Used  Avail Capacity
root@sta-viper:~ #

3/ fdisk
Code:
root@sta-viper:~ # fdisk
******* Working on device /dev/ada0 *******
parameters extracted from in-core disklabel are:
cylinders=484521 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=484521 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
  start 2048, size 278386688 (135931 Meg), flag 80 (active)
   beg: cyl 0/ head 32/ sector 33;
   end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 131 (0x83),(Linux native)
  start 278388736, size 93749248 (45776 Meg), flag 0
   beg: cyl 1023/ head 254/ sector 63;
   end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
  start 372138039, size 104857515 (51199 Meg), flag 0
   beg: cyl 1023/ head 255/ sector 63;
   end: cyl 1023/ head 255/ sector 63
The data for partition 4 is:
sysid 130 (0x82),(Linux swap or Solaris x86)
  start 476995584, size 11401216 (5567 Meg), flag 0
   beg: cyl 1023/ head 254/ sector 63;
   end: cyl 1023/ head 254/ sector 63
root@sta-viper:~ #

4/ /etc/fstab
Code:
# Device   Mountpoint   FStype   Options   Dump   Pass#
/dev/ada0s3a   /     ufs   rw   1   1
proc  /proc  procfs  rw  0  0

I hope that iI've this different output that you want!

Regards
Philippe
 
Yes, that helps. Can you also post the output of gpart show -l ada0s3?
 
Yes, that helps. Can you also post the output of gpart show -l ada0s3?

This is my output after gpart show -l ada0s3 command :
Code:
root@sta-viper:~ #  gpart show -l ada0s3
=>  0  104857515  ada0s3  BSD  (50G)
  0  96468992  1  (null)  (46G)
  96468992  8388522  2  (null)  (4.0G) /* here it's the swap */
  104857514  1  - free -  (512B)
root@sta-viper:~ #

Regards
Philippe
 
Well, your swap partition looks wrong somehow. Here is what a swap partition looks like to gpart:
for a GPT layout:

Code:
root@kg-v7# gpart show -p ada1
=>  34  250069613  ada1  GPT  (119G)
  34  128  ada1p1  freebsd-boot  (64K)
  162  62914560  ada1p2  freebsd-ufs  (30G)
  62914722  8388608  ada1p3  freebsd-swap  (4.0G)
  71303330  6  - free -  (3.0K)
  71303336  62914560  ada1p4  freebsd-ufs  [bootme]  (30G)
  134217896  115851744  ada1p5  freebsd-ufs  (55G)
  250069640  7  - free -  (3.5K)
See the one labeled freebsd-swap?
What does gpart show -p ada0 show for your disk?
 
this is the output VT320 with gpart show -p ada0 command :

Code:
root@sta-viper:~ # gpart show -p ada0
=>  63  488397105  ada0  MBR  (233G)
  63  1985  - free -  (993K)
  2048  278386688  ada0s1  ntfs  [active]  (133G)
  278388736  93749248  ada0s2  linux-data  (45G)
  372137984  55  - free -  (28K)
  372138039  104857515  ada0s3  freebsd  (50G)
  476995554  30  - free -  (15K)
  476995584  11401216  ada0s4  linux-swap  (5.4G)
  488396800  368  - free -  (184K)
root@sta-viper:~ #

I adding that this configuration of my harddrive work well before change the operating system version of FreeBSD.

Regards
Philippe
 
Add this to /etc/fstab:
Code:
/dev/ada0s3b          none    swap    sw              0       0
Then run swapon -a and you should have swap.
 
Back
Top