From Mageia wiki
Jump to: navigation, search


Drakconf multiflag.png
Other languages
Deutsch ; English ; Français ; Nederlands ; Português (Portugal) ; português brasileiro ;

To dump a Mageia installation, Network boot installer, or Live ISO on a USB stick, there are several tools available on all common operating systems.

For writing to optical media, see Writing_CD_and_DVD_images.

Important

You can not copy the file using a file manager - you need a tool to write the file content directly to the root of the device (and not a partition).

Likewise, UNetbootin cannot successfully be used.

To later restore the flash drive to full empty capacity, many popular tools fails - but good methods exist, see Removing the ISO files from USB Media below.

Most of our installer and Live images are more than 4 GB, so you need at least an 8 GB USB drive. For live images, you want a fast drive, and especially if you are going to use persistence, you should use a drive with good random write performance - more about that here.

Warning!
"Dumping" an image onto a device DESTROYS access to any previous files!

Using Linux

  • Mageia: use IsoDumper. It also supports creating persistence - so the stick remembers your work, settings, system updates, added applications...
  • Ubuntu: use the application Disks with the action "Restore an image" and select the .iso file.
  • Mint: use Minstick, which is similar to IsoDumper.
  • any Linux, command line: use dd.

Using Microsoft Windows

You can choose one of the following tools:

  • Rufus. For older Rufus versions (v2.x and below) you must use the "DD Image" option - this is also mentioned in the rufus FAQ. Current Rufus versions should automatically detect this.
  • Win32 Disk Imager, for recent versions of Windows. You will need to change to "all files" when you attempt to open the .iso since it only allows .img by default.
  • WinImage works fine on systems with restrictions, such as Microsoft Windows 7 Starter. See a dedicated page on the present wiki, on how to use it: Dump Mageia ISO on a USB flash drive - WinImage.
  • Balena Etcher both 32 and 64 bit. It seems it needs the following option enabled in extended settings to behave like dd for all images: "Clone drive onto target (DD mode)"

Using MacOS

  • The builtin diskutil command can write ISOs like with dd, as mentioned here.
  • Balena Etcher Both x86_64 and ARM64. It seems it needs the following option enabled in extended settings to behave like dd for all images: "Clone drive onto target (DD mode)"

Ventoy

Use Ventoy to have one or several ISO on one device, with menu to choose.

Ventoy can be installed on the memory device using Linux, MS Windows, or any system that can write its ISO file to the device.

Note: when running any Mageia installer from Ventoy, you must choose custom partitioning and manually select the correct target drive for partitions, and at the end select the correct location for the boot loader.

Using the dd command

Open a console and go to the directory where the name_of_the_mageia.iso is stored (in this example the file Mageia-7-Live-Plasma-x86_64.iso, in the directory Downloads)

$ cd Downloads
Warning!
BE VERY CAREFUL TO USE THE CORRECT DEVICE NAME AS YOU CAN OVERWRITE YOUR HARD DISK WITHOUT ANY WARNING

HINT: type lsblk or mount in a terminal window to see the USB device name. NEVER USE /dev/sda (that's usually your main system drive). Since this method uses the whole USB stick you have to specify the node of the device and not of a partition on the device (e.g. use /dev/sde not /dev/sde1); you should be very careful when using this method because writing the image to a SCSI or SATA hard disk will render it unbootable and destroy some data on it.

Become after that a root with the command

$ su -p

and enter the root password. After that you can dump the ISO to an USB device via the following command

# dd if=Mageia-7-Live-Plasma-x86_64.iso of=/dev/sd(x) bs=1M status=progress && sync

where (x)=your device name eg: /dev/sdb;/dev/sdc....etc

2887+1 records in 2887+1 records out 3027845120 bytes (3,0 GB, 2,8 GiB) copied, 145,719 s, 20,8 MB/s
  • Then safely remove the USB (it should be mounted)
  • Type mount again and see which device is missing

Removing the ISO files from USB Media

How to remove the files from a USB stick, so it can be used for other purposes again.

Most graphical formatting tools have problems with media where an ISO file has been put. But in Mageia we have tools that work great for that. Here we also give example for *nix command line and another OS.

'If you just want to put another ISO on the stick, there is no need for this procedure.

Using Mageia

This is the safest option as it tries hard to make you unable to select system drives.

Apart from dumping ISO files to the device, it can also take a backup image, and, in this case, you select to format it to one of a few common filesystem types, and label (name) it.

  • Diskdrake (From Mageia 8 onwards)

Select the device - Make very sure it is the right one - all data on it WILL be lost!

Then press the Clear button down left, then partition the device.

  • Installer (From Mageia 8 onwards)

(Yes you can perform a conventional install to a removable device.)

Classic and Live installers from Mageia 8 onwards take care of it when you select use the whole disk, or when you press Clear in custom partitioning.

Using command line

... in Mageia or similar *nix system.

1) Open a Terminal and type:

su -

to switch to root. You will be prompted for the root password

2) Confirm the device by typing (or copying & pasting) this command.

fdisk -l

This list all drives and some info on them. The entry for a 4GB flash drive may start like:

Disk /dev/sdb: 3980 MB, 3980394496 bytes

...and some info on that drive. Note the /dev/sd<some letter>

Warning!
Make sure you are reformatting the correct drive, there is no going back - all data on that drive *WILL* be lost!
  • Your device could have a different designation than /dev/sdb, but we will stick with this designation in the following procedure.
  • The size of the drive is a good way to confirm which drive you are going to reformat. Also it usually is the last one fdisk lists.

3) Unmount the device by typing (or copying & pasting):

umount /dev/sdb

4) Reformat the USB device to fat32, by typing (or copying & pasting):

mkdosfs -F 32 -I /dev/sdb

Now you can remove it.

Using Microsoft Windows

A normal format will not restore access to full storage capacity although if you use the Disk Management tool (right-click on the Windows Logo > Disk Management, or type "Disk Management" into the search box either at the Start Button or in Control Panel), you should be able to restore full storage access. You will need to delete the partition on the Flash Drive and then create a new one and format it. If that's just a little bit daunting, then rufus or HPformatUSB can restore partitioning (this section to be completed).