Shared/enter_device=/dev/disk/by-label/ARCHIVE (if labelling is used) tells it what the selected device is. Shared/ask_device=manual informs the installer that the device where the image is will be manually selected. If you anticipate having to rely on non-free firmware for the installation, you could consider following the advice given later on this page or using an unofficial image containing non-free firmware.Īs part of an automated process you can avoid all disks being searched by constructing a grub.cfg that designates where the image to be used for the installation is. Suitable images are the first image of a CD or DVD set (labelled as debian-something-1) or a netinst image. The initrd contains the iso-scan program this will search all disks for an installation image.
INSTALLING GRUB ON USB DOWNLOAD
A vmlinuz and intitrd.gz from the daily download page could help with a problem encountered after booting the installation image. Ensure the image, vmlinuz and initrd.gz are the most up-to-date possible. It is important that the kernel used to boot and the kernel in the installation image match. The first two items are obtainable for the Debian 11 i386 architecture from a Debian mirror and copied to /boot: The method chosen here to boot a USB stick requires a kernel, an initrd and a grub.cfg. usr/sbin/grub-install -boot-directory=/boot /dev/sdb GRUB in the Master Boot Record (MBR) of the USB stick (assuming /dev/sdb as the device name) is achieved with:
![installing grub on usb installing grub on usb](https://i.stack.imgur.com/BgGOK.png)
Udisksctl unmount -b /dev/disk/by-label/ARCHIVE Udevil unmount /dev/disk/by-label/ARCHIVE Udisksctl mount -b /dev/disk/by-label/ARCHIVE Udisksctl loop-setup -f /dev/disk/by-label/ARCHIVE
INSTALLING GRUB ON USB ARCHIVE
Pmount /dev/disk/by-label/ARCHIVE ARCHIVE The other two programs will indicate where the mount point is located. The mount point for pmount is /media/ARCHIVE. Without a desktop environment but with pmount, udevil or udisks2 on the system, one of the following commands may be run as a user to mount the primary partition. A label will possibly be used for the mount point.Ĭheck the mount point from within the file manager or with This is because udisks2 will be on the system. If you are working within one of the desktop environments it is very likely the mounting can be done as a user from the file manager that comes with it.
INSTALLING GRUB ON USB INSTALL
Install the dosfstools package, put a vfat filesystem on the partition you have created and label the partition.įAT and vfat are chosen because modules for them are available from the very beginning of the start the installer.īeing able to mount and unmount the USB stick is a prerequisite to installing GRUB to its MBR. Partition the stick with fdisk or cfdisk to have a single FAT16 primary partition: GRUB will refuse to install in the MBR of a device if it detects that it has once held an isohybrid image. It is best to play safe and obliterate any record of previous partitioning and of the stick having possibly held an isohybrid ISO.
![installing grub on usb installing grub on usb](https://i.redd.it/y6dxsffszvx51.jpg)
This is the device name of the USB stick. Now plug the stick in and note the extra entry under NAME when the command is executed again. Without the stick plugged into a USB port execute lsblk (as a user). This can be done with or without becoming root. There is no requirement to use su or sudo for a device to be partitioned, formatted and have GRUB installed to its MBR on Debian 7.Īn exception to the need to have root privileges is when it comes to mounting a partition on a USB stick.
![installing grub on usb installing grub on usb](https://miro.medium.com/max/1400/1*D43UBhXalf-N7-5zJ_Ru6g.jpeg)
On Debian 7 an ordinary user does have the permissions to write to a raw device and the dd, fdisk, cfdisk, mkfs.vfat and grub-install commands will be successful. The only way to have these commands complete successfully is for a user to gain root privileges with su or sudo or log in as root. Using the dd, fdisk, cfdisk, mkfs.vfat and grub-install commands will not work for such a user. It is tailored to install a minimal text mode OS that has an ethernet connection to the internet.įor Debian 8 and later an ordinary user does not have the permissions to write to a raw device. There is a sample preseed.cfg file available to consult. The same techniques should be applicable to pre-Debian 11 (buster and earlier) and the amd64 architecture of all distributions. Having the USB stick also hold a Debian archive to allow package installation from it after the OS has been installed.Īutomation is done via preseeding and the focus here will be on the i386 Debian 11 (bullseye) architecture to illustrate the process.Producing an automated installation of a Debian operating system from a USB stick.The techniques described on this page have the objectives of Telling the OS About the Package Archive.Choose from Multiple Installation Images.