Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: updating a live cd with persistence usb

  1. #21
    Join Date
    Jun 2011
    Location
    UK
    Beans
    77
    Distro
    Ubuntu

    Re: updating a live cd with persistence usb

    Hi Cameron,

    I have tried to create a persistent Live USB installation of Ubuntu 14.04 however the persistence doesn't work. I looked at your post here http://ubuntuforums.org/showthread.php?t=2124124 and followed the instructions to the letter however the persistence still doesn't work, and I still get the Try/Install splash screen. Has something changed for 14.04? Does the whitespace formatting of the syslinux.cfg file matter?

    I read somewhere else that there is a limit of 4GB for the persistence file - does this mean that the partitions you have mentioned each have to be less than 4GB? My USB stick is 32GB so I end up with a 2, 4, and approx 26 GB FAT32, casper-rw, and home-rw respectively; would this partition size be causing problems?

    Any tips gratefully received. Many thanks.

    P.S. In your post when you ask "do you see a casper-rw file" do you mean the folder in the first partition, a file in the root directory, or the second partition (called casper-rw as per your instructions)?

  2. #22
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,116

    Re: updating a live cd with persistence usb

    Hi inhumangeek,

    I hope it's okay if I chip in a little info while Cameron is away.
    Quote Originally Posted by inhumangeek View Post
    I have tried to create a persistent Live USB installation of Ubuntu 14.04 however the persistence doesn't work. I looked at your post here http://ubuntuforums.org/showthread.php?t=2124124 and followed the instructions .... Does the whitespace formatting of the syslinux.cfg file matter?
    The 'syslinux.cfg' file no longer contains the booting line. It now uses the modular programming technique, means some of the contents it is supposed to have are now scattered across different files for easy maintenance. If you didn't notice yourself, it only contains a line "include menu.cfg", which means "also include the contents of the 'menu.cfg' file. Now this 'menu.cfg' file further includes the contents of another file - 'txt.cfg'.

    Now this 'txt.cfg' file is where you should see the booting line, the place where you are supposed to put the "persistent" flag. This file may look like this (copy-pasted from a Xubuntu Live USB) -
    Code:
    default live
    label live
    menu label ^Try Xubuntu without installing
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/xubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
    label live-install
    menu label ^Install Xubuntu
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/xubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash --
    label check
    menu label ^Check disc for defects
    kernel /casper/vmlinuz
    append noprompt boot=casper integrity-check initrd=/casper/initrd.lz quiet splash --
    label memtest
    menu label Test ^memory
    kernel /install/mt86plus
    label hd
    menu label ^Boot from first hard disk
    localboot 0x80
    The line highlighted in blue is where you should put the word "persistent" among other flags. It should look like -
    Code:
    append noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/xubuntu.seed boot=casper initrd=/casper/initrd.lz persistent quiet splash --
    Note that I intentionally put the word "persistent" just before "quite" and "splash" as against the post that you followed where it is right after "boot=casper". This is just to emphasize that it doesn't matter where it is put as long as it is separated from other flags by blank spaces and comes BEFORE "--" in the last.


    Please try this and assuming you have did the partitioning part correctly, it should work right away.

    PS:
    You can also add the "persistent" flag in temporary mode during boot time. See points 2 and 5 of post #8.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  3. #23
    Join Date
    Jun 2011
    Location
    UK
    Beans
    77
    Distro
    Ubuntu

    Re: updating a live cd with persistence usb

    Varun,

    Thanks very much for your help and quick reply. Unfortunately I am still having problems. I have tried what you/Cameron suggested:
    1) Use gparted to partition memory stick: 2GB FAT32; 4GB ext4 (casper-rw); and 24GB ext4 (home-rw) (screenshot attached)
    2) Use startup disk creator with said memory stick (it only allows me to use the first partition), with no persistence
    3) Change contents of txt.cfg to include the word "persistent" where indicated.
    4) Boot to from USB, add a file to home area, reboot and it's gone.

    I might try doing a full install instead, unless you have any other suggestions?
    Screenshot from 2014-10-07 16:37:29.png

    Many thanks again,
    Paul

  4. #24
    Join Date
    Jun 2014
    Beans
    7,385

    Re: updating a live cd with persistence usb

    I read somewhere else that there is a limit of 4GB for the persistence file
    That only applies to FAT32 partitions. If you use ext2 or another Linux filesystem it can be larger.

    In your post when you ask "do you see a casper-rw file" do you mean the folder in the first partition, a file in the root directory, or the second partition (called casper-rw as per your instructions)?
    There is a casper directory/folder in any Ubuntu Live CD, the persistence file shows as a file and it is labelled 'casper-rw' and needs to be all lower case.

  5. #25
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,116

    Re: updating a live cd with persistence usb

    Quote Originally Posted by inhumangeek View Post
    2) Use startup disk creator with said memory stick (it only allows me to use the first partition), with no persistence
    The startup disk creator works only with FAT/FAT32 partitions, and I think it doesn't have to be first one. But that's not the problem here.

    An easier approach might be to simply create the Live filesystem again WITH Persistence this time. This will automatically create the files and settings the way they should be. Of course you must make the size of the FAT32 partition bigger to do this. I suggest deleting the 2nd partition and expanding the FAT32 partition to cover the area.

    Once it is created and working, delete the "casper-rw" file from the Live partition > run GParted (from another source, not from the target Live USB itself) > shrink the FAT32 partition again > create a fresh EXT3/4 partition > label it "casper-rw" > Done!

    But it would be interesting to see what may be wrong in your current approach to do it all manually. Could you post the contents of your syslinux.cfg and txt.cfg files before trying above?
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  6. #26
    Join Date
    Jun 2011
    Location
    UK
    Beans
    77
    Distro
    Ubuntu

    Re: updating a live cd with persistence usb

    Hi Varun,
    I'll try what you have suggested and let you know. Unfortunately I have been playing with the usb stick and don't have the cfg files.

    Many thanks!

  7. #27
    Join Date
    Jun 2011
    Location
    UK
    Beans
    77
    Distro
    Ubuntu

    Re: updating a live cd with persistence usb

    Quote Originally Posted by varunendra View Post
    simply create the Live filesystem again WITH Persistence this time.
    So I have tried this again but the persistence still doesn't work, back to square one really. I have attached syslinux.cfg and txt.cfg from the vanilla installation, created with a 4GB persistence file. (I notice that there are two syslinux.cfg files, one in the root of my USB and one in the syslinux folder). There is a casper-rw file in my root, if that is important.

    Just to reiterate what I have done: I simply booted from a (lubuntu) LiveUSB, created a second LiveUSB startup disk (on a second USB stick, 100% FAT32), and used the persistence setting. Since my last message I have also tried doing it from a Windows PC using UNetBootin, again selecting persistence, but it also doesn't work. Can there be something wrong with the current 14.04 image?!

    Quote Originally Posted by varunendra View Post
    Once it is created and working, delete the "casper-rw" file from the Live partition > run GParted (from another source, not from the target Live USB itself) > shrink the FAT32 partition again > create a fresh EXT3/4 partition > label it "casper-rw" > Done!
    Didn't get to this part because I didn't get it working.

    syslinux.cfg (in root folder):
    Code:
    default menu.c32
    prompt 0
    menu title UNetbootin
    timeout 100
    
    label unetbootindefault
    menu label Default
    kernel /ubnkern
    append initrd=/ubninit file=/cdrom/preseed/ubuntu-gnome.seed boot=casper quiet splash -- persistent
    
    label ubnentry0
    menu label ^Help
    kernel /ubnkern
    append initrd=/ubninit  persistent
    
    label ubnentry1
    menu label ^Try Ubuntu GNOME without installing
    kernel /casper/vmlinuz.efi
    append initrd=/casper/initrd.lz file=/cdrom/preseed/ubuntu-gnome.seed boot=casper  quiet splash -- persistent
    
    label ubnentry2
    menu label ^Install Ubuntu GNOME
    kernel /casper/vmlinuz.efi
    append initrd=/casper/initrd.lz file=/cdrom/preseed/ubuntu-gnome.seed boot=casper only-ubiquity  quiet splash -- persistent
    
    label ubnentry3
    menu label ^Check disc for defects
    kernel /casper/vmlinuz.efi
    append initrd=/casper/initrd.lz boot=casper integrity-check  quiet splash -- persistent
    
    label ubnentry4
    menu label Test ^memory
    kernel /install/mt86plus
    append initrd=/ubninit  persistent
    
    label ubnentry5
    menu label ^Boot from first hard disk
    kernel /ubnkern
    append initrd=/ubninit  persistent
    
    label ubnentry6
    menu label Try Ubuntu GNOME without installing
    kernel /casper/vmlinuz.efi
    append initrd=/casper/initrd.lz file=/cdrom/preseed/ubuntu-gnome.seed boot=casper quiet splash -- persistent
    
    label ubnentry7
    menu label Install Ubuntu GNOME
    kernel /casper/vmlinuz.efi
    append initrd=/casper/initrd.lz file=/cdrom/preseed/ubuntu-gnome.seed boot=casper only-ubiquity quiet splash -- persistent
    
    label ubnentry8
    menu label OEM install (for manufacturers)
    kernel /casper/vmlinuz.efi
    append initrd=/casper/initrd.lz file=/cdrom/preseed/ubuntu-gnome.seed boot=casper only-ubiquity quiet splash oem-config/enable=true -- persistent
    
    label ubnentry9
    menu label Check disc for defects
    kernel /casper/vmlinuz.efi
    append initrd=/casper/initrd.lz boot=casper integrity-check quiet splash -- persistent
    syslinux.cfg (in syslinux folder):
    Code:
    # D-I config version 2.0
    include menu.cfg
    default vesamenu.c32
    prompt 0
    timeout 50
    ui gfxboot bootlogo
    txt.cfg:
    Code:
    default live
    label live
    menu label ^Try Ubuntu without installing
    kernel /casper/vmlinuz.efi
    append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
    label live-install
    menu label ^Install Ubuntu
    kernel /casper/vmlinuz.efi
    append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash --
    label check
    menu label ^Check disc for defects
    kernel /casper/vmlinuz.efi
    append noprompt boot=casper integrity-check initrd=/casper/initrd.lz quiet splash --
    label memtest
    menu label Test ^memory
    kernel /install/mt86plus
    label hd
    menu label ^Boot from first hard disk
    localboot 0x80
    Thanks again

  8. #28
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,116

    Re: updating a live cd with persistence usb

    Quote Originally Posted by inhumangeek View Post
    (I notice that there are two syslinux.cfg files, one in the root of my USB and one in the syslinux folder)
    There shouldn't be. It seems you used unetbootin AFTER making it live with the native Startup Disk Creator, without formatting it. Unetbootin doesn't format it for you, it simply copies the file and installs its boot loader.

    Anyway, you don't need to go in those technicalities. I don't think there can be anything wrong with the startup disk creator since the 'txt.cfg' file seems to be okay. It is the 'syslinux.cfg' file created by unetbootin that is not okay. The "persistent" flag is after "--", while it should be before it as I already pointed out very clearly earlier -
    Code:
    append initrd=/ubninit file=/cdrom/preseed/ubuntu-gnome.seed boot=casper quiet splash -- persistent
    Unless you did it yourself (the wrong way), it is the fault of unetbootin.

    Please correct the position of the flag, or format the usb and use either unetbootin or the native startup disk creator, not both. It shouldn't be a problem but creates unnecessary confusion.

    Making a Live USB persistent is one of the easiest things possible with it, you seem to be overthinking it.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  9. #29
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: updating a live cd with persistence usb

    I think it is possible to have boot options also after --

    It is used in order to separate options to be ported into an installed system. See this link

    https://help.ubuntu.com/community/Bo...iguration_Line

    The "-- " entry defines the boundary between options which are specific to the installer and ones that are copied to the target system. Often you would like to copy the boot option to the target system, so add the option at the very end of the line, after the "-- ".
    But I'm not sure if it is also valid with Unetbootin. I think so, but I have not tested it.

    -o-

    If you are happy with a standard 4 GB file for persistence, please re-format the pendrive to FAT32 and start all over with either of the Ubuntu Startup Disk Creator or Unetbootin. Just following the instructions in the graphical user interface should help you get there.

    If you want more disk space for persistence, you can make a second partition on the pendrive, format it to ext2, ext3 or ext4 and give it the label casper-rw. Then run the Ubuntu Startup Disk Creator or Unetbootin, this time without creating any persistence (you don't want the default file). Finally adding persistence as suggested by Varunendra should do the trick.

Page 3 of 3 FirstFirst 123

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
  •