RabbieBurns Posted June 21, 2009 Posted June 21, 2009 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.
dhicks Posted June 21, 2009 Posted June 21, 2009 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
RabbieBurns Posted August 7, 2009 Author Posted August 7, 2009 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?
powdarrmonkey Posted August 7, 2009 Posted August 7, 2009 Amongst other things it's modularised and much more portable. From the GNU blurb: 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 2
powdarrmonkey Posted August 7, 2009 Posted August 7, 2009 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?) 1
RabbieBurns Posted August 8, 2009 Author Posted August 8, 2009 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
powdarrmonkey Posted August 8, 2009 Posted August 8, 2009 Whats the command to chroot again, Ive not had to do that for a while.. That would be chroot(8) 1
RabbieBurns Posted August 9, 2009 Author Posted August 9, 2009 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?
powdarrmonkey Posted August 9, 2009 Posted August 9, 2009 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. 1
RabbieBurns Posted August 10, 2009 Author Posted August 10, 2009 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 ?
RabbieBurns Posted August 10, 2009 Author Posted August 10, 2009 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
RabbieBurns Posted August 10, 2009 Author Posted August 10, 2009 hmm cant get it booting to anything else now heh It now goes back to the grub menu when im choosing the windows options....
SYNACK Posted August 10, 2009 Posted August 10, 2009 Windows 7 upgrade and fixing Grub afterward. : You Will Get A Virus
RabbieBurns Posted August 10, 2009 Author Posted August 10, 2009 cheers, but the problem is, ive got grub back workgin again after the windows install, but now I cant get to windows.
RabbieBurns Posted August 10, 2009 Author Posted August 10, 2009 [bug 402154] Re: grub2 Windows 7 fails to start. The grub2 in the jaunty repos is grub2_1.96+20080724-12ubuntu2_i386.deb not sure if thats my problem
powdarrmonkey Posted August 10, 2009 Posted August 10, 2009 Ah, yes. That's certainly not going to help It's a karmic installation, right? Once you've chrooted into it you should be able to apt-get dist-upgrade to get grub2_1.96+20090725 and then reinstall it as before. If it's a jaunty installation (ignore the rescue cd, you're just using that as a way to chroot) you'll have to add mixed repositories, pin them to jaunty, and pull in the karmic grub2 package. I'll walk you through that if you have. Edit: I just thought, I would actually do an apt-get update and then apt-get install grub2, which should just upgrade grub2, not everything else. 1
RabbieBurns Posted August 10, 2009 Author Posted August 10, 2009 Its not karmic. just jaunty with grub2 upgraded. grub says its up-to-date so if you could talk me through how to get the karmic version Ill give that a whirl
powdarrmonkey Posted August 10, 2009 Posted August 10, 2009 Oh sorry, must have mis-read. Anywho, 1. Add karmic repositories to your apt sources (use a local mirror) 2. Pin the default to be jaunty packages: /etc/apt/apt.conf: APT::Default-Release "jaunty"; 3. apt-get update, apt-get install -d -t karmic grub2 4. Check the correct version was downloaded, then drop the -d to install it 1
RabbieBurns Posted August 11, 2009 Author Posted August 11, 2009 Im a bit dumb this afternoon... I dont have an apt.conf, ive got a apt.conf.d folder though. Also, what are the karmic repository lines to add to sources.list This is what Ive got for jaunty, do I just add the same but change it to karmic? deb http://ftp.iinet.net.au/pub/ubuntu/ jaunty main restricted deb-src http://ftp.iinet.net.au/pub/ubuntu/ jaunty main multiverse universe #Added by software-properties
RabbieBurns Posted August 11, 2009 Author Posted August 11, 2009 apt-get update seems to have added the karmic root@rubuntu:~# apt-get update ... Hit http://ftp.iinet.net.au karmic Release.gpg Hit http://ftp.iinet.net.au karmic/main Translation-en_GB Hit http://ftp.iinet.net.au karmic/restricted Translation-en_GB ... Hit http://ftp.iinet.net.au karmic/main Packages Hit http://ftp.iinet.net.au karmic/restricted Packages Hit http://ftp.iinet.net.au karmic/main Sources Hit http://ftp.iinet.net.au karmic/multiverse Sources Hit http://ftp.iinet.net.au karmic/universe Sources root@rubuntu:~# apt-get install -d -t karmic grub2 Reading package lists... Done Building dependency tree Reading state information... Done grub2 is already the newest version. However root@rubuntu:~# apt-get --reinstall install grub2 Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 209 not upgraded. Need to get 8298B of archives. After this operation, 0B of additional disk space will be used. Do you want to continue [Y/n]? y Get: 1 http://ftp.iinet.net.au jaunty/universe grub2 1.96+20080724-12ubuntu2 [8298B] ...
RabbieBurns Posted August 12, 2009 Author Posted August 12, 2009 Managed to sort it. Found the deb of the latest build of grub2, and installed it manually. It all works now
powdarrmonkey Posted August 12, 2009 Posted August 12, 2009 Aha, I was just looking for this thread. Excellent
RabbieBurns Posted August 12, 2009 Author Posted August 12, 2009 Aha, I was just looking for this thread. Excellent Do you reckon I should take the karmic out my sources.list now? Update manager keeps prompting me to update a whole heap of stuff... Or should I keep it in so that I will receive updated to firefox which Ive installed from the karmic source?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now