New answers tagged

0

Does only /boot have to be on a bootable partition? Yes, I think you are intending to do something very similar to what I did a few days ago, and it works for me :-) See also this link. But you need a few more things too, that should be on a bootable drive. I installed an nvme drive, an m2 stick via a PCI Express card into my workstation, a Lenovo ...


0

I know that this is an old post but I am not sure if hard coding /dev/sda is a good idea. Instead, I'd use something similar to d-i partman/early_command string \ USBDEV=$(list-devices usb-partition | sed "s/\(.*\)./\1/");\ if [ ! -z "$USBDEV" ]; then \ BOOTDEV=$(list-devices disk | grep -v "$USBDEV" | head -1);\ else \ BOOTDEV=$(...


3

gdisk just modifies the partition table, it does not actually create the filesystem metadata structures into new partitions (aka "formatting" the partition). For that, you'll need some variant of the mkfs command. As you've created a partition /dev/sdb1 and marked it as a Linux filesystem, you should now create the filesystem of the desired type on it. For ...


0

This script is a little brittle to variations in parted versions, but works for me and is particularly useful if rebuild the partition table as suggested by @frostschutz is complicated by resizing extended/multiple partitions: Script #!/bin/bash echo "Resizing partition ${2} on ${1} with new end ${3}" parted "${1}" ---pretend-input-tty <<EOF ...


0

The following will work: sgdisk --clear /dev/vda --set-alignment=1 --new 1:34:2047 --typecode 1:EF02 -c 1:"grub" -g /dev/vda sgdisk --new 2:0:-2G --typecode 2:8300 -g /dev/vda sgdisk --new 3:0:0 --typecode 3:8200 -g /dev/vda It's much simpler than I thought. sgdisk does all the calculations. The key is the minus sign, which is explained in the man page (...


1

Despite what the other answers already tell You (partition needs to be formatted to be mountable and mounter to be shown by df and to be used as file system) you may want to use this disk with LVM as the other partitiona are also LVM. You have to do pvcreate /dev/sda3 to make the partition a physical volume for lvm, a vgextend centos /dev/sda3 to add it ...


0

Remember the df command only shows mounted file systems. All unmounted filesystems will not be shown in the df command output. In order for you to be able to see your partition on df you must mount the partition first. If you look at your pdf output you can see sda3 us not mounted and the 'MOUNTPOINT' entry is empty. To do this do the following: find a ...


-1

mkfs.something creates a filesystem on a already existing partition. In your case it: looks for the first partition of the drive /dev/sda creates a new filesystem on it of the filesystemtype ext4 gives it the label datapartition But: None of this this will work if the partition does not exist it does exist but the partitiontype is set to a type that can't ...


4

A partition can have a type. The partition type is a hint as in "this partition is designated to serve a certain function". Many partition types are associated with certain file-systems, though the association is not always strict or unambiguous. You can expect a partition of type 0x07 to have a Microsoft compatible file-system (e.g. FAT, NTFS or exFAT) and ...


1

Looking at tutorials such as this here, and in particular the discussion here, it would seem that the purpose of creating the single partition on drives used in a RAID is to flag it as part of a RAID array by setting the type to 0xfd prevent (rare) occurences of error message stating that "no partition table" was found on the disk ensure drop-in ...


2

If you have simply created a new partition, then it is not yet ready for use. A partition is only a logical subdivision of a large disk into smaller portions which is performed so that usage or maintenance of one part of the disk doesn't affect the other (see e.g. the discussion here). To use the partition, you must first create a filesystem in it, in the ...


2

No, not really Unless you are operating a RAID, no special measures must be taken. As other answers said, SSDs tend to have a block size of 4k byte instead of 512 byte. For years partition tools are aware of this, hence the partitions are aligned to 1 MiB starts. You can check with fdisk -l /dev/sdx: If the output looks like this, you are fine: Disk /dev/...


-1

There are two ways to do this: A block-level copy (dd if=/dev/hdd of=/dev/ssd etc) or a file-level copy (rsync -aAXv /mnt/hdd/ /mnt/ssd). The block level copy is simpler; all you have to do is make sure the destination disk is bigger than the source disk and run a dd command. But it's possible that you end up with the blocks in the filesystem not lining-...


0

Two things to consider are the block size and, as you mentioned, any optimizations the filesystem has for SSD's. Partionion tools can show you the block size, so you can compare them. You can also check dmesg. For the filesystem, check it's mkfs.* documentation for flags used for SSD's.


0

Very easy: lsblk -fp Description from the man page: -f, --fs Output info about filesystems. This option is equivalent to -o NAME,FSTYPE,LABEL,UUID,MOUNTPOINT. The authoritative information about filesystems and raids is provided by the blkid(8) command. -p, --paths Print full device paths. On both of the following distributions ...


0

Do you use Hibernation? Then you must have a swap partition equal in size to your RAM chip size. If you don't, boot from Windows of a Linux Live USB and delete /dev/sda6 because 4MB is more trouble than it's worth. Then. boot back into Linux and create a swap file in your root partition, because your system is guaranteed to be unstable without it. How ...


1

Use sudo swapoff /dev/sda6 to stop using it for swapping, then you can resize/move/rearrange the swap partition any way you like. If you resize the swap partition, or completely recreate it in a different location, you might have to run sudo mkswap /dev/sda<whatever> on it afterwards, unless GParted already does that for you. Then just edit your /etc/...


1

If I start gparted from a live-USB, can I just delete the Ubuntu partition and expand the Debian partition? grub is managed from debian. Yes grub is managed from Ubuntu . You need to reinstall grub , see Rescue Live.


0

Try to umount and mount the partition in command line manually. BTW, check if there are any errors in dmesg. Can you provide the ouput of "ls -alh"?


0

You're correct in your assumption that it is GB vs GiB. lvcreate uses GiB where as gnome-disks is using GB 64 Gibibyte = 68.72 Gigabyte


3

Open gnome-disks, or gparted. I recommend gparted. Execute sudo apt install gparted, if you don't have it installed. Select the drive you want to clean in the upper right corner, and press Device -> Create partition table. You would usually pick msdos type as it is readable by all modern OSes. Now your disk is clean, you may create new partitions of any ...


Top 50 recent answers are included