First step : downloading the compressed image
The download step aims to get an image of a GNU/Linux system; the size of such images can fit a DVD-ROM (4.7 GB) or a USB stick (use a size of 16 GB, if possible).
A so-called "heavy" image will be uncompressed up to 16 GB, and fits only USB sticks. The "simple" image can fit a DVD-ROM or a USB stick; however it does not manage the persistent data issue immediately.
|
... OK, now it's downloaded ... But how can one trust the big file just there? To know it, please go to the certification page.
Second step: burning the image onto a medium
There are two different cases: "heavy" or "simple" image.
When it's a "heavy" image
There are two sub-steps:
- uncompress the file
live-image-amd64.stick16G.img.gz
, to get a file namedlive-image-amd64.stick16G.img
, weighing about 16 GB - copy, or rather burn the file
live-image-amd64.stick16G.img
onto the USB stick, whose size must be sufficient. Beware, if the stick has a bigger size, 32 GB for instance, only the first 16 GB will be consistently managed.
Uncompressing can be done with every good file manager, like
file-roller
under Linux, 7zip
under Windows, etc.
Burning is not equivalent to copying a file as usual: the image does contain some data to write to the boot sector of the medium.
To do it, one can use, under Windows, the free and cost-less software Win32 Disk Imager.
Under Linux, the utility gnome-disks
(package gnome-disk-utility)
does the job when one wants to use the GUI, or one can also use
a command line:
sudo dd if=<the_path_to>live-image-amd64.stick16G.img of=/dev/<sdX> bs=4M conv=fdatasync status=progress
... where the_path_to is the actual path to the image file (can be empty if the image file is in the default directory when the command is launched), and sdX represents the USB drive which was plugged in to burn the image on it.
At any time, the command lsblk
provides information about the list of
drives which might be accessed; when one plugs the USB drive in, some
additional lines will appear in lsblk
's output, which discloses the
precise name to use to access the USB drive. Please notice than if the
USB drive appears on more than one line, for example with names
sdc, sdc1, sdc2, only the first name must be considered (so, in such
a case, sdX would be: sdc).
When it's a simple image
The burning process is completely similar to the method used for "heavy images" (see above).
However, there is a difference: when the image is burnt on a USB drive, no partition is created to let use one part of the drive for data persistence. That must be managed separately.
Data persistence
If one has burnt a simple image, the USB drive (or the DVD-ROM) can be used to boot the computer, and the GNU/Linux system will run seamlessly. However when one shuts down the computer, every data which were generated locally are lost, because they live in the RAM, which is erased upon shutdown.
Letting no track can have some advantage... But if one wants to reuse locally generated data after the next boot-up, as usual with computers, one must create a partition for data persistence.
The easiest way is to use the live-clone
program under GNU/Linux. That
program manages the burning process of a simple image, and then configures
automatically a partition for data persistence.
Creating a persistence partition "manually"
You don't want to use live-clone
? you are free! there will just be
little more sports...
The present documentation is valid if one is running a Linux system (for example, one can boot the USB drive just burnt a while ago).
-
Locate the target drive; the USB drive where one wants to create
a persistence partition is considered by Linux as a disk. The line-command
program
lsblk
outputs the list of available drives. The target drive will often be known as sdb, and there will be a partition named sdb1 -
Create a new partition; launch the command
fdisk /dev/sdb
(to adapt accordingly if it's rather sdc or sdd which is disclosed by the command lsblk). the programfdisk
is interactive ... typingp
(Print), fdisk will display existing partitions, numbered 1 and 2.
Whilefdisk
is running, typen
(New), andp
(Primary partition), and then3
, and finally a few times on the Enter key.
This creates a third partition, which uses all the available space remaining on the drive. Typep
(Print), to check the new structure, which should contain three partitions, numbered 1, 2 and 3. If it wen well, typew
(Write): the new partition table will overwrite the current one. It is possible to cancel if in doubt, by typingq
(Quit); this halts fdisk without modifying the partition table. -
Format the new partition; when one is back to the shell prompt in
the terminal (fdisk does no longer control the interface),
launch the command
mkfs -t ext4 -L persistence /dev/sdb3
Of course the recipe must be adapted when the drive is not sdb but sdc or sdd, etc. -
Document the new partition; one configuration file
must be placed on the recently formatted partition.
One can open a graphic file manager: it should detect a disk
partition named "persistence". If this partition is not detected, one
can try to unplug the drive, and plug it in after a short while.
The file manager shows this partition, and discloses its mount point.
Typically, the mount point is something like
/media/user/persistence
(user can be some other name, the name of the current user).
Create a plain text file somewhere in your working area, which must be namedpersistence.conf
, and contain exactly this only line:/ union
Be careful to insert a space between the character/
and the wordunion
.
finally, as a root user, copy this file into the right location:
sudo cp persistence.conf /media/user/persistence
(of course, adapt the command when the mount point is not /media/user/persistence).
Et voilà! when it will booted, later, the system of the USB drive will benefit from data persistence.
How to check whether the data persistence is running
One can check whether the data persistence is running, by saving a file, then rebooting the drive. The saved file should be there, at the same place.
However it rather long and frustrating to reboot. It is faster to display a short summary of mounting points. Launch this command:
mount | grep persis
... this will display the list of all mounting points labeled with words like "persistence". If one sees a line mentioning the persistence partition, then everything works as expected.