linux:mintstick
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:mintstick [2020/08/09 11:29] – Wuff | linux:mintstick [2024/12/27 23:36] (current) – [Partition USB Device] Wuff | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Editable Mintstick ====== | ====== Editable Mintstick ====== | ||
| - | NOTE: USE FAT32!!! | + | Following are instructions to partition, format and prepare a USB stick to be able to boot and contain adjustments like additional drivers/ |
| + | ===== Partition USB Device ===== | ||
| + | |||
| + | Gparted GUI method: | ||
| < | < | ||
| * delete partitions | * delete partitions | ||
| Line 9: | Line 12: | ||
| * add boot flag | * add boot flag | ||
| + | Parted command line method: | ||
| < | < | ||
| - | #set boot flag via command line: | + | umount |
| - | sudo parted | + | |
| + | parted /dev/sdb print | ||
| + | |||
| + | #delete existing partitions | ||
| + | parted /dev/sdb rm 1 | ||
| + | parted /dev/sdb rm 2 | ||
| + | parted /dev/sdb rm 3 | ||
| + | |||
| + | #create new partition | ||
| + | parted /dev/sdb mklabel msdos | ||
| + | parted /dev/sdb mkpart primary fat32 0% 100% | ||
| + | parted /dev/sdb align-check opt 1 | ||
| + | |||
| + | parted /dev/sdb set 1 boot on | ||
| + | parted /dev/sdb set 1 lba on | ||
| + | |||
| + | #Format as fat32 | ||
| + | mkfs.vfat -F 32 -n ' | ||
| + | </ | ||
| + | |||
| + | alt: | ||
| + | < | ||
| + | apt-get install parted | ||
| + | parted --script /dev/sdX mklabel gpt | ||
| + | parted --script --align=optimal /dev/sdX mkpart ESP fat32 1MiB 100% | ||
| + | parted --script /dev/sdX set 1 boot on | ||
| + | mkfs.vfat -n MINTSTICK /dev/sdX1 | ||
| + | mount -t vfat /dev/sdX1 /mnt | ||
| + | cd /mnt | ||
| + | uniso < / | ||
| + | cd ~ | ||
| + | umount /mnt | ||
| + | </ | ||
| + | |||
| + | ===== Bootloader (MBR) ===== | ||
| + | |||
| + | Both syslinux and grub are disk-based boot loaders, and perform similar functions. They are the first software loaded from disk to run. syslinux has pretty much taken a more minimalist approach, whereas GRUB was much more extensive. GRUB also supports different filesystems through the use of a secondary loader. | ||
| + | |||
| + | Ubuntu and its derivatives use both grub and syslinux. GRUB is shown when the ISO image is booted on EFI-capable machine. SYSLINUX is shown when the ISO image is booted on BIOS-only machine. | ||
| + | |||
| + | Plymouth handles the progress dot animation, regardless of GRUB or SYSLINUX is shown. | ||
| + | |||
| + | ==== Syslinux ==== | ||
| + | |||
| + | Syslinux is FAT filesystem based. | ||
| + | |||
| + | initialise using: | ||
| + | < | ||
| + | syslinux --install /dev/sdX1 | ||
| + | </ | ||
| + | This will alter the boot sector on the disk and copy a file named ldlinux.sys into its root directory. | ||
| + | On boot time, by default, the kernel will be loaded from the image named LINUX in the root of the boot media. | ||
| + | |||
| + | #Manual MBR installation and re-enabling partition boot flag | ||
| + | < | ||
| + | dd conv=notrunc bs=440 count=1 if=/ | ||
| + | parted /dev/sdX set 1 boot on | ||
| + | </ | ||
| + | This will write the Syslinux mbr code (mbr.bin) into the master boot record of the drive, | ||
| + | and mark first partition as active (bootable). | ||
| + | |||
| + | Copy a Linux kernel image (like vmlinuz) to the root (/dev/sdX1) of your media. | ||
| + | |||
| + | Lastly, create a ' | ||
| + | enter any configuration options you need/want. | ||
| + | |||
| + | Additional information: | ||
| + | |||
| + | ==== Grub ==== | ||
| + | < | ||
| sudo mkdir -p /mnt/usb | sudo mkdir -p /mnt/usb | ||
| sudo mount /dev/sdX1 /mnt/usb | sudo mount /dev/sdX1 /mnt/usb | ||
| sudo grub-install --target=i386-pc --boot-directory="/ | sudo grub-install --target=i386-pc --boot-directory="/ | ||
| + | </ | ||
| + | |||
| + | EFI installation. Does not install in MBR: | ||
| + | < | ||
| + | sudo mkdir -p /mnt/usb | ||
| + | sudo mount /dev/sdX1 /mnt/usb | ||
| + | grub-install --target=x86_64-efi --efi-directory=/ | ||
| + | </ | ||
| + | |||
| + | ===== Copy data ===== | ||
| + | |||
| + | < | ||
| + | sudo mkdir -p /mnt/usb | ||
| + | sudo mount /dev/sdX1 /mnt/usb | ||
| sudo mkdir -p /mnt/iso | sudo mkdir -p /mnt/iso | ||
| Line 23: | Line 109: | ||
| </ | </ | ||
| - | < | ||
| - | ubnkern | ||
| - | </ | ||
linux/mintstick.1596968976.txt.gz · Last modified: (external edit)