Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Using a real Linux swap partition?

2005-07-17
2013-05-09
  • Hello,

    I am wondering whether this is possible at all.  I tried it and it didn't seem to work.

    I do have a gentoo installation on my first harddisk and tried to use its swap partition in colinux with the following device entries "/Device/HarddiskVolume2" and "/Device/Harddisk0/Partition2".  Both resulted in the message that the partition doesn't contain a swap signature.  It must be the right partition (I checked with dd).

    The layout of the harddisk is as follows:

    - Windows XP boot partition (primary)
    - Extended Partition with a linux boot, linux swap & gentoo system partition

    So it should be Volume2 (or HarddiskVolume2).

    Any ideas?
    Rainer

     
    • Hi Rainer!

      By the sond of it, you're trying to use an extended partition as swap, what of course won't work. My understanding of your setup is the following:
      - Windows XP boot partition (Partition1)
      - Extended partition (Partition2)
        - Linux boot (Partition5)
        - Linux swap (Partition6)
        - Gentoo system (Partition7)
      You're allowed only 1 extended partition per drive and secondary partitions are numbered from 5 on (whichever primary partition is used as extended). Try with ...Partition6 and let us know.
      Cheers
        Olivier

       
    • The linux partitions are inside the extended partition.

      Windows shows the following:

      \\?\Device\Harddisk0\Partition0
        link to \\?\Device\Harddisk0\DR0
        Fixed hard disk media. Block size = 512
      \\?\Device\Harddisk0\Partition1
        link to \\?\Device\HarddiskVolume1
      \\?\Device\Harddisk0\Partition2
        link to \\?\Device\HarddiskVolume2
        Fixed hard disk media. Block size = 512
      \\?\Device\Harddisk0\Partition3
        link to \\?\Device\HarddiskVolume3
        Fixed hard disk media. Block size = 512
      \\?\Device\Harddisk0\Partition4
        link to \\?\Device\HarddiskVolume4
        Fixed hard disk media. Block size = 512

      - Primary partition with Windows XP
      - Extended partition consisting of
        - Linux boot
        - Linux swap
        - gentoo system

      I tried the following parameters (set in params.txt):

      cobd0=F:\colinux\gentoo4g
      cobd1=/Device/Harddisk0/Partition3
      cobd2=/Device/Harddisk0/Partition4
      cobd3=/Device/Harddisk0/Partition5
      cobd4=/Device/Harddisk0/Partition6
      cobd5=/Device/Harddisk0/Partition7

      Apart from cobd0 nothing is mountable, I keep getting "unknown device" messages when I tried to mount /dev/cobd/1 to 5.

      I am using a snapshot build, btw.  From 1st of July.

       
    • Tim Yang
      Tim Yang
      2005-07-27

      Mine works as follows:

      dd --list
      \\?\Device\CdRom0
        Removable media other than floppy. Block size = 2048
      \\?\Device\Harddisk0\Partition0
        link to \\?\Device\Harddisk0\DR0
        Fixed hard disk media. Block size = 512
      \\?\Device\Harddisk0\Partition1
        link to \\?\Device\HarddiskVolume1
        Fixed hard disk media. Block size = 512
      \\?\Device\Harddisk0\Partition2
        link to \\?\Device\HarddiskVolume2
      \\?\Device\Harddisk0\Partition3
        link to \\?\Device\HarddiskVolume3
      \\?\Device\Harddisk0\Partition4
        link to \\?\Device\HarddiskVolume4
      \\?\Device\Harddisk0\Partition5
        link to \\?\Device\HarddiskVolume5

      In my config.xml, the swap partition is this:

          <block_device index="4" path="\Device\Harddisk0\Partition5" enabled="true"
          alias="hda7" />

      And in my fstab, it is /dev/hda7.

      I think cobd4 works in my case also. I use dual boot, so I like it to be hda7.

      Maybe the swap partition is not Volume 2?
      And the last post is definitely wrong.

      I use 0.6.2.  It has other problems, but swap partition works.

       
    • Had to change it to Partition3.  It seems that 2 was the extended partition and 3 the first logical drive within it. *shrug* :)  Also have to use \Device instead of /Device (silly mistake).

       
    • Mikey
      Mikey
      2005-08-01

          Hi, I wonder how you can use "dd --list" to show the partition info.?
          When I try that, it shows no such option. Btw, the version I used is "Debian 2.6.10-co-0.6.2", is that OK?