diff --git a/docs/_misc/reactos.md b/docs/_misc/reactos.md new file mode 100644 index 00000000..97528062 --- /dev/null +++ b/docs/_misc/reactos.md @@ -0,0 +1,49 @@ +--- +title: ReactOS +homepage: https://reactos.org/ +download: https://reactos.org/download +cfgdir: reactos.d +layout: default +--- + +# {{ page.title }} + +> ReactOS is a free and open-source operating system based on the best design +> principles found in the Windows NT architecture. Written completely from +> scratch, ReactOS is not a Linux-based system and it shares none of the UNIX +> architecture. The main goal of the ReactOS project is to provide an operating +> system which is binary compatible with Windows. This will allow Windows +> applications and drivers to run as they would on a Windows system. Additionally, +> the look and feel of the Windows operating system is used, such that people +> accustomed to the familiar user interface of Windows would find using ReactOS +> straightforward. The ultimate goal of ReactOS is to allow people to use it as +> an alternative to Windows without the need to change software they are used to. +> +> -- [DistroWatch][] + + +{% if page.cfgdir %} +## Configuration + +- [Project's files for {{ page.title }}][config] +{% endif %} + + +## Supported releases + +- BootCD ISO for installation (using [MEMDISK][]) +- LoveCD ISO (using [MEMDISK][]) + + +## Links + +- [Official homepage]({{ page.homepage }}) +- [Official download page]({{ page.download }}) +- [{{ page.title }} at DistroWatch][distrowatch] +- [{{ page.title }} at Wikipedia][wikipedia] + + +[config]: {{ site.github.repository_url | append: "/tree/master/mbusb.d/" | append: page.cfgdir }} +[distrowatch]: https://distrowatch.com/table.php?distribution=reactos +[memdisk]: http://www.syslinux.org/wiki/index.php?title=MEMDISK +[wikipedia]: https://en.wikipedia.org/wiki/ReactOS diff --git a/grub.cfg.example b/grub.cfg.example index 20d1b4fc..c7e79360 100644 --- a/grub.cfg.example +++ b/grub.cfg.example @@ -76,6 +76,11 @@ submenu "GRUB2 options ->" { } } +# Motherboard +menuentry "System Settings" { + fwsetup +} + # Reboot menuentry "Reboot" { reboot diff --git a/mbusb.cfg b/mbusb.cfg index 346df545..a7a0c6c1 100644 --- a/mbusb.cfg +++ b/mbusb.cfg @@ -1,7 +1,9 @@ # Partition holding files +regexp --set=rootdisk "^(.*),.*" "$root" +regexp --set=rootpartnum "^.*,.*([0-9]+)" "$root" probe -u $root --set=rootuuid set imgdevpath="/dev/disk/by-uuid/$rootuuid" -export imgdevpath rootuuid +export imgdevpath rootuuid rootdisk rootpartnum # Custom variables set isopath="/boot/isos" @@ -16,8 +18,74 @@ if [ -e "$prefix/mbusb.cfg.local" ]; then source "$prefix/mbusb.cfg.local" fi +# Function to look for boot files +function search_files { + root="$1" + + insmod bitmap + insmod jpeg + insmod png + insmod tga + + for grubfile in \ + /boot/grub/loopback.cfg \ + /boot/grub/grub.cfg \ + /boot/grub/x86_64-efi/grub.cfg \ + /EFI/BOOT/grub.cfg; do + if [ -e "$grubfile" ]; then + menuentry "GRUB boot ($grubfile)" "$grubfile" { + grub_file="$2" + configfile "$grub_file" + } + fi + done + + for syslinuxfile in \ + /isolinux.cfg \ + /syslinux.cfg \ + /isolinux/isolinux.cfg \ + /isolinux/syslinux.cfg \ + /syslinux/isolinux.cfg \ + /boot/isolinux.cfg \ + /boot/isolinux/isolinux.cfg \ + /boot/syslinux.cfg \ + /boot/syslinux/isolinux.cfg \ + /boot/syslinux/syslinux.cfg; do + if [ -e "$syslinuxfile" ]; then + menuentry "SYSLINUX boot ($syslinuxfile)" "$syslinuxfile" { + syslinux_file="$2" + syslinux_configfile -i "$syslinux_file" + } + fi + done + + for legacyfile in \ + /boot/grub/menu.lst \ + /menu.lst; do + if [ -e "$legacyfile" ]; then + menuentry "GRUB legacy boot ($legacyfile)" "$legacyfile" { + legacy_file="$2" + legacy_configfile "$legacy_file" + } + fi + done + + if [ "x$grub_platform" == "xefi" ]; then + for efifile in /efi/boot/bootx64.efi; do + if [ -e "$efifile" ]; then + menuentry "EFI boot ($efifile)" "$efifile" { + efi_file="$2" + chainloader "$efi_file" + } + fi + done + fi + +} + # MultiBoot USB menu submenu "Multiboot ->" { + # Warning for 32-bit systems if ! cpuid -l; then clear @@ -30,9 +98,76 @@ submenu "Multiboot ->" { echo fi - # Load configuration files - echo -n "Loading configuration files... " - for cfgfile in $prefix/mbusb.d/*.d/*.cfg; do - source "$cfgfile" - done + # Load configuration for ISO/kernel files + submenu "Boot supported ISO/kernel files ->" { + echo -n "Loading configuration files... " + for cfgfile in $prefix/mbusb.d/*.d/*.cfg; do + source "$cfgfile" + done + } + + # Search partitions for boot files + submenu "Auto-detect bootable partitions ->" { + echo -n "Searching pendrive's partitions... " + for part in ($rootdisk,*); do + regexp --set=partnum "^.*,.*([0-9]+)" "$part" + if [ "$partnum" -le "$rootpartnum" ]; then continue; fi + submenu "$part ->" "$part" { + part_name="$2" + probe --fs-uuid $part_name --set=part_uuid + search --fs-uuid --no-floppy --hint=$part_name --set=root $part_uuid + # Look for boot files + search_files $root + } + done + } + + # Search ISO files for boot files + submenu "Auto-detect ISO's configfiles ->" { + echo -n "Looking for ISO files... " + for isofile in $isopath/*.iso $isopath/*.img; do + if [ -e "$isofile" ]; then + regexp --set=isoname "$isopath/(.*)" "$isofile" + submenu "$isoname ->" "$isofile" { + iso_path="$2" + export iso_path + search --set=root --file "$iso_path" + loopback loop "$iso_path" + root=(loop) + # Look for boot files + search_files $root + } + fi + done + } + + # Use MEMDISK to load ISO files + submenu "Use MEMDISK to boot ISO files ->" { + echo -n "Looking for ISO files... " + for isofile in $isopath/*.iso; do + if [ -e "$isofile" ]; then + regexp --set=isoname "$isopath/(.*)" "$isofile" + menuentry "$isoname" "$isofile" { + iso_path="$2" + bootoptions="iso raw" + linux16 $prefix/memdisk $bootoptions + initrd16 $iso_path + } + fi + done + echo + echo -n "Looking for ISO files... " + for imgfile in $isopath/*.img; do + if [ -e "$imgfile" ]; then + regexp --set=imgname "$isopath/(.*)" "$imgfile" + menuentry "$imgname" "$imgfile" { + img_path="$2" + bootoptions="raw" + linux16 $prefix/memdisk $bootoptions + initrd16 $img_path + } + fi + done + } + } diff --git a/mbusb.d/antiviruslive.d/generic.cfg b/mbusb.d/antiviruslive.d/generic.cfg new file mode 100644 index 00000000..e9e162e2 --- /dev/null +++ b/mbusb.d/antiviruslive.d/generic.cfg @@ -0,0 +1,19 @@ +for isofile in $isopath/AntivirusLiveCD-*.iso; do + if [ -e "$isofile" ]; then + regexp --set=isoname "$isopath/(.*)" "$isofile" + submenu "$isoname ->" "$isofile" { + iso_path="$2" + loopback loop "$iso_path" + menuentry "AntivirusLiveCD with Default Display" { + bootoptions="isoboot=$iso_path rw root=/dev/ram0 vga=normal" + linux (loop)/boot/bzImage $bootoptions + initrd (loop)/boot/initrd.gz + } + menuentry "AntivirusLiveCD with VESA Framebuffer" { + bootoptions="isoboot=$iso_path rw root=/dev/ram0 vga=ask" + linux (loop)/boot/bzImage $bootoptions + initrd (loop)/boot/initrd.gz + } + } + fi +done diff --git a/mbusb.d/bitkey.d/generic.cfg b/mbusb.d/bitkey.d/generic.cfg new file mode 100644 index 00000000..4d776392 --- /dev/null +++ b/mbusb.d/bitkey.d/generic.cfg @@ -0,0 +1,25 @@ +for isofile in $isopath/turnkey-bitkey-*.iso; do + if [ -e "$isofile" ]; then + insmod test + regexp --set=isoname "$isopath/(.*)" "$isofile" + submenu "$isoname ->" "$isofile" { + iso_path="$2" + loopback loop "$iso_path" + menuentry "Cold Offline: Create wallet, sign transactions" { + bootoptions="boot=casper isoboot=$iso_path rw root=/dev/ram showmounts toram bitkey=cold-offline --" + linux (loop)/casper/vmlinuz $bootoptions + initrd (loop)/casper/initrd.gz + } + menuentry "Cold Online: Watch wallet, prepare transactions" { + bootoptions="boot=casper isoboot=$iso_path rw root=/dev/ram showmounts toram bitkey=cold-online --" + linux (loop)/casper/vmlinuz $bootoptions + initrd (loop)/casper/initrd.gz + } + menuentry "Hot Online: Create & watch wallet, prepare & sign transactions" { + bootoptions="boot=casper isoboot=$iso_path rw root=/dev/ram showmounts toram bitkey=hot-online --" + linux (loop)/casper/vmlinuz $bootoptions + initrd (loop)/casper/initrd.gz + } + } + fi +done diff --git a/mbusb.d/reactos.d/generic.cfg b/mbusb.d/reactos.d/generic.cfg new file mode 100644 index 00000000..371111bc --- /dev/null +++ b/mbusb.d/reactos.d/generic.cfg @@ -0,0 +1,11 @@ +for isofile in $isopath/ReactOS*.iso; do + if [ -e "$isofile" ]; then + regexp --set=isoname "$isopath/(.*)" "$isofile" + menuentry "$isoname (memdisk)" "$isofile" { + iso_path="$2" + bootoptions="iso raw" + linux16 $prefix/memdisk $bootoptions + initrd16 $iso_path + } + fi +done diff --git a/mbusb.d/scientificlinux.d/generic.cfg b/mbusb.d/scientificlinux.d/generic.cfg new file mode 100644 index 00000000..2f1499b9 --- /dev/null +++ b/mbusb.d/scientificlinux.d/generic.cfg @@ -0,0 +1,25 @@ +for isofile in $isopath/SL-*.iso; do + if [ -e "$isofile" ]; then + regexp --set=isoname "$isopath/(.*)" "$isofile" + submenu "$isoname ->" "$isofile" { + iso_path="$2" + loopback loop "$iso_path" + probe --label --set=cd_label (loop) + menuentry "Start Scientific Linux" { + bootoptions="iso-scan/filename=$iso_path root=live:CDLABEL=$cd_label rootfstype=auto ro rhgb rd.luks=0 rd.md=0 rd.dm=0 rd.live.image quiet" + linux (loop)/isolinux/vmlinuz0 $bootoptions + initrd (loop)/isolinux/initrd0.img + } + menuentry "Start Scientific Linux in basic graphics mode" { + bootoptions="iso-scan/filename=$iso_path root=live:CDLABEL=$cd_label rootfstype=auto ro rhgb rd.luks=0 rd.md=0 rd.dm=0 rd.live.image nomodeset quiet" + linux (loop)/isolinux/vmlinuz0 $bootoptions + initrd (loop)/isolinux/initrd0.img + } + menuentry "Test this media & start Scientific Linux" { + bootoptions="iso-scan/filename=$iso_path root=live:CDLABEL=$cd_label rootfstype=auto ro rhgb rd.luks=0 rd.md=0 rd.dm=0 rd.live.image rd.live.check quiet" + linux (loop)/isolinux/vmlinuz0 $bootoptions + initrd (loop)/isolinux/initrd0.img + } + } + fi +done diff --git a/mbusb.d/thinstation.d/generic.cfg b/mbusb.d/thinstation.d/generic.cfg new file mode 100644 index 00000000..98ab69cc --- /dev/null +++ b/mbusb.d/thinstation.d/generic.cfg @@ -0,0 +1,14 @@ +for isofile in $isopath/TS-Multiclient*.iso; do + if [ -e "$isofile" ]; then + regexp --set=isoname "$isopath/(.*)" "$isofile" + submenu "$isoname (isolinux.cfg) ->" "$isofile" { + iso_path="$2" + export iso_path + search --set=root --file "$iso_path" + loopback loop "$iso_path" + root=(loop) + syslinux_configfile -i /boot/syslinux/syslinux.cfg + loopback --delete loop + } + fi +done diff --git a/mbusb.d/ubuntustudio.d/generic.cfg b/mbusb.d/ubuntustudio.d/generic.cfg new file mode 100644 index 00000000..c14465bd --- /dev/null +++ b/mbusb.d/ubuntustudio.d/generic.cfg @@ -0,0 +1,14 @@ +for isofile in $isopath/ubuntustudio-*.iso; do + if [ -e "$isofile" ]; then + regexp --set=isoname "$isopath/(.*)" "$isofile" + submenu "$isoname (loopback.cfg) ->" "$isofile" { + iso_path="$2" + export iso_path + search --set=root --file "$iso_path" + loopback loop "$iso_path" + root=(loop) + configfile /boot/grub/loopback.cfg + loopback --delete loop + } + fi +done