Skip to content

Instantly share code, notes, and snippets.

@Gee2k
Last active June 30, 2023 23:06
Show Gist options
  • Save Gee2k/dad2c6cd5503d13652c4d248f741de9f to your computer and use it in GitHub Desktop.
Save Gee2k/dad2c6cd5503d13652c4d248f741de9f to your computer and use it in GitHub Desktop.
create portable bootable linux stick

How to create a laptop usable portable linux without overwriting your windows bootloader

tested with garuda linux needs 2 usb sticks

  • download bootable image
  • use rufus / etcher to create a bootable linux on spare usb stick
  • boot that linux
  • use partition manager to partition the second usb stick
    • Boot as fat32, 300mb
    • Root as ext4, 50%
    • linuxswap, ram size + 1gb
    • Home as ext4, 50% / Rest
  • start install, chose manual partitioning and chose the partitions as follows
    • fat32, 300mb -> set mountpoint: "/boot/efi" and set the boot flag
    • ext4, ROOT -> set mountpoint: "/"
    • linuxswap, ram size + 1gb eg 16gb + 1gb
    • ext4, HOME -> set mountpoint "/home"

ArchLinux

parted

parted /dev/sdx path to usb stick example on 128gb stick

(parted) mkpart "EFI system partition" fat32 1MiB 301MiB
(parted) set 1 esp on
(parted) mkpart "root partition" ext4 301MiB 30301MiB
(parted) mkpart "swap partition" linux-swap 30301MiB 46301MiB
(parted) mkpart "home partition" ext4 46301MiB 100%

(parted) print

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment