swapon -a does not work when bootin, but it _does_ work from the command line

From: Jan Lindåker (docekal_at_spray.se)
Date: 07/30/05

  • Next message: Bryan Donlan: "Re: Need iso images of Woody, Debian 3.0r3"
    To: debian-user@lists.debian.org
    Date: Sat, 30 Jul 2005 20:48:39 +0200
    
    

    Hi,

    I'm having a problem with getting swap to work on my debian sarge stable
    installation.

    I'm havig two hard disk, one normal IDE-drive an one SATA. GRUB is avtivated
    from the SATA disk, but the version I'm having problem with (2.6.8-2-k7) is
    on the IDE, drive (on the SATA drive I'm experimenting with AMD64/-k8
    kernel). The swap space in on the SATA Disk.

    My problem is that my swap space does get activeted at boot time. My fstab
    looks as follows:

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    /dev/hda1 / ext3 defaults,errors=remount-ro 0 1
    # Jan: Added swap
    /dev/sda5 none swap sw 0 0
    /dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

    If I login I'm abel to activate the swap space with the following command (as
    root)
    # swapon -a

    This command is also present in the appropriate ini/rc scripts

    # grep -r swapon /etc/*
    init.d/checkroot.sh: swapon -a 2> /dev/null
    init.d/mountall.sh:# Execute swapon command again, in case we want to swap to
    init.d/mountall.sh: swapon -a 2> /dev/null
    rcS.d/S10checkroot.sh: swapon -a 2> /dev/null
    rcS.d/S35mountall.sh:# Execute swapon command again, in case we want to swap
    to
    rcS.d/S35mountall.sh: swapon -a 2> /dev/null

    Which is exactly the same as on my SATA partition with the 64-bit linux kernel

    I suspect that somehow the SATA disk is not avaliable at that tiem in the boot
    process - but unfortuantely I have no clue about how to remedy the problem: I
    tried to mount the SATA partition by adding the following line in /etc/fstab
    (before the lines whith the swap partiiton)

    /dev/sda1 /mnt ext3 defaults,errors=remount-ro 0 2

    - but this only resutled in that the boot process stopped and claimed that the
    partioin was not an ext2 filesystem

    As you might suspect it is no problem to mount sda1 once I have logged in:

    #mount /dev/sda1 /mnt

    As I wrote above I suspect that at the time that mounting/swap activation
    occurs the system has no support for SATA drives - unfortunately I do not
    know which steps to take to remedy the problem (ensure drivers are loaded,
    etc), so any help would be higly appreciated.

    Best Regards - Jan

    P.S. I'm aware of that I could probably solve my problems by creating a swap
    file on /dev/hdc, but that would not really solve the boot/mount problem
    although swap activation would be automated

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Bryan Donlan: "Re: Need iso images of Woody, Debian 3.0r3"

    Relevant Pages