Page 1 of 2 [ 27 posts ]  Go to page 1, 2  Next

leejosepho
Veteran
Veteran

User avatar

Joined: 14 Sep 2009
Gender: Male
Posts: 9,011
Location: 200 miles south of Little Rock

07 Sep 2010, 5:57 pm

Question: Can I use just one (1) "/boot" and one (1) "/swap" for multiple installations of Linux?

I already have Mint installed with its own partitions and I intend to leave those alone, but I have made some room for more Linux so I can put Debian back in and be able to try or even add others beyond just running them "live". So, I am assuming a second and/or third installation would add itself to a common "/boot" partition and also use a common one for "swap".

Will that work, or am I thinking wrong and just asking for trouble?

Also, I have been using "ext2" for "\boot" and "ext3" for other partitions ...

Any problem there?


_________________
I began looking for someone like me when I was five ...
My search ended at 59 ... right here on WrongPlanet.
==================================


Last edited by leejosepho on 07 Sep 2010, 11:14 pm, edited 1 time in total.

one-A-N
Veteran
Veteran

User avatar

Joined: 2 Mar 2010
Age: 69
Gender: Male
Posts: 883
Location: Sydney

07 Sep 2010, 6:54 pm

You can use a single swap partition for several different Linux installations, as each OS will re-initialise the swap when it boots. The only situation I am not sure about is laptops and sleeping/hibernating - I think the OS uses the swap partition to store the memory image. But if you are setting up a desktop PC, just use the one swap partition.

As for a separate boot partition, I don't use one, so I can't help you there. I run a single partition on my home and work desktops, and other techies at work partition the Linux servers - and we don't dual boot. I just run single boot systems (Debian testing) and then run other OSs in VMware if I really need them. I do 99% of my work in Linux, though.

Off the top of my head, the problem with having several OSs use the same boot partition might be a "collision" in kernel versions: what if two OSs have the same kernel version (and filenames!) but with slightly differences? Will the second OS overwrite the kernel installed by the first OS? Do you need a separate boot partition? I have never used one, and I have been using Linux since 1997 - never had a problem with booting (well, nothing that related to boot partitions).

ext2 should OK - ext3 is just ext2 with journaling. The OS can handle either, these days. I wouldn't see any problems.



leejosepho
Veteran
Veteran

User avatar

Joined: 14 Sep 2009
Gender: Male
Posts: 9,011
Location: 200 miles south of Little Rock

07 Sep 2010, 7:13 pm

one-A-N wrote:
You can use a single swap partition for several different Linux installations, as each OS will re-initialise the swap when it boots.

That is what I thought, but I wanted to be sure ... and something interesting has just happened:

I have Debian going in at the moment, and I told it to use the "/swap" partition I have asked about here, and then it went on ahead and included Mint's "/swap" on another drive also! No harm done, of course. I sometimes give Windows more than one "swap" space to use. However, it surprised me a bit that Debian just went on ahead and hijacked a second "/swap" all on its own!

one-A-N wrote:
As for a separate boot partition, I don't use one, so I can't help you there ...

The "/boot" I made is only 180mb, and I was assuming it was just a place for GRUB to store a loader ... but maybe I am wrong about that.


_________________
I began looking for someone like me when I was five ...
My search ended at 59 ... right here on WrongPlanet.
==================================


Last edited by leejosepho on 07 Sep 2010, 11:15 pm, edited 1 time in total.

Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 51
Gender: Male
Posts: 5,223
Location: Alberta Canada

07 Sep 2010, 7:17 pm

You can also use files as swaps similar to windows page system. Thats an easy search. In fact, with enough ram your swap probably doesnt get touched: mine doesnt. Some application might depend on it being present however, but in years I have never needed one and often declined to set one up.

http://www.cyberciti.biz/faq/linux-add- ... ile-howto/

http://ubuntuforums.org/showpost.php?p= ... stcount=43


_________________
davidred wrote...
I installed Ubuntu once and it completely destroyed my paying relationship with Microsoft.


leejosepho
Veteran
Veteran

User avatar

Joined: 14 Sep 2009
Gender: Male
Posts: 9,011
Location: 200 miles south of Little Rock

07 Sep 2010, 7:19 pm

Yeah, I doubt the "/swap" will ever be used ... but just in case ...


_________________
I began looking for someone like me when I was five ...
My search ended at 59 ... right here on WrongPlanet.
==================================


Last edited by leejosepho on 07 Sep 2010, 11:16 pm, edited 1 time in total.

LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 34
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

07 Sep 2010, 7:22 pm

I don't know why you're using Ext2 for some partitions and Ext3 for others. It really makes no difference as to which one boots. All of my partitions are formatted as Ext3, except for one 28 GB one which I've set up for swapping. For some reason I didn't have to set to boot flag on the Debian partition in order for the BIOS to boot it, probably because that's the only partition that currently has anything on it. I do have to do it for USB drives though.


_________________
I don't want a good life. I want an interesting one.


leejosepho
Veteran
Veteran

User avatar

Joined: 14 Sep 2009
Gender: Male
Posts: 9,011
Location: 200 miles south of Little Rock

07 Sep 2010, 7:36 pm

LordoftheMonkeys wrote:
I don't know why you're using Ext2 for some partitions and Ext3 for others.

Some time ago I saw a post where someone suggested Ext2 is best for "/boot", but I do not remember why s/he thought that.

LordoftheMonkeys wrote:
For some reason I didn't have to set to boot flag on the Debian partition in order for the BIOS to boot it, probably because that's the only partition that currently has anything on it. I do have to do it for USB drives though.

For this Debian installation, I marked the active FAT32 partition at the beginning of one of my drives as "/windows", and I think later I will be going there to find Debian's loader. I also have a USB stick to eventually use, but I still need to some reading about that.


_________________
I began looking for someone like me when I was five ...
My search ended at 59 ... right here on WrongPlanet.
==================================


Last edited by leejosepho on 07 Sep 2010, 11:17 pm, edited 1 time in total.

LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 34
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

07 Sep 2010, 7:43 pm

I'm confused. What's with the backslashes?


_________________
I don't want a good life. I want an interesting one.


CloudWalker
Veteran
Veteran

User avatar

Joined: 26 Mar 2009
Age: 34
Gender: Male
Posts: 711

07 Sep 2010, 8:42 pm

Sharing swap isn't a problem, you can even share it with Windows with a little tweaking.

Sharing /boot is theoretically possible but like one-A-N said is risky. Linux also put the kernel there so sharing increase the chance of one disrto messing up the other. Unless you have something special in mind, it just doesn't seem to give any benefit.



Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 51
Gender: Male
Posts: 5,223
Location: Alberta Canada

07 Sep 2010, 9:06 pm

leejosepho wrote:
Yeah, I doubt the "\swap" will ever be used ... but just in case ...


Then I would just share it among distros or give each a file and save the partition count.

Also I use ext4 ever since it came out. They have fall back compatibility, so if new features fail, they act like 3, and 3 will act like 2. Ext2 lacks journaling if I recall, so its going to be comparable to fat32 in that it fragments and disk checks will be slow. Ext4 is massively faster.


_________________
davidred wrote...
I installed Ubuntu once and it completely destroyed my paying relationship with Microsoft.


LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 34
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

07 Sep 2010, 9:26 pm

NTFS fragments too. When I went to modify my partitions from a live CD, I found it was impossible to resize the partition used for Windows 7, even though most of it was unused. I suspect this was because it was fragmented.


_________________
I don't want a good life. I want an interesting one.


leejosepho
Veteran
Veteran

User avatar

Joined: 14 Sep 2009
Gender: Male
Posts: 9,011
Location: 200 miles south of Little Rock

07 Sep 2010, 9:45 pm

LordoftheMonkeys wrote:
I'm confused. What's with the backslashes?


Special system: Rookie ritten.


_________________
I began looking for someone like me when I was five ...
My search ended at 59 ... right here on WrongPlanet.
==================================


Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 51
Gender: Male
Posts: 5,223
Location: Alberta Canada

07 Sep 2010, 11:10 pm

leejosepho wrote:
LordoftheMonkeys wrote:
I'm confused. What's with the backslashes?


Special system: Rookie ritten.


and typed with a wookie mitten?


_________________
davidred wrote...
I installed Ubuntu once and it completely destroyed my paying relationship with Microsoft.


leejosepho
Veteran
Veteran

User avatar

Joined: 14 Sep 2009
Gender: Male
Posts: 9,011
Location: 200 miles south of Little Rock

07 Sep 2010, 11:22 pm

Fuzzy wrote:
leejosepho wrote:
LordoftheMonkeys wrote:
I'm confused. What's with the backslashes?


Special system: Rookie ritten.


and typed with a wookie mitten?

I'm in Winders right now, but I dun better in my gnu Debian.


_________________
I began looking for someone like me when I was five ...
My search ended at 59 ... right here on WrongPlanet.
==================================


Oenone
Butterfly
Butterfly

User avatar

Joined: 2 Sep 2010
Gender: Male
Posts: 14

08 Sep 2010, 9:39 am

LordoftheMonkeys wrote:
I don't know why you're using Ext2 for some partitions and Ext3 for others.


Ext2 has no journalling system so uses less space, Ext3 will use a small amount of space for its journalling system, since boot partitions are generally small usually under 100MB or less, ive used a boot partition at 60Mb< space is usually scarce.

I think that is the case, at least from what i remember. Its not so much an issue now, boot partitions are big enough most of the time for it not to matter and you would never notice.

leejosepho you can use one boot partition to hold multiple OS' kernels. The only think you need to look out for is naming, but you can check this before hand. Ive never had a problem using one boot partition to hold multiple kernels for more than one OS.

If there is a case where the names are the same its a simple fix, rename them with the prefix of the OS and edit your grub, in some OS' you can specify the name of the kernel when installing it, I can do this in Gentoo for example.



kip
Veteran
Veteran

User avatar

Joined: 13 Mar 2007
Age: 37
Gender: Male
Posts: 1,166
Location: Somewhere out there...

08 Sep 2010, 10:50 am

one-A-N wrote:
You can use a single swap partition for several different Linux installations, as each OS will re-initialise the swap when it boots. The only situation I am not sure about is laptops and sleeping/hibernating - I think the OS uses the swap partition to store the memory image.


When a laptop hibernates, it writes a copy of all active memory (RAM BTW, not other random cached and swap stuff) to the hard drive. So, in Linux, I'm pretty sure it uses swap for this purpose, but it's not an issue since the only way you can boot a different OS is to crash the current hibernate, which means you loose all your stuff, just like booting clean would.

Also, hibernate in *Nix is still pretty buggy on older hardware, so if you do have a laptop older than about 5 years, I'd turn off hibernate support. It took me weeks to get my 8 year old Toby to hibernate properly, and most people don't want to bother with that level of poking.


_________________
Every time you think you've made it idiot proof, someone comes along and invents a better idiot.

?the end of our exploring, will be to arrive where we started, and know the place for the first time. - T.S. Eliot