LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 08-25-2010, 11:53 PM   #1
sfxpt
Member
 
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99
Blog Entries: 3

Rep: Reputation: 16
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
 
Old 08-25-2010, 11:56 PM   #2
Kenny_Strawn
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
Blog Entries: 62

Rep: Reputation: 55
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.
 
Old 08-30-2010, 10:56 AM   #3
sfxpt
Member
 
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Kenny_Strawn View Post
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
 
Old 08-30-2010, 12:14 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,036

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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?)
 
  


Reply


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu is running in low graphics mode vibinlakshman Ubuntu 4 02-23-2010 11:40 AM
How to identify processes running in user mode and kernel mode subha109 Linux - Kernel 1 10-21-2009 12:37 PM
unable to connect to wireless access when running opensuse11 in live mode postmanpat16940 Linux - Wireless Networking 1 10-11-2009 03:06 PM
Ubuntu 7.10, running live cd but see no taskbar(s) RgnKjnVA Linux - Newbie 4 11-11-2007 11:32 PM
running Ubuntu from a live CD Gatewood Linux - Newbie 2 08-31-2005 06:48 PM


All times are GMT -5. The time now is 06:39 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