Click to See Complete Forum and Search --> : Dual-Linux Shared Swap Space?


Sasquash
03-22-2004, 04:34 AM
Hey

I've heard a few different things, so I'm not sure if this has been settled.

Can anyone clear up for me this very simple issue:

With two different Linux distributions on the same disk sharing on swap space, does the swap space need to be in a certain place on the disk?

Also, more important:

What's the easiest way to share files and folders between the two distributions? I like to have just one user on my computer - root. I've never seen any disadvantage to doing so up until now. If I log in as root, I should be able to access anything in terms of documents, right? So, the question is, do I need to create another partition (/home or maybe /root) in which shared files and folders are kept?

Thanks all

Sasquash

Digit0
03-22-2004, 05:02 AM
Originally posted by Sasquash


With two different Linux distributions on the same disk sharing on swap space, does the swap space need to be in a certain place on the disk?

Nop, in fact used to have two swap partitions for the hell of it even though I never swap...


What's the easiest way to share files and folders between the two distributions? I like to have just one user on my computer - root. I've never seen any disadvantage to doing so up until now. If I log in as root, I should be able to access anything in terms of documents, right? So, the question is, do I need to create another partition (/home or maybe /root) in which shared files and folders are kept?


Some people never learn. Running as root is A Bad Thing [TM], that is how you get infected with viruses/trojans/STD's/Malaria/AIDS (you get the picture). If running as root (again, bad thing) you have complete access to any flder or document in whatever disk. What I would do is create in both distributions a non root account and make a separate partition for /home/foo then just edit your fstab on both distros to point to the same /home partition. Do this and you will be able to keep your settings regardles of the distro...

Sasquash
03-22-2004, 05:47 AM
See, I've always heard, from people, that running as root is a "Bad Thing", but I've never once heard why.

So... why?

Sasquash

Digit0
03-22-2004, 06:22 AM
Lets say you are surfing the web as root. And one of the web pages has some exploit that attacks your computer. If you are root the exploit will tke control of all your computer because root can go anywear in your system and has access to anything in it.

This is an example but also aplies to any application you might be running as root (even if you loged in as a none root acount). Lets say you have a game and again it is vurnerable, even though you loged in as a none root account you gave the game root privileges now anyone that exploits the bug on the game can take control of your machine.

Viruses work the same way.

Think safe, think smart, protect yourself and others...
... don't use root.

JThundley
03-22-2004, 06:58 AM
Also, when you run normally as root you have to potential to mess things up. I know, everyone thinks "I'll just be very careful". It happens to the best of us dude.

That said, if I were dual booting two different distros, I would share lots of stuff! It's all about mounting partitions. Have both distros mount the same swap partition. Have both distros mount the same /home partition. Although I could see mounting /home could also mess things up because of different software versions.

When in doubt, back up and experiment! :D

Digit0
03-22-2004, 07:16 AM
Originally posted by JThundley
Although I could see mounting /home could also mess things up because of different software versions.

When in doubt, back up and experiment! :D

Might be just me but my /home partition has lasted me for a long time across a bunch of distro testing and upgrades. The worse that happens is it looks all broken cause it can't find the wallpaper, icons or skin, no biggie.

dr_te_z
03-22-2004, 10:04 AM
Back on topic:

I have a multi-boot machine. Amongst others I run 2 linux instances: a debian woody and a Slackware 9.1

They share serveral partitions:
- swap
- /tmp
- /data.

The /data is just an extra ext2 partition used to exchange data.

You must realize that debian cleans it's /tmp at startup. So all the tempory files that slack stores there are also gone after debian-boot. As long as you do not park your "more-than-an-hour" downloads there: no problemo.

DMR
03-22-2004, 03:35 PM
Originally posted by Sasquash
See, I've always heard, from people, that running as root is a "Bad Thing", but I've never once heard why.

So... why? As fate would have it, a post from earlier today answers your question perfectly:

http://www.justlinux.com/forum/showthread.php?threadid=124670

:D

asklepios
03-22-2004, 03:49 PM
yup a rm -Rf /usr teaches you everything you want to know about "why not to work as root?" :rolleyes:
yes i personally did that once :(