LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 10: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, 10: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: 56
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, 09:56 AM   #3
sfxpt
Member
 
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99

Original Poster
Blog Entries: 3

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, 11:14 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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



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 10:40 AM
How to identify processes running in user mode and kernel mode subha109 Linux - Kernel 1 10-21-2009 11:37 AM
unable to connect to wireless access when running opensuse11 in live mode postmanpat16940 Linux - Wireless Networking 1 10-11-2009 02:06 PM
Ubuntu 7.10, running live cd but see no taskbar(s) RgnKjnVA Linux - Newbie 4 11-11-2007 10:32 PM
running Ubuntu from a live CD Gatewood Linux - Newbie 2 08-31-2005 05:48 PM

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

All times are GMT -5. The time now is 07:40 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
Open Source Consulting | Domain Registration