General :: Create A Bash Script To Remove All Partitions On Harddrive Via Fdisk?

Jul 19, 2010

I would like to remove/create partitions on a harddrive without going into the menu of fdisk.

can one pass options to fdisk to create and delete without going into the menu? So that I can write a script to do that automatically.

Or if fdisk isn't capable, what other alternatives do I have?

View 5 Replies


ADVERTISEMENT

Ubuntu Installation :: Create Aligned Partitions With Fdisk On EBS?

Jul 17, 2010

After reading Markus Ewald blogpost on http:[url]...n-ssd-on-linux about Aligning an SSD on Linux I decided to give it a try.I have bought two 80 GB Intel X25-M SSD for my home server. The plan is to install Ubuntu 10.04 64-bit server and use the SSDs as system discs and vmware data storage using software raid for redundancy.After reading the blog post I am not sure how to make all my partitions aligned and set up on EBS (Erase Boundary Size)I am planning for four partitions:Boot, size 1GB

Root, size 25GB
Swap, size 4GB
Data storage for vmware server, size 40GB

According to Markus Ewald I should use 32 heads and 32 sectors.Using the live CD, I started using fdisk -S 32 -H 32 /dev/sda.Fdisk can create partitions using cylinders or sectors, and now I ran into trouble.

First partition /boot must start on cylinder 2 (or sector 1024). Size is 1 GB and the following partition should be aligned and start on a new EBS block. How do I do this with fdisk?Should the next partition start on a new cylinder? Otherwise, after formatting, fdisk gives a warning that the partition is not aligned to the cylinder size? The overall question is how to format four aligned partitions which all are aligned with Intels X25-M EBS. EBS for Intel X25-M is either 128KB or 512KB (Have not found a confirmed value yet)

View 1 Replies View Related

Ubuntu :: Mount NTFS Harddrive Not Visible In Fdisk?

Jul 7, 2010

I have a ntfs hard drive (my "C" drive in Windows) and it has some very important data (baby pictures) on it. The drive is, for some reason, very fail-prone. Last time it went out, I used ubuntu to make a windows disk (I have the key, nothing illegal!) and it went to the error fixing part or what have you and fixed it all up. That was a few days ago, and I was working on backing up the picturs but hadn't finished, and it failed again. Now I can't get it to fix the current windows installation, even though it's doing the same thing (making a clicking noise and stalling on boot before eventually giving up and booting to the ubuntu "d" drive.), it will only take me to the part about installing a new copy of windows, which I don't want to do because that would wipe the drive.

So my next idea was to try and get at the pictures through ubuntu, but when I use sudo fdisk -l, it only shows me my ubuntu hard drive.. Is there anything I can do to find and mount the other drive? I really can't afford to take it in to a professional for data recovery, and I've had them charge me an arm and a leg and do nothing but wipe my drive in the past, so I want to do everything I can to try and get my pictures back myself.

View 9 Replies View Related

General :: Create Partition Of Harddrive?

Jul 6, 2011

as i told, that my pcs running with fedora 10,and i couldnt make partitions of a harddrive, and i want to make 4 partitions as my harddisk is of 160GB means and i want to divide it into 4 (means 40GB of each part)

View 2 Replies View Related

General :: Partition Gparted Fdisk / When Reduced The Size Of Some Linux Partitions Using Gparted?

Sep 18, 2009

I have 3 Ubuntu installations & a PCLINUXOS, plus Windows XP installed on one hard disk. I still can boot to each one of them and can mount each one using Ubuntu.

The problem "may" have occurred when I reduced the size of some linux partitions using gparted. I still have plenty of space in each of those partitions.

When I started gparted all of the HD was unallocated. I did that from each ubuntu installation and the PCLINUX installation, plus LIVECDs. All indicated the space was unallocated.

When I did an fdisk -l from a Puppy Linux LiveCD I got a normal start and ends of each partition.

When I tried it from Ubuntu installation or live cd, I received the following types of responses:

Code:
ubuntu@ubuntu:~$ sudo fdisk -l /dev/sda5

Disk /dev/sda5: 28.5 GB, 28566397440 bytes
255 heads, 63 sectors/track, 3473 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
ubuntu@ubuntu:~$ sudo fdisk -u /dev/sda5

The number of cylinders for this disk is set to 3473.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Plus the Windows partition seems to go over its limits.

Since all of my OS installations are still working, I don't know how critical this is. From reading another post, I understand this might be able to be fixed by making some changes in fstab.

