Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
Partitions
MBR versus GPT partition schemes
Tools
Size: MB
Name | Size | Description | Remark |
---|---|---|---|
partitionmanager | 1181) |
UUID
UUID | Filesystem level UUID |
PARTUUID | Partition table level UUID. Standard for all partitions for GPT |
PTUUID | Partition table UUID. Disk signature on MBR-partitioned disks |
MBR-partitioned disks | Has no UUIDs in the partition table 32-bit disk signature is the PTUUID PARTUUIDs is the disk signature extended by a two-digit partition number |
Generate a UUID
This does not change the PARTUUID
As root in a terminal:
- Get a UUID: cat /proc/sys/kernel/random/uuid
- or via uuidgen
if ! [[ -f /usr/bin/uuidgen ]]; then aptitude install uuid-runtime; else echo 'Already installed'; fi
- Generate a new UUID:
- uuidgen
- The result should look like: e2310fa3-f7b6-4743-a993-d32d496a0326
Change UUID
- Boot the computer from a live distribution
- Open a terminal
- Log in as root
- Make sure the partition you want to assign the UUID to is unmounted:
- mount | grep sdnx # n and x are the drive letter and the partition
- Check the partition
- e2fsck -f /dev/sdnx
- Assign the UUID
- tune2fs /dev/sdnx -U $(cat /proc/sys/kernel/random/uuid)
- Check
- blkid /dev/sdnx
fstab
After changing /etc/fstab run systemctl daemon-reload
MBR
Partitions table
If the drive has no partition table it has to be created. Use cfdisk (ncurses interface) for this if possible. Just run cfdisk. It preforms much better than fdisk (the second choice) or sfdisk (a script-oriented tool). If you need more advanced options fdisk is needed
Use the msdos format when creating a new partition table. Warning: Doing this will erase all data on the disk, it will empty the disk
fdisk
Understands GPT, MBR, Sun, SGI and BSD partition tables
fdisk -l: show partition information
The size entry, an example
+2000M
Commands
DOS (MBR) a toggle a bootable flag b edit nested BSD disklabel c toggle the dos compatibility flag
Generic d delete a partition F list free unpartitioned space l list known partition types n add a new partition p print the partition table t change a partition type v verify the partition table i print information about a partition Misc m print this menu u change display/entry units x extra functionality (experts only)
Script I load disk layout from sfdisk script file O dump disk layout to sfdisk script file
Save & Exit w write table to disk and exit q quit without saving changes Create a new label g create a new empty GPT partition table G create a new empty SGI (IRIX) partition table o create a new empty DOS partition table s create a new empty Sun partition table
Delete partition
fdisk -l # Notice which disk has to be acted upon fdisk /dev/sdx # /dev/sdx is the disk to be acted upon p # Print the partition table d # Delete a partition. If there is only one partition it will be deleted. Otherwise a question will be raised asking which partition to delete p # Verify Partition Deletion w # Write table to disk and exit
GTP
CLI tools
gdisk sgdisk cgdisk
UUID
Whith sgdisk --info=n /dev/sdx information about a partition can be shown. Replace the 'n' and 'x' with the applicable values
The Partition unique GUID value is the value which has to be used in /etc/fstab
Errors
Repartitioning error
When something goes wrong while repartitioning a drive the partition might be restored with testdisk
Warning: Make sure to select all partitions (Make them green) before writing the partition table to disk
initramfs-tools
When a new kernel is installed and you get W :initramfs-tools configuration sets RESUME=UUID=[UUIDhash] but no matching swap divice is available do blkid | grep swap and copy the UUID of the swap partition over the UUID found in /etc/initramfs-tools/conf.d/resume
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.