Announcement

Collapse
No announcement yet.

Grub Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grub Question

    Now if you want to move your Linux to a larger harder drive how do you do it without screwing grub.

    I've cloned with Ghost but unless the hard drive is exactly the same you get either a hung Grub or a Error 17.
    Chief Lemon Buyer no more Linux sucks but not as much
    Weather nut and sad git.

    My Weather Page

  • #2
    Originally posted by The PIT
    Now if you want to move your Linux to a larger harder drive how do you do it without screwing grub.

    I've cloned with Ghost but unless the hard drive is exactly the same you get either a hung Grub or a Error 17.
    Did you clone the disk, or the partition(s)?
    Check this page http://www.gnu.org/software/grub/man...l#Installation

    Depending on what ghost did or didn't do for you, you may need to mark a bootable partition, and / or install grub on the new drive. I'm suspicious that the MBR didn't get correctly transferred to the new drive.

    Actually - from this page: http://www.linuxquestions.org/questi...04/08/4/207044
    you should boot Linux with some other means (boot CD, floppy, etc), then find grub (/sbin under wherever the alternate boot puts the hard drive)
    run grub
    at the prompt, type the following two commands
    root (hd0,0)
    setup (hd0)

    That should get you booting again.
    - Steve
    Last edited by spadnos; 14 September 2005, 16:58.

    Comment


    • #3
      It was cluster by cluster clone including boot sector. None of the others would work when creating an image for some reason. Well once out of four it would for some unknown reason.
      Dos Ghost from version 2003.


      The latest version of Ghost is even worse. Just sees each partition as a single hard drive and cloning is impossible as it then wants to expand each partition into a single drive.


      I'll have too try those suggestions when I've got time.
      Last edited by The PIT; 14 September 2005, 23:56.
      Chief Lemon Buyer no more Linux sucks but not as much
      Weather nut and sad git.

      My Weather Page

      Comment


      • #4
        If it were suse, I would just copy the HDD and then remove the old one form the system(just for the next step)

        And then boot the suse dvd/cd and choose install, when you get to the first part of the install choose the repair/fix option and let it do its work.

        I use the above whenever evil MS decides to kill my boot record, or whenever I move my OS drive to a different channel or storage adapter.

        I like suse

        Comment


        • #5
          Would that work for Debian though???
          Chief Lemon Buyer no more Linux sucks but not as much
          Weather nut and sad git.

          My Weather Page

          Comment


          • #6
            Well, if you want to make an exact copy of the smaller drive onto the larger one with
            expanding the partitions, here is a procedure you can use to do the copy, but it will
            be very slow.


            1. Boot into Linux from a cdrom (Like the Red Hat, Fedora or CentOS Rescue mode on CD1 or DVD1
            or the System Rescue CD-Rom

            http://www.sysresccd.org/download.en.php

            2. At the command prompt, run the following command:

            dd if=/dev/hda of=/dev/hdb

            where hda would be your source drive and hdb is the new larger destination drive.

            Once the copy is done (several hours later I can guarantee you), you will have an EXACT copy
            of the original drive on your new drive with grub all set. I have used this several times for cloning
            hard drives in clusters. Booting off of the cdrom will make sure that there are no open files on the
            hard drive you want to copy.

            I now use Ghost 2003 for Dos to do this. If you would rather use Ghost (much faster than dd but requires
            additional work after the copy) do the following.

            1. Ghost the drive

            2. After ghosting the drive, boot into the rescue mode off of a Red Hat disk, have it locate any Linux installs
            on the hard drive.

            3. chroot into the environment it found using the following command

            chroot /mnt/sysimage

            where /mnt/sysimage is the mount point for your linux install that the rescue mode found.

            4. Run the following:

            grub-install /dev/hda

            where hda is your boot drive. This will reinstall the grub boot loader.

            Reboot and watch grub start up in all its glory

            Good Luck and PM me if you need any help.

            - Mike

            Comment


            • #7
              Originally posted by The PIT
              Would that work for Debian though???
              If I recall correctly, debian sarge has a rescue option on the install CD.

              Then, as directed, just run grub.
              Wah! Wah!

              In a perfect world... spammers would get caught, go to jail, and share a cell with many men who have enlarged their penises, taken Viagra and are looking for a new relationship.

              Comment

              Working...
              X