Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Grub troubles after deleting partition..

  1. #11
    Join Date
    Dec 2009
    Location
    Fareham, UK
    Beans
    1,793
    Distro
    Ubuntu

    Re: Grub troubles after deleting partition..

    A bit late for you now as darkod has done all the hard work. Something for you to read just in case. http://ubuntuforums.org/showthread.php?t=1581099

  2. #12
    Join Date
    Mar 2011
    Location
    New Zealand
    Beans
    440
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub troubles after deleting partition..

    Code:
    root@ubuntu:/# grub-install --root-directory=/mnt /dev/sda
    /dev/sda8: Not found or not a block device.
    root@ubuntu:/# grub-install --root-directory=/mnt /dev/sda1
    /dev/sda8: Not found or not a block device.
    root@ubuntu:/# grub-install --root-directory=/mnt /dev/sda
    /dev/sda8: Not found or not a block device.
    root@ubuntu:/#
    dev/sda8? it doesn't exist. I think we've found the problem?
    EDIT:btw I purged then installed and mkconfig and updated grub.
    Last edited by jonnyboysmithy; November 18th, 2011 at 12:49 AM.

  3. #13
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub troubles after deleting partition..

    Hold on, are you trying this from the chroot or just from live mode? Because it makes a difference. And why it is asking for sda8, you did mount sda7 at /mnt right?

    From live mode WITHOUT entering the chroot as previously just do in terminal:

    Code:
    sudo mount /dev/sda7 /mnt
    sudo grub-install --root-directory=/mnt /dev/sda
    Or from chroot it's enough only:

    grub-install /dev/sda

    because you are already inside the "root partition".
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  4. #14
    Join Date
    Mar 2011
    Location
    New Zealand
    Beans
    440
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub troubles after deleting partition..

    Quote Originally Posted by darkod View Post
    Hold on, are you trying this from the chroot or just from live mode? Because it makes a difference. And why it is asking for sda8, you did mount sda7 at /mnt right?

    From live mode WITHOUT entering the chroot as previously just do in terminal:

    Code:
    sudo mount /dev/sda7 /mnt
    sudo grub-install --root-directory=/mnt /dev/sda
    Or from chroot it's enough only:

    grub-install /dev/sda

    because you are already inside the "root partition".
    yes I did that inside the chroot without the sudo.
    As for the /dev/sda8 thats the partition I deleted.

    this is the result
    Code:
    ubuntu@ubuntu:~$ sudo mount /dev/sda7 /mnt
    mount: /dev/sda7 already mounted or /mnt busy
    mount: according to mtab, /dev/sda7 is already mounted on /mnt
    ubuntu@ubuntu:~$ sudo chroot /mnt
    root@ubuntu:/# grub-install /dev/sda
    /dev/sda8: Not found or not a block device.
    Thats my question, why is it asking for /dev/sda8?

  5. #15
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub troubles after deleting partition..

    If you look into sda7 in /etc/fstab do you have an entry for example:
    /dev/sda8 / ext4 .....

    The only idea I have is if the entry in fstab is looking for /dev/sda8 specifically.

    But if I understood correctly the partition you deleted was from another installation, 11.10, not this 11.04. So it shouldn't look for it.

    Run the bootinfoscript again, it's best to see the new situation after all these changes.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  6. #16
    Join Date
    Mar 2011
    Location
    New Zealand
    Beans
    440
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub troubles after deleting partition..

    http://paste.ubuntu.com/741768/
    EDIT: Shall I edit fstab?
    Last edited by jonnyboysmithy; November 18th, 2011 at 01:18 AM.

  7. #17
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub troubles after deleting partition..

    It's looking for sda8 because 11.04 was on sda8 and now somehow is on sda7. It still has references to sda8 all over it.

    I'm not sure why the update-grub command didn't adjust this.

    You could try entering chroot again, but if you still haven't exited it I recommend shutting everything down and entering the chroot again. Then from inside the chroot run the update-grub.

    Also, in sda7 you have /boot/grub/menu.lst which is not used since 9.10. I would delete that because it also exists /boot/grub/grub.cfg which should be used (even though right now it's not 100% correct). Why would the menu.lst be there, did you maybe upgrade version by version since 9.04? In that case the menu.lst might remain there.

    Try entering the chroot again and running:

    update-grub
    grub-install /dev/sda
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  8. #18
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub troubles after deleting partition..

    Quote Originally Posted by jonnyboysmithy View Post
    http://paste.ubuntu.com/741768/
    EDIT: Shall I edit fstab?
    No, leave it alone for now. It does say that / was on /dev/sda8 when installed but the UUID is correct and is from /dev/sda7. No need for editing, it should work fine with the UUID.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  9. #19
    Join Date
    Mar 2011
    Location
    New Zealand
    Beans
    440
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub troubles after deleting partition..

    No this was first installed from fresh with xp then 11.04 then 11.10 EDIT: (actually I'm not sure on the order)
    Running in chroot after a reboot:
    Code:
    root@ubuntu:/# update-grub
    Searching for GRUB installation directory ... found: /boot/grub
    Searching for default file ... found: /boot/grub/default
    Testing for an existing GRUB menu.lst file ... 
    
    Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N) y
    Searching for splash image ... none found, skipping ...
    Found kernel: /boot/vmlinuz-2.6.38-12-generic
    Found kernel: /boot/vmlinuz-2.6.38-8-generic
    Found GRUB 2: /boot/grub/core.img
    Found kernel: /boot/memtest86+.bin
    Updating /boot/grub/menu.lst ... done
    EDIT2: I just ran this inside of chroot, no mention of /dev/sda8 ...interesting...
    Code:
    root@ubuntu:/# grub-install --root-directory=/mnt /dev/sda
    The file /mnt/boot/grub/stage1 not read correctly.
    Last edited by jonnyboysmithy; November 18th, 2011 at 01:37 AM.

  10. #20
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub troubles after deleting partition..

    You seem to have a mix of grub and grub2 but that's a smaller problem if we get this thing to boot correctly.

    Does it boot now?

    And how would grub1 get there, ubuntu last time used it in 9.04.

    EDIT: I think you used that boot-repair cd and that might install grub1. This is exactly why I don't like "external" tools. They advertise them as easy fix, and if you don't know what they will do, they can get you into more trouble. Now that you have a mix of grub1 and grub2 it's a hell to get it out.

    EDIT2: I'm trying to find some link in my bookmarks about removing grub1 in situations like this, but I can't. You have to depend on google or someone else jumping in.
    Last edited by darkod; November 18th, 2011 at 01:42 AM.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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