Find the answer to your Linux question:
Results 1 to 4 of 4
What are some command line commands I can use to figure out from which device I am currently booting from/logged in to/manipulating? For example, I have the exact same linux ...
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    17

    Where am I booting from?

    What are some command line commands I can use to figure out from which device I am currently booting from/logged in to/manipulating?

    For example, I have the exact same linux on a CD and HDD. Once I am booted up into a system. It all looks the exact same. How can i tell if I am actually running from the CD?

    I am trying to implement the command into a script that is dangerous if run from anything except a CD. Currently it happily runs on a HDD and proceeds to mess everything up.

    Thanks

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    The dmesg command gives the kernel log. Search the line with "Kernel command line:".
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Jan 2009
    Posts
    17
    Quote Originally Posted by GNU-Fan View Post
    The dmesg command gives the kernel log. Search the line with "Kernel command line:".
    Nice thinking.

    Unfortunately both instances of the OS (on cd, hdd, usb stick, etc) has the same root=/dev/ram0. Using slax linux.

  4. #4
    Just Joined!
    Join Date
    Jan 2009
    Posts
    17
    losetup -a gives me something pretty decent... where the modules are getting loaded from. Might be specific to Slax though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...