LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-23-2007, 04:46 AM   #1
lothario
Member
 
Registered: Apr 2004
Posts: 340

Rep: Reputation: 30
swap partition not being mounted at boot


I moved my system to a bigger hard disk using Ghost4Linux.
Then I used Gparted to:
1. Move the swap partion to the end of the disk
2. Grow the / partition from 7Gig to 15Gig

Just about everthing is working fine.

The only thing that is not being picked up is the swap partition.
The /etc/fstab file still shows the old LABEL and the disk to be hda.

Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/1                /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
LABEL=SWAP-hda3         swap                    swap    defaults        0 0
/dev/hda                /media/cdrom            auto    pamconsole,exec,noauto,managed 0 0
The new disk is hdc and hda is a new CDROM drive on this system.
So the new CDROM is being recognized at boot time.
But the old swap partition entry is not being replaced/updated.

If I do "swapon /dev/hdc3" from the command line then the swap partition is enabled and being used.

But if I reboot the system then /dev/hdc3 is not being enabled at boot time.

What should I do?
man fstab-sync says "... This program is usually never run directly from a shell ..."
 
Old 11-23-2007, 04:51 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Simplest would be to do a mkswap on /dev/hdc3 and assign the old label to it - see the manpage.
 
Old 11-23-2007, 05:23 AM   #3
lothario
Member
 
Registered: Apr 2004
Posts: 340

Original Poster
Rep: Reputation: 30
Thanks syg00

I did:
mkswap -c -L SWAP-hda3 /dev/hdc3

Then I reboot the system.
Now the hdc3 swap partition is being enabled at boot.
This is good.

The hda3 label is going to cause some confusion down the road.
Is there any other way to take care of this?
 
Old 11-23-2007, 05:26 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Use a device instead the label in /etc/fstab.
 
Old 11-23-2007, 05:54 AM   #5
lothario
Member
 
Registered: Apr 2004
Posts: 340

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jschiwal View Post
Use a device instead the label in /etc/fstab.
Yes, that was the first thing I thought of. Won't that get overwritten by anything using fstab-sync.
 
Old 11-23-2007, 07:17 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Just change the label to SWAP, and update fstab. I think fstab-sync is only for HAL.
Been known to be wrong though ...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Specify existing swap partition at boot when reinstall? GeirG Linux - General 2 09-11-2004 07:42 AM
Can a swap or boot partition be too big? gadams33 Linux - Newbie 4 08-22-2004 05:48 PM
swap partition not mounted after Debian installation codeape Linux - Hardware 4 02-12-2004 03:11 PM
Mounted vFAT partition not accessable after re-boot bkorito Linux - Security 4 12-02-2003 01:04 PM
swap partition not being mounted jclark00001 Linux - Newbie 28 02-15-2003 03:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration