Sponsored Content
Operating Systems Linux Gentoo How to copy single partition? Post 302085999 by Corona688 on Monday 21st of August 2006 06:52:46 PM
Old 08-21-2006
Quote:
Originally Posted by siegfried
If I use dd or cp, will they only copy the contents?

The contents of the misbehaving partition seem to be perfectly intact. I can boot SuSE live from a DVD and mount the partition. The problem is that grub won't recognize it as a boot partition.
Hmm. cp or dd on a partition won't set a partition bootable, no, that's defined in the partition table, i.e. sector zero.
Quote:
Is there a way I can only change the attributes of the partition?
Something like this will set Partition 1 bootable:

Code:
# fdisk /dev/hda

The number of cylinders for this disk is set to 36483.
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)

Command (m for help): a
Partition number (1-4): 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

#

 

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
DISKTAB(5)						      BSD File Formats Manual							DISKTAB(5)

NAME
disktab -- disk description file SYNOPSIS
#include <disklabel.h> DESCRIPTION
Disktab is a simple database which describes disk geometries and disk partition characteristics. It is used to initialize the disk label on the disk. The format is patterned after the termcap(5) terminal data base. Entries in disktab consist of a number of `:'-separated fields. The first field for each entry gives the names by which a disk's entry may be selected, separated by `|' characters. The last name given should be a long name fully identifying the disk. The optional fields for each entry are: ID Type Description ty str Type of disk (e.g. removable, winchester) dt str Type of controller (e.g. SMD, ESDI, floppy) ns num Number of sectors per track nt num Number of tracks per cylinder nc num Total number of cylinders on the disk sc num Number of sectors per cylinder, ns*nt default su num Number of sectors per unit, sc*nc default se num Sector size in bytes, DEV_BSIZE default sf bool Controller supports bad144-style bad sector forwarding rm num Rotation speed, rpm, 3600 default sk num Sector skew per track, default 0 cs num Sector skew per cylinder, default 0 hs num Headswitch time, usec, default 0 ts num One-cylinder seek time, usec, default 0 il num Sector interleave (n:1), 1 default d[0-4] num Drive-type-dependent parameters bs num Boot block size, default BBSIZE sb num Superblock size, default 0 ba num Block size for partition `a' (bytes) bd num Block size for partition `d' (bytes) be num Block size for partition `e' (bytes) bf num Block size for partition `f' (bytes) bg num Block size for partition `g' (bytes) bh num Block size for partition `h' (bytes) fa num Fragment size for partition `a' (bytes) fd num Fragment size for partition `d' (bytes) fe num Fragment size for partition `e' (bytes) ff num Fragment size for partition `f' (bytes) fg num Fragment size for partition `g' (bytes) fh num Fragment size for partition `h' (bytes) oa num Offset of partition `a' in sectors ob num Offset of partition `b' in sectors oc num Offset of partition `c' in sectors od num Offset of partition `d' in sectors oe num Offset of partition `e' in sectors of num Offset of partition `f' in sectors og num Offset of partition `g' in sectors oh num Offset of partition `h' in sectors pa num Size of partition `a' in sectors pb num Size of partition `b' in sectors pc num Size of partition `c' in sectors pd num Size of partition `d' in sectors pe num Size of partition `e' in sectors pf num Size of partition `f' in sectors pg num Size of partition `g' in sectors ph num Size of partition `h' in sectors ta str Partition type of partition `a' (4.2BSD file system, swap, etc) tb str Partition type of partition `b' tc str Partition type of partition `c' td str Partition type of partition `d' te str Partition type of partition `e' tf str Partition type of partition `f' tg str Partition type of partition `g' th str Partition type of partition `h' FILES
/etc/disktab SEE ALSO
getdiskbyname(3), bsdlabel(8), newfs(8) HISTORY
The disktab description file appeared in 4.2BSD. BSD
October 14, 2006 BSD
All times are GMT -4. The time now is 12:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy