all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ERROR: In procedure swapon: "/dev/sda1": Invalid argument
@ 2016-04-17 20:18 Thierry Micoud
  2016-04-18  8:02 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Thierry Micoud @ 2016-04-17 20:18 UTC (permalink / raw)
  To: help-guix

Hi,
Ive been trying to use a swap partition but as the subject title
indicates i get the following error

ERROR: In procedure swapon: "/dev/sda1": Invalid argument

when i do
#sudo guix system reconfigure /etc/config.scm

this is the config.scm file

    (use-modules (gnu) (gnu system nss))
    (use-service-modules desktop networking ssh)
    (use-package-modules certs  rsync zsh suckless emacs vim tmux wm admin)

      ;; For those that want to use the zsh shell
    (define zsh-location
    #~(string-append #$zsh "/bin/zsh"))
    (operating-system
      (host-name "yuhata")
      (hosts-file (local-file (string-append "/etc/hosts-file")))
      (timezone "Europe/London")
      (locale "en_GB.UTF-8")
      ;; Assuming /dev/sdX is the target hard disk, and "my-root"
      ;; is the label of the target root file system.
      (bootloader (grub-configuration (device "/dev/sda")))
      (file-systems (cons* (file-system
                            (device "root")
                            (title 'label)
                            (mount-point "/")
                            (type "ext4"))
         (file-system
            (device "/dev/sda3")
           ;(title 'label)
            (mount-point "/home")
            (type "ext4"))
                          %base-file-systems))
    (swap-devices '("/dev/sda1"))


      (users (cons (user-account
                    (name "tmx")
                    (group "users")
    (shell zsh-location)
                    (supplementary-groups '("wheel" "netdev"
                                            "audio" "video"))
                    (home-directory "/home/tmx"))
                   %base-user-accounts))

      ;; This is where we specify system-wide packages.
      (packages (cons* nss-certs         ;for HTTPS access
       dwm tmux emacs vim dmenu i3-wm htop
       rsync
                        %base-packages))

      (services (cons* (lsh-service)
      (console-keymap-service "uk")
                      %desktop-services))

      ;; Allow resolution of '.local' host names with mDNS.
      (name-service-switch %mdns-host-lookup-nss))

and this is the relevent output of fdisk -l

    Disk /dev/sda: 232.9 GiB, 250000000000 bytes, 488281250 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x659d198e

    Device     Boot     Start       End   Sectors  Size Id Type
    /dev/sda1            2048   8390655   8388608    4G 82 Linux swap / Solaris
    /dev/sda2         8390656 385878015 377487360  180G 83 Linux
    /dev/sda3       385878016 488281249 102403234 48.8G 83 Linux

I cant see what im doing wrong
any help, sugestions will be greatly apreciated
Many thnaks
thierry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ERROR: In procedure swapon: "/dev/sda1": Invalid argument
  2016-04-17 20:18 ERROR: In procedure swapon: "/dev/sda1": Invalid argument Thierry Micoud
@ 2016-04-18  8:02 ` Ludovic Courtès
  2016-04-18 22:20   ` Thierry Micoud
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2016-04-18  8:02 UTC (permalink / raw)
  To: Thierry Micoud; +Cc: help-guix

Thierry Micoud <thierrymicoud@gmail.com> skribis:

> ERROR: In procedure swapon: "/dev/sda1": Invalid argument

[...]

> and this is the relevent output of fdisk -l
>
>     Disk /dev/sda: 232.9 GiB, 250000000000 bytes, 488281250 sectors
>     Units: sectors of 1 * 512 = 512 bytes
>     Sector size (logical/physical): 512 bytes / 512 bytes
>     I/O size (minimum/optimal): 512 bytes / 512 bytes
>     Disklabel type: dos
>     Disk identifier: 0x659d198e
>
>     Device     Boot     Start       End   Sectors  Size Id Type
>     /dev/sda1            2048   8390655   8388608    4G 82 Linux swap / Solaris

According to swapon(2), this most likely means that /dev/sda1 does not
contain a valid swap signature.

If that is the case, it can be fixed with:

  mkswap /dev/sda1
  herd start swap-/dev/sda1

HTH!

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ERROR: In procedure swapon: "/dev/sda1": Invalid argument
  2016-04-18  8:02 ` Ludovic Courtès
@ 2016-04-18 22:20   ` Thierry Micoud
  2016-04-19 10:42     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Thierry Micoud @ 2016-04-18 22:20 UTC (permalink / raw)
  To: Ludovic Courtès

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

On 18 Apr 2016 09:03, "Ludovic Courtès" <ludo@gnu.org> wrote:
>
> Thierry Micoud <thierrymicoud@gmail.com> skribis:
>
> > ERROR: In procedure swapon: "/dev/sda1": Invalid argument
>
> [...]
>
> > and this is the relevent output of fdisk -l
> >
> >     Disk /dev/sda: 232.9 GiB, 250000000000 bytes, 488281250 sectors
> >     Units: sectors of 1 * 512 = 512 bytes
> >     Sector size (logical/physical): 512 bytes / 512 bytes
> >     I/O size (minimum/optimal): 512 bytes / 512 bytes
> >     Disklabel type: dos
> >     Disk identifier: 0x659d198e
> >
> >     Device     Boot     Start       End   Sectors  Size Id Type
> >     /dev/sda1            2048   8390655   8388608    4G 82 Linux swap /
Solaris
>
> According to swapon(2), this most likely means that /dev/sda1 does not
> contain a valid swap signature.
>
> If that is the case, it can be fixed with:
>
>   mkswap /dev/sda1
>   herd start swap-/dev/sda1
>
> HTH!
>
> Ludo’.

That was exactly it.
Being a fresh install I completely forgot to mkswap the partition during
the install.

Thanks very much for taking time to reply.
I'm still finding my way round this distro, but enjoying very much the
learning curve.

Thierry

[-- Attachment #2: Type: text/html, Size: 1715 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ERROR: In procedure swapon: "/dev/sda1": Invalid argument
  2016-04-18 22:20   ` Thierry Micoud
@ 2016-04-19 10:42     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2016-04-19 10:42 UTC (permalink / raw)
  To: Thierry Micoud; +Cc: help-guix

Thierry Micoud <thierrymicoud@gmail.com> skribis:

> On 18 Apr 2016 09:03, "Ludovic Courtès" <ludo@gnu.org> wrote:

[...]

>> According to swapon(2), this most likely means that /dev/sda1 does not
>> contain a valid swap signature.
>>
>> If that is the case, it can be fixed with:
>>
>>   mkswap /dev/sda1
>>   herd start swap-/dev/sda1
>>
>> HTH!
>>
>> Ludo’.
>
> That was exactly it.
> Being a fresh install I completely forgot to mkswap the partition during
> the install.

The manual failed to mention it, so I’ve added it:

  http://git.savannah.gnu.org/cgit/guix.git/commit/?id=31b6cdf8d196f36790776f366868fe64932fa23d

> Thanks very much for taking time to reply.
> I'm still finding my way round this distro, but enjoying very much the
> learning curve.

Thanks for your feedback!

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-19 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-17 20:18 ERROR: In procedure swapon: "/dev/sda1": Invalid argument Thierry Micoud
2016-04-18  8:02 ` Ludovic Courtès
2016-04-18 22:20   ` Thierry Micoud
2016-04-19 10:42     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.