You are not logged in.

#1 2012-02-15 02:10:48

cravengemetzel
Member
Registered: 2012-02-15
Posts: 7

Swap issues with Arch/Ubuntu/Win7 triple boot ?

Firstly, I am not new to Arch Linux; I simply did not know where to post my problem . I've in fact been with Arch Linux for ahhh, it must be two years now - and I am loving it .

But I encountered a strange problem . I have 8GB of memory on my new lappy, so at first I made myself a 10GB Swap partition to go with Arch, which worked fine . But then I decided that I wanted to make another partition for testing . So I did, and I (wrongly) assumed that Arch would be happy sharing Swap with other Linux systems, as Swap is only a scratchpad for when there is not enough RAM available . Little did I know that when I installed Ubuntu (for testing purposes, as Backtrack 5R1 has issues with my hardware and I was seeing if I might implement the tools into Ubuntu 12.04 . I was also madly curious about Gnome Unity - and I found myself liking it, although I do not like the Gnome project per se .) and I specified my 10 gig Swap partition, it would start a war between the two distros . Say, I had to "mkswap and swapon" on each boot, and then reboot into the same distro just so that I did not get the "Activating Swap FAIL" or whatever it is error message . Thus, I had to repeat every time I switched between Arch and Ubuntu .

I thought I would resolve the problem by using fdisk to delete my 10GB Swap partition and make two 5GB Swap partitions, pointing Arch to "/dev/sda7" in the "/etc/fstab" and then doing "mkswap /dev/sda7 && swapon /dev/sda7" while also editing the Ubuntu "/etc/fstab" and then pointing it to "/dev/sda8" and then doing "mkswap /dev/sda8 && swapon /dev/sda8" but all this to no effect . Well, actually, there was an effect - Ubuntu no longer complains about not being able to activate Swap, but I still have the issue that whenever I boot into Arch after an Ubuntu session, I must "mkswap /dev/sda7 && swapon /dev/sda7 && reboot" to avoid the "FAIL" message upon bootup .

Did I do something wrong ? I thought my theory was sound by pointing fstab to /dev/sda7 and /dev/sda8 in Arch and Ubuntu, respectively . Any advice ? I'd like to be able to use the "sleep" and "hibernate" features if at all possible . ;P

Danke . ^^

Last edited by cravengemetzel (2012-02-15 02:13:07)

Offline

#2 2012-02-15 05:22:46

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Swap issues with Arch/Ubuntu/Win7 triple boot ?

Run # blkid and find out your uuid's.  Use the uuid # for your swap partition in both distros.  Anytime you install a distro and select a swap partition to use, it usually overwrites the existing partition and changes the uuid of that partition.

Last edited by David Batson (2012-02-15 05:23:23)

Offline

#3 2012-02-15 15:14:45

cravengemetzel
Member
Registered: 2012-02-15
Posts: 7

Re: Swap issues with Arch/Ubuntu/Win7 triple boot ?

I actually did do "# blkid" and by saying that I appointed "/dev/sdx" I actually meant that I pointed the UUID of said partition in the fstab of said distro, but I still have the same problem . I've no clue why -- perhaps when I "# mkswap /dev/sda7" in Arch linux it does not do it properly ? I do know, however, that if I try to "# blkid /dev/sda7" in Arch before the mkswap command, there is no output whatsoever . But after I "# mkswap /dev/sda7 && swapon /dev/sda7," blkid does output the same UUID that was appointed by "mkswap" .

Either that, or Ubuntu decides to recreate my /dev/sda7 Swap partition upon every boot, which I still do not understand because I pointed it to the UUID of /dev/sda8 which differs to the UUID of /dev/sda7 appointed to Arch (which consequently changes every time I do "mkswap," thus I must frequently edit the fstab) .

Last edited by cravengemetzel (2012-02-15 15:15:42)

Offline

#4 2012-02-15 15:19:46

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Swap issues with Arch/Ubuntu/Win7 triple boot ?

UUID on swap is not reliable, for various reasons, like distroes recreating it every boot, use LABEL instead. Or make sure that it is always created using the same UUID.

Last edited by Mr.Elendig (2012-02-15 15:20:11)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2012-02-15 16:05:14

cravengemetzel
Member
Registered: 2012-02-15
Posts: 7

Re: Swap issues with Arch/Ubuntu/Win7 triple boot ?

Thank you, but how would I go about using LABEL or making sure that it is always recreated using the same UUID ?

