LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bedrock Linux
User Name
Password
Bedrock Linux This forum is for the discussion of Bedrock Linux.

Notices


Reply
  Search this Thread
Old 09-30-2017, 02:04 PM   #1
elypter
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Rep: Reputation: Disabled
Swap distro without reboot?


is it possible to switch the default strata and singletons to another distro and run the default applications without having to reboot? and is it possible to kexec reboot into another distro of the bedrock boot menu without manually selecting it?
 
Old 09-30-2017, 02:10 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by elypter View Post
is it possible to switch the default strata and singletons to another distro and run the default applications without having to reboot? and is it possible to kexec reboot into another distro of the bedrock boot menu without manually selecting it?
that's an interesting language you are using there, not sure if it is english.
anyhow on "bare metal" you need to reboot to use another distro, but i believe there's virtualisation techniques that might fulfil your needs.
 
Old 09-30-2017, 03:06 PM   #3
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Can a *bedrock distro expert* advise further here???

@Bedrock Linux's 3LQpeople ... (they may be busy &take a day+ to find nonZRT)

Welcome to LQ, elypter!!! Sounds like you may have some ?grad school? concepts there, but tell us a bit more.
Try a word different than strata: it has geological meaning, but my web-researching it with "OS" found nothing.
Your 2nd word is found with OOprogramming. kexec mentions the syscall exec: have you used it? (how?) I assume you are using http://DistroWatch.com/bedrock

Cool features:all 'init systems'!!! Maybe it has a way to kexec...
Note that a 'distro' is basically some one/team's kernel .config plus choice of software (init, pkg-mgr, DE/WM/'apps', other customizations); see DWsearch

What hostOS/PC do you currently use? A tiny bit of info on your Linux experience/goals, might help us also.
You can, in just minutes, on M$WinX/Linux/MacOS, run Linux guest VMs (js heavy link) in VirtualBox
to experiment and (try to) experience all this. Best wishes; let us know more.

p.s. You also might look into 'containers' (used in Cloud technology, but I don't know such).
Cool instantaneous triage in #2!!! (2=3-1) I gave it a "raiep"

Last edited by !!!; 09-30-2017 at 06:27 PM.
 
Old 09-30-2017, 07:02 PM   #4
ParadigmComplex
Bedrock Linux Founder
 
Registered: Feb 2016
Distribution: Bedrock Linux
Posts: 179

Rep: Reputation: Disabled
Quote:
Originally Posted by elypter View Post
is it possible to switch the default strata and singletons to another distro and run the default applications without having to reboot? and is it possible to kexec reboot into another distro of the bedrock boot menu without manually selecting it?
I'm not entirely sure what you're asking, but I'll offer something. If it doesn't answer your question, feel free to rephrase or go into more detail.
  • Bedrock Linux tries to let you run as much as is possible in parallel and, where that fails, hot swap as much as possible, and where that fails, swap as much as possible with a reboot. However, there are limits to what it can do, namely the singletons that you've mentioned. If there's a limit here, it's probably because we don't know of a way to do this cleanly, rather than some design goal.
  • I don't know what you mean by "default applications", but my guess is that Bedrock will *probably* let you run those from a variety of distros without a reboot in between, provided they're not dependent on some non-hot-swap'able singleton. If multiple strata provide some feature, there are ways to specify which is desired, including configuration specifying a default. Typically if I run `firefox` I'll get Firefox from one stratum, but I can reconfigure it so next time I run `firefox` I'll get Firefox from a different stratum, or I can always run `brc <stratum> firefox` to specify which stratum I want to provide Firefox on the fly. Provided I use `-remote` (due to a Firebox quirk, not necessarily representative of all applications), I can run multiple instances of Firefox in parallel from different strata.
  • I'm not as familiar with kexec as I should be. If it'll let you hot swap the kernel on some other distro, it'll probably let you do that with Bedrock Linux. I've never personally tried this, and I've never heard reports from those who have. If you give it a try, do let me know so I can make note of it for others. Bedrock Linux does not provide any special magicks to make hot swapping kernels possible.
  • Independent of Bedrock, it is possible in theory to hot swap init systems, if the init system supports it. I've written toy init systems which do this. However, I don't think most major init systems support this. Bedrock Linux does not provide any special magicks to make hot swapping init systems possible.

Quote:
Originally Posted by ondoho View Post
anyhow on "bare metal" you need to reboot to use another distro, but i believe there's virtualisation techniques that might fulfil your needs.
The idea behind Bedrock Linux is to let you get features from other distros at the same time, working together, without the overhead of virtualization. You can hot swap quite a bit of the system without rebooting. You can run a DE from one distro and swap it to a DE from another distro without a reboot, for example. Or run both DEs at the same time.

Quote:
Originally Posted by !!! View Post
Try a word different than strata: it has geological meaning, but my web-researching it with "OS" found nothing.
Your 2nd word is found with OOprogramming.
Both "strata" and "singleton" are well defined within the context of Bedrock Linux. If you query a search engine for "bedrock linux strata" or "bedrock linux singleton" it should direct you accordingly, but in case they don't, the relevant web page to read is here.
 
1 members found this post helpful.
Old 10-01-2017, 01:22 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ thanks for the clarification.
i also see this thread has been moved to the appropriate subforum.
 
Old 10-01-2017, 06:16 AM   #6
ParadigmComplex
Bedrock Linux Founder
 
Registered: Feb 2016
Distribution: Bedrock Linux
Posts: 179

Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
^ thanks for the clarification.
i also see this thread has been moved to the appropriate subforum.
I didn't realize it was in another subforum before I got to it. That would explain some of the confusion in the responses! Apologies if my tone came out wrong. I was confused why people were confused.
 
Old 10-02-2017, 10:03 AM   #7
elypter
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
sorry for the confusion. i came from the bedrock linux website but i must have been redirected without noticing, maybe during login.


Quote:
Bedrock Linux tries to let you run as much as is possible in parallel and, where that fails, hot swap as much as possible, and where that fails, swap as much as possible with a reboot. However, there are limits to what it can do, namely the singletons that you've mentioned. If there's a limit here, it's probably because we don't know of a way to do this cleanly, rather than some design goal.
i should first explain what i am trying to do. i was unsatisfied with the shutdown dialog my de provided so i decided to write an expert gui shutdown dialog that offers every possible way shut down, reboot, suspend or log out. i researched quite a bit of stuff and i also remembered bedrock linux and its advantage of not having to reboot for many use cases. so i asked myself if you could implement some sort of pseudo reboot. this is not really limited by a specific use case but just by what users could find useful.
Quote:
I don't know what you mean by "default applications", but my guess is that Bedrock will *probably* let you run those from a variety of distros without a reboot in between, provided they're not dependent on some non-hot-swap'able singleton. If multiple strata provide some feature, there are ways to specify which is desired, including configuration specifying a default. Typically if I run `firefox` I'll get Firefox from one stratum, but I can reconfigure it so next time I run `firefox` I'll get Firefox from a different stratum, or I can always run `brc <stratum> firefox` to specify which stratum I want to provide Firefox on the fly. Provided I use `-remote` (due to a Firebox quirk, not necessarily representative of all applications), I can run multiple instances of Firefox in parallel from different strata.
one of the ideas of how a pseudo reboot could look like was to look at the difference between the booted distro and the one that should be "booted" and then unload whats not in the new one and load what has not been loaded yet. i know this could be tricky but maybe it is possible if both use the same init system. another way could be to load everything the new system would load as long as it doesnt run into conflicts. i dont know if it is possible to just extract those bits of information out of an init system and excecute it without having a high probability of breaking stuff but maybe there is a method to do this in a limited but safe way.
Quote:
I'm not as familiar with kexec as I should be. If it'll let you hot swap the kernel on some other distro, it'll probably let you do that with Bedrock Linux. I've never personally tried this, and I've never heard reports from those who have. If you give it a try, do let me know so I can make note of it for others. Bedrock Linux does not provide any special magicks to make hot swapping kernels possible.
i use a program called kexec-reboot on linux mint and it works quite well. it doesnt just swap the kernel but the whole system which should be a lot easier. this cuts down reboot time by skipping bios. i thought that if none of the pseudo reboots work or if you want a full reboot this would be the fastest way. i thought it would be handy if you could select one of the distros in the bedrock boot list in the shutdown dialog already and then just hit reboot and come back when the new system has booted up.
Quote:
Independent of Bedrock, it is possible in theory to hot swap init systems, if the init system supports it. I've written toy init systems which do this. However, I don't think most major init systems support this. Bedrock Linux does not provide any special magicks to make hot swapping init systems possible.
thats quite interesting
 
Old 10-03-2017, 03:54 PM   #8
ParadigmComplex
Bedrock Linux Founder
 
Registered: Feb 2016
Distribution: Bedrock Linux
Posts: 179

Rep: Reputation: Disabled
Quote:
Originally Posted by elypter View Post
sorry for the confusion. i came from the bedrock linux website but i must have been redirected without noticing, maybe during login.
No worries, it looks like it was all sorted out.

Quote:
Originally Posted by elypter View Post
i should first explain what i am trying to do. i was unsatisfied with the shutdown dialog my de provided so i decided to write an expert gui shutdown dialog that offers every possible way shut down, reboot, suspend or log out.
Interesting. That's where the kexec-reboot came into play - another option to include into the mix.

Quote:
Originally Posted by elypter View Post
i researched quite a bit of stuff and i also remembered bedrock linux and its advantage of not having to reboot for many use cases. so i asked myself if you could implement some sort of pseudo reboot. this is not really limited by a specific use case but just by what users could find useful.
I'm blanking on the use cases you're considering here. My only guess: Bedrock Linux can let you install or remove what would normally be the entirety of a distro's files. What for other distros would have been a reinstall (which includes a reboot) can be done live with Bedrock.

Quote:
Originally Posted by elypter View Post
one of the ideas of how a pseudo reboot could look like was to look at the difference between the booted distro and the one that should be "booted" and then unload whats not in the new one and load what has not been loaded yet.
Provided I am following you correctly, many init systems provide a feature that does this. It's usually called something like "runlevels" or "targets". Provided your init is adequately featureful, you should be able to make various, different sets of services you want and switch between them. You'll have to see your preferred init's documentation.

Quote:
Originally Posted by elypter View Post
i know this could be tricky but maybe it is possible if both use the same init system. another way could be to load everything the new system would load as long as it doesnt run into conflicts. i dont know if it is possible to just extract those bits of information out of an init system and excecute it without having a high probability of breaking stuff but maybe there is a method to do this in a limited but safe way.
Getting init systems to coordinate across strata is in the scope of what Bedrock Linux is trying to do. I've put quite a bit of thought here. If we ever get that to work perfectly, you could use runlevels/targets/etc to get your pseudo reboot. However, it looks like it'll be a lot of work. Moreover, there's a good chance I don't come up with an adequately reliable solution and all the R&D effort goes to waste. For the foreseeable future, I'd rather invest the available resources elsewhere.

The plan right now is to have people to use their distro's configs for their init then hand write configuration for services in other strata. Making a daemontools service directory or systemd unit file that calls out to something in another stratum is quite doable. It's on the person hand writing the configuration to avoid potential conflicts. In theory you could make such configuration for each and every service you're interested in and make runlevels/targets/etc and get the desired goal, but it'll be a lot of work.

Quote:
Originally Posted by elypter View Post
i use a program called kexec-reboot on linux mint and it works quite well. it doesnt just swap the kernel but the whole system which should be a lot easier. this cuts down reboot time by skipping bios.
That's pretty cool. Now that it is pointed out to me, it makes sense that something like this should be possible, but I've never thought about it before.

Quote:
Originally Posted by elypter View Post
i thought that if none of the pseudo reboots work or if you want a full reboot this would be the fastest way. i thought it would be handy if you could select one of the distros in the bedrock boot list in the shutdown dialog already and then just hit reboot and come back when the new system has booted up.
As I understand kexec-reboot, there's no reason it couldn't be used to reboot to the menu where you pick which stratum's init to use right now.

Going forward, I should be able to add a feature to specify the preferred stratum/init via a kernel line parameter that kexec-reboot could set which would let you pick the init at a reboot dialogue. That shouldn't be hard at all. Provided I don't forget, this will be supported in the next release.

Quote:
Originally Posted by elypter View Post
thats quite interesting
Conceptually it's very similar to kexec, just for the init. Optionally stop all the services, then simply call one of the exec system calls (e.g. execvp) on the desired new init executable. If more inits supported this, it would be exactly what you wanted. However, the init system landscape is... politically divisive, and I fear we're unlikely to see such efforts.
 
  


Reply



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
upgrade without reboot (any distro) pnguine Linux - Software 5 08-31-2016 04:47 PM
[SOLVED] swap file and partition reboot issue with free cmd scriptkiddy Linux - Newbie 3 03-11-2016 05:55 AM
[SOLVED] Using swap for more than one distro darthpinguim Linux - Newbie 11 08-06-2011 12:06 PM
Can't reboot RHEL WS4 - swap space issue? genemob Red Hat 3 01-31-2007 10:40 AM
New distro, same swap? lacerto Linux - Newbie 2 01-26-2005 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bedrock Linux

All times are GMT -5. The time now is 09:09 PM.

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
Open Source Consulting | Domain Registration