02-11-2005
Using fdisk in scripts
Hi !
I need to create large amount of portions for database in Linux. Untill now I've used fdisk for manual creation of chunks and changing thei? file system type. Now I want to write script for create them automatically.
I think I'm not the first who deal with that problem!
Thank you for your answers!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I recently installed RedHat 7.2, and cannot find any tools to partition the disks other than during the install. I did a find from / for fdisk and cfdisk, neither turned up. I looked in the RPM directories on the CD's, again no good. What rpm contains a partition management tool? (1 Reply)
Discussion started by: 98_1LE
1 Replies
2. Solaris
how do i know my disk partion using fdisk (4 Replies)
Discussion started by: seyiisq
4 Replies
3. Red Hat
OS= Fedora 10
I have a secondary 250GB disk of which I created a 50G partition on to try and set-up an LFS system. I finished with the LFS system and now I want to destroy the partition and reclaim all of the 250GB. So i simply ran fdisk /dev/sdb and deleted the 2 Linux partitions ( one 83 and... (2 Replies)
Discussion started by: woodson2
2 Replies
4. Shell Programming and Scripting
Hi folks
What I'm trying is to build a partitioning script.
I can pass a HEREDOC to fdisk just fine. Like this:
fdisk /dev/sda << EOF
p
q
EOF
but I don't know how to put that HEREDOC into a varible to pass it to fdisk.
This is what I have tried so far (no luck)
#!/bin/bash
... (3 Replies)
Discussion started by: latenite
3 Replies
5. UNIX for Dummies Questions & Answers
Just started understanding linux filesystem and partition utilities.
I was going though some video tutorials by CBT nuggets and the author was cursing fdisk as fuzzy tool and recommending to use parted instead.
In our job environment i have seen almost every one using fdisk utility for... (1 Reply)
Discussion started by: pinga123
1 Replies
6. Solaris
I use fdisk -l command to see the attached hard disk drives in rhel5 and cntos 5.5 what is the same command for sun 5.9 (4 Replies)
Discussion started by: z_haseeb
4 Replies
7. Solaris
Hi All,
fdisk -l in linux equals in fdisk option in Solaris
Thanks.......... (2 Replies)
Discussion started by: pvkarthykeyan
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Someone please analyse the following o/p of fdisk -l and tell me what it means for /dev/sda, /dev/sdb, /dev/sdc ....
Disk /dev/sda: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start ... (5 Replies)
Discussion started by: stunn3r
5 Replies
9. BSD
Hello,
MBR partition table made by linux fdisk looks certainly not correct when printed by openbsd fdisk:
Partition table created on linux (centos 6.3):
# fdisk -l /dev/sdc
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 *... (2 Replies)
Discussion started by: vilius
2 Replies
10. Red Hat
run fdisk on a vg with a few lvs , and label it as 8e..and reboot the system..
I wonder if there is still a way to recover the data at all:confused::rolleyes: (2 Replies)
Discussion started by: ppchu99
2 Replies
LEARN ABOUT DEBIAN
acorn-fdisk
FDISK(8) BSD System Manager's Manual FDISK(8)
NAME
acorn-fdisk -- partition editor for Acorn/RISC OS machines
SYNOPSIS
acorn-fdisk -h | --help | -v | --version
acorn-fdisk [-t scheme | --type scheme] -l | --list [device ...]
acorn-fdisk [-t scheme | --type scheme] -s | --size partition
acorn-fdisk [-t scheme | --type scheme] [device]
DESCRIPTION
The acorn-fdisk utility allows one to display or interactively edit partition tables for Acorn/RISC OS machines in various formats. Using
the PC/BIOS format, standard IBM PC (i386) partition tables can also be accessed. When no optional device is given, it defaults to /dev/hda
or /dev/sda.
The options are as follows:
-h | --help Display a short usage and exit immediately.
-l | --list Display the partition table(s) of all devices.
-s | --size Display the size of partition.
-t | --type Select the partitioning scheme to use. Valid schemes are:
EESOX Eesox SCSI on the Acorn machines.
ICSIDEFS ICS IDE.
Filecore/Linux Linux on Filecore. This uses the non-ADFS descriptor to point to the start of the disc to be partitioned. The
first two sectors contain a partition table to identify the Linux partitions contained within.
PC/BIOS PC/BIOS partitioning scheme. This consists of a partition table in the first sector of the disk which contains
both CHS and LBA values for the partitions. There can be up to four entries in the primary partition table.
One of these can be an extended partition containing up to four extra partitions.
PowerTec PowerTec SCSI on the Acorn machines.
Filecore/RISCiX RiscIX on Filecore.
-v | --version
Display the version of acorn-fdisk and exit immediately.
If neither -l | --list or -s | --size are given, the partition table of the given device will be edited interactively.
EXAMPLES
Display the default device's partition table on a PC:
acorn-fdisk --type PC/BIOS -l
Display the PC partition table of /dev/sda:
acorn-fdisk --type PC/BIOS --list /dev/sda
Display the size in blocks of the partition /dev/sda1:
acorn-fdisk --type PC/BIOS --size /dev/sda1
Edit the MBR partition table interactively:
acorn-fdisk --type PC/BIOS
Display the partition table of an MBR backed up to a file:
acorn-fdisk -t PC/BIOS -l mbrdump.bin
Display the size of the first partition on a device where the MBR would be restored from the backup file mbrdump.bin:
acorn-fdisk -t PC/BIOS -s mbrdump.bin1
AUTHORS
arm-fdisk was written by Russell King <rmk@arm.uk.linux.org> based on util-linux fdisk, which was written at least partially by
A. V. Le Blanc <LeBlanc@mcc.ac.uk>.
This manual page was written for the Debian system by
Thorsten Glaser <tg@debian.org> but may be used by others.
BSD
October 2, 2010 BSD