Solved

Parted Layout

Posted on 2013-01-07
10
272 Views
Last Modified: 2013-01-18
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
Comment
Question by:NetRock6
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 38753771
Hello, I see no attachment?
0
 
LVL 44

Expert Comment

by:Darr247
ID: 38753792
And do you mean GParted Live ?
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 38753801
I'd be using parted btw to create such a script, not gparted (graphical). For batch files, command-line parted would be better.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 38753809
man fdisk
man parted
man gdisk
0
 

Author Comment

by:NetRock6
ID: 38754201
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 44

Expert Comment

by:Darr247
ID: 38755140
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
 
LVL 22

Accepted Solution

by:
rickhobbs earned 500 total points
ID: 38757191
0
 

Author Comment

by:NetRock6
ID: 38757545
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
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 38758114
>> 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
 

Author Comment

by:NetRock6
ID: 38767713
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now