guix system error: In procedure swapon: "/dev/sda2": Invalid argument

  • Done
  • quality assurance status badge
Details
3 participants
  • Julien Lepiller
  • Ludovic Courtès
  • znavko
Owner
unassigned
Submitted by
znavko
Severity
normal
Z
Z
znavko wrote on 28 Nov 2018 08:24
(name . Bug Guix)(address . bug-guix@gnu.org)
LSOC4IN--3-1@tutanota.com
Guix is not possible to start swap device/dev/sda2. I noticed this:

# guix system reconfigure /etc/config.scm
...
guix system: error: exception caught while executing 'start' on service 'swap-/dev/sda2':
In procedure swapon: "/dev/sda2": Invalid argument...

# cat /etc/config.scm
...
(operating-system (host-name "antelope") (timezone "Europe/Moscow") (locale "en_US.utf8")
  (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
                (target "/dev/sda")))
  (file-systems (cons (file-system
                        (device "/dev/sda1") (mount-point "/") (type "ext4"))
                      %base-file-systems))
  (swap-devices '("/dev/sda2"))

  (users (cons* (user-account (name "bob") (group "users")......

I've read manual and I do not know what is wrong:
https://git.savannah.gnu.org/cgit/guix.git/tree/doc/guix.texi?id=1c6c0ad067b558fcbebd87e8cb51d342d808163e#n6878 https://git.savannah.gnu.org/cgit/guix.git/tree/doc/guix.texi?id=1c6c0ad067b558fcbebd87e8cb51d342d808163e#n6878


# free -m
              total        used        free      shared  buff/cache   available
Mem:           1880        1187          44         181         649         701
Swap:             0           0           0


Swap really did not worked ever in my Guix installation. Let me know what ought to be done?
Attachment: file
Z
Z
znavko wrote on 28 Nov 2018 08:34
Re: bug#33537: Acknowledgement (guix system error: In procedure swapon: "/dev/sda2": Invalid argument)
(address . 33537@debbugs.gnu.org)
LSOEPcq--3-1@tutanota.com
--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:


Nov 28, 2018, 10:32 AM by help-debbugs@gnu.org:

Toggle quote (22 lines)
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
> > bug-guix@gnu.org <mailto:bug-guix@gnu.org>
>
> If you wish to submit further information on this problem, please
> send it to > 33537@debbugs.gnu.org <mailto:33537@debbugs.gnu.org>> .
>
> Please do not send mail to > help-debbugs@gnu.org <mailto:help-debbugs@gnu.org>> unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 33537: > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33537 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33537>
> GNU Bug Tracking System
> Contact > help-debbugs@gnu.org <mailto:help-debbugs@gnu.org>> with problems
>
Attachment: file
Z
Z
znavko wrote on 28 Nov 2018 08:30
Re: guix system error: In procedure swapon: "/dev/sda2": Invalid argument
(name . Bug Guix)(address . bug-guix@gnu.org)
LSODQC1--3-1@tutanota.com
# fdisk -l
...
Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048 230000000 229997953 109.7G 83 Linux
/dev/sda2       230000640 234441647   4441008   2.1G 82 Linux swap / Solaris
Attachment: file
J
J
Julien Lepiller wrote on 28 Nov 2018 09:01
Re: bug#33537: Acknowledgement (guix system error: In procedure swapon: "/dev/sda2": Invalid argument)
CB533F6E-AC7D-40A1-89E0-8F571984B6F4@lepiller.eu
Just to be sure, could you run "mkswap /dev/sda2"?

Le 28 novembre 2018 08:34:33 GMT+01:00, znavko@tutanota.com a écrit :
Toggle quote (1 lines)
>
Z
Z
znavko wrote on 28 Nov 2018 10:27
(name . Julien Lepiller)(address . julien@lepiller.eu)(name . 33537)(address . 33537@debbugs.gnu.org)
LSOdAnB--3-1@tutanota.com
Thank you, Julien Lepiller! That exactly was what I need!


Nov 28, 2018, 11:01 AM by julien@lepiller.eu:

Toggle quote (6 lines)
> Just to be sure, could you run "mkswap /dev/sda2"?
>
> Le 28 novembre 2018 08:34:33 GMT+01:00, > znavko@tutanota.com <mailto:znavko@tutanota.com>> a écrit :
>
>>
>>
Attachment: file
L
L
Ludovic Courtès wrote on 28 Nov 2018 14:27
Re: bug#33537: guix system error: In procedure swapon: "/dev/sda2": Invalid argument
(address . znavko@tutanota.com)(address . 33537@debbugs.gnu.org)
87mupt49iz.fsf@gnu.org
Hi,

<znavko@tutanota.com> skribis:

Toggle quote (5 lines)
> # guix system reconfigure /etc/config.scm
> ...
> guix system: error: exception caught while executing 'start' on service 'swap-/dev/sda2':
> In procedure swapon: "/dev/sda2": Invalid argument...

According to swapon(2), there are 3 conditions that can lead to this
error:

EINVAL The file path exists, but refers neither to a regular file nor to a
block device;

EINVAL (swapon()) The indicated path does not contain a valid swap signature
or resides on an in-memory filesystem such as tmpfs(5).

EINVAL (since Linux 3.4)
(swapon()) An invalid flag value was specified in flags.

Did you run “mkswap /dev/sda2” beforehand?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 28 Nov 2018 14:28
Re: bug#33537: Acknowledgement (guix system error: In procedure swapon: "/dev/sda2": Invalid argument)
(address . znavko@tutanota.com)
87in0h49hr.fsf@gnu.org
<znavko@tutanota.com> skribis:

Toggle quote (2 lines)
> Thank you, Julien Lepiller! That exactly was what I need!

Ah, good. :-)

Closing!

Ludo’.
L
L
Ludovic Courtès wrote on 28 Nov 2018 14:28
control message for bug #33537
(address . control@debbugs.gnu.org)
87h8g149he.fsf@gnu.org
tags 33537 notabug
close 33537
?
Your comment

This issue is archived.

To comment on this conversation send an email to 33537@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 33537
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch