Next revision | Previous revision |
gnu_linux:boot:usb_stick [2015/01/18 12:17] – created kolan | gnu_linux:boot:usb_stick [2020/04/24 17:29] (current) – [Installing SystemRescueCD] kolan |
---|
==== Installing SystemRescueCD ==== | ==== Installing SystemRescueCD ==== |
* Under MS Windows: download image [[http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick#B.29_Recommended_USB_installation_method_from_Windows|SystemRescueCD-Installer.exe]] and follow instructions given on the link. | * Under MS Windows: download image [[http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick#B.29_Recommended_USB_installation_method_from_Windows|SystemRescueCD-Installer.exe]] and follow instructions given on the link. |
* Under GNU/Linux: Mount [[http://www.sysresccd.org/Download|SystemRescueCd-x86-x.x.x.iso]] with //exec// option and run as root //usb_inst.sh// script. Use this short script replacing //iso_path// to path to the iso file: <code bash | Installing SystemRescueCD: iso_path - path to the dowloded iso image>iso_path=/path/to/systemrescuecd-x86-x.x.x.iso | * Under GNU/Linux: Mount [[http://www.system-rescue-cd.org/Download/|SystemRescueCd-x86-x.x.x.iso]] with //exec// option and run as root //usb_inst.sh// script. Use this short script replacing //iso_path// to path to the iso file: <code bash | Installing SystemRescueCD: iso_path - path to the dowloded iso image>iso_path=/path/to/systemrescuecd-x86-x.x.x.iso |
mkdir iso_dir && sudo mount -o loop,exec "$iso_path" iso_dir && sudo iso_dir/usb_inst.sh \ | mkdir iso_dir && sudo mount -o loop,exec "$iso_path" iso_dir && sudo LANG=en TERM=screen iso_dir/usb_inst.sh \ |
&& echo "SystemRescueCD successfully installed\! ;-)" || echo "Installation of SystemRescueCD failed\! ;-(" ; \ | && echo "SystemRescueCD successfully installed\! ;-)" || echo "Installation of SystemRescueCD failed\! ;-(" ; \ |
sudo umount iso_dir ; rmdir iso_dir</code> | sudo umount iso_dir ; rmdir iso_dir</code> |
| |
| <note important> |
| Last SysRecueCD versions can be written with **dd** to the usb stick. |
| </note> |
| |
==== Set correct FS type ==== | ==== Set correct FS type ==== |
Set correct file system type to make >=DOS-7.1 understand it. Under GNU/Linux type<code bash | Set correct fs type for DOS>sudo fdisk /dev/sdX # X - is the stick vfat partition, type 't', 'b', 'w', 'Enter'</code>Additionally you can set a DOS fs label<code bash | set dos fs label>sudo dosfslabel /dev/sdX1 LABEL</code> | Set correct file system type to make >=DOS-7.1 understand it. Under GNU/Linux type<code bash | Set correct fs type for DOS>sudo fdisk /dev/sdX # X - is the stick vfat partition, type 't', 'b', 'w', 'Enter'</code>Additionally you can set a DOS fs label<code bash | set dos fs label>sudo fatlabel /dev/sdX1 LABEL</code> |
==== Syslinux.cfg ==== | ==== Syslinux.cfg ==== |
Add menu items to //stick:/syslinux/syslinux.cfg// before first LABEL string match. <code | stick://syslinux/syslinux.cfg>LABEL Debian netinstall 32 bit | Add menu items to //stick:/syslinux/syslinux.cfg// before first LABEL string match. <code | stick://syslinux/syslinux.cfg>LABEL Debian netinstall 32 bit |
rootnoverify (fd0)</code> | rootnoverify (fd0)</code> |
==== Debian netinstall ==== | ==== Debian netinstall ==== |
To get available Debian netinstall need to download [[ftp://ftp.debian.org/debian/dists/testing/main/installer-i386/current/images/netboot/debian-installer/i386/linux | kernel-32bit]], [[ftp://ftp.debian.org/debian/dists/testing/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz | initrd-32bit]], [[ftp://ftp.debian.org/debian/dists/testing/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux | kernel-64bit]], [[ftp://ftp.debian.org/debian/dists/testing/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz | initrd-64bit]] and move it to the //stick:/syslinux// directory renaming to //vmlinuz-debian32//, //initrd-debian32.gz//, //vmlinuz-debian64//, //inird-debian64.gz// accordinly. Under GNU/Linux you can do all operations by typing one command <code bash | Downloading Debian files: path - path to the mounted usb stick fs, release = stable | testing | sid> | To get available Debian netinstall need to download [[http://ftp.debian.org/debian/dists/stable/main/installer-i386/current/images/netboot/debian-installer/i386/linux | kernel-32bit]], [[http://ftp.debian.org/debian/dists/stable/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz | initrd-32bit]], [[http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux | kernel-64bit]], [[http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz | initrd-64bit]] and move it to the //stick:/syslinux// directory renaming to //vmlinuz-debian32//, //initrd-debian32.gz//, //vmlinuz-debian64//, //inird-debian64.gz// accordinly. Under GNU/Linux you can do all operations by typing one command <code bash | Downloading Debian files: path - path to the mounted usb stick fs, release = stable | testing | sid> |
path=/mnt/flash ; release=stable | path=/mnt/flash ; release=stable |
ftp_url="ftp://ftp.debian.org/debian/dists/$release/main/installer"; \ | ftp_url="http://ftp.debian.org/debian/dists/$release/main/installer"; \ |
ftp_path="current/images/netboot/debian-installer" \ | ftp_path="current/images/netboot/debian-installer" \ |
&& p="$ftp_url-i386/$ftp_path/i386" \ | && p="$ftp_url-i386/$ftp_path/i386" \ |
title Ubuntu LiveCD/Installer | title Ubuntu LiveCD/Installer |
find --set-root /casper/initrd.lz | find --set-root /casper/initrd.lz |
kernel /casper/vmlinuz.efi boot=casper live-media-path=/casper/ ignore_uuid | kernel /casper/vmlinuz boot=casper live-media-path=/casper/ ignore_uuid |
initrd /casper/initrd.lz | initrd /casper/initrd.lz |
</code> | </code> |
full_path="$path/install/gentoo"; \ | full_path="$path/install/gentoo"; \ |
url_path="http://mirrors.kernel.org/gentoo/releases"; mkdir -p "$full_path" \ | url_path="http://mirrors.kernel.org/gentoo/releases"; mkdir -p "$full_path" \ |
&& fname=`wget $url_path/x86/autobuilds/latest-stage3-i486.txt -O - 2>/dev/null | tail -n1` \ | && fname=`wget $url_path/x86/autobuilds/latest-stage3-i486.txt -O - 2>/dev/null | tail -n1 | cut -d' ' -f1` \ |
&& wget "$url_path/x86/autobuilds/$fname" -O "$full_path/${fname##*/}" \ | && wget "$url_path/x86/autobuilds/$fname" -O "$full_path/${fname##*/}" \ |
&& fname=`wget $url_path/amd64/autobuilds/latest-stage3-amd64-nomultilib.txt -O - 2>/dev/null | tail -n1` \ | && fname=`wget $url_path/amd64/autobuilds/latest-stage3-amd64-nomultilib.txt -O - 2>/dev/null | tail -n1 | cut -d' ' -f1` \ |
&& wget "$url_path/amd64/autobuilds/$fname" -O "$full_path/${fname##*/}" \ | && wget "$url_path/amd64/autobuilds/$fname" -O "$full_path/${fname##*/}" \ |
&& fname=`wget $url_path/amd64/autobuilds/latest-stage3-amd64-hardened+nomultilib.txt -O - 2>/dev/null | tail -n1` \ | && fname=`wget $url_path/amd64/autobuilds/latest-stage3-amd64-hardened+nomultilib.txt -O - 2>/dev/null | tail -n1 | cut -d' ' -f1` \ |
&& wget "$url_path/amd64/autobuilds/$fname" -O "$full_path/${fname##*/}" \ | && wget "$url_path/amd64/autobuilds/$fname" -O "$full_path/${fname##*/}" \ |
&& wget "$url_path/snapshots/current/portage-latest.tar.bz2" -O "$full_path/portage-latest.tar.bz2" \ | && wget "$url_path/snapshots/current/portage-latest.tar.bz2" -O "$full_path/portage-latest.tar.bz2" \ |