How to use Grub2 to boot Linux manually - Page 2


Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25

Thread: How to use Grub2 to boot Linux manually

  1. #16
    Join Date
    Sep 2003
    Location
    Knoxville, TN
    Posts
    123
    Has anyone successfully setup grub2 to dual-boot linux (Ubuntu 9.10 in my case) and Windows 7? I've tried but so far no luck, it seems Windows 7's bootloader demands control of the mbr and all I can get when I choose to boot Ubuntu from the boot menu is a grub rescue screen.

  2. #17
    Join Date
    Nov 2002
    Location
    Houston, Texas
    Posts
    299
    Quote Originally Posted by teeitup View Post
    If your system only has one OS installed and it's Debian Squeeze it should be fairly straight forward. My main desktop has a single install of Squeeze and it upgraded without issues.

    What should happen is that when Squeeze(testing) initiated the upgrade to Grub2 the maintainers used a two step process. They left Grub1 in the MBR and chain loaded to Grub2. This allowed the user to ensure that their OS would boot using Grub2. They left the final step up to the user. You don't have to do anything else and can leave it this way forever. If you want to go all in with Grub2 then, as root, run the "upgrade-from-grub-legacy" script.

    I've successfully upgraded 3 machines. Two desktops and one laptop.

    If you have multiple OS's loaded, as does my laptop and one desktop, then I recommend that you install the "os-prober" package before finalizing your upgrade. This package isn't listed as a dependency or recommended package. Why? I don't know, but it's important if you have multiple OS's installed.

    If you have already upgraded, you can install os-prober after the fact and then run "update-grub2" as root. Your boot menu will be rebuilt with any OS's os-prober finds.

    Good Luck,
    Well hells bells! That's exactly what I did the first time I saw the prompt to 'run the "upgrade-from-grub-legacy" script. And of course I couldn't log in afterwards. I got the errror 15 message. So I left well enough alone after I reinstall Squeeze. And this happened on both my desktop and laptop.

    I getting gun shy so I guess I'll leave it alone. Unless... Damn it! I guess I can't leave it along. I'll give it another shot and see what happens.

    One more thing, it running 'upgrade-from-grub-legacy' as root all that is needed? Because that's all I did.
    Thanks,
    Loopback48

    Debian fanboy. And only Debian.

    http://www.debiantutorials.org/

  3. #18
    Join Date
    Sep 2000
    Location
    N California
    Posts
    951
    Do you have more than one disk drive in this system? If so maybe the wrong disk is being used.

    You might want to read through some posts from the debian forums for some insight.

    http://forums.debian.net/viewtopic.php?p=258424#p258424

    Good Luck,

  4. #19
    Join Date
    Sep 2008
    Posts
    33
    Hi again,
    Some small progress, and some setbacks. I have a Pardus which was completely unbootable, as I installed it to an ext4 partition before discovering that it only has Grub 0.97, which cannot handle ext4. I tried copying all the Grub2 files from Ubuntu 9.10: no luck. In fact, Grub2 in Ubuntu could not not see Pardus, no entry in the grub.cfg file after numerous update-grub's. It would not boot by chainloading, of course. I mounted it and chrooted into it to run update-grub from Ubuntu; still no good, I got "No such file or directory", even though the files were there and were executable, and I was root. (Trying grub-install when chrooted, whether using a Live CD or the installed U. 9.10, gave the error message that said grub could only be installed using blocklists)

    So I tried booting it directly using a Grub prompt by hitting 'c' at the Ubuntu boot prompt. The following was concocted from the menu entries in Ubuntu and the output of sudo blkid.

    Code:
    insmod ext2
    set root=(hd0,22)
    search --no-floppy --fs-uuid --set 09f23ec7-4e5b-434d-9435-2ba1970fe3eb
    linux /boot/kernel<tab-to-complete> root=/dev/sda22 ro
    initrd /boot/in<tab-to-complete>
    boot
    It booted.
    Note:The line starting search is necessary. Without it there is an error that complains about terminals not being accessible. I could not get it to accept anything other than the uuid. Trying --fs-label LABEL gave an error, so did using /dev/sda22. I had to leave out the option in pretty pink above as for some reason my terminal would not handle the long line, and my experiments with control characters for newline didn't work.
    The insmod line is also necessary.

    Once in Pardus I downloaded Grub 1.97.1 which was the latest availablefrom Gnu (Pisi only has Grub0.97). It compiled OK after a bit of hunting up necessary files, but on running make install it installed itself into /usr/local rather than into /etc, /usr/bin, /usr/sbin. I copied all the bits to the correct locations, after checking with Ubuntu, and tried running update-grub - "no such file . . ." Tried grub-mkconfig -o /boot/grub/grub.cfg also grub-mkimage and grub-probe fs. None of them work, they all seem to go into a trance. Nothing freezes, but nothing happens. So that's the extent of my success to date.

    The important thing is that it is possible to directly boot with Grub2, but you need to use all the commands in the menu entries in grub.cfg.

  5. #20
    Join Date
    Jul 2010
    Location
    Bristol PA
    Posts
    1
    I made a mistake with the "partition to install Grub2" during a dist-upgrade recently. Needless to say lucid won't boot. I tried the manual CLI boot. Any ideas why Grub2 tells me that 'linux is not a command'? 'Cause it's tough to identify a kernel without using the word...

  6. #21
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    keith W,

    In a Grub2 the command "help" will list the commands you can use. You will find "linux" listed there.

    Also the command "ls" and "cat" are pretty useful too.

    "ls" list the files and directories like
    Code:
    ls (hd0,1)/
    and cat can be used to display any text file. Say if your lucid is in partition (hd0,1) then you can see the grub.cfg from command
    Code:
    cat (hd0,1)/boot/grub/grub.cfg
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  7. #22
    Join Date
    Oct 2011
    Posts
    1
    Thx for this.
    Looking for a way to install g2 on any os that doesn't come with it.

    I've got several os installed (not vm or vbox. Useless sh-t) Yeah all on 2 or 3 hd. I even took one hd and got that on another motherboard. Needless to say none of those drivers were install of that #2 mobo... hey, linux is so awesome, everything worked. And those os were installed on a mobo which sound driver were too old for even linux to find one.
    Anyway, got the #2 box working from the #1 box installed os(s), and the sound worked out from boot. I messed up the sound-driver(s) a bit cz the volume wouldn't go down to zero unless muted. The farthest it even got was 5. Wanting to resolve I've tried a couple of gui mixers, which messed it all out. No sound anymore, no matter what I do.
    That's where this thread comes handy to me.
    I've been booting from grub2 on liveCD for weeks now. This was a lucky guess. But this was from the installed os. At boot, press TAB option, and put in where the installed kernel is. Thats all but in the ram memory section I've put ram=swap.... lololol... I never saw or heard of anything booting that fast, and I was on a 512ram 1.70Pentium. I'm still wonder why any already installed os can't boot this fast. It worth a try, if an image is a 1000words, strap yourself if you do this.
    And yes, I had to install grub from there, and it solved my boot problem.

    btw; I'm a complete noobe, and proud to say it. I find bits of solutions from any forums anyone can guess of. But I'm human, I get easily pissed-off on 17pages thread that ends up on nothing at all.

    Grub had to evolve. Grub2 is something to look in. Burg is something to forget. Grub2 is to grub just like grub is to lilo or other. They were all great. But just like MS booter, it has to go, not out the window, but beyond it

    Now problems come from the os operates, not from grub, grub2 or any before/after. All one needs to boot is the hd # and the partition's #, even if it has 30 partition on 4 hd. It DOES NOT HAS to be a endless serial # as if it was on a global PC. It's a PC for g-d sake, as in "personal computer" need to remind some minds if I may.
    If I want a cloud, I look in the air, and thats enough.

    Grub2 does a great job from liveCD on any os I've installed lately. It scans any os on hd(s), it install from that, and boot it all selectively as one wish. Try to find that now. The only thing I have against grub2, is that whenever I install a no-grub2 os, that os (on grub legacy) messes all other booting sequences out all up in the air (no clouds) lololol

    Why so many os some might ask?
    Getting rid of MS Windows and/or any other bloated os should enough for anyone to wonder about any real good answer)

    All I need is a machine. Not something that watches my whereabouts.

    Peace

  8. #23
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Ghis1964,

    Welcome to Justlinux!


    Despite Grub2's gross finish the Legacy Grub does have one advantage of being able to restore itself without the assistance of a Linux using command "setup". Grub2 can only be restored via a Linux and has no equivalent to "setup".

    In case of legacy Grub I could move 40 or 60 installed Linux from one hard disk to another hard disk and a Grub floppy is all I need to restore Grub in every one by changing the disk number and partition number using the same "setup" command.
    Last edited by saikee; 10-31-2011 at 03:32 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  9. #24
    Join Date
    Nov 2011
    Posts
    1

    making grub2 boot floppy

    Hello saikee: Today is 11/26/2011 and I installed Ubuntu 11.1 on my hard drive.Grub2 is in the root partition and I wanted to make a boot floppy. I used your formula :
    grub-mkrescue --image-type=floppy /tmp/grub-rescue.flp and it comes back with the error message "output file must be given". Even I tried to put --output= in the front of /tmp/... but nothing help. I tried to start with --overlay=/boot/grub but it did not help either. After that I tried to make a boot CD and error is always the same. I am new to grub2. What do I make wrong. billtsyj

  10. #25
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    billtsuj,

    Welcome to Justlinux!


    The Grub2 has been in continuous development and I did notice a few changes took place.

    What I suggest is in case of doubt do what Linux is good for and type man in front of the command to see what the documentation has to say. In this case it is
    Code:
    man grub-mkrescue
    You then get the word directly from the horse's mouth.

    The GNU/Grub2 manual is also a good source of information. It wasn't fully ready when I wrote this thread.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

Posting Permissions

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