Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This has been asked several times already (I found it here, here and here), but basically everyone simply recommend to perform a full install to the USB stick. But I do need it to stay as a LIVE session, not a "full install on USB", for a number of reasons (the most important one being that using Live session I can easily install Ubuntu using the desktop icon)

So, my constraints for skipping the Welcome Screen (and automatically choose "Try Ubuntu" option) are:

  • It must actually be the Ubuntu Live session (or as close to the default as possible). Same software selection (gparted is present in live sessions, gimp is not, for example), user (name and ID), behavior (no login screen, no password for sudo, to name a few), no GRUB, etc. That rules out an Ubuntu full install on USB.

  • It must be able to install Ubuntu in the computer (while full install requires the ISO file, an additional USB stick, and the hassle of Startup Disk Creator)

  • If possible, to be as fast as the "text-based launcher" (the one you have when you press a key right after the kernel loads)

  • It must be completely automatic, unattended from boot to desktop.

  • Select a different language than default. It can be a hard-corded selection (actually, it must, since boot itself shall be fully unattended). But preferably be easily changed ("easily" as in editing a config file then rebooting)

Is it possible?

The proposed (great) solutions that I've ruled out so far are:

  • Installing Ubuntu in the USB stick (for all of the above mentioned reasons)

  • Remove Ubiquity package (it removes the ability to install the system from that USB as well)

  • Ubuntu Customization Kit (ubk): several limitations and caveats, and its not even in the repos

  • Remastersys / LiLi: its the same as full direct USB install, only customized.

An ideal solution would be something like "create USB sick using Startup Disk Creator, then open it and remove / edit / add file(s) xxx, yyy, zzz"

share|improve this question
    
I replaced the code on my USB that I had in syslinux.cfg with what was suggested, but I still get the prompt. (Original lines: vesamenu.c32 prompt 0 timeout 50 ui gfxboot bootlogo) Is it possible that I should do something with the txt.cfg (below): label persist menu label ^Persistent Mode kernel /casper/vmlinuz append bootkbd=us console-setup/layoutcode=en_US console-setup/variantcode=nodeadkeys locale=us_us persistent noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz splash -- label live menu label ^Live Mode kernel /casper/vmlinuz append –  user142859 Mar 30 '13 at 18:02
add comment

4 Answers 4

up vote 31 down vote accepted

This guide was made for Ubuntu (Gnome). It works for Kubuntu (KDE) too, with a few exceptions

I've been able to get the Live CD boot straight into a Live session without timeout or fancy menu, optionally with a language pack installed.

Live USB (13.10)

  1. Mount the USB with Ubuntu installed in it
  2. Backup the file isolinux/isolinux.cfg. We will modify it so we need to replace it back if something goes wrong.
  3. Open the following files under isolinux directory: isolinux.cfg and txt.cfg
  4. Delete everything in isolinux.cfg.
  5. The txt.cfg file has the default GRUB menu entries. Copy the live one to isolinux.cfg:

    default live
    label live
    menu label ^Try Ubuntu without installing
    kernel /casper/vmlinuz.efi
    append file=/cdrom/preseed/ubuntu.seed boot=casper cdrom-detect/try-usb=true persistent noprompt floppy.allowed_drive_mask=0 ignore_uuid initrd=/casper/initrd.lz quiet splash --
    
  6. You can add any specific kernel parameters needed for your device in the append line.

  7. Save isolinux.cfg and boot your system using the USB. It will boot straight to the desktop now.

[source]

Live USB (11.04)

  1. Go to the root folder of your Live USB
  2. Enter the syslinux directory
  3. Make the syslinux.cfg file writeable
  4. Replace the contents of the file syslinux.cfg with:

    default live
    label live
      say Booting an Ubuntu Live session...
      kernel /casper/vmlinuz
      append  file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash noprompt --
    
  5. Optional: localize the system (see below)

Live CD

  1. If you've a Live CD in your CD drive, mount it. Otherwise, if you've an ISO file available, mount it on /media/cdrom by running the next command in a terminal (replace the name of the .iso file accordingly):

    sudo mount -o loop,ro ubuntu-11.04-desktop-amd64.iso /media/cdrom
    
  2. Create a temporary directory in which the CD contents can be stored, say ~/live-cd (mkdir ~/live-cd)
  3. Copy the contents of the CD to the folder ~/live-cd/iso (cp -r /media/cdrom ~/live-cd/iso)
  4. Since the Live CD is not needed anymore, it can be unmounted (sudo umount /media/cdrom)
  5. Open the ~/live-cd/iso folder (cd ~/live-cd/iso)
  6. Enter the isolinux directory (cd isolinux)
  7. Make the isolinux.cfg file writable (chmod u+w isolinux.cfg)
  8. Replace the contents of the file isolinux.cfg with:

    default live
    label live
      say Booting an Ubuntu Live session...
      kernel /casper/vmlinuz
      append  file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
    
  9. Optional: localize the system (see below)
  10. Open a terminal and run:

    cd ~/live-cd
    chmod u+w iso/isolinux/isolinux.bin
    mkisofs -r -V "Ubuntu Live session" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ubuntu-11.04-live-amd64.iso iso
    
  11. The new iso will be available at ~/live-cd/ubuntu-11.04-live-amd64.iso. To save space, the ~/live-cd/iso directory can be removed. (rm -rf ~/live-cd/iso)
  12. Now burn the ubuntu-11.04-live-amd64.iso file on a CD if needed.

