Fedora Linux Support Community & Resources Center
  #1  
Old 22nd November 2006, 05:47 PM
jeremie Offline
Registered User
 
Join Date: Sep 2004
Location: Montreal, Quebec
Posts: 29
Distros sharing SWAP partition

I thought it was possible. Apparently it's more subtle....

I installed Ubuntu 6.10 last week. I thought it could automatically use my existing swap partition. As part of the installation it had to reformat my 1Gb SWAP. Now, neither Ubuntu nor FC6 can mount the swap at boot time. FC6 complains that it is
Code:
Unable to access resume device (LABEL=SWAP-hda3)
. I can manually mount the swap with gparted in both cases (has to be redone after each boot).

Is there a secret? How do I teach FC6 to use the swap again at boot time? Is there a way to have the swap work for both distros?
__________________
Registered Linux User #372484
Reply With Quote
  #2  
Old 22nd November 2006, 07:07 PM
b_martinez Offline
Registered User
 
Join Date: Apr 2005
Location: Pueblo,Colorado
Posts: 724
What's the output of fdisk -l? Open a terminal and type in each command, followed by hitting the 'enter' key. When asked for a password, enter the root password.
/*code*/
su -
(enter password)
fdisk -l
/*code*/
fdisk -l lists partitions on the hard drive. This is a lower case L , not the number 1.
Bill
__________________
Registered Linux User : 361761 Registered Machine (2nd time): 332471
Work is for people who don't know how to fish.......;)
Sometimes the obvious is so well hidden that it boggles the mind.
Reply With Quote
  #3  
Old 22nd November 2006, 07:20 PM
ejket Offline
Registered User
 
Join Date: Nov 2006
Location: Ontario, Canada
Age: 59
Posts: 67
I've found that multi-distro setups can have problems with labels. Try explicitly naming the device in your fstab, ie, as /dev/hda3 if that's where it is.
__________________
noobus in perpetuum
Reply With Quote
  #4  
Old 22nd November 2006, 08:24 PM
jeremie Offline
Registered User
 
Join Date: Sep 2004
Location: Montreal, Quebec
Posts: 29
fdisk

fdisk -l outputs the following info

fc6 is on hda2
and ubuntu on the slave drive (hdb1)

the swap I want to use is on hda3 and used to be working with fc6 before i installed ubuntu.


Code:
Disk /dev/hda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        7649    61440561    7  HPFS/NTFS
/dev/hda2   *        7650       10199    20482875   83  Linux
/dev/hda3           10200       10327     1028160   82  Linux swap / Solaris
/dev/hda4           10328       30515   162160110    f  W95 Ext'd (LBA)
/dev/hda5           10328       30515   162160078+   7  HPFS/NTFS

Disk /dev/hdb: 15.3 GB, 15382241280 bytes
255 heads, 63 sectors/track, 1870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        1870    15020743+  83  Linux
__________________
Registered Linux User #372484
Reply With Quote
  #5  
Old 22nd November 2006, 08:30 PM
jeremie Offline
Registered User
 
Join Date: Sep 2004
Location: Montreal, Quebec
Posts: 29
Explicitly naming the swap device as /dev/hda3 in fstab partly fixes it. The message complaining about LABEL=SWAP-hda3 still shows up at boot time but the partition is successfully mounted. Thank you. Just for the info: where exactly is fc6 looking at at the very beginning, it must not be looking in fstab since I have changed the LABEL=SWAP-hda3 for /dev/hda3...
__________________
Registered Linux User #372484

Last edited by jeremie; 22nd November 2006 at 08:40 PM.
Reply With Quote
  #6  
Old 22nd November 2006, 08:40 PM
b_martinez Offline
Registered User
 
Join Date: Apr 2005
Location: Pueblo,Colorado
Posts: 724
Would you please post the contents of your /etc/fstab file?
Bill
__________________
Registered Linux User : 361761 Registered Machine (2nd time): 332471
Work is for people who don't know how to fish.......;)
Sometimes the obvious is so well hidden that it boggles the mind.
Reply With Quote
  #7  
Old 22nd November 2006, 08:44 PM
jeremie Offline
Registered User
 
Join Date: Sep 2004
Location: Montreal, Quebec
Posts: 29
Sorry, you beat me by a few seconds, I was editing my previous post.
The change ejket suggested DOES work. The swap is mounted with the following line in fstab

Code:
/dev/hda3               swap                    swap    defaults        0 0
So , I guess doing the same thing in ubuntu should fix this.

I am still getting the error message at boot though... so maybe the info must be updated elsewhere than in fstab.
__________________
Registered Linux User #372484
Reply With Quote
  #8  
Old 23rd November 2006, 04:25 AM
ejket Offline
Registered User
 
Join Date: Nov 2006
Location: Ontario, Canada
Age: 59
Posts: 67
Probably ubuntu relabeled the swap partition, which explains why fedora borked on it ... it's still a mystery why ubuntu doesn't like it, though. I'd think that using the explicit name for the device would work there as well.

Personally, these abstractions on top of simple device names serve none of my needs, and I edit that stuff out of fstab.

The irony is that if you have a gig of ram or more, it's very likely you never use swap anyway.
__________________
noobus in perpetuum
Reply With Quote
  #9  
Old 23rd November 2006, 04:41 AM
b_martinez Offline
Registered User
 
Join Date: Apr 2005
Location: Pueblo,Colorado
Posts: 724
Quote:
Originally Posted by ejket
Probably ubuntu relabeled the swap partition, which explains why fedora borked on it ... it's still a mystery why ubuntu doesn't like it, though. I'd think that using the explicit name for the device would work there as well.

