A few days ago, I made my first install of Obarun, onto a Dell Latitude E6400 laptop with 8GB RAM and a 500GB SSD.

During the installation process, I used the guided partitioning option. I chose:
- NO separate boot partition
- NO separate home partition
- YES a separate swap partition

I was asked how big a swap partition I wanted.
The value of 3200 MiB was suggested (default)
I changed that to 7600 MiB (roughly 8 GB)

I checked my fstab, and saw:

# /dev/sda1
UUID=f65a46ed-e04d-4de6-8261-4a9d61c0339a / ext4 rw,relatime 0 1

# /dev/sda2
UUID=f32d8151-fb06-4273-b0af-23bafef0533a none swap defaults 0 0

This morning, I thought I should check to see if swap was actually enabled.

swapon --show gave a null result, indicating swap was not enabled. So I used

sudo swapon -a to turn it on. Here comes the surprise:

john@ lat8gb ~ % swapon --show
NAME TYPE SIZE USED PRIO
/dev/sda2 partition 256G 0B -2

So I seem to have a 256 GB swap partition.
A quick check with htop says the same.

However, gparted gives a different result.

Partition File System Mount Point Size Used Unused Flags
/dev/sda1 ext4 / 7.42 GiB 4.833 GiB 2.59 GiB boot,swap
/dev/sda2 linux-swap 458,34 GiB 0.0 GiB 458.34 GiB

According to gparted, I have gotten the sizes of my root and swap partitions backwards. My root is around 8 GB, instead of my swap being 8GB. But, according to swapon -show, and according to htop, my swap partition is 256 GB. Either way, I have botched things badly.

I guess I'll have to start from scratch with a fresh install, to see how I managed this.

Before I do that, I figure I should ask for ideas on how this went so wrong, so I don't repeat any obvious blunder.
So I went ahead and repartitioned the SSD, by running gparted from the LiveUSB.

I removed the "swap" flag from the root partition. (I have no idea why it was there. It does not appear on any of my other machines, regardless of OS.)

I downsized the swap partition to 8GB (as originally intended) and put all the new unallocated space in front of it.
Then I expanded the root partition into that unallocated space.

Now the sizes of the two partitions are reversed, and are as originally intended.

The SSD boots properly and Obarun appears to be functioning as before.

I still have no idea how the partition sizes got reversed. Perhaps I totally misread/misunderstood the sizing question in the installer.


Now I need to figure out how to automatically enable swap at the start of every session.
Right now, I have to remember to use

sudo swapon -a

after each reboot.
edit your boot@ module e.g. (replace system by the name of your module and <editor> by the name of your favorite editor)
# 66-env -t boot -e <editor> boot@ system
be sure to use FSTAB=!yes and SWAP=!yes, then enable again the module by
# 66-enable -t boot -F boot@ system
reboot.
As you can tell, I am a complete newcomer to 66, as well as to Arch. So I am having quite the adventure. But I enjoy learning new things, and I am enthused by the principles behind S6/66. While I am making time daily to read the background material, I am also trying to get a viable system running so I can use it as a learning tool. Hence I am setting up routine things like swap, system date/time, cron jobs, printing, etc.

Late yesterday, I learned about 66-env and found my way to boot@ system, where I was able to set SWAP=!yes, then re-enable the module. That got swap working for me.

I was just now sitting down to add that information to this thread when I discovered your kind reply. Your instructions give me a bit of confidence that I am beginning to find my way into the "big picture" of how 66 is organized.

I very much appreciate your taking time to point me in the right direction.
8 months later

Still problems with swap partition.

"swapon -a" works -- "free" shows available swap -- so I suppose my
swap partition and the fstab are alright.

In /etc/66/conf/boot@system/version/boot@system both FSTAB and SWAP
are set to !yes.
But "sudo 66-enable -z -F -t boot boot@system" produces just the following
lines about fstab and swap:
boot@system: info: enable service: mount-fstab
boot@system: info: disable service: mount-swap
66-enable: info: Disabled successfully: mount-fstab
66-enable: info: Enabled successfully: mount-fstab

What goes wrong?

Swap seems to work now.

Cautious as I am, I use to make backup copies of files before I change them.
So I made a copy of the file boot@system in
etc/66/conf/boot@system/version, and kept the backup copy in the same directory.

Moving the backup away and reexecuting
sudo 66-enable -z -F -t boot boot@system
the outputline
boot@system: info: disable service: mount-swap
changed to
boot@system: info: enable service: mount-swap
as it should, I suppose

After rebooting my swap partition seems to be working.

  • eric replied to this.

    Bertram
    You should not touch any inner directories of 66. Use the corresponding tools instead.

    If you want to control environment of the service, pick the 66-env tool. You can modify/configure the environment of the service through it. If you want to make manually backup, please make it at your home directory instead of the 66 directory.

    Bertram boot@system: info: disable service: mount-swap
    changed to
    boot@system: info: enable service: mount-swap
    as it should, I suppose

    This means that the SWAP key was set to no at boot@system environment file. to change it simply do the following:

    # 66-env boot@system ## and changes what you need
    # 66-enable -t boot -F boot@system

    You can also list the contents of the file:
    # 66-env -L boot@system

    Thanks for commenting on my postings.
    I think, I now understand the usage of 66-env and 66-enable

    I wonder whether it wouldn't be nice to add a backup feature to
    66-env, either automatically when the -e or the -r option is used, or
    a special option for.

    Powered by Obarun