Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I have just installed FC6, everything seems to work perfectly. Even though, I still have problems. Fisrt At boot time, there is an error: swap partition (which is shared between ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! beginner's Avatar
    Join Date
    Feb 2006
    Location
    Kiel, Germany
    Posts
    32

    Question How to make my SWAP partiton work on FC6?


    I have just installed FC6, everything seems to work perfectly. Even though, I still have problems.

    Fisrt
    At boot time, there is an error: swap partition (which is shared between other Distros) can not be enable, here is result of free command

    free
    total used free shared buffers cached
    Mem: 498204 434844 63360 0 8356 150412
    -/+ buffers/cache: 276076 222128
    Swap: 0 0 0


    My swap partition is 490 Mb, I have tried the command mkswap and swapon to solve the problem but here are the results:

    mkswap /dev/hda6
    bash: mkswap: command not found


    swapon -a
    bash: swapon: command not found


    Here is content of my fstab:

    LABEL=/1 / ext3 defaults 1 1
    devpts /dev/pts devpts gid=5,mode=620 0 0
    tmpfs /dev/shm tmpfs defaults 0 0
    proc /proc proc defaults 0 0
    sysfs /sys sysfs defaults 0 0
    LABEL=SWAP-hda6 swap swap defaults 0 0

    Second
    I also want to mount other partitions at boot time by adding the following lines to the fstab file

    /dev/hda8 /media/hda8 reiserfs defaults 0 2
    /dev/hda9 /media/hda9 ext3 defaults 0 2
    /dev/hda10 /media/hda10 ext3 defaults 0 2
    /dev/hda1 /media/hda1 ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
    /dev/hda7 /media/hda7 vfat users,gid=users,umask=0002,utf8=true 0 0


    When i restarted my box, it crashed and the only thing i have to do is press the power button to turn the box off . After i remove all the added lines, the system is work fine but the swap partition does not

    Please help me to solve the problems, thank you in advance.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    you must be 'root' to execute swapon or mkswap commands.
    Fedora assigns Label to SWAP partition but if you installed another distro and formatted SWAP space during installation, Label name is gone now.
    remove 'Label' in fstab file
    Code:
    /dev/<swap-partition> swap swap defaults 0 0





    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined! beginner's Avatar
    Join Date
    Feb 2006
    Location
    Kiel, Germany
    Posts
    32

    Wink Thank you so much, devils_casper

    Quote Originally Posted by devils_casper
    you must be 'root' to execute swapon or mkswap commands.
    Fedora assigns Label to SWAP partition but if you installed another distro and formatted SWAP space during installation, Label name is gone now.
    remove 'Label' in fstab file
    Code:
    /dev/<swap-partition> swap swap defaults 0 0
    Casper
    Yes, I executed the commands as root! and I have also installed FC6 after all other Distros
    Code:
    [root@localhost hdm]# mkswap /dev/hda6
    bash: mkswap: command not found
    It seems the mkswap and swapon do not exist on my system! Please tell me how can i get these commands.

    Thank you very much

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    i am in Kubuntu box right now and i have to check in Fedora box. i'll post back soon.
    did you try changing 'swap' line in fstab file?





    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Just Joined! beginner's Avatar
    Join Date
    Feb 2006
    Location
    Kiel, Germany
    Posts
    32
    I try it now! if it works i'll inform you. .
    Thank you,

  7. #6
    Just Joined! beginner's Avatar
    Join Date
    Feb 2006
    Location
    Kiel, Germany
    Posts
    32
    Poor me! , I did the same way as you told me
    Code:
    /dev/hda6    swap    swap    defaults   0 0
    the problem still exists!
    Here is the error message:
    Enabling /etc/fstab swaps---------------------------[FAILSE]

    And now
    Code:
    [root@localhost hdm]# free
                 total       used       free     shared    buffers     cached
    Mem:        498204     491344       6860          0      15096     286392
    -/+ buffers/cache:     189856     308348
    Swap:            0          0          0
    Do you think the swap partition is a litle bit smaller than RAM causes this problem? (Other distros work well with my swap partition!!!)

  8. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    log in as root or execute 'su -' as normal user and type 'swa' in terminal. hit TAB key 2-3 times. does it show 'swapon' in the list of available commands?








    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #8
    Just Joined! beginner's Avatar
    Join Date
    Feb 2006
    Location
    Kiel, Germany
    Posts
    32
    Quote Originally Posted by devils_casper
    log in as root or execute 'su -' as normal user and type 'swa' in terminal. hit TAB key 2-3 times. does it show 'swapon' in the list of available commands?

    Casper
    I did the same but nothing happen!!! Now i am sure that these commands (swapon, mkswap) do not exist in my system! I dont know why?

    I also have tried other regular command like ifconfig and here is the result
    Code:
    [root@localhost hdm]# ifconfig
    bash: ifconfig: command not found
    I am running XFCE Desktop Environment, Is this the reason why those commands do not include in my box? If yes, do you have any solution?

    Thank you for you time and your help.

  10. #9
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    I am running XFCE Desktop Environment, Is this the reason why those commands do not include in my box? If yes, do you have any solution?
    execute this code as root
    Code:
    echo $PATH
    post output here.
    prefix '/sbin' before these commands.
    Code:
    /sbin/mkswap /dev/hda6
    /sbin/swapon -a




    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  11. #10
    Just Joined! beginner's Avatar
    Join Date
    Feb 2006
    Location
    Kiel, Germany
    Posts
    32
    Thank you very much devils_casper! , you are very kind and helpfull! I found where those commands are, they are in /sbin! and now i can make swap partition active.

    Here is the output
    Code:
    [root@localhost hdm]# echo $PATH
    /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/hdm/bin
    Could you please tell me how to include /sbin in the PATH? (and tell me other important directories that i should add to PATH)

    Once again, i would like to thank you for all of the help.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •