+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 27
*nix Thread, grub2 in Technical; Been testing grub2 in chainloader mode the last week or so.. Just recently made it the default boot loader on ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200

    grub2

    Been testing grub2 in chainloader mode the last week or so.. Just recently made it the default boot loader on my Vaio TZ.

    https://wiki.ubuntu.com/KernelTeam/Grub2Testing

    Took me a while to figure out how to get my grub splash and colours sorted, they moved things from the menu.lst into grub.cfg which is auto generated automatically, and you need to edit a couple of different files.

  2. #2

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,726
    Thank Post
    1,287
    Thanked 797 Times in 693 Posts
    Rep Power
    239
    Quote Originally Posted by RabbieBurns View Post
    Been testing grub2 in chainloader mode the last week or so.
    What does it do that plain grub doesn't? Does it support ext2 file systems with more than 128 bytes per inode, by any chance? Took me a while to figure out that problem - formatted an ext2 partition with the latest version of System Rescue CD, then couldn't figure out why grub couldn't read menu.lst off it - turns out mke2fs defaults to 256 bytes per inode now, which the version of grub that ships with System Rescue CD can't handle. Easily fixed by formatting with e.g. "mke2fs -i128 /dev/hda2", but fiddly to remember.

    --
    David Hicks

  3. #3

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    Ive not really got a clue what the new grub does over the old one..

    However, now that Im running grub2 I think Ive put myself into a bit of a dilemma with regards to upgrading to Win7 on my laptop.

    I have like this

    sda1: Sony Vista Recovery Partition
    sda2: Win XP
    sda3: Ubuntu

    Now, if I replace the XP partition with 7, Im assuming I will lose my grub bootloader?

    Normally I would just use the ubuntu cd and do something to copy it across.. but with me using grub2, its a different version to whats on the ubuntu cd, and uses different files etc, ie its no longer menu.lst etc.

    Any suggestions what I might be able to do?

  4. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Amongst other things it's modularised and much more portable.

    From the GNU blurb:

    Quote Originally Posted by GNU
    GRUB 2 targets at the following goals:
    • Scripting support, such as conditionals, loops, variables and functions.
    • Graphical interface.
    • Dynamic loading of modules in order to extend itself at the run time rather than at the build time.
    • Portability for various architectures.
    • Internationalization. This includes support for non-ASCII character code, message catalogs like gettext, fonts, graphics console, and so on.
    • Real memory management, to make GNU GRUB more extensible.
    • Modular, hierarchical, object-oriented framework for file systems, files, devices, drives, terminals, commands, partition tables and OS loaders.
    • Cross-platform installation which allows for installing GRUB from a different architecture.
    • Rescue mode saves unbootable cases. Stage 1.5 was eliminated.
    • Fix design mistakes in GRUB Legacy, which could not be solved for backward-compatibility, such as the way of numbering partitions.
    Good to know it's gone well for you, IIRC it's one of our release goals for squeeze so that's reassuring

  5. 2 Thanks to powdarrmonkey:

    dhicks (9th August 2009), RabbieBurns (12th August 2009)

  6. #5

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Quote Originally Posted by RabbieBurns View Post
    Now, if I replace the XP partition with 7, Im assuming I will lose my grub bootloader?

    Normally I would just use the ubuntu cd and do something to copy it across.. but with me using grub2, its a different version to whats on the ubuntu cd, and uses different files etc, ie its no longer menu.lst etc.

    Any suggestions what I might be able to do?
    Yes, you will.

    I've never done this with grub2, but on other occasions:
    - do your windows stuff and lose the bootloader
    - boot into a rescue cd
    - mount your Ubuntu root partition and chroot to it
    - assuming all other requirements are present, reinstall the grub2 package (you did it from the package, right?)

  7. Thanks to powdarrmonkey from:

    RabbieBurns (12th August 2009)

  8. #6

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    right, sounds fairly straight forward (famous last words)

    Whats the command to chroot again, Ive not had to do that for a while..

    Yeh, it was just installed through apt, so hopefully should just work.. Will give it a try tomorrow or monday.

    Thanks

  9. #7

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Quote Originally Posted by RabbieBurns View Post
    Whats the command to chroot again, Ive not had to do that for a while..
    That would be chroot(8)

  10. Thanks to powdarrmonkey from:

    RabbieBurns (12th August 2009)

  11. #8

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    Ive only got an ubuntu 8.10 cd, but running 9.40.. Do I need to get hold of a 9.40 CD to do the chroot and grub2 install, or will it work with the 8.10 cd?

  12. #9

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    It should be fine, chroot just straps you into the target installation as if you'd booted it. It doesn't do any automatic mounting, init scripts etc though.

  13. Thanks to powdarrmonkey from:

    RabbieBurns (12th August 2009)

  14. #10

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    OK, got booted off the CD fine, mounted and chrooted to the existing ubuntu partition, did an

    apt-get --reinstall install grub2

    and rebooted but it didnt launch grub. I feel Ive forgotton a step, to install grub onto /dev/sda2 ?

  15. #11

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Try dpkg-reconfigure grub2

  16. Thanks to powdarrmonkey from:

    RabbieBurns (12th August 2009)

  17. #12

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    it was

    grub-install /dev/sda2

    that I was missing..

    But its now broke the windows boot

    Will need to read up now on what to put in the grub config to get it to boot win7 instead of xp

  18. #13

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    hmm cant get it booting to anything else now heh

    It now goes back to the grub menu when im choosing the windows options....

  19. #14

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,268
    Thank Post
    884
    Thanked 2,747 Times in 2,321 Posts
    Blog Entries
    11
    Rep Power
    785

  20. #15

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    cheers, but the problem is, ive got grub back workgin again after the windows install, but now I cant get to windows.



SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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