Link to home
Start Free TrialLog in
Avatar of NetRock6
NetRock6Flag for Canada

asked on

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
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Hello, I see no attachment?
And do you mean GParted Live ?
I'd be using parted btw to create such a script, not gparted (graphical). For batch files, command-line parted would be better.
man fdisk
man parted
man gdisk
Avatar of NetRock6

ASKER

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
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?
ASKER CERTIFIED SOLUTION
Avatar of Rick Hobbs
Rick Hobbs
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
>> 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?
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.