| Ubuntu This forum is for the discussion of Ubuntu Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-25-2010, 10:53 PM
|
#1
|
|
Member
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99
Rep:
|
Identify Ubuntu running in Live mode
Hi,
Is there any sure-fire way to identify whether the current Ubuntu system is running in Live mode or not?
I want to distinguish between Live mode and running from installed HD, and do some processing in boot up script.
Please help.
FYI, in grml, the /etc/grml_cd file only exit in Live mode file system; no such file if running from installed HD.
Thanks
|
|
|
|
08-25-2010, 10:56 PM
|
#2
|
|
Senior Member
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Rep:
|
Just look at the username in the top right corner of the screen: If it says 'ubuntu', that's the Live CD user account, which is Live CD specific.
|
|
|
|
08-30-2010, 09:56 AM
|
#3
|
|
Member
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99
Original Poster
Rep:
|
Quote:
Originally Posted by Kenny_Strawn
Just look at the username in the top right corner of the screen: If it says 'ubuntu', that's the Live CD user account, which is Live CD specific.
|
Ops, thought that's good enough, but on second thought,
I want to do some processing in boot up script, which is before any user log on into the system.
Any other way?
thanks
|
|
|
|
08-30-2010, 11:14 AM
|
#4
|
|
Guru
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,002
|
Quote:
|
FYI, in grml, the /etc/grml_cd file only exist in Live mode file system; no such file if running from installed HD.
|
Isn't that your answer then?
Code:
if [ -f /etc/grml_cd ] then runninglivecd=true
If that file doesn't work or exist for ubuntu then find another one that does (maybe by checking for a file on the mounted CD itself?)
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:23 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|