View 2 Replies View Related

Ubuntu Installation :: Creating Partitions Using Fdisk?

Sep 30, 2010

I have a dell poweredge 2950 server which had red hat on it. I have installed ubuntu on top of it. I have replaced master boot record during the installation of ubuntu as I dont want use red hat anymore. During the installation it asked me for the space I wanted to give for Ubuntu and I provided 10GB. Now I can use only 10GB of my harddrive until I mount other partitions correct?

So when I type sudo fdisk -l I get the below printed:

Code:
Disk /dev/sda: 146.2 GB, 146163105792 bytes
255 heads, 63 sectors/track, 17769 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

[Code]....

View 1 Replies View Related

Ubuntu :: Fdisk, Partitions, Hdds And Terms Of Storage?

Jan 18, 2011

i have a question regarding how data is placed on a media, for example the daily used hdd: when we talk about storage we often speak in heads sectors and cylinders. my question is if heads, sectors and cylinder is the true way data exists on a hdd platter?

lets take for example, disk_x
1000.2gb = 1000204886016 bytes
255 heads, 63 sectors/track 121601 cylinders.

fdisk -H 128 -S 32 /dev/disk_x each cylinder will be shrank to 2097152bytes, number of cylinders will grow to 476934. but everything will be much more aligned and readable or there is something i don't know and i will loose almost half of the total sector count on the hdd cause 63-32=31. i asked the partitioner just to use 32 sectors from each track and only 128 tracks of the cylinder.

or another example, if i have a cluster size of 4k. why not making each track use 56 sectors or 7 clusters. theoretically i have all files in my storage and each one of them occupies 14 clusters isn't it wiser to make it as described. what happens when i invoke fdisk -h -s params? what will be changed, the disc physically and the way it is accessed or only the partition table? you probably asking your self what the hell does this dude wants? i want to get maximum i/outputs and the widest bandwidth and the nicest readble partition tables and to understand better fdisk -H -S.

View 6 Replies View Related

Software :: Recover USB Pendrive Several Partitions (w/ Fdisk Results)?

Jun 2, 2010

I have a Pen drive which has been moving info between PC's and MAC. PC now sees and empty drive, also does the MAC.I've tried Testdisk & Photorec w/o success.Is there any way to recover the data?

Gorkon
p.s. fdisk -l results are:
Disk /dev/sdc: 1010 MB, 1010827264 bytes

[code]...

View 1 Replies View Related

Ubuntu :: Ext3 Partition : Fdisk Is Not Showing Any Partitions On The Drive?

Apr 24, 2010

I had a 500gb hard drive that I wanted to use on my Ubuntu system as a media storage drive. The drive originally had two partitions on it,one was a Dell Recovery partition and the other was a Windows Vista partition. Using the Palimpsest Drive Utility that comes with Ubuntu, I deleted both partitions,created a Ext3 partition using 100% of the space and copied my data to the drive. After I finally got fstab to load the drive, I found another problem. First of all, when Grub loads, two options it offers are:

Windows Vista (loader) on sdc1
Windows Vista (loader) on sdc3

Aside from that, 100% of the drive is not being used by the Ext3 partition.It is showing 434.6gb available on the drive. Fdisk is not showing any other partitions on this drive, so A) why are the Windows loader options showing up under Grub and B) why do I not have 500gb available?Here is a copy of the output fdisk -l:

Code:
Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes[code]....

View 5 Replies View Related

Red Hat / Fedora :: Grub - Recover Without Using A Bootable CD - Fdisk -l Is Not Listing The Partitions

Jan 26, 2010

I am preparing for RHCE. While doing the lab I renamed /etc/grub/grub.conf as grub1.conf. Now (obviously) system boots on grub> prompt. Can I recover without using a bootable CD? Another problem that I encountered was, while doing lab for fdisk, I used command umount -al. Now, fdisk -l is not listing the partitions but giving a message:- /proc/partitions does not exist. If I reboot the system this is restored.

View 1 Replies View Related

Ubuntu :: Partitions Are Effed Up - Fdisk -l: Code: Omitting Empty Partition (5)

May 7, 2010

I have a 120GB HDD with a 22GB partition for Ubuntu and the rest for Windows XP. Windows finally died on me so I attempted a fresh install on its partition. However, the install threw a ton of errors so I used a LiveCD to re-install Grub and I booted into Ubuntu. I open up the disk utility to re-format the Windows partition so I can re-try re-installing Windows, but immediately I notice that the partitions are not right. If you add up all the partitions, they are about, say, 18 million terabytes over my HDD's 120GB capacity. Ahhh! What do I do?

