Crear un USB Bootable de Debian

Foro sobre GNU Linux
Responder
gbeltran
Mensajes: 188
Registrado: 13 May 2023, 01:15
Ubicación: Valencia - España
Contactar:

Crear un USB Bootable de Debian

Mensaje por gbeltran »

Ver esta parte:
How to Create a Debian 12 Bootable USB from Linux Command Line
Advanced Linux users can create Debian boot drives directly from terminal using the dd tool. While not as user-friendly as Rufus, dd is extremely powerful and gives you more flexibility over partition tables, file systems, etc.

Here‘s how to put a Debian ISO onto USB with just bash tools:

Step 1) Find Your USB Device Name
Insert your target USB stick into your Linux machine, then open a terminal and run lsblk to list disks:

Código: Seleccionar todo

$ lsblk -e7
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   1.8T  0 disk 
|-sda1    8:1    0   512M  0 part /boot/efi
|-sda2    8:2    0   100M  0 part 
|-sda3    8:3    0    16M  0 part 
|-sda4    8:4    0   1.8T  0 part 
sdb       8:16   1  14.9G  0 disk 
|-sdb1    8:17   1   1.9G  0 part /run/media/deckard/NIGHTLY
`-sdb2    8:18   1  13.1G  0 part 
This shows my 16GB USB stick as /dev/sdb. Yours may be /dev/sdc or similar. Make note your USB drive name as we‘ll use this in the next step.

Step 2) Write the ISO to Drive Using dd
With your USB name identified, use dd to copy the Debian ISO directly to the drive. Make absolutely sure you reference the correct drive name here:

Código: Seleccionar todo

$ sudo dd if=debian.iso of=/dev/sdb bs=4M status=progress && sync
This copies the ISO bit-for-bit onto the USB device. Using a larger bs (block size) value like 4M makes the transfer faster.

Let the command run to completion, which can take 5-15 minutes depending on the drive and image size:

Using dd in Linux to write a Debian ISO to USB Drive

Warning: The dd command is very powerful. Any mistyped drive names can overwrite your data. So double check the target of= path!

Step 3) Cleanly Unmount and Boot
After dd finishes, the USB device will still be mounted. Unmount it before removing physically:

Código: Seleccionar todo

$ sudo umount /dev/sdb*
$ sudo eject /dev/sdb
Now insert this drive into your target computer, choose it from the boot menu and install away!

Creating Persistent Storage on the USB Drive
The methods above put the Debian installer onto USB, allowing you to load the OS and run through installation.

However, there‘s a cool feature called "persistent storage" that reserves space on the USB device to persist OS updates, application data and settings between reboots.

Here are some methods for enabling persistent storage:

- When using dd, first manually partition your USB drive with a FAT32 data partition using fdisk, then pass just the bootable partition like /dev/sdb1 to dd rather than the whole drive. Debian will utilize the other partition for persistence.
- On first boot of the live Debian system, choose "Enable persistence" from the boot menu. Then set at least 4GB or so for this feature. A casper-rw file will be created to store data.
- Use the mkusb utility which has persistent partitioning options built-in.
- With persistence configured, you can install apps, download files, save preferences etc while running Debian from the USB device and have changes remain next boot.
Fuente: https://thelinuxcode.com/create-bootabl ... debian-12/
gbeltran
Mensajes: 188
Registrado: 13 May 2023, 01:15
Ubicación: Valencia - España
Contactar:

Re: Crear un USB Bootable de Debian

Mensaje por gbeltran »

Responder