Как установить gparted ubuntu
compizomania
Азбука в Linux для начинающих и не только. Я знаю только то, что ничего не знаю, но другие не знают и этого. Сократ
Страницы
25 октября 2014
Приложение GParted (Gnome Partition Editor) предназначено для создания, изменения и удаления разделов жёсткого диска.
Дисковое устройство можно разбивать, создавать на нём различные разделы. Программа GParted позволяет изменять структуру разделов дискового устройства, сохраняя при этом имеющиеся на диске данные.
Редактирование разделов является потенциально опасной операцией, которая может привести к ПОТЕРЕ ДАННЫХ НА ЖЁСТКОМ ДИСКЕ.
Программа GParted позволяет редактировать разделы с минимальным риском потерять данные. Программа GParted была внимательно протестирована и используется командой проекта GParted, однако потеря данных все-таки возможна по другим причинам, связанным с проблемами с оборудованием, потерей питания от электрической сети и различными ошибками в программном обеспечении.
Чтобы снизить вероятность потери данных, не выполняйте операции монтирования и размонтирования разделов вне GParted во время работы GParted.
Рекомендуется СДЕЛАТЬ РЕЗЕРВНУЮ КОПИЮ ваших важных данных (документы, фото, видео и др. файлов) прежде чем работать с GParted.
Установка GParted 0.20 в Ubuntu 14.04 и производные
В Центе приложений Ubuntu имеется программа GParted, но версии 0.18.
Для установки GParted 0.20 откройте терминал (Ctrl+Alt+T), скопируйте и выполните следующие команды:
sudo apt-get update
sudo apt-get install gparted
Программа GParted запускается только с правами администратора, т.е. перед запуском обязательно нужно ввести пароль. Вы можете открыть её из системного меню или выполнить команду в терминале:
Как пользоваться Gparted
С помощью Gparted вы можете выполнять все основные действия, такие как изменение размеров раздела, создание таблицы разделов, форматирование разделов и даже проверка файловой системы. В этой статье мы рассмотрим как пользоваться Gparted. Подробно разберем интерфейс программы и ее возможности.
Установка Gparted
sudo apt install gparted
Чтобы установить Gparted в Red Hat или CentOS используйте:
sudo yum install gparted
А установка в Fedora выполняется с помощью dnf:
sudo dnf install gparted
Как пользоваться Gparted
После того, как программа будет установлена, вы можете запустить ее из главного меню. Только обратите внимание, для правильной работы утилиту необходимо запускать с правами суперпользователя. Если вы запускаете ее из главного меню, то система сама спросит пароль.
1. Интерфейс программы
После запуска перед вами откроется главное окно программы. Оно состоит из нескольких областей. Давайте рассмотрим их чтобы потом было проще использовать программу:
Все это мы и будем использовать для работы с разделами. Как вы убедитесь, использование Gparted очень просто. Дальше мы рассмотрим как разбить диск Gparted.
2. Создание таблицы разделов
3. Создание раздела
Чтобы создать новый раздел выберите область «Не размечено» и кликните правой кнопкой чтобы открыть контекстное меню. В этом меню выберите «Новый».
Теперь необходимо заполнить информацию о будущем разделе. В левой стороне вы можете тонко настроить расположение раздела от начала или конца свободного пространства и указать размер. С правой стороны можно выбрать файловую систему, тип раздела (первичный/вторичный) и метку. В таблице разделов MSDOS может быть только четыре первичных раздела, все остальные логические. Что касается GPT, то здесь таких ограничений нет.
4. Изменение раздела
Для изменения раздела откройте контекстное меню для этого раздела и выберите пункт «Изменить или переместить раздел». Здесь можно только изменить размер Gparted:
Вы можете указать новый размер раздела или выбрать его с помощью ползунка. В зависимости от выбранного действия и способа переноса, эта операция может занять довольно много времени. Если же вы захотите изменить файловую систему, то для этого нужно использовать пункт контекстного меню «Форматировать в».
5. Удалить раздел
Чтобы удалить раздел достаточно открыть контекстное меню и выбрать «Удалить раздел».
7. Применение изменений
Работа утилиты может занять довольно длительное время. Теперь вы знаете как разбить диск gparted.
8. Управление флагами
Кроме основных параметров, разделы могут иметь флаги, которые будут указывать на их особое состояние, например, на то, что это загрузочный раздел или раздел lvm. Для того чтобы установить флаг для раздела вам нужно сначала применить изменения. Затем выберите в контекстном меню пункт «Управление флагами». В открывшемся окне вы можете отметить галочкой флаги, которые нужно установить, например, boot.
В этом случае уже нет необходимости применять изменения. Флаг будет установлен сразу же.
Выводы
В этой статье мы рассмотрели как пользоваться Gparted linux для разметки диска и управления разделами. Хотя на первый взгляд может показаться, что это очень сложная и опасная затея, на самом деле все довольно просто. Надеюсь эта инструкция Gparted была вам полезной. Если у вас остались вопросы, спрашивайте в комментариях!
Ubuntu Documentation
Introduction
This guide goes over procedures for a single partition drive install only. Multiple partition drive installations are not very hard, and you may very well figure it out by using this guide; however, make sure you add an entry in /etc/fstab for each partition, not just the drive.
A Note about File Systems:
Drives that are going to be used only under Ubuntu should be formatted using the ext3/ext4 file system (depending on which version of Ubuntu you use and whether you need Linux backwards compatibility). For sharing between Ubuntu and Windows, FAT32 is often the recommended file system, although NTFS works quite well too. If you are new to file systems and partitioning, please do some preliminary research on the two before you attempt this procedure.
Determine Drive Information
We assume that the hard drive is physically installed and detected by the BIOS.
To determine the path that your system has assigned to the new hard drive, open a terminal and run:
Be sure to note the «logical name» entry, as it will be used several times throughout this guide.
Partition The Disk
If you have already formatted the drive and it contains data, skip this step and move on to «Mount Point.» If the drive is still blank and unformatted, then you have two options: formatting the drive using the command line, or installing GParted for a graphical approach. Decide whether you want the drive to contain one single partition, or if you want to divide the space up between two or more partitions.
Partitioning Using GParted
If System > Administration > GNOME Partition Editor (or ‘Partition Editor’) is not available, install «GParted» using «sudo apt-get install gparted» from the command line, «Add/Remove Software» (or «Add/Remove. «) from the Applications menu, or «Synaptic Package Manager» from the System > Administration menu. Open GParted and let’s get started.
In the top-right corner of the window, choose your new hard drive from the drop-down list, referring back to the «logical name» from earlier. The window should refresh and show you a representation of the new drive. Assuming that the drive has yet to have been used, a white bar will run across the window. Use these steps to partition the drive with a single partition.
1) Right-click on the white bar and choose «New.»
2) For «New Size» the number should be the maximum allowable, to fill the entire disk.
3) Choose «Primary Partition»
4) Now decide on a filesystem. Use «ext3» if the drive will only be used with Ubuntu. For file-sharing between Ubuntu and Windows, you should use «fat32.» If you are unsure, search around the wiki and forums for advice.
5) Now click Add to compute the partition. The graphical display should update to show a new partition covering the entire disk.
6) To finish, click «Apply,» or Edit > Apply. The disk will then be partitioned and formatted. You may now close GParted.
Command Line Partitioning
There are two commands that can be used in the command line to partition a new drive: fdisk and parted. fdisk is an older program, and its main downside is that it can only create MBR partitions. parted allows you to create MBR or GPT partitions.
GPT vs MBR
MBR (Master Boot Record) has two main limitations: you cannot have a partition larger than 2 TB and you cannot have more than 4 primary partitions. GPT (GUID Partition Table) can do both of these things, but it is part of the EFI standard. This means your kernel must support EFI. The latest version of the kernel supports EFI, and almost all the latest distros do too.
fdisk
Refer back to the logical name you noted from earlier. For illustration, I’ll use /dev/sdb, and assume that you want a single partition on the disk, occupying all the free space.
Otherwise, this will not negatively affect you.
1) Initiate fdisk with the following command:
2) Fdisk will display the following menu:
3) We want to add a new partition. Type «n» and press enter.
4) We want a primary partition. Enter «p» and enter.
5) Since this will be the only partition on the drive, number 1. Enter «1» and enter.
If it asks about the first cylinder, just type «1» and enter. (We are making 1 partition to use the whole disk, so it should start at the beginning.)
6) Now that the partition is entered, choose option «w» to write the partition table to the disk. Type «w» and enter.
7) If all went well, you now have a properly partitioned hard drive that’s ready to be formatted. Since this is the first partition, Linux will recognize it as /dev/sdb1, while the disk that the partition is on is still /dev/sdb.
parted
Refer back to the logical name you noted from earlier. For illustration, I’ll use /dev/sdb, and assume that you want a single partition on the disk, occupying all the free space.
1) Start parted as follows:
2) Create a new GPT disklabel (aka partition table):
3) Set the default unit to TB:
4) Create one partition occupying all the space on the drive. For a 4TB drive:
5) Check that the results are correct:
There should be one partition occupying the entire drive.
6) Save and quit «parted»:
Command Line Formatting
To format the new partition as ext4 file system (best for use under Ubuntu):
To format the new partition as fat32 file system (best for use under Ubuntu & Windows):
As always, substitute «/dev/sdb1» with your own partition’s path.
Modify Reserved Space (Optional)
When formatting the drive as ext2/ext3, 5% of the drive’s total space is reserved for the super-user (root) so that the operating system can still write to the disk even if it is full. However, for disks that only contain data, this is not necessary.
NOTE: You may run this command on a fat32 file system, but it will do nothing; therefore, I highly recommend not running it.
You can adjust the percentage of reserved space with the «tune2fs» command, like this:
Using this command does not change any existing data on the drive. You can use it on a drive which already contains data.
Create A Mount Point
Now that the drive is partitioned and formatted, you need to choose a mount point. This will be the location from which you will access the drive in the future. I would recommend using a mount point with «/media», as it is the default used by Ubuntu. For this example, we’ll use the path «/media/mynewdrive»
Now we are ready to mount the drive to the mount point.
Mount The Drive
You can choose to have the drive mounted automatically each time you boot the computer, or manually only when you need to use it.
Automatic Mount At Boot
Note: Ubuntu now recommends to use UUID instead, see the instructions here:https://help.ubuntu.com/community/UsingUUID
You’ll need to edit /etc/fstab:
Add this line to the end (for ext3 file system):
If you want to allow a normal user to create files on this drive, you can either give this user ownership of the top directory of the drive filesystem: (replace USERNAME with the username)
or in a more flexible way, practical if you have several users, allow for instance the users in the plugdev group (usually those who are meant to be able to mount removable disks, desktop users) to create files and sub-directories on the disk:
The last «chmod +t» adds the sticky bit, so that people can only delete their own files and sub-directories in a directory, even if they have write permissions to it (see man chmod).
Manually Mount
Alternatively, you may want to manually mount the drive every time you need it.
For manual mounting, use the following command:
When you are finished with the drive, you can unmount it using:
Need Additional Help?
If you run into problems or need more help, search the wiki or forums at http://ubuntuforums.org. If you cannot find what you are looking for, simply ask for help.
InstallingANewHardDrive (последним исправлял пользователь runverzagt 2019-01-25 15:30:08)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details
compizomania
Азбука в Linux для начинающих и не только. Я знаю только то, что ничего не знаю, но другие не знают и этого. Сократ
Страницы
05 августа 2015
Приложение GParted (Gnome Partition Editor) предназначено для создания, изменения и удаления разделов жёсткого диска. Для работы с устройствами и таблицами разделов GParted использует библиотеку libparted. Для работы с редко используемыми файловыми системами, не поддерживаемыми libparted, есть другие инструменты.
GParted предназначен для различных операций с разделами (и файловыми системами, находящимися на них), таких как: создание, уничтожение, изменение размера, перемещение, проверка и копирование. Это необходимо при создании пространства для новых операционных систем, реорганизации использования диска, копировании данных, находящихся на жёстких дисках, и зеркалировании одного раздела на другой (создании образа диска). Также существует Live CD версия программы — GParted-Live, выпускаемая командой разработчиков GParted с каждой новой версией этой программы.
Для Ubuntu 15.04/14.04 и призводных стала доступной стабильная версия GParted 0.23.
С помощью GParted можно выполнять следующие задачи:
Жесткие диски (например, SATA, IDE и SCSI)
Устройства флэш-памяти, такие как карты памяти USB (флешки) и твердотельные накопителей (SSD-х)
RAID устройства (аппаратные RAID, BIOS материнские платы RAID, и программное обеспечение RAID Linux)
Все размеры секторов (например, устройства с 512, 1024, 2048, 4096 байт секторов и более)
Редактирование разделов является потенциально опасной операцией, которая может привести к ПОТЕРЕ ДАННЫХ НА ЖЁСТКОМ ДИСКЕ.
Программа GParted позволяет редактировать разделы с минимальным риском потерять данные. Программа GParted была внимательно протестирована и используется командой проекта GParted, однако потеря данных все-таки возможна по другим причинам, связанным с проблемами с оборудованием, потерей питания от электрической сети и различными ошибками в программном обеспечении.
Чтобы снизить вероятность потери данных, не выполняйте операции монтирования и размонтирования разделов вне GParted во время работы GParted.
Рекомендуется СДЕЛАТЬ РЕЗЕРВНУЮ КОПИЮ ваших важных данных (документы, фото, видео и др. файлов) прежде чем работать с GParted.
Установка GParted 0.23 в Ubuntu 15.04/14.04 и производные
Для установки GParted 0.23 в Ubuntu 14.04 необходимо подключить репозиторий getdeb и ключ к нему. Откройте терминал (Ctrl+Alt+T), скопируйте и выполните следующие команды:
sudo apt-get update
sudo apt-get install gparted
Установка в GParted 0.23 в Ubuntu 15.04
sudo apt-get update
sudo apt-get install gparted
Программа GParted запускается только с правами администратора, т.е. перед запуском обязательно нужно ввести пароль. Вы можете открыть её из системного меню или выполнить команду в терминале:
App Highlight: Open Source Disk Partitioning Tool GParted
Last updated October 29, 2020 By Ankush Das 10 Comments
Brief: GParted is an incredibly popular and free partition editor available for Linux distros. Here, we take a look at what it offers in brief.
GParted: A Free & Open-Source GUI-based Partition Manager
GParted is undoubtedly one of the best partition managers for Linux out there. The user interface is very simple and gets the job done.
In some cases, you end up using GParted to fix or format your USB drive as well. I had a USB disk which I couldn’t format in Ubuntu using the “Disks” app – this is where GParted came to the rescue.
So, it is a quite useful tool with a lot of good features. Let me highlight them for you.
Playing with disk partitioning is a risky task. Don’t do it unless it’s absolutely necessary. Or else, you might just end up wiping the entire disk.
Features of GParted
You can do a lot of things with GParted, ranging from a simple format task to important partitioning tasks. I’ll highlight the key features with some screenshots to help you know more about it before installing it.
Create partition tables
You can create a new partition table for your new disks or erase the content of your existing disk to modify the partition table.
You will be able to select msdos, gpt, atari, and a lot more types of partition tables.
Create, move, label, delete & modify partitions
You can easily create, label, delete or modify the partitions with a bunch of options available within GParted.
Of course, you will have to be careful about what you want to do.
The good thing is that GParted makes sure that you do not directly apply any changes – it queues up your selected operations/tasks and asks for another final confirmation before you hit it.
The tick mark symbol ✓on the top allows you to confirm the changes and then only your changes take into effect.
Here’s another screenshot for the options you have available for the partitions:
Attempt data rescue
Apart from editing partitions, you can also try to recover your lost data in Linux using the “Attempt Data Rescue” feature as shown in the screenshot below.
It is worth noting that you do not have this feature installed by default – you only see the option visible. So, for the data recovery feature to work, you have to install gpart separately using the following command (on Ubuntu/Debian-based distributions):
In addition to all the key features, it supports a wide range of storage devices and filesystems. You can learn more about it from the list of features on their official website.
Installing GParted on Ubuntu and other Linux distributions
You might have GParted pre-installed. So, make sure to verify that. If you do not have it installed, you can head into the software center to get it installed.
In case you want to use the terminal, simply type in the following command:
As I mentioned above, if you want the data recovery option, you should install gpart package in addition to gparted package.
If you’re using any other Linux distribution, you can either find it in the respective software manager or simply check out the official download instructions.
Wrapping Up
GParted is a very useful and important tool when it comes to dealing with disk management and partitions. However, you will have to be careful while using it for the obvious reasons.
Have you tried GParted? Which other partitioning tool you use on Linux? Feel free to share your experiences in the comments below.
Like what you read? Please share it with others.