Thursday, September 15, 2016

How to make a live usb persistent [Manual Method]

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 :






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.





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





mount /dev/sdh2 /tmp/usbp2




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





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




cp -rf isolinux /tmp/usbp2/syslinux





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




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





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




ms-sys -s /dev/sdh





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




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.

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...