Localize Ubuntu (translations)

If you want the system in the languages English, Spanish, Portuguese, Xhosa or Simplified Chinese, you've just to add the locale= boot option with en, es, pt, xh or zh to the append line as in:

... quiet splash locale=pt --

Otherwise, if you do not want to modify the file containing the root file system (filesystem.squashfs) and do not mind hacking around, continue reading.

Open a terminal and navigate to the ~/live-cd/iso directory and put the code from http://pastebin.com/VTdt9WFZ in a file (name it install-locale) and run it.

This script mounts the filesystem.squashfs, retrieves version information of the language packs from it, downloads the packages and put those in the directory locale-hack. Next, a script is created that installs the language packages on boot time. To make that work, the script also modifies the syslinux.cfg or isolinux.cfg file to apply these changes.

You'll be asked for a locale, enter something like nl or de. The script is not that clever to understand things like Dutch or German. Afterwards, the file can be removed

The terminal commands that should be executed:

cd ~/live-cd/iso
wget http://pastebin.com/raw.php?i=VTdt9WFZ -O install-locale
bash install-locale
rm install-locale

Note that adding language pack can cause the generated .iso file to be bigger than 700MB which won't fit on a CD. For virtual machines however, it suffices. This hack has as a side-effect that Plymouth does not work (i.e. you do not get a fancy boot screen), but at least the system is translated when logging in. Otherwise, you had to install language-pack-gnome-* manually.

References

share|improve this answer
    
+1 for that! It worked! (using the Live USB method). I will also consider adding noprompt cdrom-detect/try-usb=true to the append line, since thats the way it is in txt.cfg. Do you know what these additional parameters do? Also, can the solution be improved to include the language? –  MestreLion Jun 8 '11 at 11:23
    
noprompt shuts the system down without asking for removing the CD. I've added that to the Live USB line because it does not make sense with USB media. I don't know what cdrom-detect/try-usb=true does. All language packs are not included by default on the Live CD because of its size. To set a different locale (e.g. NL), pass the locale=nl_NL option on the append line. This will set the locale but not the language for Gnome because the package is simply unavailable on the Live CD. –  Lekensteyn Jun 8 '11 at 12:08
    
@MestreLion: updated with a hack for a localized environment. –  Lekensteyn Jun 8 '11 at 14:09
    
@Lekensteyn: the packages are avaliable on the Live CD, because when you select a different language, Ubuntu starts Live session in that language. Ill try your suggestion about locale=pt_BR. Maybe thats all thats needed. –  MestreLion Jun 8 '11 at 14:16
    
@MestreLion: not really, I've tested it with both locale=nl and the language selection menu at Try/Install. In both cases, I got an English layout although the locale command outputs nl_NL.UTF-8. –  Lekensteyn Jun 8 '11 at 14:18
show 6 more comments

The above works great for both Startup Disk Creator and UNetbootin installs. If you are using a persistent flash drive you will want to add the word persistent thus:

default live
label live
  say Booting an Ubuntu Live session...
  kernel /casper/vmlinuz
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --

For a 64 bit system the code is a little different

default live
label live
  say Booting an Ubuntu Live session...
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --
share|improve this answer
    
Is this any different from Lekensteyn's answer combined with his comment from Jun 20 '11 at 8:08? –  MestreLion Jan 16 '13 at 11:13
    
Not sure, where can I find his comment from Jun 20 '11 at 8:08? –  C.S.Cameron Apr 27 '13 at 2:17
    
It's the third-from-last comment in his answer above –  MestreLion Apr 27 '13 at 17:37
add comment

Any reason u didnt want remastersys? You could install the os, make an iso with remastersys extract the squashfs file and replace the one on the stock iso, (or premade usb folder)

I do this often

share|improve this answer
1  
Using remastersys I would end up with a full install, not a live session. Read my 1st constraint: It must actually be the Ubuntu Live session (or as close to the default as possible). Same software selection (gparted is present in live sessions, gimp is not, for example), user (name and ID), behavior (no login screen, no password for sudo, to name a few), no GRUB, etc. That rules out an Ubuntu full install on USB. –  MestreLion Sep 6 '13 at 10:59
add comment

In 14.04 and perhaps earlier, Ubiquity uses upstart to start. You can disable this by modifying /etc/init/ubiquity.conf.

1) If you are not using the Live install itself, first mount casper-rw:

# Mount the usb_drive manually if nautilus has not done it for you
# Change sdb1 to the proper location of your usb drive, find it using sudo blkid
sudo mkdir /media/$USER/usb_drive
sudo mount /dev/sdb1 /media/$USER/usb_drive
# Create a mount point for the read-write file system and mount via loopback
sudo mkdir /media/$USER/casper-rw
sudo mount -o loop /media/$USER/usb_drive/casper_rw /media/$USER/casper-rw
cd /media/$USER/casper-rw

2) Edit etc/init/ubiquity.conf within the Live install and comment out the following lines:

#start on (starting gdm
#          or starting kdm
#          or starting xdm
#          or starting lxdm
#          or starting lightdm)

If you are remastering the disk, you could just edit the master ubiquity.conf in the squashfs system. Ubiquity will then be completely out of your way upon restart.

3) Unmount the drives

sudo umount /media/$USER/*
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.