0

on my job i use a pendrive of 8GB, with partitions

NOTE : Only Manual Method, not with automatized tools

Partition 1 : Format FAT32, label "CASPER-RW", 6,2 GB Free

Partition 2 : Fommat FAT32, label "Xubuntu" (16.04.4) i386 -> 1.26 GB Used

After i do the partitions with GParted i do the follow procedure like root on a terminal :

PreRequisites :

Make the partitions (1.27 for Partition 2 for the LiveUSB) "MS-SYS" (Download, Compile and Install) and "syslinux" (In the repository) , The reason of make the first Partition the persistent, is because i should use the USB with Windows XP or Seven, and that versions of Windows just mount the first partition compatible detected on USB Devices.

01 - Make Temporaly Folder (USB Partition 2, Xubuntu ISO) :

mkdir -p /tmp/usbp2
mkdir -p /tmp/XubuntuISO

02 - Mount USB to Temp Folder)

mount /dev/sdh2 /tmp/usbp2

03 - Mount ISO and change directory to the Temp folder :

mount xubuntu-16.04.2-desktop-i386.iso /tmp/XubuntuISO -o loop ; cd /tmp/XubuntuISO

04 - Copy the follow folders/file to USB Partition 2 :

cp -rf casper dists install pics pool preseed .disk README.diskdefines /tmp/usbp2/

05 - Copy "isolinux" like "syslinux" on USB Partition 2

cp -rf isolinux /tmp/usbp2/syslinux

06 - Rename isolinux config file to syslinux :

cd /tmp/usbp2/syslinux
mv isolinux.cfg syslinux.cfg
mv isolinux.bin syslinux.bin

07 - Modify the file "txt.cfg" via sed & echo for remove "/cdrom" and add persistent label and option

cat txt.cfg | sed 's/\/cdrom//g' >> /tmp/txt.cfg
su -c "rm -rf txt.cfg" root
su -c "cp -f /tmp/txt.cfg /tmp/usbp1/syslinux/txt.cfg" root
su -c "rm -rf /tmp/txt.cfg" root
sed '0,/live/s//persistent/' txt.cfg >> /tmp/txt.cfg
echo 'label persistent' >> /tmp/txt.cfg
echo '  kernel /casper/vmlinuz' >> /tmp/txt.cfg
echo '  append  file=/preseed/xubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash ---' >> /tmp/txt.cfg
su -c "cp -f /tmp/txt.cfg /tmp/usbp2/syslinux/txt.cfg" root

edit "syslinux.cfg"

# D-I config version 2.0
# search path for the c32 support libraries (libcom32, libutil etc.)
MENU HIDDEN
include menu.cfg
default live
prompt 0
timeout 1

edit "exithelp" file :

label menu
    kernel vesamenu.c32
    config syslinux.cfg

08 - unmount partition :

cd ; umount /tmp/usbp2
syslinux /dev/sdh2

09 - Make booteable:

ms-sys -s /dev/sdh

10 - Test with "kvm" or "qemu-kvm" (distro depend)

kvm -hda /dev/sdh -m 512 -vga std -usbdevice tablet

Dunnos :

1 - What i should do to the USB start directly in "Try Xubuntu" not start in the Live Session Asking for "Try Xubuntu" or "Install Xubuntu"

2 - How i should to to the "casper-rw" be automounted when the live session start ?

3 - (X)Ubuntu have a method like Porteus, for make a Customized ISO for make a Live Distro, which the Application i know i need?

i really want to do this with Slackware, but i don't know how make persistence and live usb with Slackware xD.

Thanks for any answer you can give me.

2
  • There are many ways to make a bootable USB. Back when flash drives were small it was popular to make Live and Persistent installs as it takes less disk space initially. For UEFI it is only necessary to extract the ISO to the USB disk. ISO's can also be loop mounted using grub 2. UNetbootin can make a USB with up to 4GB Persistence using syslinux and mkusb can make a USB with unlimited persistence and a Data partition that Windows and Linux can use. Both methods work in BIOS and UEFI. Nowadays with USB drives getting large many people, (perhaps an exaggeration), are doing Full installs to USB. Commented Jun 19, 2018 at 18:18
  • (Oops almost forgot), for persistence with a syslinux system add a casper-rw file to the root of the USB and with a grub 2 system add a ext2 or ext4 partition labeled casper-rw. Add the word persistence to txt.cfg in a syslinux system or to grub.cfg in a grub 2 system. I like your advice for testing with qemu. Commented Jun 19, 2018 at 18:29

2 Answers 2

1

Dunnos

1) For 32bit overwrite syslinux.cfg with:

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

For 64bit use:

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

2) Doing 1) above, should automount casper-rw when booting a Persistent system.

3) Customizing ISO's has been covered elsewhere in Ask Ubuntu.

4) Not sure Slackware is a permissible subject here.

0
0

Thanks for your answer, i put the follow content on the file

txt.cfg :

default live
label live
  menu label ^Try Xubuntu without installing
  kernel /casper/vmlinuz
  append file=/preseed/xubuntu.seed boot=casper ipv6.disable=1 languagechooser/language-name=Spanish countrychooser/shortlist=ES localechooser/supported-locales=es_ES.UTF-8 initrd=/casper/initrd.lz locale=es_ES bootkbd=es console-setup/layoutcode=es quiet splash ---
label persistent
  menu label ^Try Xubuntu without installing
  kernel /casper/vmlinuz
  append file=/preseed/xubuntu.seed boot=casper persistent ipv6.disable=1 languagechooser/language-name=Spanish countrychooser/shortlist=ES localechooser/supported-locales=es_ES.UTF-8 initrd=/casper/initrd.lz locale=es_ES bootkbd=es console-setup/layoutcode=es quiet splash ---
label live-install
  menu label ^Install Xubuntu
  kernel /casper/vmlinuz
  append file=/preseed/xubuntu.seed boot=casper only-ubiquity ipv6.disable=1 languagechooser/language-name=Spanish countrychooser/shortlist=ES localechooser/supported-locales=es_ES.UTF-8 initrd=/casper/initrd.lz locale=es_ES bootkbd=es console-setup/layoutcode=es quiet splash ---
label check
  menu label ^Check disc for defects
  kernel /casper/vmlinuz
  append 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

on the syslinux.cfg

# D-I config version 2.0
# search path for the c32 support libraries (libcom32, libutil etc.)
MENU HIDDEN
include menu.cfg
default live
prompt 0
timeout 1

exithelp.cfg

label menu
    kernel vesamenu.c32
    config syslinux.cfg

Right now i am trying to remember, how i do some years ago with grub2 on a usbstick for boot 32-Bits or 64-Bits, because i had the two ISOS on a partition of the USB Stick. and i remember i had this files on the second partition of USB Stick, and the first partition with nfts format for the same.

i notice with the persistence mix the installation and if the first partition is FAT32 or NTFS, take a lot of time to boot, sometimes damage the boot of USB Stick, just hang during the boot. well i prefer not put the label "casper-rw" when i use "NTFS" format for the fist partition. i just put the label "Inukaze" (My username) xD

2
  • Is persistence working for you? I have not heard of a persistent Ubuntu install working without a file or partition named either: casper-rw, home-rw, live-rw, etc. Commented Jun 21, 2018 at 19:08
  • yes persistence works for me with 2 modes, when i put label "casper-rw" the system merge installation i had for example "gimp" and configuration files. but if i put another label like "inukaze" that don't happend is just a partition without files
    – Inukaze
    Commented Jun 23, 2018 at 2:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .