38

The options correspond to the various partitioning systems supported in libparted; there's not much documentation, but looking at the source code: aix provides support for the volumes used in IBM’s AIX (which introduced what we now know as LVM); amiga provides support for the Amiga’s RDB partitioning scheme; bsd provides support for BSD disk labels; dvh ...


12

Per the author of gdisk, Rod Smith, the proper tool for this kind of job is sgdisk — a command-line program intended for use in scripts or by experts who need quick and direct access to a specific feature. The equivalent of gdisk's interactive x,z,y,y (wiping out GPT data) is sgdisk --zap-all /dev/sda or sgdisk -Z /dev/sda


9

Yes msdos is the Master Boot Record based partioning. You should either go with msdos or with gpt. You will have to go with gpt if you want more than 7 partitions (unless you want a non-standard MBR, which I don't recommend, you never know what utilities assume the msdos/windows restrictions). You also have to go with gpt if you have drives > 2Tb. If this ...


7

You can use partx's -d option to tell the kernel to forget about partitions. For example, partx -d /dev/sda will make /dev/sda1, /dev/sda2, ... go away (temporarily). They'll show up again next time the kernel is made to re-scan the partition table. Another option is delpart: delpart /dev/sda 1; delpart /dev/sda 2 should do it (but the partx syntax is nicer)...


5

If the partition is larger than the filesystem, you can use resize2fs to expand it: If size parameter is not specified, it will default to the size of the partition. So it'd just be [#]> resize2fs /dev/sdb1


5

128 partitions is the default limit for GPT, and it's probably painful in practice to use half that many... Linux itself originally also had some limitations in its device namespace. For /dev/sdX it assumes no more than 15 partitions (sda is 8,0, sdb is 8,16, etc.). If there are more partitions, they will be represented using 259,X aka Block Extended Major. ...


5

Partitions must not overlap, so the start of the second partition must be at least one sector after (larger number) than the last sector of the first partition. Not the first sector, the last. Your first partition starts at offset 1049kb and is 300GB in size. Parted is asking you for a start position in MB; your first partition runs from (approximately) 1 ...


4

I figured this out after spending days scouring the internet for any shred of information about partman - it is not very well-documented at all. Here's the config I used: # This automatically creates a standard unencrypted partitioning scheme. d-i partman-auto/disk string /dev/sda d-i partman-auto/method string regular d-i partman-lvm/device_remove_lvm ...


4

You can do it. GPT and (U)EFI are not related concepts, although it is only custom that (U)EFIs use GPT partition tables, or at least they are compatible with them. The BIOS (typically) can't see partitions, and the partition tables only rarely affect it. The only what the BIOS knows if that it has to read the first sector of the MBR (=the first sector of ...


4

ok, the quick answer is: Yes, you can remove the ntfs flag, which is a Windows thing, you won't need it when making your NixOs installation. The second question, well some people prefer GPT over MBR because you can create unlimited partitions on the disk... I use MBR and have 3 primary partitions (3 Linux distros) and one extended partition which is my /...


4

gdisk was able to fix the drive. It displayed some warnings, but was able to correctly read the primary copy of the GPT, adjust the location of the secondary GPT, and write the partition table back to the disk. I also tried fdisk and gparted, but neither of them was able to correctly handle the drive. fdisk only saw the protective MBR. gparted said that the ...


3

You may have luck to see more information including partitions using file -k # Don't stop at the first match, keep going. Though on my systems it also does not show the partition table. (file 5.15 and 5.19). But I wonder why file should print the partition table at all. IMO file is supposed to show what kind of data is it, not the the whole content. ...


3

fdisk may not be able to open the device, because it sees a iso9660 filesystem. this could be confirmed with blkid /dev/sdb*. In Any case I would then probably try this: dd if=/dev/zero of=/dev/sdb count=4 bs=1M This will remove any filesystem signature at the start try fdisk /dev/sdb again start with operation o (Create new MS-DOS partition table) Then, ...


3

-… /dev/sdb This is a regular file, not a device. You must have tried to write to /dev/sdb at some point when there was no device connected with this drive letter. Be careful! You were lucky not to overwrite a different device from the one you intended. Information about block devices in /proc and /sys is provided directly by the kernel uses the kernel's ...


3

The problem is with your 1. Here you only have one partition and so the a command automatically selected it, and the 1 is unnecessary. This is a problem with trying to use fdisk in this manner for scripted automation; the starting position may not be known or the user interface changes. You may want to use sfdisk instead. This is designed for scripting ...


3

Alignment is important on partitions containing data, in order to maximise the chance that block operations will match whatever the underlying block structure is (4K on modern hard drives, more than that on flash-based drives). Extended partitions don't contain data, they're simply containers for logical partitions. The only operation which is done on ...


3

You can make a file as big or as small as you want - especially on a linux tmpfs. df -h /tmp Filesystem Size Used Avail Use% Mounted on tmpfs 12G 472K 12G 1% /tmp We can just make a sparse file. for cmd in \ 'dd bs=1024k seek=20k of=' \ 'ls -slh ' do eval "$cmd/tmp/file" echo done </dev/null 0+0 ...


3

Starting partedwith the --align optimal option tells the program to align to multiples of the device's physical block size to ensure best performance. The --align option has other types available as well. See man parted for more information.


3

In the 1980s, the BIOS in a PC needed to know the geometry of a hard disk in order to operate it properly. Users had to enter the correct number of cylinders, heads and sectors. At some point (with the introduction of the IDE interface? My memory is rather fuzzy on this topic), disks became capable of reporting their geometry to the computer. By the early ...


3

It's possible, but might need additional steps (kpartx) to make those partitions available. parted /dev/mapper/cryptsda kpartx -a /dev/mapper/cryptsda mount /dev/mapper/cryptsda1 /mnt/firstpartition Most people just use LVM instead, of course LVM also needs VG/LV to be enabled first, but this is usually handled for you by whatever init system you use. ...


3

Yes, wiping /dev/sda wipes the partition table too. It also wipes any area of the drive unallocated to any partition. Although the kernel will typically keep partition tables in memory. partprobe can be used to tell the kernel to update them.


3

There aren’t necessarily any timestamps created with new GPT partition tables. The GPT layout doesn’t include any timestamp fields. If a partition is given a version 1 GUID (see RFC-4122 sections 4.1.3 and 4.1.4), the generated GUID will include a timestamp; but any other version won’t. Most partition GUIDs I’ve seen use version 4 and therefore don’t contain ...


3

In Linux: Open your file manager. The side-bar should display the Windows partitions. Click on them. In Windows: I recommend EXT2FSD as mentioned here or here. In the long run, I recommend creating a partition specifically for sharing files between operating systems. For this task, I prefer UDF as a file-system as it supports symlinks in both os'es, but ...


3

I didn't find the answer on how to use zerofree on such disks but I found an alternative solution which works well. Mount your disk somewhere (in my case 3 disks are mounted to locations: /srv/node/d1, /srv/node/d2, /srv/node/d3). Enter the directory where your disk is mounted (cd /srv/node/d1). Perform the command: dd if=/dev/zero of=zerofillfile bs=1M ...


2

What it says is that the xenix, coherent, and sysv filesystems are supported by the same drivers. The filesystems are similar enough that having separate drivers is just a waste of time and effort. As such, you should mount it with sysv as the filesystem type. That should just work.


2

Working with the following conditions: The original disk to copy is /dev/sdx The original disk is properly partitioned/labeled/flagged The filesystem contents of the original disk will be ignored The destination disk, to copy to, will be /dev/sdy The swap partition will be /dev/sdy4 The boot partition will be /dev/sdy1 mounted on /boot in the final system ...


2

The MBR Partion is sector 0 of the disk, clone it with dd: sudo dd if=/dev/sda of=/dev/sdb bs=512 count=1 Beware: the data of the target disk may be destroyed. To activate the new partitions, you must run kpartx.


2

As said in a comment, dd will copy the data, partition layout, etc. The only issue is that your source and target disks must be identical (cylinders, heads, sectors, etc) A better option that becomes somewhat hardware neutral would be to use clonezilla - http://clonezilla.org/


2

The preferred method to handle this is to start a completely new partition table by typing - Choose 'o'option Verify with 'Y' Afterwards - The new partition table will be created with the correct size and you can continue and create the new table


2

In response to your question about can you install Windows and Ubuntu without creating a separate partition: No. You would end up corrupting the data of the other operating system upon installation (and im sure it would lead to lots of issues if it were possible to do it after installation). However, creating a separate partition comes at no cost. Simply ...


Only top voted, non community-wiki answers of a minimum length are eligible