I don't think anything is terribly altered, since I can still boot into Ubuntu, but I am completely confused and slightly worried that I might kill any chances to save my HDD I can't post a screenshot due to my post count, so the image loses some of its efficacy in making it small enough for an attachment. Here is the output of fdisk -l: Code: omitting empty partition (5)

[Code]...

View 5 Replies View Related

Software :: Make (c)fdisk Divide A Drive Into Equal Size Partitions?

Feb 11, 2010

Anyone have a script, or method, that would allow (c)fdisk to divide a hard drive up into equal size primary partitions?

View 1 Replies View Related

Software :: Bash: Fdisk: Command Not Found

Apr 28, 2010

I am trying to use fdisk command as following but it gave me error . .

[root@rac2 ~]# fdisk
bash: fdisk: command not found

I am running on Oracle Enterprise Linux 32-bit

View 10 Replies View Related

Hardware :: Use Fdisk To Create Partition?

Aug 20, 2009

i have one harddisk /dev/sda it is partitioned as below:

/dev/sda1: /
/dev/sda2: swap

after the centos is installed, i want to create another partition /dev/sda3 to use all remaining disk space. i used fdisk. after fdisk, it requires reboot. The partition table has been altered! Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks.is reboot really necessary? is there any other tools which do not need to reboot?

View 1 Replies View Related

Server :: Can't Create Partition Using Fdisk

May 6, 2011

I recently expanded the RAID on an iSCSI device which is shared out to a linux server. Fdisk correctly sees the new size but it won't let me add a third partition. It complains about overlapping partitions whenever I try to add it.If I 'remove' the partition, the overlapping error goes away. The interesting thing here is that when attempting to use the default sizes to setup the partition the printed screen shows completely different results (which I can understand is why its complaining about overlapping)

I'm not sure why its not accepting the cylinder sizes I want. Anyone have any ideas as to what's wrong here?

View 9 Replies View Related

Hardware :: Create And Mount The Free Space (using Fdisk)

Jul 20, 2011

I have edited my hard disk partition using gparted which created 50GB of free space. I edited my /home which is primary and hence it can not partitioned it. Now, I am trying to create and mount the free space (using fdisk) but the free space is not showing in df or fdisk. can you plz tell me how to create a partition using the free space?
my df and fdisk is as follows:

Code:

# fdisk -l
Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes

[code].....

View 4 Replies View Related

General :: Slackware 10 Will Not Let Me Create Partitions

Oct 27, 2010

OK, trying to install Slackware version 10 on the Athlon XP Shuttle PC and been hit back hard at the very first hurdle.In short I can't create a partition in Linux.At all!CD boots up OK. Loading in basic kernal.I try and create a partition using either fdisk or cfdisk.BOTH apps reports that the partition table cannot be written to! Both apps run read only mode.So I am unable to create any partitions in Linux.

I booted up a Windows 98 floppy and checked the partition table.Two x30GB partitions.I deleted both of them in case Linux did not like a Fat32 DOS/XP partition table.Tried again. Same read only messages.Attempt to use 'w' in fdisk reports the partition table cannot be written to.Viewing the partion table returns nothing, no matter how I set it up in DOS/Windows.

Only clue is that to my surprise, the DVD RW drive is the Primary master and the 60GB HD is the secondary master. I must have slipped up installing the drives years ago and Windows didn't care. Would Linux? Other than that, nothing in the BIOS that gives a clue. I turned off ACPI support in case. I also tried the ACPI kernal. No joy there either. But DOS/Windows quite happy to build partitions.Cfdisk states that no partition tables exist even after Windows has just created one.So I am at a loss.Any clues? This is a Shuttle PC so the tech is a bit propritory but nothing that various renderings of Windows have not handled.

View 6 Replies View Related

General :: How To Create Partitions On OS Running?

Mar 15, 2011

i have server and there is no option from my control panel on data center to make os reload with partitions i need for Openvz , so how can create partitions ? the server have 2 hard.

View 5 Replies View Related

General :: Automatically Create Windows Partitions?

Mar 19, 2010

How to automatically create windows partitions(fat/ntfs) through Linux. I have all the required information for partitions to be created.

For example:

Size
Flag
Partition Type
etc.

View 2 Replies View Related

General :: How To Manage / Create Partitions For Multiple OS

Aug 3, 2011

How do I divide my hard drive into multiple OS'es/partitions for my test machine? For example:
Win XP
Win 7
Gentoo
Ubuntu
Storage
Can Linux'es share swap area? I was told to leave the first primary for the grub and linux cores.

View 1 Replies View Related

General :: Cannot Create Logical Partitions Without Errors

Jan 14, 2010

I have run into a Gparted problem that I am not familiar with. I've never seen it before.

I cannot create logical partitions without errors or not at all. I have two choices:

1) not checking 'round to cylinders' - I will get an error* and it will not partition

2) check 'round to cylinders' - it will partition but I will also obtain 4MB of unallocated space (each time)

This applies to Primary partitions, too, I think. At least, #2 will happen.

Imho, this is ridiculous. Why would I retain 4MB of unallocated space? In other words, the two choices above are not choices.

The error message doesn't explain much if anything either. *"Unable to satisfy all constraints on the partition"

View 9 Replies View Related

General :: Create A Boot Cd That Will Mount Some Partitions?

Sep 26, 2010

I want to create a boot cd that will mount some partitions, copy a file, run lilo, then eject the cd and reboot the computer.

View 1 Replies View Related

General :: Create A RAID Set Up And Merge Partitions?

Aug 7, 2009

I have three hard drives in my computer That I want to make RAID 0. All of them already have partitions and data on them. What I want to know is if I can, without losing data, add the disks to RAID and then merge the partitions? All the partitions are of the same type. Or would it easier/better/possible to do this with LVM? Even if I'd have to shrink partitions and copy data to a new LVM one to get it set up properly, would it be better than RAID 0?

View 2 Replies View Related

General :: Create Separate Partitions For Directories AFTER Installing?

Sep 28, 2010

I want to create a separate partition for /home.inuxMint is *already* installed.PartedMagic be used for the same, NOW

View 14 Replies View Related

General :: End Of Support For Mint6 - Safely Remove The Partitions And Duplicate Operating Systems

Apr 14, 2010

The bad news comes that active support for Mint6 is set to end Apr. 30. The worse news is I don't know what to do about it. Complicating this is that I have about 5 drive partitions and duplicate Mint6 operating systems because of password problems and just partitioning the drive and rebooting the OS instead of trying to fix the issue. I hear good things about Mint8, but my 80 Gig drive is getting pretty thin on partitions. I know there must be a way to safely remove the partitions and duplicate operating systems. I just don't know how to do it.

View 6 Replies View Related

General :: Installing Multiple Distros - Create Another / And /home Partitions For The New Distro?

Nov 20, 2010

My partition layout is as follows:

sda1: 14GB / ext4
sda2: 10GB /iso ext4
sda3: 4GB /home ext4
sda4: 86GB Extended
sad5: 2GB swap

I have 84GB free space on this hard drive and want to install another distro. Will I be able to create another / and /home partitions for the new distro?

View 6 Replies View Related

General :: Bash Command To Remove Spaces

Sep 14, 2010

I am reading the output of /proc/acpi/thermal_zone/ATF0/temperature in a program to read my CPU temp. I am using cat like the following:

Code:
#cat /proc/acpi/thermal_zone/ATF0/temperature
temperature: 49 C

I basically want to get rid of the spaces in between temperature and the actual temperature. Is there a command I can pipe the cat output to, to remove the spaces. I have seen suggestions for sed, or tr, but for some reason I cannot get them to work properly.

View 14 Replies View Related

General :: Create A Bash Script?

Jun 12, 2011

create a bash script with "if" statements and to do that I need to learn some bash programming. I will probably do it later but I want to create some script today so maybe The script should do this:

Code:
I enter something like this string with a script path:
$ ~/watch-script http://www.......com/watch?v=OI3gKGhe0QM

[code]...

View 5 Replies View Related

General :: Create A Shortcut In BASH?

Feb 23, 2010

I wanted to do this:

Code:

ssh root@10.10.10.10

How would I create a shortcut in BASH so that I can simply type:

Code:

mypc

I want to be able to execute commands like that; like you can with ls, cd, grep, etc. Do I create a BASH script and place it in /bin?

View 14 Replies View Related

General :: Create GUI For Bash Script Using Kommander?

Jan 21, 2010

I have create some simple bash script file (.sh), and i would like to find out what are the steps that i should do so that the GUI form is able to call out and run the bash script file (e.g clicking the button on the form, and the script will run).

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved