From 1a91f8a9f67d6c01d6c3964b1528dfbc93e019de Mon Sep 17 00:00:00 2001 From: Holger Wansing Date: Wed, 27 Oct 2021 21:09:02 +0200 Subject: Overhaul of chapter 'Preparing Files for USB Memory Stick Booting' --- en/install-methods/usb-setup/x86.xml | 104 +++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 40 deletions(-) (limited to 'en/install-methods/usb-setup/x86.xml') diff --git a/en/install-methods/usb-setup/x86.xml b/en/install-methods/usb-setup/x86.xml index 569d06a76..a1448d311 100644 --- a/en/install-methods/usb-setup/x86.xml +++ b/en/install-methods/usb-setup/x86.xml @@ -2,31 +2,45 @@ - Partitioning the USB stick + Partitioning and adding a boot loader We will show how to set up the memory stick to use the first partition, instead of the entire device. + + +In order to start the kernel after booting from the USB stick, we will +put a boot loader on the stick. Although any boot loader +should work, it's convenient to use +syslinux, since it uses a FAT16 partition and can +be reconfigured by just editing a text file. Any operating system +which supports the FAT file system can be used to make changes to the +configuration of the boot loader. + + + +First, you need to install the syslinux and +mtools packages on your system. + Since most USB sticks come pre-configured with a single FAT16 partition, you probably won't have to repartition or reformat the stick. If you have to do that anyway, use cfdisk -or any other partitioning tool to create a FAT16 partition +or any other partitioning tool to create a FAT16 partition now -Don't forget to set the bootable bootable flag. +Don't forget to activate the bootable flag. -, install an MBR using: +, and then install an MBR using: -# install-mbr /dev/sdX +# cat /usr/lib/syslinux/mbr/mbr.bin >/dev/sdX -The install-mbr command is contained in the -mbr &debian; package. Then create the filesystem using: +Now create the filesystem using: # mkdosfs /dev/sdX1 @@ -38,19 +52,8 @@ Take care that you use the correct device name for your USB stick. The -In order to start the kernel after booting from the USB stick, we will -put a boot loader on the stick. Although any boot loader -should work, it's convenient to use -syslinux, since it uses a FAT16 partition and can -be reconfigured by just editing a text file. Any operating system -which supports the FAT file system can be used to make changes to the -configuration of the boot loader. - - - -To put syslinux on the FAT16 partition on your USB -stick, install the syslinux and -mtools packages on your system, and do: +Having a correctly partitioned USB stick (now), you need to put +syslinux on the FAT16 partition with: # syslinux /dev/sdX1 @@ -65,12 +68,20 @@ procedure writes a boot sector to the partition and creates the file - Adding the installer image + Adding the installer files -Mount the partition -(mount /dev/sdX1 /mnt) -and copy the following installer image files to the stick: +There are two different installation variants to choose here: +The hd-media variant needs an installation ISO file on the stick, +to load installer modules and the base system from. +The netboot installer however will load all that from a &debian; mirror. + + + +According to your choice, you have to download some installer files from +the hd-media or netboot subdirectory of +debian/dists/&releasename;/main/installer-&architecture;/current/images/ +on any &debian; mirror: @@ -85,24 +96,34 @@ and copy the following installer image files to the stick: -You can choose between either the text-based or the graphical version -of the installer. The latter can be found in the gtk -subdirectory. If you want to rename the files, please note that -syslinux can only process DOS (8.3) file names. +You can choose between either the text-based version of the installer (the +files can be found directly in hd-media or netboot) or the graphical +version (look in the respective gtk subdirectories). + + + +Then mount the partition +(mount /dev/sdX1 /mnt) +and copy the downloaded files to the root directory of the stick. -Next you should create a syslinux.cfg configuration -file, which at a bare minimum should contain the following line (change -the name of the kernel binary to linux -if you used a netboot image): +Next you should create a text file named syslinux.cfg +in the root directory of the stick as configuration file for syslinux, which at +a bare minimum should contain the following line: default vmlinuz initrd=initrd.gz -For the graphical installer you should add vga=788 to the -line. Other parameters can be appended as desired. +Change the name of the kernel binary to linux +if you used files from netboot. + + + +For the graphical installer (from gtk) you should add +vga=788 at the end of the line. Other parameters can be +appended as desired. @@ -111,17 +132,20 @@ To enable the boot prompt to permit further parameter appending, add a -If you used an hd-media image, you should now copy the ISO file of a -&debian; ISO image +If you used files from hd-media, you should now copy the +ISO file of a &debian; installation image onto the stick. (For the +netboot variant this is not needed.) + + - You can use either a netinst or a full CD/DVD image (see -). Be sure to select one that fits. +). Be sure to select one that fits on your stick. Note that the netboot mini.iso image is not usable for this purpose. - - onto the stick. When you are done, unmount the USB memory stick + + +When you are done, unmount the USB memory stick (umount /mnt). -- cgit v1.2.3