* a scripted fdisk ???
@ 1999-01-29 16:38 Bob Segrest
1999-01-30 21:13 ` Philip Blundell
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Bob Segrest @ 1999-01-29 16:38 UTC (permalink / raw)
To: axp-list
Greetings,
I need to build a large number of identical Linux systems. Rather than
manually install and configure the operating system and other software bits,
I am writing a command script that will restore a master dump file to the
hard drives I will install in each system.
One task I have not figured out is how to automatically create the initial
disk label. I know how to manually do this with fdisk, but I don't want to
do this several hundred times. After looking at the fdisk man page, I don't
see any way to pass fdisk command from a shell script.
Does anyone know of a tool that can write the disklabel without manual
intervention ???
If not, where can I find the source for fdisk ???
Bob Segrest
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: a scripted fdisk ???
1999-01-29 16:38 a scripted fdisk ??? Bob Segrest
@ 1999-01-30 21:13 ` Philip Blundell
1999-01-30 21:48 ` Michal Jaegermann
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Philip Blundell @ 1999-01-30 21:13 UTC (permalink / raw)
To: axp-list
Bob Segrest wrote:
>Does anyone know of a tool that can write the disklabel without manual
>intervention ???
I think I once did this by just writing a script that ran fdisk with its stdin
redirected from a file. Not exactly a neat solution but it worked.
p.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: a scripted fdisk ???
1999-01-29 16:38 a scripted fdisk ??? Bob Segrest
1999-01-30 21:13 ` Philip Blundell
@ 1999-01-30 21:48 ` Michal Jaegermann
1999-01-30 23:38 ` Tharin
1999-01-30 23:17 ` Quant-X Alpha Linux Support
1999-02-01 14:47 ` jeff
3 siblings, 1 reply; 11+ messages in thread
From: Michal Jaegermann @ 1999-01-30 21:48 UTC (permalink / raw)
To: axp-list
>
> One task I have not figured out is how to automatically create the initial
> disk label. I know how to manually do this with fdisk, but I don't want to
> do this several hundred times.
You can find on net archives 'sfdisk'. This one can be driven
from a file with commands and data. It is actually more flexible and
capable than fdisk but its interface is a bit cryptic. :-)
I have no idea if 'sfdisk' is still maintained, if its code if 64 bit
clean and if it knows now anything about disk labels. Last time I used
it it was definitely writing only partition tables. If these things
are missing it likely should not be very hard to update its code
by "borrowing" from the current fdisk.
> Does anyone know of a tool that can write the disklabel without manual
> intervention ???
If you are really talking about disklabel then did you check 'minlabel'?
Its counterpart from DU definitely can do what you ask.
Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: a scripted fdisk ???
1999-01-29 16:38 a scripted fdisk ??? Bob Segrest
1999-01-30 21:13 ` Philip Blundell
1999-01-30 21:48 ` Michal Jaegermann
@ 1999-01-30 23:17 ` Quant-X Alpha Linux Support
1999-02-01 14:47 ` jeff
3 siblings, 0 replies; 11+ messages in thread
From: Quant-X Alpha Linux Support @ 1999-01-30 23:17 UTC (permalink / raw)
To: axp-list
Hi Bob !
On Fri, Jan 29, 1999 at 11:38:48AM -0500, Bob Segrest wrote:
> Does anyone know of a tool that can write the disklabel without manual
> intervention ???
RedHat shipped in old releases (5.0 or 4.2) a tool called
sfdisk which is in fact the command-line driven version
of fdisk. We still use this in our current installer,
it works really fine.
> If not, where can I find the source for fdisk ???
Maybe in the source-rpm of "rpm -qf $(which fdisk)" (util-linux).
--
ciao -
Stefan Traby
Quant-X Alpha Linux Support
Quant-X Service & Ph: (+43) 4212 90555-0
Consulting Ges.m.b.H. Fax: (+43) 4212 90555-555
http://www.quant-x.com Email: support@quant-x.com
^ permalink raw reply [flat|nested] 11+ messages in thread* RE: a scripted fdisk ???
1999-01-29 16:38 a scripted fdisk ??? Bob Segrest
` (2 preceding siblings ...)
1999-01-30 23:17 ` Quant-X Alpha Linux Support
@ 1999-02-01 14:47 ` jeff
1999-02-01 17:37 ` Michal Jaegermann
3 siblings, 1 reply; 11+ messages in thread
From: jeff @ 1999-02-01 14:47 UTC (permalink / raw)
To: axp-list
if they are the same type of harddisk, why not use dd to copy the first to
the others?
> -----Original Message-----
> From: Bob Segrest [mailto:Bob.Segrest@digital.com]
> Sent: Friday, January 29, 1999 09:39
> To: axp-list
> Subject: a scripted fdisk ???
>
>
> Greetings,
>
> I need to build a large number of identical Linux systems. Rather than
> manually install and configure the operating system and other
> software bits,
> I am writing a command script that will restore a master dump file to the
> hard drives I will install in each system.
>
> One task I have not figured out is how to automatically create the initial
> disk label. I know how to manually do this with fdisk, but I
> don't want to
> do this several hundred times. After looking at the fdisk man
> page, I don't
> see any way to pass fdisk command from a shell script.
>
> Does anyone know of a tool that can write the disklabel without manual
> intervention ???
>
> If not, where can I find the source for fdisk ???
>
> Bob Segrest
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: a scripted fdisk ???
1999-02-01 14:47 ` jeff
@ 1999-02-01 17:37 ` Michal Jaegermann
1999-02-01 17:51 ` Marek
1999-02-01 18:31 ` Maurice Hilarius
0 siblings, 2 replies; 11+ messages in thread
From: Michal Jaegermann @ 1999-02-01 17:37 UTC (permalink / raw)
To: axp-list
jeff wrote:
>
> if they are the same type of harddisk, why not use dd to copy the first to
> the others?
This sounds like a pretty risky proposition. Various the same type
disks may be not really exactly the same because a production process
is not perfect. Few sectors here, few sectors there....
Also running the first time mke2fs, or mkswap, without -c flag will
likely work nearly always - untill you will **really** need that
disk right away. :-)
--mj
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: a scripted fdisk ???
1999-02-01 17:37 ` Michal Jaegermann
@ 1999-02-01 17:51 ` Marek
1999-02-01 18:31 ` Maurice Hilarius
1 sibling, 0 replies; 11+ messages in thread
From: Marek @ 1999-02-01 17:51 UTC (permalink / raw)
To: axp-list
One easy way to use fdisk is to make a file with the values and have fdisk take
the values from the file.
For instance, lets say you have 2 partitions on your disk.. you can do
something like this in a text file
n
p
1
1
+1000m
n
p
2
256
+1000m
w
Of course the cylinder values are just out of my head and not real, just to
prove the point.
Name the file something like values
and do fdisk < values.
quick and dirty :)
On Mon, 01 Feb 1999, Michal Jaegermann wrote:
>jeff wrote:
>>
>> if they are the same type of harddisk, why not use dd to copy the first to
>> the others?
>
>This sounds like a pretty risky proposition. Various the same type
>disks may be not really exactly the same because a production process
>is not perfect. Few sectors here, few sectors there....
>
>Also running the first time mke2fs, or mkswap, without -c flag will
>likely work nearly always - untill you will **really** need that
>disk right away. :-)
>
> --mj
>
>--
>To unsubscribe: send e-mail to axp-list-request@redhat.com with
>'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
--
\x7fELF\x01\x01\x01
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: a scripted fdisk ???
1999-02-01 17:37 ` Michal Jaegermann
1999-02-01 17:51 ` Marek
@ 1999-02-01 18:31 ` Maurice Hilarius
1 sibling, 0 replies; 11+ messages in thread
From: Maurice Hilarius @ 1999-02-01 18:31 UTC (permalink / raw)
To: axp-list
With regards to your message at 10:37 AM 02-01-99 -0700, Michal Jaegermann.
Where you stated:
>jeff wrote:
>>
>> if they are the same type of harddisk, why not use dd to copy the first to
>> the others?
>
>This sounds like a pretty risky proposition. Various the same type
>disks may be not really exactly the same because a production process
>is not perfect. Few sectors here, few sectors there....
>
>Also running the first time mke2fs, or mkswap, without -c flag will
>likely work nearly always - untill you will **really** need that
>disk right away. :-)
>
> --mj
I also answered this guy ( in private mail) sugegsting dd as a solution,
BUT I told him to make sure they are identical disks, including the ROM
version ( what you see on startup messages) and run a low-lvel format and
check from the SCSI controller to refresh the bad sectors table, then
maybe, after that run badblocks on the disks. This will pretty well
eliminate any bad blocks/sectors from the disks before you dd.
dd can not override the SCSI bad table, btw. Nothing can override this,
short of a "mode sense, mode alter" command set referred to the right mode
page, etc. - on the actual SCSI device.
Best regards,
Maurice W. Hilarius NEW! Telephone: 01-780-456-9771
Hard Data Ltd. NEW! FAX: 01-780-456-9772
11060 - 166 Avenue email:maurice@harddata.com
Edmonton, AB, Canada - T5X 1Y3 http://www.harddata.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: a scripted fdisk ???
@ 1999-01-30 21:47 Greer, Joe
0 siblings, 0 replies; 11+ messages in thread
From: Greer, Joe @ 1999-01-30 21:47 UTC (permalink / raw)
To: 'axp-list@redhat.com'
NAME. cfdisk - Curses based disk partition table manipulator for Linux.
SYNOPSIS. cfdisk
> -----Original Message-----
> From: Michal Jaegermann
> Sent: Saturday, January 30, 1999 4:49 PM
> To: axp-list@redhat.com
> Subject: Re: a scripted fdisk ???
>
> >
> > One task I have not figured out is how to automatically create the
> initial
> > disk label. I know how to manually do this with fdisk, but I don't want
> to
> > do this several hundred times.
>
> You can find on net archives 'sfdisk'. This one can be driven
> from a file with commands and data. It is actually more flexible and
> capable than fdisk but its interface is a bit cryptic. :-)
>
> I have no idea if 'sfdisk' is still maintained, if its code if 64 bit
> clean and if it knows now anything about disk labels. Last time I used
> it it was definitely writing only partition tables. If these things
> are missing it likely should not be very hard to update its code
> by "borrowing" from the current fdisk.
>
> > Does anyone know of a tool that can write the disklabel without manual
> > intervention ???
>
> If you are really talking about disklabel then did you check 'minlabel'?
> Its counterpart from DU definitely can do what you ask.
>
> Michal
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <5518FE2C95E6D111B1A500104B72113B024E291B@alfexc8.alf.dec.c om>]
* Re: a scripted fdisk ???
[not found] <5518FE2C95E6D111B1A500104B72113B024E291B@alfexc8.alf.dec.c om>
@ 1999-02-01 18:48 ` Frank C. Brants
0 siblings, 0 replies; 11+ messages in thread
From: Frank C. Brants @ 1999-02-01 18:48 UTC (permalink / raw)
To: axp-list
At 10:38 AM 1/29/99 , you wrote:
Why don't you run them diskless, like the alpha-linux cluster we've been
reading about. 1 boot disk server & however many clients you need....
Just a thought.
Franko
>Greetings,
>
>I need to build a large number of identical Linux systems. Rather than
>manually install and configure the operating system and other software bits,
>I am writing a command script that will restore a master dump file to the
>hard drives I will install in each system.
>
>One task I have not figured out is how to automatically create the initial
>disk label. I know how to manually do this with fdisk, but I don't want to
>do this several hundred times. After looking at the fdisk man page, I don't
>see any way to pass fdisk command from a shell script.
>
>Does anyone know of a tool that can write the disklabel without manual
>intervention ???
>
>If not, where can I find the source for fdisk ???
>
>Bob Segrest
>
>--
>To unsubscribe: send e-mail to axp-list-request@redhat.com with
>'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
>
Frank C. Brants
Netopia, Inc.
Systems Engineer
franko -at- netopia.com
Fax 972-855-6610
Office / Cell 214-769-0354
Text Page http://primeco.textmsg.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~1999-02-01 18:52 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-29 16:38 a scripted fdisk ??? Bob Segrest
1999-01-30 21:13 ` Philip Blundell
1999-01-30 21:48 ` Michal Jaegermann
1999-01-30 23:38 ` Tharin
1999-01-30 23:17 ` Quant-X Alpha Linux Support
1999-02-01 14:47 ` jeff
1999-02-01 17:37 ` Michal Jaegermann
1999-02-01 17:51 ` Marek
1999-02-01 18:31 ` Maurice Hilarius
-- strict thread matches above, loose matches on Subject: below --
1999-01-30 21:47 Greer, Joe
[not found] <5518FE2C95E6D111B1A500104B72113B024E291B@alfexc8.alf.dec.c om>
1999-02-01 18:48 ` Frank C. Brants
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox