date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,582,061,970,000
So, let's say I have an array with a list of URLs, and I want to use something such as GNU parallel to download the URLs in parallel. A command like this would do the trick. parallel -u wget -qc --show-progress ::: "${URLs[@]}" The only issue with this command is while the progress of the commands is shown (especiall...
parallel --ll wget -qc --show-progress ::: "${URLs[@]}" The --ll option is in alpha testing, but works in my test.
Run one-line programs in parallel on separate lines
1,582,061,970,000
Does GNU Parallel start a batch of as many jobs as possible (the number of jobs started being governed by GNU Parallel internals or/and the -j option along with given parameters), and once complete, then start the next batch of jobs and so on? Context I want to learn how to better handle timestamps related to jobs (st...
GNU Parallel starts a job when there is a free job slot. The number of job slots is given by -j/--jobs and defaults to the number of CPU threads. Let us assume your server has 8 CPU threads. When you start GNU Parallel it will spawn 8 jobs immediately. When a job finishes, the info is logged (in --joblog), and a new j...
Understanding timestamps in a GNU Parallel --joblog output
1,582,061,970,000
I have the following command in my Makefile parallel \ --eta \ --bar \ --joblog mnist/embedder.joblog \ pipenv run python3 \ -m mnist.train_embedder \ --embedder_name {1} \ --embedder_dim {2} \ --embedder_lr {3} \ --embedder_epochs {4} \ :...
--header : does almost what you want. It is made for CSV-files where the first line is a header. So you need to prepend 'grid/embedder_name' with 'name': $ cat grid/embedder_name name ae cnn $ cat grid/embedder_dim dim 24 32 48 64 Also you do not need :::: between every file. A single one is enough (but if you find i...
GNU Parallel with named arguments
1,582,061,970,000
I ran into a strange problem.I am running this example from this https://www.gnu.org/software/parallel/parset.html. But it is not working inside the script file. parset myarray seq 3 ::: 4 5 6 echo "${myarray[1]}" I am getting the following error if I ran the script file Unknown option: myarray Unknown option: seq Un...
In short: You need to do what the error message tells you to do. Longer version: There are two things called parset. The first is a shell script that tells you how to enable the function version. That's the entire purpose of this script, to provide setup instructions for people trying to run parset without having ...
GNU parset is not working in a script but works in terminal
1,582,061,970,000
I need to run a python script several times in parallel but I have done executing it in the background like this ipython program.py & ipython program.py & ... I want to know if this way uses one core per execution or just executes the program.py using threads. By the way, I want to explore the use of GNU Parallel but...
How can I use GNU Parallel for executing program.py concurrently, each time in a different core? You (almost) never want to peg a program to a certain core. Typically you do not care which core is doing the work. And often you simply want to run one job for each CPU thread in the system. And that is easy to do using...
How to use GNU Parallel for executing a program concurrently?
1,582,061,970,000
Is it possible to abort process for gnu parallel process if it exceeds an estimated runtime? For example, I have a handler for recon-all processing: while [ -n "${ids[0]}" ] ; do printf 'Processing ID: %s\n' "${ids[@]}" >&2 /usr/bin/time -f "$timefmt" \ printf '%s\n' "${ids[@]}" | parallel --jobs 0 recon-all ...
You are looking for --timeout. You can do --timeout 9h or you can do --timeout 1000%. The last will measure how long the median time is for a job to succeed, and given the median it will compute a timeout that is 1000% of the median run time. The neat thing about using a percentage is that if the compute program gets...
gnu parallel exit process with timeout
1,582,061,970,000
I'm trying to wrap my head around running parallel in parallel, and it seems like I have a situation where that would be an ideal solution. I want to run a set of jobs in series - call them A-1, A-2, A-3 and so on. These would be run with --jobs 1 (or sem?). I want to run sets of those in parallel - call them A, B, C,...
a() { seq 10 | parallel -j1 'echo A-{#};sleep $((RANDOM % 10))' } b() { seq 10 | parallel -j1 'echo B-{#};sleep $((RANDOM % 10))' } c() { seq 10 | parallel -j1 'echo C-{#};sleep $((RANDOM % 10))' } d() { seq 10 | parallel -j1 'echo D-{#};sleep $((RANDOM % 10))' } export -f a b c d parallel ::: a b c d If...
Parallel in Parallel
1,582,061,970,000
When I try to write a pipeline like this: git branch | rg '^\*' | parallel git pull {} I run into a problem with whitespace. Because the branch names have leading whitespace, parallel ends up attempting to run git pull ' foo' which is wrong. Is there an argument for GNU Parallel that says "strip trailing/leading whi...
--trim rl git branch | rg -v '^\*' | parallel --dr --trim rl git pull {}
Strip leading and trailing whitespace when piping to GNU parallel
1,582,061,970,000
Introduction I have a bash script to execute a command in multiple servers through ssh. It uses GNU parallel in the parallel version, a for loop in the sequential one. The script is used like this: foreach_server "cd $dir && find -name '*.png' | wc -l" foreach_server "cd $dir && git --no-pager status" Sometimes I nee...
Rather than jump through hoops trying to remove the symptom of error messages, it would be better to remove the cause. This will assign a tty to the ssh session so that a terminal ioctl can be applied: ssh -t $host "$@" You might need to double up the -t flag as -tt, depending on how you're actually calling this line...
Bash script hangs when filtering stderr through sed
1,630,653,200,000
I would like to run a list of Gnuplot commands in parallel. I'm getting an "Unrecognized option" error: $ ./parallel-plot-sine.sh | parallel -q gnuplot unrecognized option -e "set terminal pngcairo; set output '100.png'; set title 'Sample rate: 100'; set key left box; set autoscale; set samples 100; plot [-30:20] sin(...
GNU Parallel quotes input by default. You give input that is already quoted. There are several solutions. Change the input from: -e "set terminal pngcairo; set output '100.png'; set title 'Sample rate: 100'; set key left box; set autoscale; set samples 100; plot [-30:20] sin(x)" to: set terminal pngcairo; set output ...
Running several Gnuplot commands in parallel with Gnu Parallel
1,630,653,200,000
I'm using gnu parallel to generate backups for about ~1500 web sites on pantheon.io, using their terminus CLI. The terminus backup:create command does not finish until a response is received that it has completed on the remote end. I'm wondering if there is any way to better speed this up with parallel so that more si...
Not specifying how many jobs to run in parallel will make it default to number of cpus. From the manual: -j Number of jobslots on each machine. Run up to N jobs in parallel. 0 means as many as possible. Default is 100% which will run one job per CPU on each machine. In general this is a safe bet, but you are waiting...
gnu parallel - speed up command agains remote servers that waits
1,630,653,200,000
I have a file which is an HTML document, containing a <table> I want to extract data from and output into a csv. This file has 544609657 characters, is about 545 megabytes, all in a single line. I managed to extract the data into a csv by using sed and making many string replacements, but I wanted to speed things up b...
You have exactly the correct thoughts. You just need to learn --recstart: parallel --pipepart --recstart '<tr>' -a big --block -10 'sed ...' > table.csv Here we assume each row of your HTML table starts with <tr>.
Use GNU Parallel when file has a single (long) line
1,630,653,200,000
I want to run a series of parallel jobs based on a set of arguments while assigning a second argument. I use the --link option in GNU Parallel as parallel --jobs 3 --link echo ::: A B C ::: D E F G A D B E C F A G It perfectly works when the number of the first set of arguments is higher than the second set. In the a...
If you do not want an input source to repeat, make the input sources the same length. Instead of: parallel --jobs 3 --link echo ::: A B C ::: D E F G run: parallel --jobs 3 --link echo ::: A B C ::: D E F Currently you can also: parallel --jobs 3 echo ::: A B C :::+ D E F G but this is considered a bug, so no not e...
How to limit the number of tasks to the first arguments in GNU Parallel?
1,630,653,200,000
I am trying to convert/use each line from a file as an input file. For example file.txt contains the following lines: cat dog lion tiger rabbit Now, using the following command: cat file.txt | parallel -j 3 "cat "/path/to/tool/toolname" --dir {}.txt --log "/path/to/output/output.txt"" where, let's assume the convert...
cat file.txt | parallel --pipe -n1 --cat -j 3 "cat "/path/to/tool/toolname" --dir {} --log "/path/to/output/output.txt"" Example: cat file.txt | parallel --pipe -n1 --cat wc {} cat file.txt | parallel --pipe -n1 --cat 'echo File number {#} contains;cat {}' cat file.txt | parallel --pipe -n1 --cat clamscan -...
convert each line in a file into an input file
1,630,653,200,000
I am running multiple commands on remote hosts. if I pass my command directly in my ssh script it's working, once I pass it from another script as an argument it gives me a result of my first host and times out on the rest as soon as it loges into them. How can I pass a command from another script and get this working...
You are leaving out something from your example: The example is not complete, because GNU Parallel will never give that error if you do not have a --timeout. That said you should test that My_ssh_function works as expected. So try this: # remove --tag from parallel parallel --dryrun ... > myfile.sh # Does myfile.sh co...
gnu parallel: Warning: This job was killed because it timed out
1,630,653,200,000
I'm trying to rsync approx 10 TB of data from a remote system to the local machine, and I want to use the parallel utility for multi-thread execution. I want to trigger the rsync from the local server. Can someone please suggest how I may do this?
Can you elaborate on why this does not work: seq -w 0 99 | parallel rsync -Havessh fooserver:src/*{}.png destdir/ From https://www.gnu.org/software/parallel/man.html#EXAMPLE:-Parallelizing-rsync
How may I run rsync with "parallel" from the local system to fetch files in parallel?
1,630,653,200,000
Suppose I have the following command to be parallelized: my_command --file <(my | pipeline) Now, I would like to parallelize in specific chunks: my | pipeline | parallel --spreadstdin my_command --file <(parallel's stdin) How would I accomplish this redirection with gnu parallel?
If I understand this right, parallel --spreadstdin sends the blocks of input piped to the stdin of the processes it runs, so it's not Parallel's stdin you want my_command to read from, but its own. If my_command doesn't default to reading stdin, you can usually use /dev/stdin in place of a filename, it resolves to th...
GNU Parallel: redirect piped stdin as if it were a file
1,630,653,200,000
Disclaimer: This is a more general question of the one I asked on biostars.org about parallel and writing to file. When I run a program (obisplit from obitools package) sequentially, it reads one file and creates a number of files based on some criterion (not important here) in the original file: input_file.fastq ...
It sound as if obisplit behaves differently if output is redirected. You can ask GNU Parallel to output to files: seq 10 | parallel --results output_{} echo this is input {} >/dev/null (or if your version is older: seq 10 | parallel echo this is input {} '>' output_{} ) It will create output_#,output_#.err,output_#....
why is this parallel process not writing output to files but printing to console instead?
1,630,653,200,000
I have a set of .txt file-pairs. In each pair of files, File1 contains a single integer and File2 contains many lines of text. In the script I'm writing, I'd like to use the integer in File1 to specify how many lines to take off the top of File2 and then write those lines to another file. I'm using gnu-parallel to ru...
Extending Gilles answer: parallel 'head -n "$(cat {1})" {2}' ::: File1s* :::+ Corresponding_File2s* You probably have a lot of File1s that you want linked to File2s. The :::+ does that.
How to pass the contents of a file to an option/parameter of a function
1,630,653,200,000
I'm executing 60 scripts with GNU parallel(they all have wget commands in there)but I have noticed that after a few hours execution will slow down a bit. What could be causing this? I'm executing parallel with this command: parallel -j 60 < list where "list" is just a file with directories to 60 scripts. I'm on a Cent...
From Understanding the Linux Kernel: In Linux, process priority is dynamic. The scheduler keeps track of what processes are doing and adjusts their priorities periodically; in this way, processes that have been denied the use of the CPU for a long time interval are boosted by dynamically increasing their priority. Co...
Why does parallel slow down after a while?
1,630,653,200,000
Scenario: $ cat libs.txt lib.a lib1.a $ cat t1a.sh f1() { local lib=$1 stdbuf -o0 printf "job for $lib started\n" sleep 2 stdbuf -o0 printf "job for $lib done\n" } export -f f1 /usr/bin/time -f "elapsed time %e" cat libs.txt | SHELL=$(type -p bash) parallel --line-buffer --jobs 2 f1 $...
Try: cat libs.txt | SHELL=$(type -p bash) /usr/bin/time -f "elapsed time %e" parallel --line-buffer --jobs 2 f1
Why does /usr/bin/time coupled with GNU parallel output results before command's output rather than after command's output?
1,630,653,200,000
parallel --joblog /tmp/log exit ::: 1 2 3 0 cat /tmp/log Ηow can Ι use a filter to write only failed job in my load when using GNU parallel or is there a way to get only failed jobs from the above log? I'm a beginner for this.
parallel --joblog /tmp/log exit ::: 1 2 3 0 cat /tmp/log cat /tmp/log | perl -ane '$F[6] and print' Not sure why you need this, but if you are going to retry them, you may want to read about --retry-failed --retries --resume-failed.
How do we write only fail jobs in a log when we use GNU parallel
1,630,653,200,000
I would like to split an input file on character count (ASCII is fine), combined with new lines as well. That is, every group of 10000 character should be seen as one record to be piped into the child process, but if that 10000th character does not happen to be at the end of line, the whole line should be included (an...
What you are asking for is pretty much: seq 100000 | parallel --block 10k --pipe wc It will pass a block around 10000 bytes to wc but will only give full lines. It will not guarantee that the block will be at least 10 kbytes, but it will at most be one line off.
Is it with GNU parallel possible to split on character count, but provide full lines only?
1,630,653,200,000
Im trying to use GNU parallel on a script, and i noticed that it only starts to output, after -jX X jobs # Only spawns cat after 100 seconds (echo a; sleep 100) | parallel -j1 --lb cat # Starts instantly (echo a; echo a; sleep 100) | parallel -j1 --lb cat The first job needs to be launched before the others (because...
Upgrade to 20181222 or later. # Spawns a instantly (echo a; sleep 100) | parallel -j1 --lb cat # Starts a and b instantly, outputs a immediately, b after 100 sec (echo a; echo b; sleep 100) | parallel -j1 --lb cat # Starts a and b instantly, outputs a and b immediately (but output may be mixed) (echo a; echo b; slee...
GNU Parallel waits for n jobs before starting
1,630,653,200,000
I have a directory with files that look like this: id1_1.txt id1_2.txt id2_1.txt id2_2.txt I need to pass these files as a couple (e.g id1_1.txt and id1_2.txt) to my_script. Here's what I thought would work parallel -j +0 -X python my_script.py -1 {} -2 {= s/_1/_2/ =} -o /output/dir/good /output/dir/bad ::: /my/dir/*...
As steeldriver pointed out, the version of parallel that I had installed pre-dated the synatx I was using (GNU parallel - NEWS). As a side note, the GNU parallel index lists the OLDEST versions at the top and the newest at the bottom. When I downloaded parallel on my new workspace, I didn't pay attention to this and ...
Syntax error when using sed to replace line-specific string in parallel: {= s/_1/_2/ =}?
1,630,653,200,000
I need to run a command for each individual instance of a given variable name in parallel. Sometimes, there might be 4 variables, other times there might be 100. For example, say I have this particular dataset as: datanames='KQPW KMMX KMKO KZAO' I need to run a process for each which is to be run in parallel with one...
A quick demonstration of executing scripts based as described in parallel, without using any external tools: #!/bin/bash datanames='KQPW KMMX KMKO KZAO' datanamesarray=($datanames) for item in ${datanamesarray[@]}; do ( ./${item}.csh; sleep 10 ) & done echo waiting.. wait echo done Executing this will display waiti...
Running multiple bash scripts with different names in parallel
1,630,653,200,000
I need to copy a large amount of files into their own directories. The issue I am having is keeping them in order when I copy them with GNU parallel. For example, file_1.output gets placed in dir_19. Here is what I have so far that is working, besides the order of files. ls *.output > copy.list parallel "mkdir cele_{}...
You can use --rpl to define your own replacement string and then use that both for mkdir and cp. ls *.output | parallel --rpl '{dir} s/\.output$/_dir/' 'mkdir {dir} && cp {} {dir}'
Keeping dirs in order with GNU Parallel
1,630,653,200,000
I use gnu parallel to run a pipe on multiple files in parallel. My code does what it should, however, if specifying the max. number of CPU (in my case 64) each job uses <5% from each CPU (based on htop ). In addition, the number of tasks and thr. (again based on htop) go through the roof which eventually kills the ser...
As Luciano says in the comment, disk I/O is most likely the cause. The reason for getting more processes is that your pipeline will start at least 5 processes. So you should see at least 64*5 processes being started. Some of these may also start several threads. Parallel disk I/O is very unpredictable (See https://ole...
gnu parallel multithreading pipe uses little CPU% but stalls server
1,630,653,200,000
First of all, yes, locked into csh on a Solaris box, can't do anything about it, sorry. I have a report batch I was running using a foreach loop. Right now it runs as a single thread and I would like to speed it up with GNU parallel. I have been trying two different approaches but hitting roadblocks on each. Here is m...
Write a script. Call that from GNU Parallel: [... set $START and $COUNT ...] seq $COUNT | parallel my_script.csh $START {} my_script.csh: #!/bin/csh set START = $1 set i = $2 set REPDATE = "`gdate --date='$START +$i day' +%Y/%m/%d`"; set FILEDATE = "`gdate --date='$START +$i day' +%Y%m%d`"; echo "runf reportname.r...
csh array/command substitution with gnu parallel
1,630,653,200,000
I have some 5 million text files under a directory - all of the same format (nothing special, just plain text files with some integers in each line). Id like to compute the maximum and minimum line count amongst all these files. I started out by trying to write out all the line count like so (and then workout how to f...
xargs exists to deal with this exact situation, and will work as long as the filenames involved don't contain spaces or newlines: find /some/data/dir/with/text/files/ -type f -print | xargs wc -l You could then sort based on the line count. If you don't care about which specific files contain the minimum and maximum ...
get minimum and maximum line count from files within a directory
1,630,653,200,000
I can't append to an array when I use parallel, no issues using a for loop. Parallel example: append() { arr+=("$1"); } export -f append parallel -j 0 append ::: {1..4} declare -p arr Output: -bash: declare: arr: not found For loop: for i in {1..4}; do arr+=("$i"); done declare -p arr Output: declare -a arr=([0]=...
Your parallel appears to be the GNU one, which is a perl script that runs commands in parallel. It tries very hard to tell what shell it is being invoked from so that the command that you pass to it is interpreted by that shell, but to do that it runs a new invocation of that shell in separate processes. If you run: ...
Unable to append to array using parallel
1,630,653,200,000
So I know that to enable Passwordless SSH I need to generate a public authentication key and append it to the remote hosts ~/.ssh/authorized_keys file, generating a new SSH key pair. The question is can I have an array of passwords and try one after another until the right password is found or do I need to have actual...
sshpass does that. You can run this on a trusted system (e.g. no attackers: The passwords will be shown in cleartext if another user runs ps). testone() { sshpass -p "$1" ssh "$2" echo OK; } export -f testone parallel --tag -k testone :::: passwords.txt hostlist.txt 2>/dev/null Be aware that some systems will see thi...
Passwordless SSH, list of possible passwords to try against any given host
1,630,653,200,000
How safe is it to use export in bash scripts when using GNU Parallel? I have a parent script. parent.sh (echo child.sh & echo child_two.sh) || parallel bash wait if [[ "$STATUS1" == "0" && "$STATUS2" == "0" ]]; then //continue else //stop the process fi child.sh Getting the STATUS1 based on another process e...
I think you will benefit from looking into parset https://www.gnu.org/software/parallel/parset.html $ parset myvar 'echo do stuff with {};(exit {}); echo $?' ::: 0 0 1 2 3 0 0 $ echo "${myvar[3]}"
How safe is it to use EXPORT in bash scripts when using GNU Parallel?
1,630,653,200,000
I'm using gnu parallel that reads a text file containing curl commands. If I do ps -ef | grep -cw [c]url it shows total number of curl process at a moment. But I want to know number of gnu parallel jobs running in each CPU core. How to find that?
Taking the question literally I do not see a way you can do that: A process may run 1 ms on one core and the next ms it runs on another core. Your comment is, however, easy to answer: I wanna ensure all cores are involved. How do I verify that? htop This shows all cores are busy: 1 [|||||93.0%] 17 [|||||97.3%...
How to find the number of jobs (created by gnu parallel) running in each CPU core at any given time?
1,630,653,200,000
I have written a script that finds files in directories, and brings through if statement, here is a code: for dirname in /input/*; do id=${dirname#/input/} # remove "/input/sub-" id=${id%/} # remove trailing "/" printf 'Adding ID to recon-all processing list: %s\n' "${id}" >&2 T11=`fi...
I wonder if you want to call recon-all with all of the non-empty variables. If that's the case, you might want this: opts=( -s "$id" ) for val in "$T11" "$T12" "$T21" "$T22"; do [[ -n "$val" ]] && opts+=( -i "$val" ) done recon-all "${opts[@]}"
Simplify and parallel bash if statement script
1,630,653,200,000
I have a script which will be running in each server and copies certain files into it. Script knows where I am running and what files I need to copy. Script will copy files from local datacenter local_dc but if it is down or not responding, then it will copy same files from remote datacenter remote_dc_1 and if that is...
Yes. It will attempt to copy from the first, if that fails it will try the second and if that fails too, it will try the third. To have it email you at the end, use this: scp ... || scp ... || scp || echo "All attempts failed" | mailx -r "[email protected]" To have each scp command tell you if it failed, you can use ...
How to copy files from other servers if local machine is down
1,630,653,200,000
Fast and simple. This command works locate -i mymovieormysong|parallel mplayer the song (or movie) play, but i cannot control mplayer with keyboard. How to do (if possible) this? Actually when i use keyboard to go forward or backward I obtain this ^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[D^[[D^[[D Edit1: using -u (un-group) o...
I reckon it is unlikely that you want more than one mplayer running. Normally GNU Parallel takes the tty of the process (due to process group logic). --tty hands the tty to the tty running. So if mplayer reads from the tty, then this might work: locate -i mymovieormysong|parallel --tty mplayer
gnu parallel: how to control output of program?
1,395,153,498,000
How can I tell whether my harddrive is laid out using an MBR or GPT format?
With lsblk from util-linux v. 2.33 and later, one can print only the partition table type via lsblk /dev/nvme0n1 -dno pttype gpt d omits children/slaves, n omits headers and o prints only the specified field. It's quite handy since it doesn't need post-processing the output and doesn't require root access.
GPT or MBR: How do I know?
1,395,153,498,000
I'm partitioning a non-SSD hard disk with parted because I want a GPT partition table. parted /dev/sda mklabel gpt Now, I'm trying to create the partitions correctly aligned so I use the following command to know where the first sector begins: parted /dev/sda unit s p free Disk /dev/sda: 488397168s Sector size (lo...
In order to align partition with parted you can use --align option. Valid alignment types are: none - Use the minimum alignment allowed by the disk type. cylinder - Align partitions to cylinders. minimal - Use minimum alignment as given by the disk topology information. This and the opt value will use layout informa...
Create partition aligned using parted
1,395,153,498,000
I keep receiving this error: Warning!! Unsupported GPT (GUID Partition Table) detected. Use GNU Parted I want to go back to the normal MBR. I found some advice here and did: parted /dev/sda mklabel msdos quit But when I get to the mklabel option it spits out a warning that I will lose all data on /dev/sda. Is there...
That link you posted looks like a very ugly hack type solution. However, according to the man page, gdisk, which is used to convert MBR -> GPT, also has an option in the "recovery & transformation" menu (press r to get that) to convert GPT -> MBR; the g key will: Convert GPT into MBR and exit. This option conv...
Remove GPT - Default back to MBR
1,395,153,498,000
I have an existing Windows 7 GPT installation, which already has a EFI System partition. I am now trying to install a Linux on a separate harddisk, which is also GPT formatted. I did not find any working way to get grub booting without EFI system partition, so my question is: Is it possible for grub2 to use the same E...
After a day of research, I can now answer my own Question: yes it is possible, and you can even use that partition as /boot and store your kernels/initramfs/etc. there. Requirements: Grub >= 2.00 (1.98 and 1.99 do not work) Grub must be installed from a Linux kernel, that has support for EFI variables (CONFIG_EFI_VAR...
Can GRUB2 share the EFI system partition with Windows?
1,395,153,498,000
In the blkid output, some lines contain UUID and PARTUUID pairs and others only PTUUID. What do they mean? In particular, why are two IDs required for a partition and why are some partitions identified by UUID/PARTUUID and some by PTUUID?
UUID is a filesystem-level UUID, which is retrieved from the filesystem metadata inside the partition. It can only be read if the filesystem type is known and readable. PARTUUID is a partition-table-level UUID for the partition, a standard feature for all partitions on GPT-partitioned disks. Since it is retrieved fro...
What is UUID, PARTUUID and PTUUID?
1,395,153,498,000
I'd like to install linux, but I don't want to risk damaging my current windows installation as I have heard a lot of horror stories. Fortunately, I have an extra hard drive. Can I install linux onto that and then dual boot windows without having to modify the windows drive? Also, I have a UEFI "BIOS" and the window...
I'm going use the term BIOS below when referring to concepts that are the same for both newer UEFI systems and traditional BIOS systems, since while this is a UEFI oriented question, talking about the "BIOS" jibes better with, e.g., GRUB documentation, and "BIOS/UEFI" is too clunky. GRUB (actually, GRUB 2 — this is o...
Dual boot windows on second harddrive, UEFI/GPT system
1,395,153,498,000
Question: Should I use fdisk when creating partitions? Or is it advisable to use parted since it uses GPT? (by default?) And with that I can create partitions larger than 2TB.
MBR, Master Boot Record Wikipedia excerpt; link: A master boot record (MBR) is a special type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The concept of MBRs was publicly introduced i...
Should I use fdisk for partitioning or GPT aware tools?
1,395,153,498,000
Will # dd if=/dev/zero of=/dev/sda wipe out a pre-existing partition table? Or is it the other way around, i.e, does # fdisk /dev/sda g (for GPT) wipe out the zeros written by /dev/zero?
Will dd if=/dev/zero of=/dev/sda wipe out a pre-existing partition table? Yes, the partition table is in the first part of the drive, so writing over it will destroy it. That dd will write over the whole drive if you let it run (so it will take quite some time). Something like dd bs=512 count=50 if=/dev/zero of=/dev...
Will dd if=/dev/zero of=/dev/sda wipe out a pre-existing partition table?
1,395,153,498,000
I'm using GPT as my partitioning scheme. I check the UUID's of my partitions: # ls -l /dev/disk/by-partuuid/ total 0 lrwxrwxrwx 1 root root 10 Oct 18 22:39 0793009a-d460-4f3d-83f6-8103f8ba24e2 -> ../../sdb3 lrwxrwxrwx 1 root root 10 Oct 18 22:39 13f83c47-ad62-4932-8d52-e93626166e7f -> ../../sdc3 lrwxrwxrwx 1 root root...
mdraid always allows you to move disks around freely in the machine, regardless of how you add the disk to the array. It tracks the disks by the RAID metadata (superblocks) stored on the disk. Note that this assumes mdadm can find the disks when its assembling the arrays. The default (specified in /etc/mdadm/mdadm.con...
Using UUID's with mdadm
1,395,153,498,000
OS: Debian Bullseye, uname -a: Linux backup-server 5.10.0-5-amd64 #1 SMP Debian 5.10.24-1 (2021-03-19) x86_64 GNU/Linux I am looking for a way of undoing this wipefs command: wipefs --all --force /dev/sda? /dev/sda while the former structure was: fdisk -l /dev/sda Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468...
You're lucky that wipefs actually prints out the parts it wipes. These, wipefs -a /dev/sda /dev/sda: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54 /dev/sda: 8 bytes were erased at offset 0x3b9e655e00 (gpt): 45 46 49 20 50 41 52 54 /dev/sda: 2 bytes were erased at offset 0x000001fe (PMBR): 55 ...
Undoing wipefs --all --force /dev/sda? /dev/sda
1,395,153,498,000
I've got an USB pen drive and I'd like to turn it into a bootable MBR device. However, at some point in its history, that device had a GPT on it, and I can't seem to get rid of that. Even after I ran mklabel dos in parted, grub-install still complains about Attempting to install GRUB to a disk with multiple partition ...
If you want a single command, instead of navigating interactive menus in gdisk, try: $ sudo sgdisk -Z /dev/sdx substituting sdx with the name of your disk in question. (obviously - don't wipe out the partition information on your system disk ;)
Remove all traces of GPT disk label
1,395,153,498,000
I know about the advanced format and setting 2048 free sectors at the beginning of a disk. But I just converted a partition table of my disk from MS-DOS to GPT, and I noticed this: Before: Number Start End Size Type File system Flags 32,3kB 1049kB 1016kB Free Space 1 1049k...
Partitioners like to align partitions on a mebibyte boundary these days. For MBR partitioning, there are 4 primary partitions, and for the rest you need extended and logical partitions. While the layout of the primary partitions is expressed at the end of the first sector of the disk, for the logical partitions, you'v...
Why are there 2048 sectors of free space between each logical partition?
1,395,153,498,000
I have a 3TB drive which I have partitioned using GPT: $ sudo sgdisk -p /dev/sdg Disk /dev/sdg: 5860533168 sectors, 2.7 TiB Logical sector size: 512 bytes Disk identifier (GUID): 2BC92531-AFE3-407F-AC81-ACB0CDF41295 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 5860533134 Par...
I found a solution: A program called kpartx, which is a userspace program that uses devmapper to create partitions from loopback devices, which works great: $ loop_device=`losetup --show -f /dev/sdg` $ kpartx -a $loop_device $ ls /dev/mapper total 0 crw------- 1 root root 10, 236 Mar 2 17:59 control brw-rw---- 1 roo...
Recognizing GPT partition table created with different logical sector size
1,395,153,498,000
I've seen some disk formatting/partitioning discussions that mention destroying existing GPT/MBR data structures as a first step: sgdisk --zap-all /dev/nvme0n1 I wasn't previously aware of this, and when I've set up a disk, I've generally used: parted --script --align optimal \ /dev/nvme0n1 -- \ ...
This advice is from the time when other tools didn't properly support GPT and were not removing all the pieces of the GPT metadata. From sgdisk man page for the --zap/--zap-all option: Use this option if you want to repartition a GPT disk using fdisk or some other GPT-unaware program. That's no longer true. Both fdi...
Is it important to delete GPT/MBR labels before reformatting/repartitioning?
1,395,153,498,000
What is the equivalent for GPT using HDDs of: # fdisk -l /dev/hda > /mnt/sda1/hda_fdisk.info I got this from https://wiki.archlinux.org/index.php/disk_cloning (under "Create disk image") for getting the extra hdd info which may be important for restoring or extracting from multi-partition images. When I do this I get ...
some unix partitioner, are deperecated and GPT partition table is new and some tools doesn't work GPT. GNU parted is new and gparted is GNOME Parted for example: root@debian:/home/mohsen# parted -l /dev/sda Model: ATA WDC WD7500BPVT-7 (scsi) Disk /dev/sda: 750GB Sector size (logical/physical): 512B/4096B Partition Ta...
Getting the extra GPT info; a "fdisk -l" equivalent
1,395,153,498,000
I'm just reading up on GUID partition tables, and messing around with gdisk, I see these two titles. What is the difference between them? I am referring to the following (emphasis mine) shown when running gdisk: GPT fdisk (gdisk) version 0.8.7 Type device filename, or press to exit: /dev/sda Partition table scan: ...
The partition unique GUID is generated at the time that the partition is created. It uniquely identifies the partition at least inside the disk and probably among all the disks you own (because it's unbelievably rare for GUIDs to collide). A partition GUID code (by which I believe you mean a partition type GUID), on t...
What's the difference between the Partition GUID Code and Partition unique GUID?
1,395,153,498,000
All of the tools I've tried until now were only capable to create a dual (GPT & MBR) partition table, where the first 4 of the GPT partitions were mirrored to a compatible MBR partition. This is not what I want. I want a pure GPT partition table, i.e. where there isn't MBR table on the disk, and thus there isn't also ...
TO ADDRESS YOUR EDIT: I didn't notice the edit to your question until just now. As written now, the question is altogether different than when I first answered it. The mirror you describe is not in the spec, actually, as it is instead a rather dangerous and ugly hack known as a hybrid-MBR partition format. This questi...
How to construct a GPT-only partition table on Linux?
1,395,153,498,000
A friend of mine used my USB stick to install a new version of OS X on his mac. Now that I got it back, I wanted to wipe it (I use Linux myself). However, I'm having a bit of trouble doing so. The first thing I did was write a Fedora LiveCD to it, using dd: # dd if=Fedora.iso of=/dev/sdb This, I thought, would overwr...
Found the answer: the Fedora ISO contains a GUID Partition Table with a partition layout very similar to that of OS X. Because of this, I confused the partitions created by dd if=Fedora.iso of=/dev/sdb with the ones created by the OS X installer. The confusion was furthered by the fact that one of the partitions has ...
Where is the GUID Partition Table stored on a device?
1,395,153,498,000
Background I'm setting up a new build, with all new hardware, tabula rosa. I want to have multiple Linux installations and common data partitions. From what I'e gathered so far, using new hardware and up-to-date kernels, I should be able to use rEFInd as a simple boot manager and use a fully modern boot process. I've ...
Current util-linux versions of fdisk support GPT, the one I'm looking at here is fdisk from util-linux 2.24.2 (reported via fdisk -v). Run fdisk /dev/whatever. Have a look at the options with m. Note these change depending on the state of the partition table. First check what state the disk is currently in with p. ...
How to initialize new disk for UEFI/GPT?
1,395,153,498,000
If I inspect an hybrid ISO with tools like fdisk and gdisk, then looks like hybrid ISO has both the MBR and GPT in order to support both the BIOS and UEFI: # gdisk -l /dev/sdb GPT fdisk (gdisk) version 0.8.10 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: present Found valid MBR a...
An USB flashdrive on which the hybride iso has been written, cannot be re-partitioned with fdisk or gparted anymore because hybrid partitions (combining ISO partition, GPT and MBR partitions) confuse fdisk and gparted. it will work very well with Linux on BIOS and UEFI system, but yo cannot re-partition it again with ...
How to understand partition table on hybrid ISO image?
1,395,153,498,000
BIOS firmware can boot a BIOS formatted /boot partition installed on a software RAID 1 pair no problem. It can even boot from a /boot installed on LVM volume that lives on a software RAID 1 pair. But with a uEFI install, /boot/efi has to be on a non md partition or the firmware can not access it. Is this a flaw with u...
EFI knows how to access FAT and FAT32 filesystems. This is why your EFI boot partition has to be FAT or FAT32 formatted. EFI however does not know how to read a software RAID 1 partition, even if it is formatted using FAT32. There is a pretty simple away around this, at least using Arch Linux. When installing the ...
Why is uEFI firmware unable to access a software RAID 1 /boot/efi partition?
1,395,153,498,000
My neighbor brought over a 3TB external hard drive saying that after loaning it out to a Windows user, her Mac is asking her "to initialize something" whenever she plugs it in to her computer. I'm using Fedora, and I'm trying to recover any data off of the drive before I let her try anything on her computer, because I...
It seems that the drive has been formatted by Windows - which is not surprising, since Windows definitely must have been unable to use the disk which had very likely been formatted by OS X for sole use under OS X. Now the problem is exactly the same, just with the sides swapped. If you want to mount the Windows partit...
Problems mounting GPT partitioned external HDD
1,395,153,498,000
I've been trying all day to get my new Wheezy install completed but it fail to install Grub every time. I'm using x64 netinstall iso. Here is my partition table: Model: ATA ST3000DM001-1CH1 (scsi) Disk /dev/sda: 5860533168s Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags: Number Start ...
Looks like somehow Debian installer screws up the partition table. The "bios_grub" flag gets removed and becomes "raid" flag. The fix is to rework the partition table again with parted and set it back. parted /dev/sda set 1 bios_grub on quit Same for /dev/sdb, and then chrooting and installing grub with answer from t...
Grub fails to install - Debian Wheezy with mdadm RAID1 and GPT partition table
1,395,153,498,000
I am trying to install FreeBSD in legacy mode (BIOS) on a UEFI system, since I have an Intel Iris Graphics 6100, which is from Broadwell series and is not supported yet by the intel driver, so I want to be able to use the vesa driver - which is not supported by UEFI. I already have 2 Linux systems installed, on a GPT ...
Yes you can install FreeBSD in Legacy mode on GPT disk. You can achieve it by creating a small partition called bios_grub (important) before installing FreeBSD , this partition is required to successfully install Grub on the Master-Boot-Record. Some newer systems use the GUID Partition Table (GPT) format. This was sp...
Boot FreeBSD in legacy mode on GPT disk
1,395,153,498,000
I have a disk with classic MBR and want to transform it to use GPT without data loss. I have seen several more or less useful tutorials, but most of them are dealing with the specific problems related to GRUB, the operating systems and multiple partitions on a disk. In my case, the situation is much simpler - I have a...
I created an MBR disk with one partition, filled every single byte on that partition with data, created a SHA1 checksum of the whole partition, converted it to GPT as described in the question, created yet another checksum and compared it with the original. They were the same. So my conclusion is this: You can safely ...
Transforming a disk from MBR to GPT
1,395,153,498,000
we have BBB based custom board with 256MB RAM and 4GB eMMC, I have partitioned it using below code, parted --script -a optimal /dev/mmcblk0 \ mklabel gpt \ mkpart primary 128KiB 255KiB \ mkpart primary 256KiB 383KiB \ mkpart primary 384KiB 511KiB \ mkpart primary 1MiB 2MiB \ mkpart primary 2MiB 3MiB \ m...
As @derobert mentioned in the comment. mkfs.ext4/mke2fs refers to /etc/mke2fs.conf and formats the partition. mke2fs chooses block size based on the partition size if not explicitly mentioned. Read -b block-size and -T usage-type in mke2fs man page for the same. So when partition size is less than 512MB mkfs.ext4 form...
File system block size differs between different ext4 partitions
1,395,153,498,000
I have a Debian Jessie (3.16.7-ckt20-1+deb8u3) system with RAID1 on 2x 3TB hard drives. Grub can't be installed into MBR on drives >2TB, thus I have GPT with 1MB bios partition: Device Start End Sectors Size Type /dev/sda1 2048 4095 2048 1M BIOS boot /dev/sda2 4096 19...
If you simply exit from the rescue shell the system will try to continue to boot. If you need to increase rootdelay you can add it to your kernel options in /etc/grub/default and run update-grub.
mdadm: no devices listed in conf file were found - Debian 8 with GPT
1,395,153,498,000
My current idea is to create one software array, class RAID-6, with 4 member drives, using mdadm. Specifically, the drives would be 1 TB HDDs on SATA in a small server Dell T20. Operating System is GNU/Linux Debian 8.6 (later upgraded: Jessie ⟶ Stretch ⟶ Buster) That would make 2 TB of disk space with 2 TB of parity i...
In this answer, let it be clear that all data will be destroyed on all of the array members (drives), so back it up first! Open terminal and become root (su); if you have sudo enabled, you may also do for example sudo -i; see man sudo for all options): sudo -i First, we should erase the drives, if there was any dat...
mdadm RAID implementation with GPT partitioning
1,395,153,498,000
I was fiddling around with parted command on a loopback disk and tried to create some partitions using gpt part table but I keep getting Error: Unable to satisfy all constraints on the partition. when trying to create a logical partition $ sudo parted /dev/loop0 (parted) mktable gpt (parted) mkpart primary 1MiB 201MiB...
The extended and logical partitions make sense only with msdos partition table. It's only purpose is to allow you to have more than 4 partitions. With GPT, there are only 'primary' partitions and their number is usually limited to 128 (however, in theory there is no upper limit implied by the disklabel format). Note t...
Unable to create logical partition with Parted
1,395,153,498,000
I had a gpt-partitioned drive, with unpartitioned space at the end, I used dd to clone it to another smaller drive. Unfortunately Linux won't see the partitions on the cloned drive. My understanding is that GPT has two copies of the partition table, the primary copy at the start just after the MBR table, and the secon...
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 t...
repair gpt after cloning to smaller drive
1,395,153,498,000
What will happen to all the remaining partition labels if I remove a single partition? For example if I have a layout that looks like this: /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5 and if I remove /dev/sda2 will /dev/sda3, /dev/sda4 and /dev/sda5 "shift" their numbers, and am I going to get this: /dev/sda1 /...
Traditionally, Linux on x86 hardware has used MSDOS partition tables. In this case, removing /dev/sda2 won't shift any of the higher numbered partitions down, because the primary partitions act like "slots": you can use them in any order you like, and removing one doesn't affect any of the others. If instead you had s...
What happens to partition labels after removing a partition?
1,395,153,498,000
When I use cfdisk to create a new partition, I usually change its type to Linux filesystem. There's multiple types for most operating systems, but a very large number for Linux (architecture-specific for root, /usr, and something called “verity”?). But isn't /etc/fstab the file that gives meaning to these partitions? ...
The idea behind all these different partition type GUIDs is that they can be used to mount a system’s volumes without /etc/fstab. The partition types are defined in the discoverable partitions specification. With systemd, this is handled by systemd-gpt-auto-generator. The general idea behind this is to be able to buil...
What is the significance of GPT's "Partition Type GUIDs"?
1,501,411,620,000
Under the MBR model, we could create four primary partitions one of which could an extended partition that's further subdivided into logical partitions. Consider this GPT schematic taking from Wikipedia: Partition entries range from LBA 1 to LBA 34, presumably we ran out of that space and I understand that's a fai...
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 represent...
Are there extended partitions in GPT partition table?
1,501,411,620,000
I'm looking at replacing my current MBR-partitioned 2 TB system drive with quite possibly a 3 TB drive. Copying the files should not pose a problem, but are there any gotchas to watch out for, particularly with regards to the boot loader, keeping in mind that MBR doesn't support anything more than 2 TB so I'll have to...
Grub2 supports GPT, so you'll have no problem booting from the new drive. Whether your BIOS can boot a GPT drive is a different matter. If you switch your BIOS from legacy mode to EFI mode, you'll need to install the grub-efi package. You'll need to install the bootloader on the new drive. The easiest way is to copy t...
Copying OS from one drive to another migrating from MBR to GPT - what to watch out for?
1,501,411,620,000
We have bbb based custom board containing eMMC. And we have created partitions as follows, parted --script -a minimal /dev/mmcblk0 \ mklabel gpt \ mkpart primary 131072B 262143B \ mkpart primary 262144B 393215B \ mkpart primary 393216B 524287B \ mkpart primary 524288B 1572863B \ mkpart primary 1572864B 262...
Try to align to eMMC erasure block size. It usually equals 0.5, 1, 2, 4, 8 MiB depending on eMMC datasheet. If you find block size alignment too much memory wasting, then stick to the page size, generally found in the range of 4..16 KiB. Try to make partition sizes and borders a multiple of erasure block size, so when...
how to achieve optimal alignment for emmc partition?
1,501,411,620,000
I have cloned a 1GB pen drive to an 8GB one using dd. But the size of the GPT is still 1GB. For example the secondary (backup) GPT is still located at 1GB (it has to be moved to the end of the disk). Also I think two fields inside the main GPT (at offset 32 and 48) have to be updated. I've looked into gdisk but couldn...
Example using gdisk: # gdisk /dev/yourdisk Command (? for help): v Problem: The secondary header's self-pointer indicates that it doesn't reside at the end of the disk. If you've added a disk to a RAID array, use the 'e' option on the experts' menu to adjust the secondary header's and partition table's locations. Id...
How to resize the GPT partition table itself on Linux?
1,501,411,620,000
All I search for this says, makes me understand that GPT is related to UEFI, but is it possible to install using GPT disk format, in a 32 bit system using bios (not legacy mode)? I tried installing Arch in a VM simulating 32bit and using a partition like: -BBP /boot / /home swap and it did not work. Is it possible? I...
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 s...
Can I install using GPT on 32 bit system with bios?
1,501,411,620,000
I am frequently testing bootable USB devices with different operating systems. Now I have to boot the whole computer just to test one USB device. How can I test the devices without booting? QEMU works sometimes, but not with UEFI GPT devices. Command sudo qemu-system-x86_64 /dev/sde1 just hangs with "Booting from Har...
sudo apt-get install ovmf qemu-efi qemu qemu-system-x86_64 --bios /usr/share/qemu/OVMF.fd -m 4096 -enable-kvm -cdrom debian-9.2.1-amd64-DVD-1.iso -display sdl -vga virtio You can specify also an HD (virtual or physical)
How do I test bootable USB created with UEFI GPT partition scheme
1,501,411,620,000
Using the GUID Partition Table and RAID 1, the bootloader (syslinux or GRUB) is not able to boot into the machine, which was installed with Arch Linux. First off, there are two drives identical drives setup to use software RAID level 1. The two drives are partitioned as follows: sd[ab]1 as md2 sb[ab]2 as md1 sb[ab]3...
The PC only boots from an individual disk, so that is where you must install grub. Note that you can install it on each of the disks individually in case one fails, then the other can be used. Grub2 also does not require a dedicated /boot partition; it can boot from lvm on draid directly.
bootloader configuration with GPT, RAID1, and LVM
1,501,411,620,000
I used dd to clone a smaller disk onto a larger disk, however now when booting I'm getting dmesg errors of: [Fri Sep 30 11:48:43 2022] GPT:Primary header thinks Alt. header is not at the end of the disk. [Fri Sep 30 11:48:43 2022] GPT:1953525167 != 3907029167 [Fri Sep 30 11:48:43 2022] GPT:Alternate GPT header not at ...
You don't need to do anything special, just use p to print information about the disk, parted will tell you the partition table is wrong and ask you what to do so simply tell it to Fix it: # parted /dev/loop0 GNU Parted 3.5 Using /dev/loop0 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p ...
Fix GPT after using dd to clone a smaller disk onto a larger disk
1,501,411,620,000
I have a hard disk that I use for backups via a USB 2.0 docking station. The disk has a GPT and one single ext4 partition. Everything is fine via the docking station, but if I attach the disk to an internal SATA port, or put it in a swap bay in my PC, the GPT is not there any more. Here's what I get when the disk is i...
Unfortunately, GPT still depends on the logical sector size, and in your case it differs: Sector size (logical/physical): 4096 bytes / 4096 bytes Sector size (logical/physical): 4096B/4096B vs. Sector size (logical/physical): 512 bytes / 4096 bytes Sector size (logical/physical): 512B/4096B The difference usuall...
GPT disk looks different in external docking bay and internal swap bay
1,501,411,620,000
I want to disable swap on several running ubuntu 16.04 servers. I'd like, if possible, not to reboot them. From my research, it seemed that running swapoff -a to disable swap until the next reboot and commenting the swap line in /etc/fstab to persist after the next reboot should do the job. However, it seems that t...
The disks were using GPT, and this was due to GPT partition automounting: On a GPT partitioned disk systemd-gpt-auto-generator(8) will mount partitions following the Discoverable Partitions Specification, thus they can be omitted from fstab. Another page of the same documentation explains how to disable this: Star...
Can't disable swap on a GPT-based system
1,501,411,620,000
I am in doubt whether I have partitioned my hdd correctly as GPT on a BIOS motherboard. I used gparted to partition and I don't know if I aligned the beginning/end of the disk correctly, used correct flags etc. The disk in question is sdc: $ sudo lsblk -f NAME FSTYPE LABEL MOUNTPOINT sda ...
To check if all partitions are properly aligned to 1MiB you should divide the start sector by 8. Let's see: 1346283520/8=168285440 174409728/8=21801216 76754944/8=9594368 8394752/8=1049344 6144/8=768 2048/8=256 It looks good. The next thing is to check if the size of the partitions can also be divided by 8: (19535237...
Partitioning correctly for GPT in BIOS system
1,501,411,620,000
I'm trying to set up a dual UEFI boot Windows/Arch Linux, and have already installed Windows on a GPT layout through UEFI boot. I now want to fresh install Arch Linux using GPT layout as well, and was wondering how I could do that. More specifically, do I need to modify the content of the core install image to be able...
I was able to boot Arch from UEFI by using an Archboot image, and then install it on the GPT drive. Then I had to install grub2, which I installed on the same partition as the Microsoft EFI partition, and chainloaded Windows 7 bootloader from it. Thanks!
Installing Arch Linux with UEFI Boot and GPT Layout
1,501,411,620,000
I'm trying to migrate my home server from FreeNAS 8.3 to DragonFly BSD. In order to shuffle my files about I picked up a Seagate 8Tb Archive disk, attached it via eSATA, formatted it as UFS under FreeNAS then patiently waited about a week for it to trickle full. Now I've got DragonFly going, but try as I might I can't...
You chose a rather convoluted migration. FreeBSD, and therefore FreeNAS, uses UFS2 while DragonFly uses the older UFS1. Both have softupdates but UFS2 has a different format as it supports some other features like more timestamps, extended attributes, faster fsck and SUJ.
Migrate UFS drive from FreeNAS to DragonFly BSD
1,501,411,620,000
I've tried installing OpenSUSE 13.2, Debian 8/8.1 and Ubuntu 15.04 (all them amd64). Debian/Ubuntu won't show disks and OpenSUSE can't format the partitions created on them. During the install, OpenSUSE detects disks and even allow me to delete old partitions, create a new partition table,and to create new partitions....
I finally figured it out myself. Solution: First I booted OpenSUSE from USBKEY in UEFI mode. In the intaller partitioner, I removed all partitions in the SSD and HDD Then I created a new partition table for each disk, still using the partitioner. Booted up from Ubuntu 15.04 USBKEY installer and it finally could man...
Can't format HDDs and install linux to Dell hybrid ultrabook
1,501,411,620,000
Why the error getting when excuting the fdisk -l command in linux. # fdisk -l /dev/sdb WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
The real limitation is that the fdisk tool in the util-linux package doesn't support GPT-type partition tables, which you can find on any disk. However, they're commonly found on disks greater than 2 GiB, because the old MBR-type partition tables don't support sizes that large. The easiest fix is, as the error sugges...
Gnu Parted Error in HardDisk of Linux?
1,501,411,620,000
As seen below in output of parted, Windows 8/8.1 seems to use flags in GUID partition entries: I guess that for example partition with hidden flag is not shown in Windows Explorer. However, does Linux also use GPT flags?
Does it use GPT flags? Define use :) The only "important" flag to Linux is the boot flag, and that's not directly handled by Linux per se: your system's firmware at boot time will select the filesystem with this flag and search therein for an EFI bootloader, boot that, and then the bootloader will use the filesystem ...
Does Linux use GPT flags?
1,501,411,620,000
What is the difference between the GPT and the BIOS disc partitioning systems? when boot drive is below 2TB on a BIOS system or UEFI boot disabled grub on BIOS system with GPT partitioned needs an extra 1MB partition, I think this is somewhat messy.
You have four primary partitions and want to add a fifth... and you can't just redeclare them extended/logical because those need an extra sector for each partition. Also GPT has a backup at the end of the disk so if you ever lost a partition table to MSDOS and had to resort to TestDisk, with GPT you might be able to ...
Advantage of GPT over MBR partition table [closed]
1,501,411,620,000
How to boot GPT based system to Linux and Windows? This is not a question of starting from a fresh GPT based system, but starting from a MBR converted to GPT based system. My Asus laptop initial setup, I disabled the Secure Boot Control, and I enabled [Launch CSM] (Compatibility Support Module) I partitioned my HD us...
As far as I know, Windows does not handle such a converted system disk as a special case once the conversion is done, so it should be treated exactly the same as a disk in a "fresh" GPT-based system. In particular, Windows imposes the limitation that GPT-partitioned system disks must always boot Windows in UEFI native...
MBR converted to GPT based system, how to boot Linux and Windows
1,501,411,620,000
In Linux Mint 18.3 which boots from an HDD, I want to mount an external SSD. When I run the command sudo fdisk -l, I get all the drives and partitions as well as the SSD and when I run sudo blkid, I get the type and UUID of each of them. I know that gpt and mbr are the partition scheme for storage drives and ext4 or ...
For the solution to this problem, there are some information in various tutorials. The following steps are prerequisite towards making the new SSD usable: 1. Partition 2. Create a File System and Format 3. Mount Number of partitions, into which the SSD is divided, is optional. In this problem, it is inteded to divide...
How to mount a device of gpt type?
1,501,411,620,000
I just bought two new 4TB external USB disks for backups http://www.bestbuy.com/site/wd-my-passport-4tb-external-usb-3-0-portable-hard-drive-black/5605533.p that came performatted with a single large ms partition. I'm running slackware 14.2x64, and ran gdisk to d(elete) that partition and make three n(ew) 1.2TB partit...
The kernel is still using the old partition table. Issue partprobe for the kernel to use the new partition table or reboot. See man partprobe for the gory details. EDIT (thanks to comments): gdisk prints the following Warning message informing you that the kernel is still using the old partition table, inviting you to...
linux gdisk (on 4TB USB drive) followed my mkfs -- but mkfs doesn't see new partitions
1,501,411,620,000
parted utility somehow detects the file system on partitions on my GPT disk: I guess it does not do this based on partition type codes(seen in the gdisk output) because those would be 27(Hidden NTFS Win) for partitions 1, 5, 6, 7 and for example ef(EFI) for /dev/sda2 but in parted output there are clearly different f...
It looks at the data on the partition, similar to what file -s /dev/partition does. If you strace it you should see things like this: lseek(3, 1048576, SEEK_SET) = 1048576 read(3, "\353<\220mkfs.fat\0\2\10..., 512) = 512 A seek to position 1048576 (1 MiB or 2048 sectors) is outside the partition table (it's the start...
How does "parted" know the file-system type for GPT partitions?
1,501,411,620,000
I have installed a new OS in the free space of the same hard disk after failing to upgrade the old one. Now there are two copies of boot partitions and EFI System partitions. After a harrowing experience deleting the partition containing the old OS where old swap is located, I am not confident to remove the rest of th...
I don't have direct answer, but what I would try if the partition needs to be reclaimed is: first make sure you can boot the system from a CD backup the EFI System partitions (to another partition), using dd reformat one of them and reboot (without CD) If the system does not come up, you can reboot from CD and rest...
Is it safe to delete old boot and EFI System partitions?
1,501,411,620,000
I am reading through the UEFI standard. On page 115, section 5 it discusses the GPT disk layout. I'm a bit confused as to exactly how this works. From the below, it sounds like UEFI will ignore the MBR. A legacy MBR may be located at LBA 0 (i.e., the first logical block) of the disk if it is not using the GPT disk la...
So is this basically saying if you put the firmware in legacy boot mode, this is how to define an MBR which will play nicely with that legacy boot mode? Yes, it's possible to have a disk that's boot table in both BIOS and UEFI mode. Many tools to create a bootable USB stick can do that Am I correct in saying that i...
Can you use MBR with UEFI - a question about the UEFI specification
1,501,411,620,000
I have an ext4 partition backed up with dd on a MBR hard drive that I would like to restore to a new GPT hard drive. Can I just create an empty partition of the exact same size on that new GPT drive and overwrite that partition with the one I want to restore or I have to do something else because the partition was bac...
Can I just create an empty partition of the exact same size on that new GPT drive and overwrite that partition with the one I want to restore? Yes. The MBR/GPT distinction is metadata stored outside of the partition. So when you made a partition backup using dd you only backed up the content of that partition (t...
Using dd to restore a partition backup from MBR disk to GPT one
1,580,829,756,000
I will be installing Windows 10 and Linux (dual-boot) on a new computer in a couple of days. I would like to use GPT instead of MBR for the partition table. As I understand it (and have done in the past), it is much easier to install Windows first (and let it try to dominate the machine 😊) followed by the Linux ins...
Latest Windows can install automatically on GPT, and then proceed with Linux install as usual, modifying partitioning setup as required. Why would you partition first?
Using gparted before installing Windows 10
1,580,829,756,000
I have just opened an external USB 3.0 hard disk enclosure and mounted the disk instead internally in a PC via SATA. Now, the Linux system stops finding the GPT which was certainly there. Since there are already 2 TB of data on the disk it would be nice to find the partition table which is already there. Can the loc...
Can the location of the GPT change when using a different interface (USB, SATA)? Yes, because GPT is stupid and depends on sector size, and some USB enclosures claim 512b sectors when it's really 4096b sectors or vice versa. Yes, because Linux is stupid and does not support GPT for differing block sizes even though ...
Does the (GPT) partition table location change when moving from USB3 to SATA?
1,580,829,756,000
I've got an external disk with 6 partitions: 4 for linux, one storage in HFS+, and one storage in ext4. I'd like to delete the ext4 storage one and move it's resulting unallocated space into my HFS+ one, but in GParted, I delete the ext4, and it becomes unallocated. But when I try to resize my HFS+, I can't enter a ne...
You can't enlarge it with GParted because it currently does not support HFS+ partition "grow". It only supports HFS+ "shrink". See Gparted features or, on your machine: GParted >> View >> File System Support
Can't increase partition size with GParted?
1,580,829,756,000
In answer to installing grub2 on UEFI GPT: In brief, on an EFI-based system, you do not install anything in the MBR; instead, you install a Linux EFI boot loader or boot manager in the EFI System Partition (ESP) and set it as the EFI's default boot program using a tool such as efibootmgr (in Linux), bcfg (in an...
GRUB is quite common, yes; grub-install (no arguments required) will call efibootmgr for you but feel free to experiment with the latter reading out the NVRAM using e.g. ALT Rescue; Rod's book on EFI is a well-formed well of knowledge on the topic, highly recommended. Backing up whole disk is the most safe as usual, a...
how do I install GRUB into the ESP with efibootmgr?
1,580,829,756,000
I have a hard drive which is encrypted using LUKS. It was originally an external hard drive. Recently I removed the casing and connected it directly (via SATA). However, when I connect it directly, I'm unable to view the partition, and it doesn't prompt for the password. Out of 4 TB, it shows an unknown partition of 5...
It's probably a problem with the sector size. Some USB enclosures claim their drives have 4KiB sectors, when the drive represents itself as 512 byte sectors or vice versa. Partition tables (both msdos and gpt) unfortunately depend on the sector size. If the sector size changes, the partition table becomes invalid. Now...
LUKS on an internal hard drive
1,580,829,756,000
Fresh Arch Linux install on (hardware) RAID0 under 64-bit UEFI system with GPT partitions. Had to add MODULES="ext4 dm_mod raid0" HOOKS="base udev autodetect modconf block mdadm_udev filesystems keyboard fsck" into /etc/mkinitcpio.conf so that partitions on RAID0 are recognized properly on boot. Otherwise, ERROR: ...
Since it's now clear you're running software raid ("fake raid", where the firmware/BIOS also has a software RAID implementation to make booting Windows off of it easier—in this case, Intel Matrix Storage), you're probably seeing some bug in Arch's initramfs w/r/t partitioning md arrays. True hardware raid is almost en...
'PARTUUID' in '/etc/fstab' and (hardware) RAID0 don't play well together, do they?
1,580,829,756,000
I am trying to learn and especially understand how partitionning and boot-loaders work. The problem is that I got it all twisted in my mind. In the end I don't understand anything anymore. I know how to partition a hard drive using fdisk, parted, gdisk. I tried chainloading iso files (such as ubuntu.iso, arch.iso) wi...
1) What is wrong here, since syslinux is supposed to support ext2 partitions? Yes, Syslinux supports ext2 fs via Extlinux. If you are using a UEFI/EFI based system then you need a fat32 partition. For GPT only you don't need to have a fat32 partition, just go with the traditional. i.e. ext? 2) Do I have to install ...
Understanding syslinux and partitioning