Sponsored Content
Operating Systems Linux Gentoo How to copy single partition? Post 302085852 by siegfried on Monday 21st of August 2006 12:49:10 AM
Old 08-21-2006
Results from parted

Here is the scoop: /dev/sdb is the good disk which boots fedora and /dev/sda is the disk with the bad fedora partition. When I try to boot this latter partition with grub it says: Error 17 Cannot mount selected partition.

How do I restore the partition attributes so grub will boot from it again?

Thanks,
Sieg


Here is what parted says:

linux:~ # parted
Using /dev/sda
(parted) print
Disk geometry for /dev/sda: 0kB - 160GB
Disk label type: msdos
Number Start End Size Type File system Flags
1 32kB 126GB 126GB primary ntfs type=07
3 126GB 136GB 10GB primary ntfs boot, type=07
2 136GB 160GB 24GB extended lba, type=0f
5 136GB 157GB 21GB logical ext3 type=83
6 157GB 159GB 2089MB logical linux-swap type=82
(parted) select /dev/sdb
Using /dev/sdb
(parted) print
Disk geometry for /dev/sdb: 0kB - 160GB
Disk label type: msdos
Number Start End Size Type File system Flags
1 32kB 126GB 126GB primary ntfs boot, type=07
2 126GB 160GB 34GB extended lba, type=0f
5 126GB 136GB 10GB logical ntfs type=07
6 136GB 157GB 21GB logical ext3 type=83
7 157GB 159GB 2089MB logical linux-swap type=82
(parted)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to copy data into a single file plus title

Hi Can anyone help me with the task below? Example: The contents in fileA.txt are: HELLO HOW DO U DO? The contents in fileA.txt are: HI I AM FINE. how to combine the data in 2 files into one with the format below? Case A-fileA.txt HELLO HOW DO U DO? Case B-fileB.txt (4 Replies)
Discussion started by: c0384
4 Replies

2. UNIX for Dummies Questions & Answers

Copy single file to multiple directories

Please help - I need to copy a single file to multiple directories. Dir structure: Parent_Directoy Filename1 Child_Directory1 Child_Directory2 Child_Directory3 Child_Directory4 .... So I need to copy Filename1 to all of the... (2 Replies)
Discussion started by: kthatch
2 Replies

3. Slackware

Install more than one OS in a single partition...

Hello dear........this is karan singh. I want to ask a question that how can we install more than one OS in a single partition of any hard disk. I am not asking about to install more than one os in a hard disk,but on a single partition. NOTE:I am confident that it is possible to install... (2 Replies)
Discussion started by: Alohamora
2 Replies

4. UNIX for Advanced & Expert Users

copy a whole partition excluding specified.

Scenario: I would want to copy my / to /mnt, and to avoid recursion exclude /mnt. cp -avx / /mnt If i use the above i believe it would run recursively, and end up in mess. So how to do it ?! Basically this / is sda1, and /mnt is sda2 and sda1 is where only OS is available & currently... (2 Replies)
Discussion started by: thegeek
2 Replies

5. Shell Programming and Scripting

Enhanced partition copy script (new & improved!)

This is now a larger script than I would customarily post. But many folks have become accustom to getting it off this forum. Every couple of years I update my favorite scripts. This script is one that I use regularly and have posted older versions every couple of years. I noticed that it has... (3 Replies)
Discussion started by: jwzumwalt
3 Replies

6. Filesystems, Disks and Memory

Using dd to copy a partition.

Here's a conundrum. I use a ThinkPad (T30) which has a slot on the side for the hard drive. It is very easy to swap this with another hard drive which I keep as a backup. Now when I copy the Linux partition from my (in use) hard drive to the backup one (in my UltraBay slot) it takes only 30... (0 Replies)
Discussion started by: newyorkpaulie
0 Replies

7. Red Hat

Single command to Partition and label as LVM whole disk

Hello, someone please suggest me how write a script or command to create partition and label whole disk as LVM . I have multiple servers that I to label as LVM using fdisk, that will very hard process. This is what I currently doing to create to partition and label. # fdisk /dev/sdb ... (0 Replies)
Discussion started by: bobby320
0 Replies

8. Shell Programming and Scripting

revision of copy script to allow for single quote

I have the following script that I use to copy a list of files from one dir to another, #!/usr/bin/bash # $1=filename of file with the list of files to copy # $2=column header for col in list file with filenames (filePath in most cases) # $3=src dir # $3=destination dir FILE_LIST="$1"... (6 Replies)
Discussion started by: LMHmedchem
6 Replies

9. Shell Programming and Scripting

Copy files recursively to one single directory

I need to copy a complete directory structure into a new location. But I want to have all files copied into one directory and leave out the directory structure. So all files must be placed in one directory. (4 Replies)
Discussion started by: ReneVL
4 Replies

10. Solaris

More > 1 TB single file cant copy

good evening, hi, I have problem for copy file, size more > 1 TB, just only for single file. error said, capacity not enough, even my storage I set to 4 TB, file always reject during finish copy. but, if I copy with multiple file/separate file, total calculation file is 2 TB, always success.... (10 Replies)
Discussion started by: katumping
10 Replies
PARTED(8)							 GNU Parted Manual							 PARTED(8)

NAME
GNU Parted - a partition manipulation program SYNOPSIS
parted [options] [device [command [options...]...]] DESCRIPTION
parted is a disk partitioning and partition resizing program. It allows you to create, destroy, resize, move and copy ext2, linux-swap, FAT, FAT32, and reiserfs partitions. It can create, resize, and move Macintosh HFS partitions, as well as detect jfs, ntfs, ufs, and xfs partitions. It is useful for creating space for new operating systems, reorganising disk usage, and copying data to new hard disks. This manual page documents parted briefly. Complete documentation is distributed with the package in GNU Info format; see near the bottom. OPTIONS
-h, --help displays a help message -l, --list lists partition layout on all block devices -m, --machine displays machine parseable output -s, --script never prompts for user intervention -v, --version displays the version -a alignment-type, --align alignment-type Set alignment for newly created partitions, valid alignment types are: none Use the minimum alignment allowed by the disk type. cylinder Align partitions to cylinders. minimal Use minimum alignment as given by the disk topology information. This and the opt value will use layout information provided by the disk to align the logical partition table addresses to actual physical blocks on the disks. The min value is the min- imum aligment needed to align the partition properly to physical blocks, which avoids performance degradation. optimal Use optimum alignment as given by the disk topology information. This aligns to a multiple of the physical block size in a way that guarantees optimal performance. COMMANDS
[device] The block device to be used. When none is given, parted will use the first block device it finds. [command [options]] Specifies the command to be executed. If no command is given, parted will present a command prompt. Possible commands are: check partition Do a simple check on partition. cp [source-device] source dest Copy the source partition's filesystem on source-device (or the current device if no other device was specified) to the dest partition on the current device. help [command] Print general help, or help on command if specified. mkfs partition fs-type Make a filesystem fs-type on partition. fs-type can be one of "fat16", "fat32", "ext2", "linux-swap", or "reiserfs". mklabel label-type Create a new disklabel (partition table) of label-type. label-type should be one of "bsd", "dvh", "gpt", "loop", "mac", "msdos", "pc98", or "sun". mkpart part-type [fs-type] start end Make a part-type partition with filesystem fs-type (if specified), beginning at start and ending at end (by default in megabytes). fs-type can be one of "fat16", "fat32", "ext2", "HFS", "linux-swap", "NTFS", "reiserfs", or "ufs". part-type should be one of "primary", "logical", or "extended". mkpartfs part-type fs-type start end Make a part-type partition with filesystem fs-type beginning at start and ending at end (by default in megabytes). Using this command is discouraged. Instead use mkpart to create an empty partition, and then use external tools like mke2fs(8) to create the filesystem. move partition start end Move partition so that it begins at start and ends at end. Note: move never changes the minor number. name partition name Set the name of partition to name. This option works only on Mac, PC98, and GPT disklabels. The name can be placed in quotes, if necessary. print Display the partition table. quit Exit from parted. rescue start end Rescue a lost partition that was located somewhere between start and end. If a partition is found, parted will ask if you want to create an entry for it in the partition table. resize partition start end Resize the filesystem on partition so that it begins at start and ends at end (by default in megabytes). rm partition Delete partition. select device Choose device as the current device to edit. device should usually be a Linux hard disk device, but it can be a partition, software raid device, or an LVM logical volume if necessary. set partition flag state Change the state of the flag on partition to state. Supported flags are: "boot", "root", "swap", "hidden", "raid", "lvm", "lba", and "palo". state should be either "on" or "off". unit unit Set unit as the unit to use when displaying locations and sizes, and for interpreting those given by the user when not suf- fixed with an explicit unit. unit can be one of "s" (sectors), "B" (bytes), "kB", "MB", "GB", "TB", "%" (percentage of device size), "cyl" (cylinders), "chs" (cylinders, heads, sectors), or "compact" (megabytes for input, and a human-friendly form for output). version Display version information and a copyright message. KNOWN ISSUES
ext3 filesystem functionality does not currently work. To manage ext3 type filesystems use tools like resize2fs(8) or mke2fs(8). Note that the currently supported ext2 filesystem will be deprecated once ext3 support is finalized. Further note that ext3 support will have limited functionality that is yet to be defined. Use tools like resize2fs(8) and mke2fs(8) to manage these types of filesystems. To manually resize an ext3 filesystem and/or a partition use resize2fs(8), fdisk(8) or similar tools. For LVM situations, you will need to use the LVM commands to resize the LVM elements. REPORTING BUGS
Report bugs to <bug-parted@gnu.org> SEE ALSO
fdisk(8), mkfs(8), The parted program is fully documented in the info(1) format GNU partitioning software manual which is distributed with the parted-doc Debian package. AUTHOR
This manual page was written by Timshel Knoll <timshel@debian.org>, for the Debian GNU/Linux system (but may be used by others). parted 2007 March 29 PARTED(8)
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy