All Projects → mytbk → Liveusb Builder

mytbk / Liveusb Builder

Licence: gpl-3.0
A script suite to create multiboot USB stick for GNU/Linux distributions

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Liveusb Builder

Rufus
The Reliable USB Formatting Utility
Stars: ✭ 16,917 (+14236.44%)
Mutual labels:  iso, usb, uefi, grub
Grub2 Filemanager
GRUB2-based file manager
Stars: ✭ 330 (+179.66%)
Mutual labels:  iso, uefi, grub
UEFI MULTI
UEFI_MULTI - Make Multi-Boot USB-Drive
Stars: ✭ 33 (-72.03%)
Mutual labels:  usb, iso, uefi
Kindd
A kindful dd, written in qt-quick.
Stars: ✭ 93 (-21.19%)
Mutual labels:  iso, usb, grub
Multibootusb
A collection of GRUB files and scripts that will allow you to create a pendrive capable of booting different ISO files
Stars: ✭ 543 (+360.17%)
Mutual labels:  iso, usb, grub
Multibootusb
Create multiboot live Linux on a USB disk...
Stars: ✭ 1,042 (+783.05%)
Mutual labels:  usb, uefi, grub
buddy-linux
Do you remember "Wubi Ubuntu Installer"? This project is both a replacement and an improvement of Wubi. You will be able to install your Debian (or derived) distribution on a PC without repartitioning it, simply by using a secondary/external boot device (like a USB drive).
Stars: ✭ 17 (-85.59%)
Mutual labels:  usb, grub
MultiOS-USB
Boot operating systems directly from ISO files
Stars: ✭ 106 (-10.17%)
Mutual labels:  usb, uefi
imageburner
An elementary OS app
Stars: ✭ 43 (-63.56%)
Mutual labels:  usb, iso
Efifs
EFI FileSystem drivers
Stars: ✭ 272 (+130.51%)
Mutual labels:  uefi, grub
bootutils
Utilities to create bootable disks, remaster ISO images, make multiboot ISO images
Stars: ✭ 18 (-84.75%)
Mutual labels:  iso, uefi
grub-iso-multiboot
grab a .iso, put in a folder, boot it up.
Stars: ✭ 53 (-55.08%)
Mutual labels:  iso, grub
Aio Boot
AIO Boot is an All-in-One bootable software for USB and HDD. Is one of the best Multiboot USB Creator for Windows.
Stars: ✭ 300 (+154.24%)
Mutual labels:  uefi, grub
GrubFM-Installer
GrubFM Installer
Stars: ✭ 27 (-77.12%)
Mutual labels:  usb, uefi
grml-plus
Script to add grml (from grml.org) and more stuff to a USB key
Stars: ✭ 13 (-88.98%)
Mutual labels:  usb, grub
Glim
GRUB Live ISO Multiboot
Stars: ✭ 452 (+283.05%)
Mutual labels:  usb, grub
Etchdroid
An application to write OS images to USB drives, on Android, no root required.
Stars: ✭ 258 (+118.64%)
Mutual labels:  iso, usb
Linux Unattended Installation
This project provides all you need to create an unattended installation of a minimal setup of Linux.
Stars: ✭ 215 (+82.2%)
Mutual labels:  iso, uefi
Super Uefiinsecureboot Disk
Super UEFIinSecureBoot Disk: Boot any OS or .efi file without disabling UEFI Secure Boot
Stars: ✭ 309 (+161.86%)
Mutual labels:  iso, uefi
Bootiso
A bash program to securely create a bootable USB device from one image file.
Stars: ✭ 645 (+446.61%)
Mutual labels:  iso, usb

liveusb-builder

liveusb-builder is a script suite to create multiboot USB stick for GNU/Linux distributions. It's lightweight with few dependencies, and it's extensible and hackable.

The source code is hosted on both git.wehack.space and GitHub.

A presentation in Chinese is at https://wehack.space/vimacs/liveusb-builder.odp.

Features

  • Multiboot support with syslinux and GRUB
  • Support legacy BIOS, UEFI, and various firmware payloads (e.g. GRUB, petitboot) that reads GRUB or syslinux config files
  • Support placing kernel files (kernel and initramfs) and other data files (squashfs, CD image) in separate partitions
  • Download an up-to-date CD image and verify it
  • A GNU/Linux command line tool

Install

You need these packages on your GNU/Linux system to use liveusb-builder.

  • udevil: for mounting iso files
  • wget: for downloading
  • syslinux (recommended): bootloader for legacy BIOS
  • GRUB: bootloader for legacy BIOS if there's no syslinux, and bootloader for UEFI

For Arch Linux users, just install liveusb-builder-git from AUR.

Will my boot image support liveusb-builder?

liveusb-builder needs a kernel image, an initramfs image, and a proper kernel command line to support a boot image. However, not every CD/DVD image supports booting this way. There are some other ways to boot these images, but they will break our philosophy to support various firmware and bootloaders.

If you want to use a disk image to install an operating system, I suggest using the virtual machine method as follows. Boot an AMD64 machine with enough memory and VMX feature with a Live USB with QEMU GUI (e.g. Grml 2020.06, also see my ticket for Grml) after attaching the hard disk you want to install the OS on, then run the following (assume the hard disk attached is /dev/sda):

sudo qemu-system-x86_64 -enable-kvm -m 4G -cdrom your-install-cd.iso -drive /dev/sda,format=raw -boot order=d -no-reboot

Do the system installation in the QEMU window. After QEMU exits, put the hard disk on the target machine to continue installing.

I've already used this method to successfully install Windows 7, OpenBSD 6.7, and various GNU/Linux systems.

Usage

The easier way: one FAT32 partition

First mount your USB drive partition. I recommend using udevil so that you can write files without as root.

Then run buildlive script as follows, suppose your USB is /dev/sdb and /dev/sdb1 is mount to /media/sdb1:

# install Arch, Mint (x86_64 with MATE Desktop) and Fedora 32 to USB
./buildlive --root=/media/sdb1 arch mint/mate fedora/32

The more customizable way: using a FAT32 boot partition and an ext2 data partition

Partition your disk as follows to create a 500MB FAT32 boot partition, and an ext2 partition using the remaining space, suppose your USB is /dev/sdb.

$ sudo fdisk /dev/sdb

Command (m for help): o
Created a new DOS disklabel with disk identifier 0x24c5dd70.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p):

Using default response p.
Partition number (1-4, default 1):
First sector (2048-30463999, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-30463999, default 30463999): +500M

Created a new partition 1 of type 'Linux' and of size 500 MiB.

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): b
Changed type of partition 'Linux' to 'W95 FAT32'.

Command (m for help): a
Selected partition 1
The bootable flag on partition 1 is enabled now.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p):

Using default response p.
Partition number (2-4, default 2):
First sector (1026048-30463999, default 1026048):
Last sector, +sectors or +size{K,M,G,T,P} (1026048-30463999, default 30463999):

Created a new partition 2 of type 'Linux' and of size 14 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Format the partitions:

sudo mkfs.msdos -F 32 /dev/sdb1
sudo mkfs.ext2 /dev/sdb2

Mount them and create the directory, and we need to make the directory liveusb-data writable by the current user.

udevil mount /dev/sdb1 /media/boot
udevil mount /dev/sdb2 /media/root
sudo install -d /media/root/liveusb-data
sudo chown $(whoami) /media/root/liveusb-data/

At last, make the Live USB (we install Arch and Fedora 32 in it):

$ ./buildlive --boot /media/boot --root /media/root arch fedora/32

Experimental features

I've made some experimental features that are not yet merged to the main source tree.

Status

The resulting USB stick works on QEMU with PC BIOS (SeaBIOS), UEFI (OVMF), libreboot (i440fx, GRUB txtmode) as firmware.

Related work

You can search keyword multiboot on GitHub and find some related projects. Listed below is some related work I know or find.

  • Yumi: a Windows GUI multiboot USB builder, I need a similar tool that runs on GNU/Linux, so I created this project
  • aguslr/multibootusb: provides grub.cfg files for many CD images, I used some of the kernel command line of distros in this project, but some grub.cfg files use features provided by GRUB and thus not portable for loaders like syslinux
  • Ventoy: a new multiboot USB project that supports making a live USB with most of the CD images. It has its own boot loader so doesn't rely on GRUB or syslinux config files.
  • MultiBootLiveUSB
  • Multiboot USB drive - ArchWiki
  • cbodden/multiboot
  • mbusb/multibootusb
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].