LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Swap partition not being mounted after moving it (http://www.linuxquestions.org/questions/linux-hardware-18/swap-partition-not-being-mounted-after-moving-it-629550/)

etotheidotpy 03-20-2008 06:50 PM

Swap partition not being mounted after moving it
 
Hi,

I recently repartitioned my hard drive; I moved my swap partition so that I could grow my /home partition (it was getting pretty full.)

Upon booting (Fedora 8; kernel 2.6.24.3-34.fc8), I saw a message stating that it could not mount my swap partition. (which would be /dev/sda4)

The contents of my /etc/fstab file are:
Code:

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

And /sbin/fdisk -l returns:
Code:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x95aa95aa

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        1786    14341288+  7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2            1787        3698    15358140    5  Extended
/dev/sda3            3699        9435    46082452+  83  Linux
/dev/sda4            9603        9729    1020127+  82  Linux swap / Solaris
/dev/sda5            1787        3061    10241406  83  Linux

Under gparted, I see that the swap partition currently has no label or mountpoint.

Help, please? :)

slackhack 03-20-2008 06:54 PM

a guess: try referring to it in fstab as the device instead of by the label? maybe the label is messed up.

etotheidotpy 03-20-2008 07:33 PM

I just tried that, and I got the same error during booting:
Unable to access resume device (LABEL=SWAP-sda4)

jailbait 03-20-2008 07:45 PM

Try changing your swap line in /etc/fstab from:

LABEL=SWAP-sda4 swap swap defaults 0 0

to:

LABEL=SWAP-sda4 none swap sw 0 0


-------------------
Steve Stites

etotheidotpy 03-20-2008 08:03 PM

Okay, I tried that; however, still no luck.

syg00 03-20-2008 08:04 PM

Quote:

Originally Posted by etotheidotpy (Post 3095470)
I just tried that, and I got the same error during booting:
Unable to access resume device (LABEL=SWAP-sda4)

Read the message - it's the resume partition reference it's complaining about. Check your boot-loader parameters.

etotheidotpy 03-20-2008 08:42 PM

Ah, thanks for noticing that. :)

I just took a look at /boot/grub/grub.conf; this is what I have:
Code:

default=0
timeout=25
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.24.3-34.fc8)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.24.3-34.fc8 ro root=LABEL=/1 rhgb quiet
        initrd /boot/initrd-2.6.24.3-34.fc8.img
title Fedora (2.6.24.3-12.fc8)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.24.3-12.fc8 ro root=LABEL=/1 rhgb quiet
        initrd /boot/initrd-2.6.24.3-12.fc8.img
title Windows
        rootnoverify (hd0,0)
        chainloader +1

I'm not seeing a mention of a resume device there; what should I do?



edit: Here's menu.lst:
Code:

default=0
timeout=25
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.24.3-34.fc8)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.24.3-34.fc8 ro root=LABEL=/1 rhgb quiet
        initrd /boot/initrd-2.6.24.3-34.fc8.img
title Fedora (2.6.24.3-12.fc8)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.24.3-12.fc8 ro root=LABEL=/1 rhgb quiet
        initrd /boot/initrd-2.6.24.3-12.fc8.img
title Windows
        rootnoverify (hd0,0)
        chainloader +1


syg00 03-20-2008 08:47 PM

Me too - what does menu.lst look like ???.

slackhack 03-20-2008 08:53 PM

check out this thread:
http://forums.fedoraforum.org/showthread.php?t=111565

syg00 03-20-2008 09:28 PM

Hopefully the mkswap was done - I had presumed so.
Else I'd be inclined to use noresume (just once).

slackhack 03-20-2008 09:58 PM

Quote:

Originally Posted by syg00 (Post 3095538)
Hopefully the mkswap was done - I had presumed so.
Else I'd be inclined to use noresume (just once).

yes hopefully, but read down about the initrd.

OP you might try adding the resume=/dev/sda4 option first before trying noresume or rebuilding the initrd.

etotheidotpy 03-21-2008 05:58 PM

Quote:

Originally Posted by syg00 (Post 3095538)
Hopefully the mkswap was done - I had presumed so.

Yeah, I did that.

Quote:

Originally Posted by slackhack
adding the resume=/dev/sda4 option

I just did that and the error is not appearing anymore when I boot. (Which I'm presuming means it's fixed.) Thanks!

And a big thank you to all of you. :)


All times are GMT -5. The time now is 02:11 AM.