LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to get "dd" created copy of bootable Ubuntu partition to boot on other drive (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-get-dd-created-copy-of-bootable-ubuntu-partition-to-boot-on-other-drive-733710/)

asmythee 06-17-2009 04:26 PM

How to get "dd" created copy of bootable Ubuntu partition to boot on other drive
 
Hi all:

Here's my setup:

Compaq NC6400
120 gb internal hard drive (which i wish to leave alone)
2 Western Digital USB Drives, each with 250 gb

On USB Drive 1 (3 partitions):

Ubuntu 9.04 installed in the first partition (ext3 at 30 gb)
Linux swap on the second partition (ext 3 at 4 gb)
Remainder of disk on the third (vfat)

On USB Drive 2 (3 partitions):
Slightly larger partition than partition 1 on drive 1 with "dd" created copy of drive 1 partition 1
2 other partitions, both ext3.


The current goal is to be able to backup the ubuntu partition from Drive 1 onto Drive 2 and boot from it on Drive 2, without copying over the entire disk, as I've got other plans for the remaining space.

BUT -------------------

I'm having a horrible time getting the copy of Drive 1's first partition to boot off of Drive 2. And I'm not sure why.

I've been playing with grub-install and fixmbr and looking through the tutorials. Just when I seem to get close, there's a funky error that seems to come up.

Currently, I'm thinking I need to reinstall grub, but am running into a wall of "error 15" messages in trying to follow this advice under "Let Grub do your research for you" using the find command:

http://www.troubleshooters.com/linux/grub/grub.htm

and that of the grub manaul.

At the same time, frustratingly, I can easily view the files in question via konqueror (using a knoppix live cd) on Drive 2 (drive one unplugged).

So ... I'm not sure what to do at this point. This doesn't seem like rocket surgery, but I'm stumped as to what to do next.

Help please.

Thanks,
asmythee

jsteel 06-17-2009 05:15 PM

If you've copied the drive, then yes it sounds like you need grub on the drive's MBR to boot. I do this by running "grub" (from any install, be it on your other drive or from a Live CD) and then run "root (hd0,0)" (It may be "(hd1,0)" for you for example). Then run "setup (hd0)" (changing the number to represent your hard drive). If you press tab along the way it should give you a list of possible options and drives. Once you're done, type quit to come out of grub.

If you install it on the wrong drive, there's no harm done if it's already got grub on it, but it would mess up a Windows drive.


All times are GMT -5. The time now is 09:40 PM.