Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: updating a live cd with persistence usb

  1. #1
    Join Date
    Apr 2011
    Beans
    50

    updating a live cd with persistence usb

    i am running a live cd linux OS with persistence on a 8g usb flash drive.
    Can i update the the OS on the flash drive?
    This is not a full install run usb.

  2. #2
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,357
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: updating a live cd with persistence usb

    You can install applications and update them, but not the kernel. Kernel is frozen on a live system, can't be updated. This is by design.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  3. #3
    Join Date
    Feb 2008
    Location
    Planet earth, for now.
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: updating a live cd with persistence usb

    Then you are running a LiveUSB and not a persistence install on a USB. That is Ubuntu installed on a USB like you would install it to a hard drive. I take it you are booting from the USB and either 'Try Ubuntu' or letting it get to the desktop? You still have the option to install USB to a hard drive?

  4. #4
    Join Date
    Apr 2011
    Beans
    50

    Re: updating a live cd with persistence usb

    i click on the update in the system setting and it seems like you say my application updated, meaning google chrome browser.

    But some items fail so i assume that was the kernel?

    Also is it secure to check email and do internet banking or purchases running this way?

    I know if i do a full install to internal hard drive and update the system it would be secure but live CD with persistance , maybe not?


    If not , why?

    Thanks in advance.

  5. #5
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,357
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: updating a live cd with persistence usb

    Quote Originally Posted by user987 View Post
    Also is it secure to check email and do internet banking or purchases running this way?

    I know if i do a full install to internal hard drive and update the system it would be secure but live CD with persistance , maybe not?
    In my personal opinion, the 'non-persistent' mode is the most secure way to do internet banking and similar things. It 'Forgets' everything accumulated during a running session and always starts fresh, thus neutralizing any hacking attempts that may take more than one session to escalate the attacker's privileges to dangerous levels.

    Persistent Live USB (as well as an installed system) has the advantage that it can be regularly updated with latest security patches, but then it can also get affected with malicious code if an attacker somehow succeeds to inject it (in the browser or a program) during a session. In a non-persistent session, a reboot and everything is fresh again.

    Perhaps there could be a way to get the best of both modes (persistent & non-persistent), where you can update the system when you wish, then mount the persistent part in 'Read Only' mode during a normal session, thus NOT accumulating/remembering anything other than an intentionally done update. But I don't know how to do that. The nearest thing I know is to simply create a fresh Live USB with the latest 'Point Release' of an LTS (of course I'm talking about Ubuntu only).
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  6. #6
    Join Date
    Apr 2011
    Beans
    50

    Re: updating a live cd with persistence usb

    Sorry to be long winded but new to using Linux.
    I assume that when i see update available and i do a update, i get all the security patched that goes with the current live CD usb flash drive with persistent version that i am running.

    In my case the LTS kernel (OS) version.


    For example if using 12.04 LTS liveCD with persistent usb flash drive when i update all the security for this version is done.

    But it will not update the kernel (OS) to 13.04 version. Is this correct assumption?

  7. #7
    Join Date
    Feb 2008
    Location
    Planet earth, for now.
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: updating a live cd with persistence usb

    No, it won't. You can run:

    Code:
    sudo apt-get update
    sudo apt-get upgrade
    ... and that will update the current system and upgrade any packages for the current release only, that need to be upgraded. It will not upgrade you to the next release.

  8. #8
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,357
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: updating a live cd with persistence usb

    To elaborate what BB said, a persistent live setup can be updated for everything except the Kernel (2.x.x-xx, 3.x.x-xx etc.) AND Release (12.04, 12.10, 13.04, 13.10 etc..). In this description -

    OS is Ubuntu,
    Release is its version (for example, 12.04),
    'Point Release' is an updated officially released version of an LTS Release (12.04.1, 12.04.2, 12.04.3.. etc.), and
    Kernel is the main Linux engine that a release uses.

    The OS (or a Release or Point Release) goes through several Kernel updates (which is recommended but not necessary) before a whole new version of its Release comes out.

    Release is not the same thing as Kernel. Kernel is just the engine whose new versions keep coming out every month or so. In a normal (full) installation, they are part of normal updates and get upgraded without changing the version of Release (for example, Ubuntu 12.04 LTS originally came with kernel 3.2.0-19 (if I remember correctly), and is currently using a much newer kernel, with many different kernel versions in-between).

    So your assumption is partly correct, but is slightly misleading due to misunderstanding of the terminology. Hope the above explanation clarifies that.

    A few more things that may be interesting for you -

    1) In a Persistent Live installation, the persistent part is stored to and read from a file or partition called "casper-rw". This file or partition is mounted as your root File System that contains all the directories that are part of a Linux FileSystem hierarchy. All the changes, updates you do are stored in this area and are read when you boot the Live session with "persistent" flag (a command line argument supplied to the kernel booting command line).

    2) This "persistent" flag is added permanently to the boot configuration file (syslinux.cfg, or another file it includes) when you create a 'Persistent' live USB. But it can also be added temporarily to a non-persistent live session while booting by manually typing "persistent" at the kernel boot line (which you can get by going to advance booting mode). This flag tells the boot loader to look for a file or partition that is named "casper-rw", and try to mount it as the root file system. Since you are new to Linux, this "mounting" stuff can be confusing for you in the beginning, so let's not go into its details for now..

    3) When you do an update on the Persistent Live system, all the changes go to this "casper-rw" file (which is a virtual file system as explained above), not the original structure of the Linux File System hierarchy that always remains at defaults. This virtual File System (contained within the casper-rw file/partition) is an exact copy of the original Linux File System, the only difference being that it can store changes.

    4) As such, if you boot without the "persistent" flag, the "casper-rw" file/partition is ignored and the Live session boots with the original directory structure where the directories are either empty or at defaults. Thus the whole session is at its original defaults, not aware of 'ANY' updates you did in a previous session. Thus also not getting any benefits of the security patches you might have got during an update in the previous session.

    5) Lastly, just as you can 'add' the "persistent" flag temporarily to a non-persistent session (for example, the one running off a live CD/DVD or a non-persistent USB) by editing the kernel boot line, you can also 'remove' this flag from the boot line of a persistent setup, thus making it ignore the "casper-rw" file/partition and load with the original defaults - all fresh, but not updated. Since it does not have to read and mount the virtual File System (casper-rw) and load the custom applications/configuration from there, it boots significantly faster.

    Hope I didn't confuse you even more.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  9. #9
    Join Date
    Apr 2011
    Beans
    50

    Re: updating a live cd with persistence usb

    Varunendra,
    I really appreciate the detail information, i need a little time to absorb it.

    but seem from what you say my update did not get the security patches?

    Even though the OS tells me no new updates since my update 2 days ago, so i guess i have to run the 2 commands that BB mention to really be updated in the live cd with persistence flash drive?

  10. #10
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,357
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: updating a live cd with persistence usb

    The update via gui is the same thing as doing "apt-get update" and "apt-get upgrade". But it won't harm doing it again (via those commands) if doubtful. And those updates do contain security patches by default, although sometimes not all of them, since some of the security patches are done in the kernel itself which can't be updated on a live install.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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