How to auto fdisk?
I know the fdsik not support script process, but I want to apply the same step to other disks, the disks number is large and this is the reason I want auto fdisk. Could someone gave me a hint?
|
If the drives all have the same geometry:
Get partition info: Code:
dd if=/dev/hda of=mbr_part_table bs=512 count=1 Set partition info: Code:
dd if=mbr_part_table of=/dev/hda bs=512 count=1 Should be quite scriptable if you put the resulting file from step one close to the script ;} Another alternative would be expect. man expect for details - most distros provide it. Cheers, Tink |
sfdisk - designed for the job. See the man page.
|
ok, thanks all, I will try these now.
|
All times are GMT -5. The time now is 08:04 AM. |