boot pre-existing swap partition

Hi,

I’m trying to get openSuse to boot a swap partition that I created after installaing suse 11.2. the partiton was created through knoppix and works at mounting on command line by:

#swapon /dev/sda6

however, when i look at the /etc/fstab file, i get the following:

/dev/disk/by-id/ata-SAMSUNG_HM251JI_S1BVJD9QA02255-part4 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-SAMSUNG_HM251JI_S1BVJD9QA02255-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-SAMSUNG_HM251JI_S1BVJD9QA02255-part3 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-SAMSUNG_HM251JI_S1BVJD9QA02255-part5 /windows/E vfat users,gid=users,umask=0002,utf8=true 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

obviously part 6 isn’t mounted and i have no idea about how to automount the swap parition. do i use “swapon /dev/sda6 swap defaults 0 0”

not reeally sure and really dont want to format incase i make a mistake.

thanks in advance for any reply

xmeglo

The additional line in /etc/fstab would look something like

/dev/disk/by-id/ata-SAMSUNG_HM251JI_S1BVJD9QA02255-part6 swap   swap defaults 0 0

Keep a copy of your original file around just in case.

xmeglo wrote:
> I’m trying to get openSuse to boot a swap partition that I created
> after installaing suse 11.2.

swapspace can’t be booted.

> the partiton was created through knoppix
> and works at mounting on command line by:
>
> #swapon /dev/sda6
>
> however, when i look at the /etc/fstab file, i get the following:
>
> obviously part 6 isn’t mounted and i have no idea about how to
> automount the swap parition. do i use “swapon /dev/sda6 swap defaults 0
> 0”

swapspace can’t be “mounted” either.
But here’s an example line to automatically activate the swap space on
boot:

/dev/sda6 swap swap defaults 0 0

With kind regards,
Andreas Stieger

If you have trouble with the file naming by ID (I mean this stuff: /dev/disk/by-id/ata-SAMSUNG_HM251JI_S1BVJD9QA02255-part6), it is easy if you mount it in Yast where the system figures out the ID. Just double click the highlighted swap partition and click to Edit it and select to Mount it (in location “swap”).