LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-09-2011, 08:42 PM   #1
mahkoe
LQ Newbie
 
Registered: Oct 2011
Posts: 25

Rep: Reputation: Disabled
Installing two linux systems on the same partition


I would like to try more than just Ubuntu (which was my first linux system and still reigns my hard drive) but I have no more primary partitions and lack the patience and necessary materials (and disk space) to repartition. I have experimented with different ways of installing two systems on the same partition. I tried overcomplicated bind mounting, but that didn't work and it was a miracle I got Ubuntu running again. I tried installing to a usb, then running
Code:
sudo cp -r -p /media/usblinux/* ~/usblinux/
but I couldn't pass the right kernel argument through grub2 and I don't think it's possible.

Anyway, if anyone has any ideas, I'm wide open to suggestions.
 
Old 12-09-2011, 09:33 PM   #2
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 8,243

Rep: Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557
I think trying to install two different operating systems in one partition is doomed to failure, if, indeed, the installer will allow it.

Linux, though, can be installed to an extended partition.

http://www.linuxquestions.org/questi...tition-228808/
 
0 members found this post helpful.
Old 12-09-2011, 09:52 PM   #3
mahkoe
LQ Newbie
 
Registered: Oct 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
I'm very aware that I can use extended partitions. Although I may not have made it very clear, my hard drive is nearly full, I already have four primary partitions, I have no access to an external drive. All I have is a stack of CDs and an 8 GB USB stick. atm, I am copying all the files of a linux install on my usb stick, I will boot into my usb, then chroot into the copied files. The reason I am chrooting is that I'm hoping it will trick grub2 into making a correct menu entry, as I don't know how I would do it. Although I severely doubt that this will work.

Last edited by mahkoe; 12-09-2011 at 10:24 PM.
 
Old 12-09-2011, 10:26 PM   #4
mahkoe
LQ Newbie
 
Registered: Oct 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
And no, that failed miserably. On a related note, is it possible to at least create a fake partition that is compatible with grub2 and that I could install a working linux system so that I don't have to borrow an external hard disk and spend hours repartitioning?

Last edited by mahkoe; 12-09-2011 at 10:28 PM. Reason: previous version was ambiguous
 
Old 12-10-2011, 12:19 AM   #5
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
I can't offer any concrete help with the two-OS-one-partition scenario...

You haven't mentioned why you want the second OS. And frankly, it's none of my business. However, if you just want to try out the other OS, then maybe VirtualBox or some other virtual machine package will get what you need.

Even if you need the OS for some specific functional reason (e.g. some special data-processing app written specifically for one distro), VirtualBox can open up the host filesystem to the virtualized OS. The host's device files are probably off-limits; so driver development, driver testing, or raw hardware access is probably not available (or unpredictable if a work-around is attempted).

Quote:
Originally Posted by mahkoe
On a related note, is it possible to at least create a fake partition that is compatible with grub2
The only thing I'm aware of that would be anything like a "fake partition" would be a loopback file. I doubt that's what you'd want. Though, creating an OS within a loopback is (or was) common practice for creating bootable CD images. It's been a while since I've looked at all that though.

Quote:
Originally Posted by mahkoe
so that I don't have to borrow an external hard disk and spend hours repartitioning
I've used gparted to do repartitioning. The first time I used it, the human interaction time was less than 10 minutes. The filesystem resizing, partition modification, etc. was all automated and took less than an hour. It's a piece of cake.

Quote:
Originally Posted by mahkoe
and lack the patience and necessary materials (and disk space) to repartition
Please don't take this the wrong way, because it's not meant to be combative. You've spent a lot of time trying some creative approaches to get the two-OS-one-partition setup working. Probably as much or more than the time to invest in repartitioning--the physical disk space issue aside.

Just 10 minutes ago, I scrapped a script that would check for duplicate files lingering from old attempts to merge old backups. 10 minutes ago, I realized my effort for the script would take 10x longer than other simpler methods. I'm not saying you should try repartitioning--just make sure you don't unnecessarily pull out gobs of hair

All that aside, I'll do some Google'ing to see if I can find something of use. I'll pass along anything of interest.

EDIT:
Maybe this would be of interest: Install Knoppix Inside Another Version of Linux
The instructions also claim to generalize for other distros. Though, I haven't tested it myself... nor am I 100% positive it's what you're looking for.

Or maybe this page: Install debian server in a linux chroot environment

Last edited by Dark_Helmet; 12-10-2011 at 12:28 AM.
 
Old 12-10-2011, 01:22 AM   #6
jonyo
Member
 
Registered: Jun 2011
Distribution: looking at VectorLinux 6.0 Light, PCLinuxOS phoenix
Posts: 195

Rep: Reputation: Disabled
you can run/install as many pup OSs as you like,

assuming you can boot from cd or usb, you're looking at as little as a few minutes to get going with a second OS going that route, including permanence
 
Old 12-10-2011, 08:37 AM   #7
wpeckham
Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix
Posts: 832

Rep: Reputation: 181Reputation: 181
And on another note...

Pup, mentioned above, is a viable option. I like it.

Another is TinyCore linux. These can be installed as a single folder on an existing partition and a stanza for loading added to your grub configuration.


pup and Tiny are very small, so they do not take up much drive space. They are NOT a general answer to your question, but are specific and special use solutions.

The more general solution to be able to install another Linux distribution under your conditions would require the installation of a virtualization package, addition of additional disk, or wipe out and totally reconfigure your storage (which may leave you with less storage than required for your existing data).

I advise you to leave your main machine functional, and pick up a cheap second machine when one is available to use for testing, reloading, and generally banging on to see what you can break and fix.
 
Old 12-10-2011, 09:54 AM   #8
mahkoe
LQ Newbie
 
Registered: Oct 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
Thanks for the replies, also, I have tried loopback OSes but I can never get them to boot, because I don't which kernel arguments are necessary. (For example, the "root=" kernel argument I'm fairly sure only takes /dev/sdxy and UUIDs, and I don't know how the "init=" argument would respond to a loopback). If anyone has any more insight, I'll take it. If not, I'll consider buying an external drive and just installing a whole bunch of distros to that.

Also, the reason I don't just use virtualbox or an easier solution is just because this is the sort of thing I do for fun (and I don't care what anyone has to say about that, its the main reason the only OS I can use anymore is Linux).

I'm going to mark this thread as solved, but feel free to reply.

Last edited by mahkoe; 12-10-2011 at 09:56 AM.
 
Old 12-10-2011, 03:05 PM   #9
jefro
Guru
 
Registered: Mar 2008
Posts: 12,087

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
You can just mount the new distro as root to say a new folder instead of root /.

The issue is no matter how you look at it, the file space will be almost the same either way. If you are out of space then you are out of space.

I'd get some more usb flash drives to load extra OS's on instead of this but you can try just a new root folder. Installer ought to fix it correctly. They'd all have to share a common loader or you'd have to chain back and forth.
 
  


Reply

Tags
grub2, multiboot, partitions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Help regarding installing 6 operating systems(xp,5 linux distros) ? jitenderpal Linux - Newbie 4 12-25-2009 07:27 AM
LXer: Installing OpenVPN on Linux and Unix Systems LXer Syndicated Linux News 0 12-04-2009 10:00 AM
trying different linux systems, help installing slackware marshall8151 Linux - Newbie 8 07-19-2009 06:52 PM
Does anyone here have experience with installing two linux systems and one FreeBSD? babyboss Slackware 2 10-23-2004 04:45 AM
installing 2 operating systems, windows xp and linux? Wardie Linux - Newbie 7 01-08-2004 11:38 AM


All times are GMT -5. The time now is 08:42 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration