#!/bin/sh

list_version() {
	ls rolling next ?.0 -dr | \
	while read dir; do
		echo $dir
		[ -d loram-$dir ] && echo loram-$dir
		[ -d  web-$dir ] && echo  web-$dir
		[ -d  mini-$dir ] && echo  mini-$dir
	done
}

build_page() {
	DIR=$1
	SETS="$(echo $(./sets.sh $1))"
	case "$DIR" in
	*.*)	stable=stable;;
	*)	stable=development;;
	esac
	VERSION=${DIR#*-}
	case "$DIR" in
		web*)	TYPE="&nbsp;web" ;;
		mini*)	TYPE="&nbsp;mini" ;;
		loram*)	TYPE="&nbsp;loram" ;;
		next*)	TYPE="&nbsp;next" ;;
		*)	TYPE=""
	esac
	TITLE="Floppy image set"
	[ -s $DIR/title ] && TITLE="$(cat $DIR/title)"
	cat <<EOT
<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>SliTaz Boot Floppies</title>
	<meta name="description" content="slitaz$TYPE boot floppies $VERSION">
	<meta name="keywords" lang="en" content="slitaz, linux, lightweight, fast, boot floppies, open source, free os">
	<meta name="author" content="SliTaz Team">
	<meta name="modified" content="2026-03-31 21:24:26">
	<meta name="robots" content="index, nofollow, all">
	<meta name="author" content="SliTaz Contributors">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="shortcut icon" href="/static/favicon.ico">
	<link rel="stylesheet" href="/static/slitaz-2026.css">
	<link rel="stylesheet" href="menu-2026.css">
	<style type="text/css">
#floppies { width: 100%; }
#floppies a { color: var(--primary); }
	</style>
</head>
<body>

<!--script>de=document.documentElement;de.className+=(("ontouchstart" in de)?' touch':' no-touch');</script-->

<!-- Header -->
<header id="header">
	<input type="checkbox" id="nav-toggle">
	<h1>
		<a href="https://www.slitaz.org/">
			<img src="/static/logo.png" alt="SliTaz Logo" height="32">
			Boot floppies rolling
		</a>
	</h1>

	<nav id="network" aria-label="Network">
		<a href="https://www.slitaz.org/" class="home"></a>
		<ul id="menu">
			<li><a href="floppy-grub4dos" title="Boot tools">Generic boot floppy</a></li>
			<li><a href="https://tiny.slitaz.org/" title="SliTaz in one floppy and 4Mb RAM">Tiny SliTaz</a>
			<ul>
				$(
list_version | \
while read dir; do
	case "$dir" in
	*-*|next)
		echo -n "				<li>"
		text="${dir/-/ }";;
	*)
		echo -n "$ul<li>"
		text="SliTaz ${dir/-/ }";;
	esac

	echo "<a href=\"index-$dir.html\" title=\"$(cat $dir/title)\">$text</a>"

	case "$dir" in
	*-*|next)
		echo "					</li>";;
	*)
		echo "						<ul>"
		ul="						</ul>
					</li>";;
	esac
done )
					</ul>
				</li>
			</ul>
			<li>
				<a href="builder/index.php" title="Build floppies with your own kernel and initramfs">Floppy set builder</a>
				<ul>
					<li>
						<a href="builder/bootloader" title="Build your floppy sets without Internet">Standalone shell</a>
					</li>
				</ul>
			</li>
		</ul>
	</nav>
	<button id="theme-toggle" onclick="toggleTheme()" aria-label="Switch to dark mode"><svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg></button>
        <label for="nav-toggle" id="nav-burger" aria-label="Menu">☰</label>
</header>
<script>
var _t = localStorage.getItem('slitaz-theme');
if (_t) document.documentElement.setAttribute('data-theme', _t);
</script>
<script src="/static/theme.js"></script>
<!-- Content -->
<!-- About -->
<section class="about">

<!-- Download -->                                                                                                                                                                                       
<section id="download" class="download-section">                                                                                                                                                        
	<div class="feature-card">
        <h2>                                                                                                                                                                           
                <header>Available boot floppies</header>
	</h2>
                <ul>
$(
tail=""
list_version | \
while read dir; do
	case "$dir" in
	web*)	echo -en "\n				&middot; <a href=\"index-$dir.html\">web</a>" ;;
	mini*)	echo -en "\n				&middot; <a href=\"index-$dir.html\">mini</a>" ;;
	loram*)	echo -en "\n				&middot; <a href=\"index-$dir.html\">loram</a>" ;;
	next*)	echo -en "\n				&middot; <a href=\"index-$dir.html\">next</a>" ;;
	*)   	echo -en "$tail			<li><a href=\"index-$dir.html\">SliTaz $dir</a>" ;;
	esac
	tail="</li>\n"
done
)</li>
		</ul>
	</div>
	<p></p>
        <div class="download-card">                                                                                                                                                                    
        <h2>                                                                                                                                                                           
		<header>SliTaz rolling floppy <span id="format">1.44MB</span> images</header>
	</h2>
		<div><table id="floppies"><tbody>
$(
n=0
for f in $DIR/fd???.img ; do
	[ $n -eq 0 ] && echo "			<tr>"
	echo "				<td><a href=\"$f\">$(basename $f .img)</a></td>"
	n=$(( ($n+1)%6 ))
	[ $n -eq 0 ] && echo "			</tr>"
done
[ $n -eq 0 ] && echo "			<tr>"
while [ $n -ne 5 ]; do
	echo "				<td>&nbsp;</td>"
	n=$(($n+1))
done
)
				<td><a href="$DIR/md5sum">md5</a></td>
			</tr>
		</tbody></table></div>
	</div>
</section>


EOT
	[ -n "$SETS" ] && cat <<EOT
<script type="text/javascript">
var dir = "$VERSION";
var sets = [${SETS// /,}];
//-->
</script>
<script type="text/javascript" src="format.js"></script>
EOT
	cat <<EOT

<h2>$TITLE</h2>

<p>This floppy set will boot a SliTaz $stable$TYPE version. You can write floppies
with SliTaz <code>bootfloppybox</code>, <a href="https://en.wikipedia.org/wiki/RaWrite" target="_blank">Windows&nbsp;rawrite</a>
or simply <code>dd</code>:</p>

<pre># dd if=fd001.img of=/dev/fd0</pre>

<p>If you have a CD-ROM, a USB port and a USB key or a network card, but you
can't boot these devices directly, then try <a href="https://mirror.slitaz.org/boot/floppy-grub4dos" target="_blank">floppy-grub4dos</a> first. This 1.44Mb floppy provides tiny programs to boot
these devices without BIOS support and some other tools.</p>

$(cat $DIR/description.html)

<p>Each floppy set detects disk swaps and can be used without a keyboard.</p>

<p>Good luck.</p>


<h2 id="fdiso">ISO image floppy set</h2>

<form method="get" action="https://mirror1.slitaz.org/floppies/download.php">

	<p>The floppy image set above includes an embedded installer and can install
	SliTaz on your hard disk.</p>

	<p>Anyhow you may want these ISO images to <a href="https://doc.slitaz.org/en:guides:uncommoninst#floppy-install">install&nbsp;SliTaz</a>

	<select name="iso">
$(
for file in $(ls ../iso/*/flavors/slitaz-*.iso ../iso/*/slitaz-*.iso | sort); do
	set -- $(echo $(basename $file .iso) | sed 's/-/ /g')
	echo "		<option value=\"${file#../}\">${3:-core} $4 $2</option>"
done
)
	</select>

	<input name="build" value="Build floppy set" type="submit"/>
	</p>
</form>

<p>You can restore the ISO image on your hard disk using:</p>

<pre>
# dd if=/dev/fd0 of=fdiso01.img
# dd if=/dev/fd0 of=fdiso02.img
# ...
# cat fdiso*.img | cpio -i
</pre>

<p></p>
<div class="feature-card">
<h2>Images generation</h2>

<ul>
	<li>All these floppy images are built from a <i>core</i> or a <i>Nin1</i>
		ISO.</li>
	<li>The <i>loram</i> is preprocessed by <code>tazlitobox</code> (Low RAM
		tab) or <code>tazlito build-loram</code>.</li>
	<li>The versions 1.0 and 2.0 are built with <code>bootfloppybox</code>
		available since 3.0.</li>
	<li>The newer versions are built with <code>taziso floppyset</code>
		available since 5.0.</li>
	<li>You can extract the <u>kernel</u>, <u>cmdline</u> and <u>rootfs*</u>
		files with <a href="floppies">this tool</a>.</li>
	<li>You can change the floppy format (to 2.88M, 1.2M ...)
		with <a href="resizefdset.sh">this tool</a>.</li>
</ul>
</div>

<!-- End of content -->
</section>


<!-- Footer -->
<footer id="footer">
        <p>
                Copyright © 2006-$(date +%Y)           <a href="https://slitaz.org/">SliTaz</a> —
                <a href="https://doc.slitaz.org/" target="_blank" rel="noopener noreferrer">Wiki</a>
                <a href="https://forum.slitaz.org/" target="_blank" rel="noopener noreferrer">Forum</a>
                <a href="https://pkgs.slitaz.org/" target="_blank" rel="noopener noreferrer">Packages</a>
                <a href="https://bugs.slitaz.org/" target="_blank" rel="noopener noreferrer">Bugs</a>
                <a href="https://hg.slitaz.org/" target="_blank" rel="noopener noreferrer">Repos</a>
        </p>
        <p>
                <a href="https://www.facebook.com/slitaz">Facebook</a>
                <a href="https://distrowatch.com/table.php?distribution=slitaz">Distrowatch</a>
                <a href="https://en.wikipedia.org/wiki/SliTaz">Wikipedia</a>
                <a href="https://github.com/SliTaz-official">GitHub</a>
        </p>
</footer>

</body></html>
EOT
}

if [ -n "$1" ]; then
	build_page $1
else
	list_version | while read dir ; do
		[ -s $dir/description.html ] || continue
		[ -s $dir/md5sum ] || continue
		build_page $dir > index-$dir.html
	done
fi
