Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
wiki:boot_flash [2012/05/08 09:18] – [Steps] kolan | wiki:boot_flash [2014/01/06 19:40] – [DOS 7.1] kolan |
---|
===== Boot USB stick ===== | ===== Boot USB stick ===== |
| |
Here a short instruction how to create a multiboot usb flash disk containing [[http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project|Syslinux]] ([[http://greenflash.su/Syslinux/Syslinux.htm|rus]]), [[http://diddy.boot-land.net/grub4dos/Grub4dos.htm|Grub4dos]] ([[http://greenflash.su/Grub4Dos/Grub4dos.htm|rus]]), [[http://www.debian.org|Debian x86/64]], [[http://www.fedoraproject.org|Fedora x86/64]], [[http://www.gentoo.org|Gentoo x86/64]], [[http://clonezilla.org|Clonezilla]], [[http://old-dos.ru/files/file_672.html|4DOS]], [[http://www.microsoft.com/windows/default.aspx?icid=winvan|MS Windows]] (experimental), [[http://www.sysresccd.org/Main_Page|SystemRescueCd]] ([[http://www.memtest.org/|Memtest86]], [[http://pogostick.net/~pnh/ntpasswd|NTpassword]], [[http://www.freedos.org|FreeDOS]], [[http://gag.sourceforge.net|GAG]], [[http://www.ranish.com/part|Ranish]], [[http://hdt-project.org|HDT]], [[http://www.dban.org|DBAN]], [[http://www.ihdd.ru/mhdd|MHDD]], [[http://netboot.sourceforge.net|Netboot]], [[http://www.gnu.org/software/grub|Grub2]], [[http://www.xfce.org|Xfce]], [[http://gparted.sourceforge.net|GParted]]). | Here a short instruction how to create a multiboot usb flash disk containing [[http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project|Syslinux]] ([[http://greenflash.su/Syslinux/Syslinux.htm|rus]]), [[http://diddy.boot-land.net/grub4dos/Grub4dos.htm|Grub4dos]] ([[http://greenflash.su/Grub4Dos/Grub4dos.htm|rus]]), [[http://www.debian.org|Debian x86/64]], [[http://www.fedoraproject.org|Fedora x86/64]], [[http://www.ubuntu.com|Ubuntu x86/64]], [[http://www.gentoo.org|Gentoo x86/64]], [[http://clonezilla.org|Clonezilla]], [[http://old-dos.ru/files/file_672.html|4DOS]], [[http://www.microsoft.com/windows/default.aspx?icid=winvan|MS Windows]] (experimental), [[http://www.sysresccd.org/Main_Page|SystemRescueCd]] ([[http://www.memtest.org/|Memtest86]], [[http://pogostick.net/~pnh/ntpasswd|NTpassword]], [[http://www.freedos.org|FreeDOS]], [[http://gag.sourceforge.net|GAG]], [[http://www.ranish.com/part|Ranish]], [[http://hdt-project.org|HDT]], [[http://www.dban.org|DBAN]], [[http://www.ihdd.ru/mhdd|MHDD]], [[http://netboot.sourceforge.net|Netboot]], [[http://www.gnu.org/software/grub|Grub2]], [[http://www.xfce.org|Xfce]], [[http://gparted.sourceforge.net|GParted]]). |
| |
===== Steps ===== | ===== Steps ===== |
&& 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> |
- 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 FS type ==== |
- Add menu items to //stick:/syslinux/syslinux.cfg// before first LABEL string match. <code | stick://syslinux/syslinux.cfg>LABEL Debian netinstall 32 bit | 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> |
| ==== 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 |
MENU LABEL Debian netinstall 32 bit | MENU LABEL Debian netinstall 32 bit |
KERNEL vmlinuz-debian32 | KERNEL vmlinuz-debian32 |
kernel memdisk | kernel memdisk |
append initrd=/bootdisk/dos622.img floppy</code> | append initrd=/bootdisk/dos622.img floppy</code> |
- Extract from [[http://sourceforge.net/projects/grub4dos | Grub4dos]] //grub.exe// file to the stick into /syslinux/ relative path. And create //stick:/menu.lst// config file for Grub4dos <code ini | stick:/menu.lst>color black/cyan yellow/cyan | |
| |
| You can download and version of [[http://old-dos.ru/files/file_64.html|Dos 6.22]] and save as stick:/bootdisk/dos622.img |
| |
| ==== Grub4dos ==== |
| Extract from [[http://sourceforge.net/projects/grub4dos | Grub4dos]] //grub.exe// file to the stick into /syslinux/ relative path. And create //stick:/menu.lst// config file for Grub4dos <code ini | stick:/menu.lst>color black/cyan yellow/cyan |
timeout 30 | timeout 30 |
default /default | default /default |
chainloader (fd0)+1 | chainloader (fd0)+1 |
rootnoverify (fd0)</code> | rootnoverify (fd0)</code> |
- 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> | ==== Debian netinstall ==== |
path=/mnt/flash ; release=testing | 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> |
| path=/mnt/flash ; release=stable |
ftp_url="ftp://ftp.debian.org/debian/dists/$release/main/installer"; \ | ftp_url="ftp://ftp.debian.org/debian/dists/$release/main/installer"; \ |
ftp_path="current/images/netboot/debian-installer" \ | ftp_path="current/images/netboot/debian-installer" \ |
&& echo "Debian boot image files download successfully\! ;-)" \ | && echo "Debian boot image files download successfully\! ;-)" \ |
|| echo "Downloading Debian boot image files failed\! ;-("</code> | || echo "Downloading Debian boot image files failed\! ;-("</code> |
- To get available Fedora netinstall download [[http://dl.fedoraproject.org/pub/alt/bfo/bfo.lkrn | bfo.lkrn]] and save it as stick:/syslinux/vmlinuz-fedora. Example:<code bash | Download Fedora netinstall kernel image: path - path to the mounted stick>path=/mnt/flash | |
| ==== Fedora netinstall ==== |
| To get available Fedora netinstall download [[http://dl.fedoraproject.org/pub/alt/bfo/bfo.lkrn | bfo.lkrn]] and save it as stick:/syslinux/vmlinuz-fedora. Example:<code bash | Download Fedora netinstall kernel image: path - path to the mounted stick>path=/mnt/flash |
wget http://dl.fedoraproject.org/pub/alt/bfo/bfo.lkrn -O $path/syslinux/vmlinuz-fedora</code> | wget http://dl.fedoraproject.org/pub/alt/bfo/bfo.lkrn -O $path/syslinux/vmlinuz-fedora</code> |
- To get available Gentoo installers need to download [[http://mirrors.kernel.org/gentoo/snapshots/portage-latest.tar.bz2 | portage-latest.tar.bz2]], [[http://mirrors.kernel.org/gentoo/releases/x86/autobuilds/current-stage3 | stage3-i686-xxx.tar.bz2]] and [[http://mirrors.kernel.org/gentoo/releases/amd64/autobuilds/current-stage3 | stage3-amd64-xxx.tar.bz2]] to the //stick:/install/gentoo// directory. Under GNU/Linux all operations can be made in one step <code bash | Downloading Gentoo portage and stages: path - path to the stick> | |
| ==== Ubuntu installer ==== |
| Download [[http://www.ubuntu.com/download|Ubuntu]] iso-file. Copy /casper directory to the root of flash to get structure like this. |
| <code | stick:/>stick |
| ├── casper |
| │ ├── filesystem.manifest |
| │ ├── filesystem.manifest-remove |
| │ ├── filesystem.size |
| │ ├── filesystem.squashfs |
| │ ├── initrd.lz |
| │ └── vmlinuz.efi |
| </code> |
| Add menu items to Grub4dos menu.lst |
| <code config | stick://menu.lst> |
| title Ubuntu LiveCD/Installer |
| find --set-root /casper/initrd.lz |
| kernel /casper/vmlinuz.efi boot=casper live-media-path=/casper/ ignore_uuid |
| initrd /casper/initrd.lz |
| </code> |
| On new Ubuntu CD /casper directory may have another name so you must change it in the config. Also you probably want to change the title. |
| ==== Gentoo stage3 ==== |
| To get available Gentoo installers need to download [[http://mirrors.kernel.org/gentoo/snapshots/portage-latest.tar.bz2 | portage-latest.tar.bz2]], [[http://mirrors.kernel.org/gentoo/releases/x86/autobuilds/current-stage3 | stage3-i686-xxx.tar.bz2]] and [[http://mirrors.kernel.org/gentoo/releases/amd64/autobuilds/current-stage3 | stage3-amd64-xxx.tar.bz2]] to the //stick:/install/gentoo// directory. Under GNU/Linux all operations can be made in one step <code bash | Downloading Gentoo portage and stages: path - path to the stick> |
path=/mnt/flash | path=/mnt/flash |
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-i686.txt -O - 2>/dev/null | tail -n1 | cut -d/ -f2` \ | && fname=`wget $url_path/x86/autobuilds/latest-stage3-i486.txt -O - 2>/dev/null | tail -n1` \ |
&& wget "$url_path/x86/autobuilds/current-stage3-i686/$fname" -O "$full_path/$fname" \ | && wget "$url_path/x86/autobuilds/$fname" -O "$full_path/${fname##*/}" \ |
&& fname=`wget $url_path/amd64/autobuilds/latest-stage3.txt -O - 2>/dev/null | tail -n1 | cut -d/ -f2` \ | && fname=`wget $url_path/amd64/autobuilds/latest-stage3-amd64-nomultilib.txt -O - 2>/dev/null | tail -n1` \ |
&& wget "$url_path/amd64/autobuilds/current-stage3/$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` \ |
| && 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" \ |
&& echo "Downloading portage and stag3 success \! ;-)" \ | && echo "Downloading portage and stag3 success \! ;-)" \ |
|| echo "Downloading portage and stag3 failed \! ;-("</code> | || echo "Downloading portage and stag3 failed \! ;-("</code> |
- To have DOS 7.1 on the stick download diskette image from [[http://narod.ru/disk/27030580000/4DOS.IMA.html | narod.ru]] or [[http://www.backbone.ws/share/dist/os/dos | this site]] and move to the //stick:/bootdisk// directory. In Bash you cat type <code bash | Downloading DOS 7.1 image: path - path to mounted stick>path=/mnt/flash | |
wget http://www.backbone.ws/share/dist/os/dos/4dos.ima -O "$path/bootdisk/4dos.ima" \ | ==== DOS 7.1 ==== |
| To have DOS 7.1 on the stick download diskette image from [[http://narod.ru/disk/27030580000/4DOS.IMA.html | narod.ru]] or [[http://www.backbone.ws/share/dist/dos/os | this site]] and move to the //stick:/bootdisk// directory. In Bash you cat type <code bash | Downloading DOS 7.1 image: path - path to mounted stick>path=/mnt/flash |
| wget http://www.backbone.ws/share/dist/dos/os/4dos.ima -O "$path/bootdisk/4dos.ima" \ |
&& echo "DOS 7.1 download succes\! ;-)" || echo "DOS 7.1 download failed\! ;-("</code> | && echo "DOS 7.1 download succes\! ;-)" || echo "DOS 7.1 download failed\! ;-("</code> |
- Important! Setup MS Windows in this way with a 100% possibility it erases SYSLINUX boot loader because Windows Installer wrotes it's own boot loader from time to time. However if installation of Windows success you can got to Grub4dos using NTLDR and select DOS 7.1, then type<code>c: ; syslinux.com c:</code> //syslinux.com// must be extracted from //stick:/bootprog/syslinux-x.xx.zip/dos//. Also to install Windows XP you need to copy //ntdetect.com// from //i386// installation directory and //grldr// from [[http://sourceforge.net/projects/grub4dos | Grub4dos]] to the root of the stick. Menu config must be on the stick<code ini | stick:/boot.ini>[boot loader] | |
| ==== MS Windows ==== |
| <note warning> |
| Setup MS Windows in this way with a 100% possibility it erases SYSLINUX boot loader because Windows Installer wrotes it's own boot loader from time to time. |
| </note> |
| |
| However if installation of Windows success you can got to Grub4dos using NTLDR and select DOS 7.1, then type<code>c: ; syslinux.com c:</code> //syslinux.com// must be extracted from //stick:/bootprog/syslinux-x.xx.zip/dos//. Also to install Windows XP you need to copy //ntdetect.com// from //i386// installation directory and //grldr// from [[http://sourceforge.net/projects/grub4dos | Grub4dos]] to the root of the stick. Menu config must be on the stick<code ini | stick:/boot.ini>[boot loader] |
timeout=30 | timeout=30 |
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS | default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS |
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect | multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect |
C:\grldr="Grub4Dos"</code> | C:\grldr="Grub4Dos"</code> |
- Installing Clonezilla. Download latest [[http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable | stable]] or [[http://sourceforge.net/projects/clonezilla/files/clonezilla_live_testing | testing]] version of Clonezilla. Unpack three files from the iso by mounting it or by using File-Roller etc. You should get such directory tree.<code | stick:/>stick | |
| ==== Clonezilla ==== |
| Installing Clonezilla. Download latest [[http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable | stable]] or [[http://sourceforge.net/projects/clonezilla/files/clonezilla_live_testing | testing]] version of Clonezilla. Unpack three files from the iso by mounting it or by using File-Roller etc. You should get such directory tree.<code | stick:/>stick |
├── live | ├── live |
│ ├── filesystem.squashfs | │ ├── filesystem.squashfs |
│ ├── initrd.img | │ ├── initrd.img |
│ └── vmlinuz</code> Copy from //clonezilla-live-xxx.iso/syslinux/syslinux.cfg// file strings from first "MENU TITLE" to last "MENU END" including them and insert before first "LABEL ..." string into //stick:/syslinux/syslinux.cfg// | │ └── vmlinuz</code> Copy from //clonezilla-live-xxx.iso/syslinux/syslinux.cfg// file strings from first "MENU TITLE" to last "MENU END" including them and insert before first "LABEL ..." string into //stick:/syslinux/syslinux.cfg// |
- More Grub4dos menu list examples.<code | stick:/menu.lst>title find and load NTLDR of Windows | |
| ==== More Grub4dos options ==== |
| More Grub4dos menu list examples.<code | stick:/menu.lst>title find and load NTLDR of Windows |
NT/2K/XP | NT/2K/XP |
fallback 1 | fallback 1 |