📜 ⬆️ ⬇️

Installing Linux from a flash drive (specifically - Debian netinst)

I recently needed to install Debian on an old computer found in bins (AMD 650Mhz, 256Mb, 4.3G). The computer was designed to work as a satellite Internet router, which I will write about setting up in another article.

There was no optical drive on the computer, and it was too lazy to pull one out.

It was decided to install from a flash drive. I used two methods:
')


Method one - UNetbootin (universal)

About him already wrote on Habré .

In short, the program can download popular distributions itself, you can feed an ISO to it, or you can feed the kernel directly with the parameters to be called. After that, she will download and unpack the ishku (if necessary), put it on the flash drive, and add the bootloader to the flash drive. Very convenient and intuitive.

To boot from a flash drive, Unetbootin uses the syslinux bootloader, which is good, except that it does not understand FAT32. Look for how to format a 4GB flash drive in FAT under Windows, I was too lazy and I switched to method number 2.

Method two - boot.img.gz (tested only Debian)

For the second method, I used a virtual machine with the same Debian (yes, I could format the USB flash drive there, but the thought went the other way :)).

We take from disk or download boot.img.gz for our distribution, after which we do this:

zcat boot.img.gz > /dev/sda

Instead of / dev / sda your USB flash drive.

Now, when booting from a flash drive, a script will start that will search for all ISO on all disks available to it and will offer to choose from which one it loads! In my case, there was only one image and everything went automagic :) Maybe if the ISO has a different distribution (not Debian), everything will go just as well. (see update)

Problem: a little more than 160Mb will be available on the flash drive (it’s possible that the whole place would be available, see update), so it’s impossible to put anything except the netinst version of the distribution kit on it, but since I always use it, it completely suits me.

As a solution to the problem, you can suggest inserting a second flash drive already with full-fledged ISO.

The end.

UPDATE:

DZhon - “It is necessary to ensure that the debian versions in boot.img.gz and the iso image match (if one of the files is compiled, for example, for etch, and the second is for sid, then the installer will say that they do not correspond to the kernel version and modules to it and refuse to install anything). ”© xgu.ru/wiki/Download_USB-disc_Linux

nshopik - www.debian.org/releases/stable/i386/ch04s04.html.en
just type debian usb in google and this link is in the first place, tells your alternative and alternative option in which all the flash drive space is available

Source: https://habr.com/ru/post/48641/


All Articles