Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.


How to copy single partition?


Login or Register to Reply

 
Thread Tools Search this Thread
# 8  
Do dd and cp copy contents only?

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.

Is there a way I can only change the attributes of the partition? will dd or cp change the partition attributes?

Thanks,
Siegfried
# 9  
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.

#

# 11  
Quote:
Originally Posted by Corona688
But are you certain that the partition you see is the boot partition? On some systems, like mine, /boot is a partition on it's own, not the root partition.
Is it true that grub.conf lives in an ext2 or ext3 and not in a windows partition?

Assume that is true: grub works but cannot find grub.conf because it cannot mount that partition. Therefor, the boot partition must be good and the fedora partition is a seperate partition that is not bootable.

Siegfried
# 12  
Problem almost solved

Apparently partition magic changed the fedora partition from #5 to #4. When I type in the commands

root (hd0,4)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4smp ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4smp.img

Everything boots fine! Hurray.

Now, why cannot grub automatically find /boot/grub/grub.conf?

When I manually issue the grub command "find /boot/grub.conf" it finds it on (hd0,4).

How can I make grub automatically find /boot/grub/grub.conf?

Thanks,
Siegfried
# 13  
Quote:
Originally Posted by siegfried
Is it true that grub.conf lives in an ext2 or ext3 and not in a windows partition?
Grub lives in none of the above. Grub lives in the MBR itself, Sector Zero. It loads stuff like grub.conf from another partition, but the MBR is the prime mover.
Quote:
Assume that is true: grub works but cannot find grub.conf because it cannot mount that partition.
Grub doesn't mount partitions since it happens outside of any OS. It can grab individual files but not much beyond that.
Quote:
Therefor, the boot partition must be good and the fedora partition is a seperate partition that is not bootable.
Or it may be looking for files in a slightly different place than you expect. What does your partition structure look like? Is boot a partition by itself? Does it have a symlink like
Code:
# ls -l /boot/boot
lrwxrwxrwx  1 root root       1 Apr 12  2005 boot -> .
#

I know mine does, and when I decided it was useless and deleted it, my system stopped booting Smilie

And if that doesn't work, maybye try running grub-install again. It'll probe BIOS devices and figure out which BIOS device goes with which Linux device and hopefully configure the bootstrap code from there.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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

Featured Tech Videos