Personally, these abstractions on top of simple device names serve none of my needs, and I edit that stuff out of fstab.

The irony is that if you have a gig of ram or more, it's very likely you never use swap anyway.
ejket,
do you think running 'mkswap' on that partition would fix it for both? Run from FC, that is.
Previous set up for my main computer
/dev/hda1 ubuntu
/dev/hda2 vector linux
/dev/hda3 debian
/dev/hda4 --extended
/dev/hda5 swap
/dev/hda6 /ubuntu home
/dev/hda7 /vl home

/dev/hdb1 / fedora core 5
hdb2 /home fc5
hdb3 /swap/
hdb5 /var
hdb6 /opt
When I installed ubuntu, it did the same thing. no swap on boot. For the hda drive.
I now have Ubuntu , VL, and FC6 on hda, installed in that order and no swap problems. But then again, I run with 1,5 gig RAM.
Just a stray thought (that probably should have been shot on sight)
Bill
__________________
Registered Linux User : 361761 Registered Machine (2nd time): 332471
Work is for people who don't know how to fish.......;)
Sometimes the obvious is so well hidden that it boggles the mind.
Reply With Quote
  #10  
Old 23rd November 2006, 05:20 AM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,754
Quote:
Originally Posted by ejket
The irony is that if you have a gig of ram or more, it's very likely you never use swap anyway.
You're wrong about that because I have 2 gigs of ram and FC6 consistently uses 160 KiB of swap.

As far as sharing it should work no problem that's how I had it setup with Slack and it was never an issue, so I guess FC and Ubuntu just don't play well together, I'd bet that Suse doesn't like FC either, lol.
Reply With Quote
  #11  
Old 23rd November 2006, 05:35 AM
b_martinez Offline
Registered User
 
Join Date: Apr 2005
Location: Pueblo,Colorado
Posts: 724
Quote:
Originally Posted by Dies
You're wrong about that because I have 2 gigs of ram and FC6 consistently uses 160 KiB of swap.

As far as sharing it should work no problem that's how I had it setup with Slack and it was never an issue, so I guess FC and Ubuntu just don't play well together, I'd bet that Suse doesn't like FC either, lol.

Actually,SUSE 10.0 and FC5 played really well together. So well in fact that I kept finding that SUSE was writing to the FC /home and not to SUSE /home. Really wonked some of my photo albums. SUSE didn't last.
Bll
__________________
Registered Linux User : 361761 Registered Machine (2nd time): 332471
Work is for people who don't know how to fish.......;)
Sometimes the obvious is so well hidden that it boggles the mind.
Reply With Quote
  #12  
Old 23rd November 2006, 07:58 AM
ejket Offline
Registered User
 
Join Date: Nov 2006
Location: Ontario, Canada
Age: 59
Posts: 67
Dies, I've had my eye out for swap usage over the past few years, and haven't seen any evidence of it. I also have 2GB ram on my main box, so I guess our habits and loads are different.

B_martinez, mkswap might be worth a try if all else fails, but I think the labels just got botched up and all will be well when the swap partition is accessed correctly.

I've had no swap problems running edgy eft and fc6 together, but I had ubuntu installed first. It might matter what version of ubuntu everyone is talking about as well, because I think edgy eft's uuid scheme in fstab is new with that version. So that could be the source of the problem, or a previous labeling scheme might be the problem on an older version.

Btw, what I find works best when running multiple distros is to not have separate /home dirs, but to have a large, single shared data dir that all the distros link to for art, music, bookmarks, personal data files, etc. So, with that, a shared /boot, and a shared swap, you only need one unique partition for each distro, which makes things far easier to manage.

Anyway, I think jeremie will be okay after a little fstab fixing in ubuntu, but we'll have to see if that works.
__________________
noobus in perpetuum
Reply With Quote
  #13  
Old 23rd November 2006, 11:05 PM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,754
I don't think you read that right, I was being sarcastic it shows 160 KiB which is nothing.
I agree if you have a lot of ram swap is unnecessary.
Reply With Quote
  #14  
Old 24th November 2006, 12:29 AM
Smasher Offline
Registered User
 
Join Date: Nov 2006
Posts: 1
Unable to access resume device

Unable to access resume device (LABEL=SWAP-hda3)
error at boot time.

open a terminal window login with $su
then

$mkdir ~/tmp2; cd ~/tmp2

then

$cat /boot/initrd-2.6.18-1.2849.fc6.img | gunzip | sudo cpio -id

edit the file called 'init'
Near the end there is a line that starts with 'resume /dev/hda?'
Make this point to your swap partition and you will no longer see the resume device error.
Then pack your initrd.img file back up with this.
Making sure the name is the name of your 'initrd.img' file.

$find . | cpio --create --format='newc' | gzip > /boot/initrd-2.6.18-1.2849.fc6.img

I read this on some forum somewhere and it worked for me.
Just make sure the /tmp folder is empty before you start or when you pack it back up it will make an initrd.img file that is big and blotted with extra stuff you don't need but that won't effect the boot.
Reply With Quote
Reply

Tags
distros, partition, sharing, swap

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing PC with other distros vinoman Installation, Upgrades and Live Media 18 9th June 2008 03:57 AM
Sharing a Home Partition Between Distros? Scyythe Using Fedora 16 19th May 2008 05:23 AM
sharing /home between distros wiggie Installation, Upgrades and Live Media 0 13th January 2008 02:16 PM
File sharing, 2 distros, one computer Detonate Using Fedora 20 3rd February 2007 04:21 PM
Different distros sharing partitions sleeping Installation, Upgrades and Live Media 3 13th May 2005 08:11 AM


Current GMT-time: 17:46 (Thursday, 18-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat