You are not logged in.

#1 2008-03-31 11:59:04

clarencelee
Member
Registered: 2008-03-27
Posts: 8

Made Wrong Partition Swap

Hello, I made a mistake writing the fstab during an installation and made my sda5 vfat partition the swap partition instead of the sda6 swap partition.

I then edited fstab after installation to set sda6 as the swap partition and rebooted. According to this site:

http://lissot.net/partition/partition-08.html

there's nothing more to be done since linux does everything automagically.

Yet now I do not have a swap. (Nothing in /proc/swaps or conky)

mkswap /dev/sda6 results in the message:

Device or resource busy

Gkrellm shows that there is some activity in sda6, though I don't know how to find out what exactly is using it. I had put nothing in sda6 so I don't see how any process could be using it.

I hope to somehow get sda6 to become swap safely. Does anyone have any advice on how to go about doing this?

Thank you very much.


Clarence

Offline

#2 2008-03-31 12:25:17

sirocco
Member
Registered: 2008-03-10
Posts: 149

Re: Made Wrong Partition Swap

1. Be sure that /dev/sda6 is your swap
2. umount /dev/sda6
(or comment /dev/sda6 in fstab and reboot)
3. mkswap -f /dev/sda6
4. swapon /dev/sda6
(uncomment /dev/sda6 in fstab)

Offline

#3 2008-04-01 09:32:09

clarencelee
Member
Registered: 2008-03-27
Posts: 8

Re: Made Wrong Partition Swap

Even after commenting out the line with sda6, the resource is still busy and I cannot use mkswap or swapon on it. Yet umount /dev/sda6 claims that it is not mounted. It does not show up in /etc/mtab.

Meanwhile, sda6 continues to show activity in gkrellm. And there is still no swap in /proc/swaps.

Here is my fstab.

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0


/dev/cdrom /mnt/cdrom   iso9660   ro,user,noauto,unhide   0      0
/dev/dvd /mnt/dvd   udf   ro,user,noauto,unhide   0      0
/dev/sda5 /sda5 vfat defaults 0 1
# /dev/sda6 swap swap defaults 0 0
/dev/sda7 / ext2 defaults 0 1

Is it possible that the partition headers are now incorrect and I have to use fdisk or cfdisk? I'm not too sure how to go about doing that so help would be appreciated.

Thank you.

Clarence

Offline

#4 2008-04-01 10:00:50

sirocco
Member
Registered: 2008-03-10
Posts: 149

Re: Made Wrong Partition Swap

try

fdisk -l /dev/sda
dmesg | grep sda6

Offline

#5 2008-04-01 11:44:39

clarencelee
Member
Registered: 2008-03-27
Posts: 8

Re: Made Wrong Partition Swap

I'm unable to copy and paste text from my terminal (that is another major problem) so I'm typing this out by hand:

Disk /dev/sda: 60.0GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units= cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8da88da8

Device          Boot        Start      End              Blocks      Id         System
/dev/sda1      *               1         1912        15358108+     7      HPFS/NTFS
/dev/sda2                      6886     7296         3301357+     1c      Hidden W95 FAT32 (LBA)
/dev/sda3                      1913    6885        39945622+     5      Extended
/dev/sda5                      1913     4462       20482843+    b      W95 FAT32
/dev/sda6                      4463      4717        2048256     82       Linux swap / Solaris
/dev/sda7                      4718      5354       5116671      83      Linux

Partition table entries are not in disk order

dmesg | grep sda6 gives:

 sda5 sd6 sda7 >

Thanks a lot.

Clarence

Last edited by clarencelee (2008-04-01 11:45:22)

Offline

#6 2008-04-01 12:10:10

clarencelee
Member
Registered: 2008-03-27
Posts: 8

Re: Made Wrong Partition Swap

By the way, pacman -S gnome-terminal gave me a terminal which supports copy/paste with other X applications, but one day I hope to be able to fix the copy/paste issue using my preferred terminal, urxvt.


Clarence

Offline

#7 2008-04-01 12:25:35

sirocco
Member
Registered: 2008-03-10
Posts: 149

Re: Made Wrong Partition Swap

May be this helps

swapoff /dev/sda6

and then

mkswap -f /dev/sda6
swapon /dev/sda6

and check

swapon -s

Offline

#8 2008-04-02 10:50:54

clarencelee
Member
Registered: 2008-03-27
Posts: 8

Re: Made Wrong Partition Swap

The results were as follows:

swapoff: /dev/sda6: invalid argument

/dev/sda6: device or resource busy

swapon: /dev/sda6: invalid argument

no disks are listed as swap

I tried doing all this in Arch Fallback mode but the same happens.

Do I have to reformat the partition?

Thanks for all the help.


Clarence

Offline

#9 2008-04-02 15:57:55

sirocco
Member
Registered: 2008-03-10
Posts: 149

Re: Made Wrong Partition Swap

Load from install/rescue CD and try
mkswap /dev/sda6

Offline

#10 2008-04-02 16:07:30

windtalker
Member
Registered: 2008-03-17
Posts: 220

Re: Made Wrong Partition Swap

That wwould be my question since it was a typo error on your part,,,, was sda6 even formatted as swap.

Offline

Board footer

Powered by FluxBB