Puppy Linux: Frugal Install on USB with Syslinux

Puppy Linux is a special Linux version meant for old computers and for totally run in ram. Further than for bein installed on aged computers Puppy Linux is great to be used as portable OS installed in an usb flash drive and differently from a live distro it can also save the data if it is installed with a persistence file.

For me is really very comfortable always having with me a Linux OS ready to work.

For my current setup I'm using a 64 GB flash drive with an ntfs partition where I store my data as usual for any flash drive and with an ext partition where I installed the bootloader Syslinux and a Puppy Linux distro named Slacko. For make the ntfs partition readable by Windows OS it have to be the first partition (sdX1) in the pen drive because Windows is able to read only the first partition from an usb flash drive.

Below are the instructions to follow step by step:

  • create an ntfs partition sdX1 labeled Data
  • create an ext4(*) partition sdX2 labeled Slacko and in it create two directory: boot/syslinux, slacko
  • download the Puppy Linux distro Slacko 32bit version in way to execute it in every architecture
  • mount the downloaded iso and copy all its content in the directory slacko in the partition sdX2
  • download the bootloader Syslinux and extract its content in /tmp
  • copy all syslinux modules in the directory boot/syslinux in the partition sdX2:

cp -r /tmp/syslinux-6.03/bios/*.c32 /media/Slacko/boot/syslinux/

  • install the Syslinux mbr in the flash drive:

dd conv=notrunc bs=440 count=1 if=/tmp/syslinux-6.03/bios/mbr/mbr.bin of=/dev/sdX

  • install Syslinux in the flash drive:

/syslinux-6.03/bios/extlinux/extlinux --install /media/Slacko/boot/syslinux/

  • enable the boot flag on sdX2:

parted /dev/sdX2 set 1 boot on

  • create the file to configure the persistence:

cp /media/Slacko/isolinux.cfg /media/Slacko/syslinux_frugal.cfg

  • correct the paths in syslinux_frugal.cfg and replace pmedia=cd with pmedia=usb:

default puppy
display /slacko/boot.msg
prompt 1
timeout 50

F1 /slacko/boot.msg
F2 /slacko/help.msg
F3 /slacko/help2.msg

label puppy
kernel /slacko/vmlinuz
append initrd=/slacko/initrd.gz pmedia=usb

  • create the file to configure the background of the boot menu:

touch /media/Slacko/boot/syslinux/defaults.cfg

  • configure the file defaults.cfg:

MENU MARGIN 0
MENU ROWS -9
MENU TABMSG
MENU TABMSGROW -3
MENU CMDLINEROW -3
MENU HELPMSGROW -4
MENU HELPMSGENDROW -1

MENU COLOR SCREEN 37;40
MENU COLOR BORDER 34;40
MENU COLOR TITLE 1;33;40
MENU COLOR SCROLLBAR 34;46
MENU COLOR SEL 30;47
MENU COLOR UNSEL 36;40
MENU COLOR CMDMARK 37;40
MENU COLOR CMDLINE 37;40
MENU COLOR TABMSG 37;40
MENU COLOR DISABLED 37;40
MENU COLOR HELP 32;40

  • create the file to configure the voices in the boot menu:

touch /media/Slacko/boot/syslinux/menu.cfg

  • configure the file menu.cfg:

UI vesamenu.c32
PROMPT 0
MENU INCLUDE defaults.cfg
MENU TITLE USB MultiBoot
DEFAULT slacko_frugal
ONTIMEOUT slacko_frugal
TIMEOUT 30
 
LABEL std
    MENU LABEL Standard Boot
    COM32 whichsys.c32
    APPEND -iso- localboot.c32 -1 -sys- chain.c32 hd1 swap  
 
LABEL slacko_frugal
    MENU LABEL Slacko Frugal
    COM32 whichsys.c32 -sys- config /slacko/syslinux_frugal.cfg -iso- config /slacko/isolinux.cfg
 
LABEL hdt
    MENU LABEL Hardware Info
    COM32 hdt.c32
    
LABEL reboot
    MENU LABEL Reboot
    COM32 reboot.c32

 

 

*

To install an older Puppy Linux version we have to format sdX2 as ext3 otherwise we will have ther error: Boot failed: Failed to load ldlinux.c32

Syslinux doesnt support the 64 bit feature of ext4 so we have to format an ext4 partition for syslinux disabling the 64 bit:

mkfs.ext4 -F -O ^64bit -L "Slacko" /dev/sdX2

Tags: