Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
I tried to install another Linux O.S along with MS and to make two Linux's and one windows.Usually when I try this GRUB losses the ability to boot the first ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie theKbStockpiler's Avatar
    Join Date
    Sep 2010
    Location
    Upstate NY
    Posts
    205

    What are the missing pieces to restoring a partition


    I tried to install another Linux O.S along with MS and to make two Linux's and one windows.Usually when I try this GRUB losses the ability to boot the first Linux install. It did it again. I would really like to get this first install bootable again.

    Here are some facts.

    -I have a rescue disk , a XP installation disk and a live Ubuntu Disk.

    -If I use Gparted in the second Linux install; here by refered to as the second, I can mount the lost Distro but not of coarse boot it. From here I can get all the Grub files from this install.

    -If I use the Rescue disk I can get the starting and ending sectors of the second install.

    -The MBR is only 64 bytes long so this should not really be a burden.

    So I need to either get the last installed O.S to chain load the lost one or get the MBR to point to the lost partitions boot sector.

    Something I don't understand is how grub tranforms the MBR sector info to paths to find the partitions.

    Any help will be appreciated

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    All you need to do is add the "Lost Linux" partition to GRUB. If you don't know how to do this then post the output of
    Code:
    sudo fdisk -l
    Code:
    sudo cat /boot/grub/grub.cfg
    Or see this link for more in depth coverage.
    https://help.ubuntu.com/community/Grub2
    Look for 6. Custom Menu Entries and tell us about your system, which disk is which and what do you have installed currently.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Linux Newbie theKbStockpiler's Avatar
    Join Date
    Sep 2010
    Location
    Upstate NY
    Posts
    205

    Here is the data

    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x4f234f23

    Device Boot Start End Blocks Id System
    /dev/sda1 1 2550 20482843+ 7 HPFS/NTFS
    /dev/sda2 2551 19457 135805477+ 5 Extended
    /dev/sda5 2551 2677 1020096 82 Linux swap / Solaris
    /dev/sda6 * 10326 19248 71673966 83 Linux
    /dev/sda7 19249 19457 1678761 82 Linux swap / Solaris
    /dev/sda8 2678 10325 61429760 83 Linux

    Partition table entries are not in disk order

    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x5becad68

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 127 1020096 82 Linux swap / Solaris
    /dev/sdb2 128 7775 61432560 5 Extended
    /dev/sdb3 7776 60802 425933824 83 Linux
    /dev/sdb5 128 7775 61432528+ 83 Linux

    Disk /dev/sdc: 4012 MB, 4012900352 bytes
    120 heads, 55 sectors/track, 1187 cylinders
    Units = cylinders of 6600 * 512 = 3379200 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000

    Device Boot Start End Blocks Id System
    /dev/sdc1 1 1188 3918832 b W95 FAT32
    [root@localhost kbs]#
    [/QUOTE]

    Here is the Last install with CentOs
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd0,7)
    # kernel /boot/vmlinuz-version ro root=/dev/sda8
    # initrd /boot/initrd-[generic-]version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,7)/boot/grub/splash.xpm.gz
    hiddenmenu
    title centos (2.6.32-71.el6.i686)
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.32-71.el6.i686 ro root=UUID=2aafe016-4c0d-41ac-b92d-186ae763e4d2 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
    initrd /boot/initramfs-2.6.32-71.el6.i686.img
    title Other
    rootnoverify (hd0,0)
    chainloader +1
    Here is the one I lost in the CentOS install
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd0,6)
    # kernel /boot/vmlinuz-version ro root=/dev/sda7
    # initrd /boot/initrd-[generic-]version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,6)/boot/grub/splash.xpm.gz
    hiddenmenu

    title Fedora (2.6.34.8-68.fc13.i686.PAE)
    root (hd0,6)
    kernel /boot/vmlinuz-2.6.34.8-68.fc13.i686.PAE ro root=UUID=e5ee6093-bf50-4797-9c80-359625476d0d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
    initrd /boot/initramfs-2.6.34.8-68.fc13.i686.PAE.img
    title Fedora (2.6.33.3-85.fc13.i686.PAE)
    root (hd0,6)
    kernel /boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE ro root=UUID=e5ee6093-bf50-4797-9c80-359625476d0d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
    initrd /boot/initramfs-2.6.33.3-85.fc13.i686.PAE.img

    title Other
    rootnoverify (hd0,0)
    chainloader +1
    Thanks for the Reply!

  4. #4
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Ok, I've run out of time for now but what's going to happen is, you need to merge those two files. I'm not sure which version of Grub CentOS uses but we have a lot of people here that do. The process will be different for each version of Grub. Just be patient and help will come along. If not, I'll get back with you later this evening.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  5. #5
    Linux Newbie theKbStockpiler's Avatar
    Join Date
    Sep 2010
    Location
    Upstate NY
    Posts
    205

    According to grub --version and a file from Fedora they are both .97

    Thanks again!

  6. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    If CentOS was your last install and it is on sda8 and you are booting from it, then simply copy the entry you posted above for Fedora to the CentOS grub.conf file.
    Your fdisk output shows Linux partitions on sda6 and sda8 so one would be CentOS and the other Fedora. Your grub.conf file shows CentOS on (hd0,7) which is sda8.
    Note that the Fedora grub.conf entry shows "root (hd0,6) which is sda7. That is a swap partition. It should be pointing to sda6 or (hd0,5).
    Grub Legacy counts drives and partitions from zero.

  7. #7
    Linux Newbie theKbStockpiler's Avatar
    Join Date
    Sep 2010
    Location
    Upstate NY
    Posts
    205

    This is what I tried last.

    I took the CentOS menu.lst and after the CentOS part I inserted the Fedora part with no spaces before the windows part.The entries for Fedora where in the menu but I got an error of "can not boot selection".


    Or-
    grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd0,7)
    # kernel /boot/vmlinuz-version ro root=/dev/sda8
    # initrd /boot/initrd-[generic-]version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,7)/boot/grub/splash.xpm.gz
    hiddenmenu
    title centos (2.6.32-71.el6.i686)
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.32-71.el6.i686 ro root=UUID=2aafe016-4c0d-41ac-b92d-186ae763e4d2 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
    initrd /boot/initramfs-2.6.32-71.el6.i686.img
    title Fedora (2.6.34.8-68.fc13.i686.PAE)
    root (hd0,6)
    kernel /boot/vmlinuz-2.6.34.8-68.fc13.i686.PAE ro root=UUID=e5ee6093-bf50-4797-9c80-359625476d0d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
    initrd /boot/initramfs-2.6.34.8-68.fc13.i686.PAE.img
    title Fedora (2.6.33.3-85.fc13.i686.PAE)
    root (hd0,6)
    kernel /boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE ro root=UUID=e5ee6093-bf50-4797-9c80-359625476d0d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
    initrd /boot/initramfs-2.6.33.3-85.fc13.i686.PAE.img
    title Other
    rootnoverify (hd0,0)
    chainloader +1
    Thanks for the Reply!

  8. #8
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Quote Originally Posted by theKbStockpiler View Post
    I took the CentOS menu.lst and after the CentOS part I inserted the Fedora part with no spaces before the windows part.The entries for Fedora where in the menu but I got an error of "can not boot selection".


    Or-
    Thanks for the Reply!
    Code:
    grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd0,7)
    # kernel /boot/vmlinuz-version ro root=/dev/sda8
    # initrd /boot/initrd-[generic-]version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,7)/boot/grub/splash.xpm.gz
    hiddenmenu
    title centos (2.6.32-71.el6.i686)
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.32-71.el6.i686 ro root=UUID=2aafe016-4c0d-41ac-b92d-186ae763e4d2 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
    initrd /boot/initramfs-2.6.32-71.el6.i686.img
    title Fedora (2.6.34.8-68.fc13.i686.PAE)
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.34.8-68.fc13.i686.PAE ro root=UUID=e5ee6093-bf50-4797-9c80-359625476d0d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
    initrd /boot/initramfs-2.6.34.8-68.fc13.i686.PAE.img
    title Fedora (2.6.33.3-85.fc13.i686.PAE)
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE ro root=UUID=e5ee6093-bf50-4797-9c80-359625476d0d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
    initrd /boot/initramfs-2.6.33.3-85.fc13.i686.PAE.img
    title Windows
    rootnoverify (hd0,0)
    chainloader +1
    I believe this should work.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  9. #9
    Linux Newbie theKbStockpiler's Avatar
    Join Date
    Sep 2010
    Location
    Upstate NY
    Posts
    205

    Red face Thank You Thank You and Thank You!

    I really don't know how to edit the Menu.lst file. If possible could I get some more info?

    How does Gparted get its info that it displays? Does it figure out where the partitions are in sector terminology or does it just look the data up in a list?

    Is the partition table only kept in the MBR?

    Thanks agian! My Fedora 13 is the Flagship of my computers.

  10. #10
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Quote Originally Posted by theKbStockpiler View Post
    I really don't know how to edit the Menu.lst file. If possible could I get some more info?

    How does Gparted get its info that it displays? Does it figure out where the partitions are in sector terminology or does it just look the data up in a list?

    Is the partition table only kept in the MBR?

    Thanks agian! My Fedora 13 is the Flagship of my computers.
    Boot up CentOS, open a command line window (terminal) issue these commands with the editor of your choice. I don't know which one you have. If you have gedit use that, if you have nano or vi, use that.
    Code:
    su -c "nano /boot/grub/grub.conf"
    You'll need your root password for that. Copy the above code save and exit. Hopefully on reboot, you will be presented with all 3 working options to boot from. I believe Gparted gets its info from the MBR.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •