Skip to content

Commit

Permalink
Added Phoenix OS, Q4OS, Tooppy and FatDog linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ColumPaget committed Jun 28, 2021
1 parent 7ab03fd commit e58c3bb
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 8 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ distroflash.lua has been seen to work with the following distributions. If anyon
* Android x86 9.0
* Android Bliss O.S. v11.12
* Android Prime O.S. 0.4.5
* Android Phoenix O.S. 3.6.1
* AntiX Linux 19
* ArchLinux 2020.03.01
* Bodhi Linux 5.0.0
Expand All @@ -93,6 +94,7 @@ distroflash.lua has been seen to work with the following distributions. If anyon
* KNOPPIX 8.6.1
* Peppermint 10
* Porteus 3.2.2
* Q4OS 3.14
* PCLinuxOS 2020.02
* Slackware 14.2
* Sparky Linux 5.14
Expand All @@ -104,6 +106,7 @@ distroflash.lua has been seen to work with the following distributions. If anyon
* TinyCorePlus - has to be told path to core.gz to install (see 'Finiky installs' below)
* Puppy Linux slacko 6.3.2 - complex install process (see 'Finiky installs' below)
* Puppy Linux tahr 6.0.5 - complex install process (see 'Finiky installs' below)
* Puppy Linux tahr 6.0.5 - complex install process (see 'Finiky installs' below)
* Salix 14.2 - has to be told to install from harddrive, and given both the device name and path to files on disk
* Calculate Linux - has been seen to install to a vm. Installer has issues with some graphics cards.
* CentOS Linux 8.1 - has been seen to install to a vm. Installer crashes on some hardware.
Expand All @@ -113,6 +116,8 @@ distroflash.lua has been seen to work with the following distributions. If anyon
* Slax 9.11.0 - no automated installer, apparently can be installed from live by copying files manually
* Gentoo - no automated installer, apparently can be installed manually from live
* Damn Small Linux 4.4.10 - difficult to use installer, not had a successful install from it yet, but it may work.
* Tooppy Linux 24 - puppy derivative. runs live, haven't made it install yet
* Fatdog 8.11 - puppy derivative. runs live, haven't made it install yet

## Live environment only

