• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

Parted Layout

I used gpart live CD to create attached partitions, since I have to run it on may PCs, can someone help to make bash script to create gpt partition with the attached layout and file systems.
 Thanks
0
NetRock6
Asked:
NetRock6
  • 3
  • 3
  • 2
  • +2
1 Solution
 
Gerwin Jansen, EE MVETopic Advisor Commented:
Hello, I see no attachment?
0
 
Darr247Commented:
And do you mean GParted Live ?
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
I'd be using parted btw to create such a script, not gparted (graphical). For batch files, command-line parted would be better.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
ahoffmannCommented:
man fdisk
man parted
man gdisk
0
 
NetRock6Author Commented:
I see, here is the attachment.
just looking for Bash Script to automate the process.
Yes is the gparted live CD.
Sda1 is the /Boot
sda2 is /
Sda3 is swap i have 4Gib of memory.
sda8 is fat
sda4-sda7 are Linux partitions

Thank you in advance.
Partl.JPG
0
 
Darr247Commented:
Who told you it needs to be gpt instead of mbr?

Are you sure you don't just need to run
$ blkid
to find out the UUIDs for something?
0
 
NetRock6Author Commented:
Thanks, this is a golden way for two live HDD or raids but in my case this method simply does not work because there is no HDD to copy from the Gpt partition layout
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
>> there is no HDD to copy from the Gpt partition layout
Then you could create one 'sample' machine and create the initial layout for copying.

You are about to run this on a bunch of machines, right?
0
 
NetRock6Author Commented:
I tried to backup the partition table and restore using the following:
To backup I used:
# parted -ms /dev/sda print > sda.parted
Restore:
#sgdisk -R=/dev/sdb  sda.parted

But I get warnings/errors : file size is not multiple of 512 bytes! Misbehavior is likely!
Error 25; strange behavior

Also there is another option like sgdisk -l -w.  

Any help appreciated.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now