Offline

#6 2012-02-15 17:06:48

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Swap issues with Arch/Ubuntu/Win7 triple boot ?

Hmmm - that's rather interesting. I've done multibooting for more years than I care to remember and always used just _one_ swap partition - common to all the distros. I have always used /dev/sdaX in /etc/fstab and never had any problems. Usually I have a mix of arch, mint, centos and slackware - centos prefers 'label' and mint uses 'uuid' - however, I have always changed that to /dev/sdaX in /etc/fstab. I have never tried ubuntu - but I would've thought mint would do the same - at least the ubuntu-version (as opposed to debian-version) of mint.

Offline

#7 2012-02-15 22:49:47

cravengemetzel
Member
Registered: 2012-02-15
Posts: 7

Re: Swap issues with Arch/Ubuntu/Win7 triple boot ?

Yeah, I've no clue why it is happening either .. Perhaps if I tried reinstalling a distro into my testing slot, making sure to point it to /dev/sda8's UUID it might resolve the issue .. Actually, I was thinking of installing Pardus 2011.2 tonight (an amazing little distro, by the way, from Turkey) and seeing how that goes . Will post back later on the results, but I am still appreciative of any suggestions that anyone might have meanwhile . (:

On a sidenote, how is CentOS ? And Slackware ? (I am an avid distro-hopper, hence my testing slot .) I've never tried either and I have been curious for a while now .

I installed Gentoo (Funtoo, actually, but it is almost the same thing) the other day in my testing partition, but I found that troubleshooting on it for hardware issues was a pain, as was the extremely slow speed of compiling everything . But it was a great learning experience for me ! (:

Offline

#8 2012-02-16 01:36:22

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Swap issues with Arch/Ubuntu/Win7 triple boot ?

Maybe this old post of mine will help some.
http://forum.mandriva.com/en/viewtopic.php?t=91474

AFAIK, everytime you run mkswap, it changes the uuid of the partition.  Better to run mkswap once to set it up, then leave it alone.

Are you saying if you use mkswap in Arch to set up your swap partition, swap works correctly in Arch, but fails once you boot into Ubuntu, then reboot into Arch?  Try runing # blkid in Arch after setting up your swap partition with mkswap.  Write down the uuid of your swap partition.  Boot into Ubuntu, then reboot into Arch.  Run # blkid in Arch again.  Has the uuid changed?

Offline

#9 2012-02-16 02:16:03

cravengemetzel
Member
Registered: 2012-02-15
Posts: 7

Re: Swap issues with Arch/Ubuntu/Win7 triple boot ?

That is exactly what I was saying . Once I mkswap in Arch, it runs fine and I do not need to do it again or edit the fstab so long as I only boot into Arch . However, once I boot into Ubuntu, and then boot back into Arch, and run blkid /dev/sda7, there is no output whatsoever (there is no output, and I get a new bash line as if I simply hit "ENTER" without typing anything) . As if blkid no longer recognizes that /dev/sda7 is a partition, however it is listed in "fdisk -l" and will reappear - with a different UUID - once I "mkswap && swapon" it and add it into the fstab . After that, I may keep using swap until I once again boot into Ubuntu .. It is a very perplexing problem, as I do not understand it . I clearly pointed Ubuntu's fstab to /dev/sda8's UUID, and I clearly appointed Arch to /dev/sda7's UUID, but it would seem that for some reason Ubuntu takes it upon itself to recreate my /dev/sda7 Swap partition every time I boot it, even though it is pointed to /dev/sda8's UUID ..

Ah yes, Pardus 2011.2 was a flunk as the kernel is < 3.0 and does not support my new lappy . A shame, as the Pardus project seems to be dying ..
A fork is being discussed here, if anyone is interested in the Pardus project .  : http://worldforum.pardus-linux.nl/index … ic=4312.15

Last edited by cravengemetzel (2012-02-16 02:18:24)

Offline

#10 2012-02-16 06:01:21

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: Swap issues with Arch/Ubuntu/Win7 triple boot ?

Mr.Elendig wrote:

UUID on swap is not reliable, for various reasons, like distroes recreating it every boot, use LABEL instead. Or make sure that it is always created using the same UUID.

Or if you are using GPT and udev>=180, you can use partuuid instead of fs-uuid. Since that info is in the partition table it is independent of the filesystem used in the partition.

Offline

Board footer

Powered by FluxBB