Expand Down
15 changes: 11 additions & 4 deletions distroflash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# Distros that work as installers (this is the main focus of distroflash.lua)
name="AndroidX86" id="isolinux/android-x86.png" install_type=iso kernel="kernel" initrd="initrd.img" append="iso-scan/filename=$(distdir)/$(isoname) androidboot.selinux=permissive INSTALL=1"
name="PhoenixOS" id="cdlabel:Phoenix OS *" install_type=iso kernel="kernel" initrd="initrd.img" append="iso-scan/filename=$(distdir)/$(isoname) androidboot.selinux=permissive INSTALL=1"
name="AntiX" id="antiX/vmlinuz" kernel="antiX/vmlinuz" initrd="antiX/initrd.gz" append="bdir=$(distdir)/antiX rootdelay=5 from=usb,cd,hd splasht disable=lxF xorg=safe"
name="Arch" id="arch" kernel="arch/boot/x86_64/vmlinuz" initrd="arch/boot/x86_64/archiso.img" append="archisobasedir=/$(distdir)/arch archisodevice=/dev/disk/by-uuid/$(uuid)"
name="Deepin" install_type=iso id="deepin-boot-maker.exe" kernel="/live/vmlinuz" initrd="/live/initrd.lz" append="root=UUID=$(uuid) fromiso=$(distdir)/$(isoname) boot=live components quiet splash union=overlay livecd-installer"
Expand All @@ -16,6 +17,7 @@ name="Mint" id="preseed/linuxmint.seed" kernel="casper/vmlinuz" initrd="casper.i
name="PCLinuxOS" id="EFI/BOOT/themes/pclinuxos" kernel="isolinux/vmlinuz" initrd="isolinux/initrd.gz" append="livecd=$(distdir)/livecd nomodeset xdriver=vesa"
name="Peppermint" id="preseed/peppermint.seed" kernel="casper/vmlinuz" initrd="casper/initrd*" append="noprompt cdrom-detect/try-usb=true file=/$(distdir)/preseed/peppermint.seed boot=casper ignore_uuid live-media-path=$(distdir)/casper quiet splash --"
name="Porteus" id="porteus" kernel="boot/syslinux/vmlinuz" initrd="boot/syslinux/initrd*" append="from=$(distdir)"
name="Q4OS" install_type=iso id="cdlabel:Q4OS*" append="boot=live findiso=$(distdir)/$(isoname) components quiet splash"
name="Slackware" install_type=iso id="slackware" kernel="kernels/huge.s/bzImage" initrd="isolinux/initrd.img" append="livemedia=/dev/disk/by-uuid/UUID:$(uuid):/$(distdir)/$(isoname)"
name="SparkyLinux" id="live/sparkylinux*" kernel="live/vmlinuz" initrd="live/initrd.img" append="boot=live live-config live-media-path=$(distdir)/live"
name="Trisquel" id="preseed/trisquel.seed" kernel="casper/vmlinuz" initrd="casper/initrd" append="file=$(distdir)/preseed/linuxmint.seed ignore_uuid boot=casper live-media-path=$(distdir)/casper --"
Expand All @@ -28,8 +30,9 @@ name="Salix" id="salix" kernel="/kernels/huge.s/bzImage" initrd="/isolinux/initr
name="TinyCore" id="boot/core.gz" kernel="boot/vmlinuz" initrd="boot/core.gz" append="waitusb=5 loglevel=3 tce=UUID=$(uuid)/$(distdir)/cde showapps desktop=icewm"
name="CalculateLinux" id="id2278.uefi" initrd="/boot/initrd" append="append root=live:UUID=$(uuid) rootfstype=auto ro liveimg quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 xdriver=vesa nomodeset rd.live.dir=$(distdir) rd.live.image"
name="CentOS8" id="media.repo" kernel="isolinux/vmlinuz" initrd="isolinux/initrd.img" append="inst.stage2=hd:UUID=$(uuid):/$(distdir) inst.repo=hd:UUID=$(uuid):/$(distdir) xdriver=vesa nomodeset rd.live.dir=$(distdir) rd.live.image"
name="Puppy" id="*.sfs" kernel="" initrd="" append="psubdir=$(distdir)"

name="Puppy" id="puppy*.sfs" kernel="" initrd="" append="psubdir=$(distdir)"
name="Tooppy" id="tooppy*.sfs" kernel="" initrd="" append="psubdir=$(distdir)"
name="FatDog64" id="fatdog.xpm" kernel="" initrd="" append="psubdir=$(distdir)"

# Distros that only run live (in some cases because that's all they're supposed to do)
name="Clonezilla" id="Clonezilla-Live-Version" kernel="live/vmlinuz" initrd="live/initrd.img" append="live-media-path=/$(distdir)/live boot=live union=overlay username=user config components noswap edd=on nomodeset nodmraid noeject locales= keyboard-layouts= ocs_live_run=ocs-live-general ocs_live_extra_param= ocs_live_batch=no ip= nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 vga=791"
Expand All @@ -41,6 +44,7 @@ name="SystemRescueCD" id="sysresccd" kernel="sysresccd/boot/i686/vmlinuz" initrd
name="NST" id="README.nst" kernel="isolinux/vmlinuz0" initrd="isolinux/initrd0.img" append="append root=live:UUID=$(uuid) rootfstype=auto ro liveimg quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 xdriver=vesa nomodeset live_dir=$(distdir)/LiveOS rd.live.image"



#Pentoo runs, but asks for a password to login. I've been unable to figure out what username/password to use, and yes I've googled,
#read the FAQ etc
#name="Pentoo" id="boot/pentoo" kernel="boot/pentoo" initrd="/boot/pentoo.igz" append="init=/linuxrc looptype=squashfs loop=/$(distdir)/image.squashfs cdroot subdir=$(distdir) console=tty1"
Expand All @@ -49,7 +53,7 @@ name="NST" id="README.nst" kernel="isolinux/vmlinuz0" initrd="isolinux/initrd0.i
#name="BunsenLabsHelium" install_type=iso id="bunsen_version" kernel="/live/vmlinuz" initrd="/live/initrd.gz" append="findiso=$(distdir)/$(isoname) components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal"
#name="Debian9" install_type=iso id="doc/debian-manifesto" append="findiso=$(distdir)/$(isoname) components quiet splash"
#name="Debian", id="d-i" kernel="d-i/gtk/vmlinuz" initrd="d-i/gtk/initrd.gz" append="video=vesa:ywrap,mtrr vga=788"
#name="Debian" install_type=iso id="doc/debian-manifesto" append="findiso=$(distdir)/$(isoname) components quiet splash"
#name="Debian" install_type=iso id="doc/debian-manifesto" append="boot=live findiso=$(distdir)/$(isoname) components quiet splash"
#name="Qubes" id="isolinux/xen.gz" kernel=isolinux/mboot.c32 initrd="" append="xen.gz --- vmlinuz inst.stage2=hd:UUID=$(uuid):/$(distdir) xdriver=vesa nomodeset --- initrd.img"
#name="RedhatFedora" id="EFI/fedora" kernel="images/vmlinuz" initrd="images/initramfs.img" append="inst.stage2=hd:UUID=$(uuid):$(distdir) root=UUID=$(uuid) rootfstype=vfat rd.live.dir=$(distdir) rd.live.image xdriver=vesa nomodeset"
#name=OpenMandriva id="boot/liveinitrd.img" kernel="boot/vmlinuz0" initrd="boot/liveinitrd.img" append="root=live:UUID=$(uuid) rootfstype=auto ro liveimg rhgb xdriver=vesa nobodeset rd.live.dir=$(distdir)/LiveOS rd.live.image"
Expand All @@ -58,4 +62,7 @@ name="NST" id="README.nst" kernel="isolinux/vmlinuz0" initrd="isolinux/initrd0.i
#name="openSUSE" install_type=iso id="SUSEgo.png" kernel="boot/i386/loader/linux" initrd="boot/i386/loader/initrd" append="root=live:CDLABEL=openSUSE-Leap-15.3 iso-scan/filename=$(distdir)/$(isoname)"
#name="CentOS" id="media.repo" install_type=iso kernel="isolinux/vmlinuz" initrd="isolinux/initrd.img" append="noeject inst.stage2=hd:UUID=$(uuid):/$(distdir)/$(isofile)"
#name="Freedos", install_type=iso id="freedos" kernel="isolinux/memdisk" initrd="isolinux/fdlive.img"
#name="OpenSUSE" install_type=iso id="SUSEgo.png" kernel="boot/x86_64/loader/linux" initrd="boot/x86_64/loader/initrd" append="root=live:CDLABEL=openSUSE-Leap-15.3-DVD-x86_64160 rd.live.image iso-scan=$(distdir)/$(isoname)"
#name="Debian" install_type=iso id="doc/debian-manifesto" append="boot=live findiso=$(distdir)/$(isoname) components quiet splash"
#name="OpenSUSE" install_type=iso id="SUSEgo.png" kernel="boot/x86_64/loader/linux" initrd="boot/x86_64/loader/initrd" append="root=live:CDLABEL=$(cdlabel) rd.live.image iso-scan=$(distdir)/$(isoname) isofrom_system=$(distdir)/$(isoname)"
#name="BunsenLabs" install_type=iso id="cdlabel:BUNSENLABS*" append="boot=live findiso=$(distdir)/$(isoname) components quiet splash"
#name="Pop OS" id="cdlabel:Pop_OS*" kernel="casper/vmlinuz.efi" initrd="casper/initrd.gz" append="boot=casper ignore_uuid live-media-path=$(distdir)/casper hostname=pop-os username=pop-os noprompt"
88 changes: 84 additions & 4 deletions distroflash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,74 @@ Settings.programs={}







--for binary data it's better to read byte by byte due to issues of passing
--data including nulls out of the c-functions of libUseful
function ReadBytes(S, no_of_bytes)
local str=""
local i

for i=1,no_of_bytes,1
do
str=str..S:getch()
end

return str
end


function ISOReadDescriptor(S)
local vtype, trash
local cdlabel=""

vtype=string.byte(S:getch())
if vtype==1 --we have a volume descriptor
then
str=ReadBytes(S, 5) -- always CD001 for all descriptors
S:getch() -- version, always 1
S:getch() -- padding, always 0
str=ReadBytes(S, 32) -- system identifier, whatever that is
cdlabel=ReadBytes(S, 32) -- volume label
else
trash=ReadBytes(S, 2047)
end

return vtype,cdlabel
end


-- returns the volume label/CDLABEL of an iso
function ISOGetLabel(path)
local iso_system_area=32768;
local S, str, vtype
local cdlabel=""

--1st 32768 bytes is space allocated for putting other headers on an iso
S=stream.STREAM(path, "r")
if S ~= nil
then
S:seek(iso_system_area)
vtype,str=ISOReadDescriptor(S)
while vtype ~= 255
do
if vtype==1
then
cdlabel=str
break
end
vtype,str=ISOReadDescriptor(S)
end

S:close()
end

return(cdlabel)
end


function FindFiles(pattern_list)
local toks, pattern, glob, item
local files={}
Expand Down Expand Up @@ -128,16 +196,25 @@ end
end


-- a list of file patterns that exist for a given ISO/distro
-- check a list of file patterns that exist for a given ISO/distro
-- all patterns must exist, so we return false if one DOESN'T exist
function ISOFindIDFiles(distro, patterns)
local toks, pattern
local toks, pattern, cdpattern

toks=strutil.TOKENIZER(patterns, ",")
pattern=toks:next()
while pattern ~= nil
do

if string.sub(pattern, 1, 8)=="cdlabel:"
then
cdpattern=string.sub(pattern, 9)
if strutil.pmatch(cdpattern, distro.cdlabel) == false then return false end
else
files=FindFiles(distro.mnt..pattern)
if #files == 0 then return false end
end

pattern=toks:next()
end

Expand Down Expand Up @@ -176,6 +253,7 @@ distro.name="generic"
distro.kernel=""
distro.initrd=""
distro.root_files={}
distro.cdlabel=ISOGetLabel(path)

mnt="/tmp/.iso_"..process.getpid()
filesys.mkdir(mnt)
Expand All @@ -188,7 +266,7 @@ CategorizeISO(distro)
if distro.kernel == "" then distro.kernel=ISOFindItem(kernel_names, distro.mnt) end
if distro.initrd == "" then distro.initrd=ISOFindItem(initrd_names, distro.mnt) end

Out:puts("~c"..filesys.basename(path).."~0 DISTRO: ~e"..distro.name.."~0 kernel="..distro.kernel.." initrd="..distro.initrd.."\n")
Out:puts("~c"..filesys.basename(path).."~0 DISTRO: ~e"..distro.name.."~0 kernel="..distro.kernel.." initrd="..distro.initrd.." cdlabel="..distro.cdlabel .. "\n")
return distro
end

Expand Down Expand Up @@ -399,13 +477,15 @@ if distro.install_type=="live"
then
str=string.gsub(distro.append_live, "%$%(distdir%)", name)
str=string.gsub(str, "%$%(uuid%)", Settings.DestUUID)
str=string.gsub(str, "%$%(cdlabel%)", distro.cdlabel)
S:writeln("APPEND "..str.."\n")
elseif strutil.strlen(distro.append) > 0
then
str=string.gsub(distro.append, "%$%(distdir%)", name)

if distro.install_type=="iso" then str=string.gsub(str, "%$%(isoname%)", name..".iso") end
str=string.gsub(str, "%$%(uuid%)", Settings.DestUUID)
str=string.gsub(str, "%$%(cdlabel%)", distro.cdlabel)
S:writeln("APPEND "..str.."\n")
end

Expand Down Expand Up @@ -523,7 +603,7 @@ end
function InitConfig()
local str

Settings.Version="3.1"
Settings.Version="3.2"
Settings.MountPoint="/mnt"
str=string.gsub(process.getenv("PATH"), "/bin", "/share")
Settings.SyslinuxDir=filesys.find("syslinux", str)
Expand Down

0 comments on commit e58c3bb

Please sign in to comment.