Grub2 information & Links.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
sunewbie

Re: Grub2 information & Links.

Post by sunewbie »

may I add a community tutorial #245 Reinstall grub2 from LiveCD
hal8000
Level 4
Level 4
Posts: 436
Joined: Sun May 04, 2008 2:04 pm
Location: UK

Re: Grub2 information & Links.

Post by hal8000 »

This maybe of interest to anyone who has more than one linux distro installed.

I normally choose Grub legacy to control the boot as it is far easier to control with a single
configuration file /boot/grub/menu.lst (IMHO)

Whenever I switch to Grub2, the os-proper always makes a mess and I end up with some bootable
systems that use grub2 e.g. Ubuntu, but a total mess is made of any system using grub legacy
e.g. PCLinux , Arch etc.

After using grub_customiser in Ubuntu and changing various settings in grub2, the automatic probing was still
failing to properly load systems using grub legacy.

Any menu entry in Grub2 that tried to load a distro (that would normally use grub legacy) would
crash.
Examing the entries in Grub2 I found the problem ... and its the counting problem.

Grub leagcy starts counting at 0 for both drives and partitions.
Grub 2 starts counting at 0 for drives and 1 for partitions.

In the case of a probed grub2 entry that fails, press c for the console and you will probably find
that the script has identified the drive but NOT the partition. In my case for PClinux it tried
to load the initrd from an invalid partition. Entry looked like

menuentry "PCLinux" {
linux (hd1,1)/vmlinuz root=/dev/sdb1 quiet splash
initrd (hd1,0)/initrd.img
}

Partition 0 cannot exist in Grub2 as it counts starting at 1, changing (hd1,0) to (hd1,1) and
for the first time, I had a grub2 os_probed distribution that works.


My alternative solution was to disable probing in /etc/default/grub and add all custom entries.

The prober script is too much for me to fix, anyway and my choice is grub legacy.
I have custom menu fonts, colours, a large 1024x768 splash in grub legacy anyway, so dont miss
anything from grub2.
banjoman
Level 4
Level 4
Posts: 288
Joined: Thu Nov 11, 2010 4:46 am

Re: Grub2 information & Links.

Post by banjoman »

:?:
I have just installed Mint12 on my Acer TravelMate. It came with Windows 7so I want to create a dual boot machine. I installed Mint from live DVD, however the installation menu did not give me an option to install alongside Windows (as is my usual experience when installing a Ubuntu Linux distro).

I therefore deleted a ntfs partition and created a linux partition and installed to that.

One problem is apparent on reboot, the computer goes straight to Windows, so presumably I have not installed a grub menu. How can I boot up Linux? Does the link in previous post apply to my situation?

Secondly I was warned that I had not created a swap area, but I went ahead with the installation anyway! Do I need to create a swap area and if so, how?

Thanks for help and advice...
sunewbie

Re: Grub2 information & Links.

Post by sunewbie »

banjoman wrote::?:
I have just installed Mint12 on my Acer TravelMate. It came with Windows 7so I want to create a dual boot machine. I installed Mint from live DVD, however the installation menu did not give me an option to install alongside Windows (as is my usual experience when installing a Ubuntu Linux distro).

I therefore deleted a ntfs partition and created a linux partition and installed to that.

One problem is apparent on reboot, the computer goes straight to Windows, so presumably I have not installed a grub menu. How can I boot up Linux? Does the link in previous post apply to my situation?

Secondly I was warned that I had not created a swap area, but I went ahead with the installation anyway! Do I need to create a swap area and if so, how?

Thanks for help and advice...
Linux needs SWAP partition to function properly. But I have read some posts where people have not used SWAP and things are working fine. If you have RAM more than 8 GB, then it might work.

Links provided at the end of this thread are new ones and are useful, like I have posted and the one posted earlier than me on same page.

In case of Windows 7, if you want to play safe, you can install EasyBCD in windows 7. it's a boot loader, which identifies Linux. So even if you remove Linux, you can boot into windows. Alternatively, GRUB should identify Linux. You can make use of LIVE CD and try for links provided by my in earlier post to recover GRUB. Else Ubuntu GRUB 2 help page has given tutorial on how to reinstall GRUB using chroot / chmod method. It worked for me.

If you are planning to use easyBCD, please refer this link:

http://www.linuxbsdos.com/2011/06/11/du ... windows-7/

since I have never tried it (I have XP) so I wont be able to help. Maybe someone else can help you.

In case you install GRUB in MBR and want to remove Linux Mint, you can repair bootloader, by using the repair option of windows 7 recovery DVD
banjoman
Level 4
Level 4
Posts: 288
Joined: Thu Nov 11, 2010 4:46 am

Re: Grub2 information & Links.

Post by banjoman »

:D

thank you so much for your helpful advice, the article you linked to is excellent, very informative, it explains the technical aspects in a straightforward and helpful way, at the same time detailing the steps along the way - and illustrating them

this was just what I needed, I found it easy to set up my laptop to dual boot by following this tutorial - now to install my favourite software and I am perfectly set up...
sunewbie

Re: Grub2 information & Links.

Post by sunewbie »

Nice to know things are working for you :)

Enjoy Linux Mint ;)
breaker

Re: Grub2 information & Links.

Post by breaker »

A bit of good info here; http://www.supergrubdisk.org/wiki/SuperGRUB2Disk
Mainly the part about loopback.cfg; http://www.supergrubdisk.org/wiki/Loopback.cfg

The main one I like has been split, now we have some basics still here; https://help.ubuntu.com/community/Grub2
but all about installing/reinstalling here; https://help.ubuntu.com/community/Grub2/Installing

Also be sure to check the "related links" at the bottom of the above mentioned link;

https://help.ubuntu.com/community/Grub2/Submenus
https://help.ubuntu.com/community/Grub2/Upgrading
breaker

Re: Grub2 information & Links.

Post by breaker »

Don't forget the good version 1.99 manual from the terminal -

Code: Select all

info grub
javamaan

Re: Grub2 information & Links.

Post by javamaan »

FYI to people with grub2 problems.

I have 2 linux flavors installed. Fedora and Linuxmint. Whenever I install/upgrade Linuxmint, grub2 creator has parsing issues.
I think the parser looks for the latest version of vmlinuz and uses that image. So everytime i install/upgrade, it would use the Fedora vmlinuz and try to boot. As fedora tends to have latest kernels.

Can somebody change the parser to look for fedora vmlinuz? it usually ends as *.fxx.i686.img ("*.f17.i686.img or *.f16.i686.img)

You have to manually change the entry in grub.cfg in /boot/grub directory.

Hope this helps someone.
Fragment

Re: Grub2 information & Links.

Post by Fragment »

Keywords: fakeraid and grub, grub on fakeraid, grub on raid, grub on raid0, raid and grub, raid0 and grub, installing grub on raid

Okay since I was really pissed off by this problem, I will post my solution for installing GRUB2 on a RAID0 system.
I have an AMD Raid Controller on my Southbridge and had the problem that after the main install of Mint the Grub install would fail with error messages like
"Executing 'grub-inst /dev/sda' failed."
"Executing 'grub-inst (hd0)' failed."

The trick to install Grub then is by installing it via chrooting into the installed Mint OS (you can just stay in your Live CD session where you just installed it and open up a terminal).

Follow this Walkthrough:

https://help.ubuntu.com/community/Grub2 ... via_ChRoot

BUT KEEP IN MIND

1.) Use the mdadm tool ONLY if you have a software raid (a fakeraid = southbridgechip raid or a hardware raid are NO software raids)
2.) You can determine your partition by just opening up a gparted window and check the names of the devices
3.) Your RAID devices will 100% NOT have names like /dev/sda1, /dev/sdb1, /dev/sda2, (in general /dev/sdXY) or /dev/md0 (in general /dev/mdX), etc...
4.) Your RAID devices are always found @ /dev/mapper/ and may look like this: /dev/mapper/pdc_dfehifhebe1, /dev/mapper/pdc_dfehifhebe2, /dev/mapper/pdc_dfehifhebeX (in general /dev/mapper/pdc_XXXXXXXXX)
or /dev/mapper/nvidia_eahaabcc1, /dev/mapper/nvidia_eahaabcc2 (in general /dev/mapper/nvidia_XXXXXXXXX) depending on the manufacturer of your RAID controller chip type/integration manufacturer
Use those anytime the Tutorial wants you to mount disks...

--- VERY IMPORTANT
5.) Also as stated in the Tutorial, reinstall grub like this - EXAMPLE:

Code: Select all

grub-install --recheck /dev/mapper/pdc_dfehifhebe
NOT like this:

Code: Select all

grub-install --recheck /dev/mapper/pdc_dfehifhebe5
Only if you have a software RAID you should install grub on ALL disks in the RAID array
--- VERY IMPORTANT

Good Luck!

Also... should you have boot up problems right after successfully installing Mint + GRUB2 -> chroot into your installation again and do this

Code: Select all

apt-get install --reinstall dpkg upstart
But before you need to mount the critical virtual filesystems again, like in the Tutorial. (Step 8)
Simplified its always the same:

Code: Select all

sudo mount /dev/[...] /mnt
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
then do you stuff like (re-)install or delete packages

then reboot

Hope I could help at least some people who have this very special problem when installing directly on a RAID0 setup which is no software RAID
MartianStorm
Level 1
Level 1
Posts: 21
Joined: Sat Oct 26, 2013 4:21 pm

Re: Grub2 information & Links.

Post by MartianStorm »

I pulled off other HDDs during install to avoid having grub be set up for dualboot, no luck, updates updated grub and it found my Windows partitions. I want to manually boot into Windows from the BIOS if I need it (doesn't happen often) and I don't want grub to wait for selecting the OS. I don't mind having Windows in my boot menu, but I don't want grub to wait for user input. How can I do that? Where should I look for the solution? Sorry, I don't have much time to research it at the moment. Thanks for any help.
ogandou

Re: Grub2 information & Links.

Post by ogandou »

I recently got an error message "Error unknown filesystem grub rescue" when booting up my laptop. I googled it and found that Ubuntu Boot Repair could help. So I booted the live CD and ran boot-repair from there and sure enough it solved my issue, but now when I boot, instead of going straight to Mint like it used to, I have an interface asking me to pick between Ubuntu and Ubuntu advanced config. Which is odd because I don't have Ubuntu. Anyway, after a few seconds my computer boots into Mint, and it does too if I select Ubuntu. So no big deal, but I just wonder if there's a way to get rid of that choice. I just want to boot straight into Mint like I used to. Can someone help me do that please? Thanks!
hallergard

Re: Grub2 information & Links.

Post by hallergard »

This might be of interest if you are considering dualboot or multiboot: http://goo.gl/vzVJ7l
Michael1029

Re: Grub2 information & Links.

Post by Michael1029 »

Hey all,

First time poster here, and hope this isn't so basic, I'm not really a noob, But I'm close, I've looked for an answer to this question for months, Searched and searched and I'm guessing my Wording might not be on target as I have not as of yet found an answer, So Here goes....

I have Windows 7, WIndows XP, Linux Mint 17, And ANDROID X86, Installed on a Partitioned HDD, What I'm trying to Do is have them all boot from ONE GRUB, as it stands now, I have MINT's grub in control, If I go to Boot WIN 7, It bvrings Up WIN 7 grub with the Options of EARLIER VERSION OF WINDOWS (XP), WINDOWS 7, ANDROID, If I click ANDROID it brings up the GRUB I Created With GRUB2WIN to Boot my Android X86 OS, Ok So I FINALLY Got Android To Boot Out of the MINT GRUB, But I cannot figure out how to BOOT WIN7,XP Out of the MINT GRUB, That in a nutshell is my problem, ALL Os' Boot, But I'm Going threw Multiple Grubs to get there... I'd Like to Boot directly To WINDOWS from Mint Grub......

Any help would be greatly appreciated, And I'm Using GRUB-CUSTOMIZER On the Mint install to edit grub, so basically I just need the Proper Commands to ADD to The Mint Grub..

Thanks,

Mike
zolar1

Re: Grub2 information & Links.

Post by zolar1 »

someone here posted elsewhere that you can boot from an ISO with grub and having that ISO in the boot folder.

Can someone direct me to that discussion or post what I need to do here?
Dyfi

Re: Grub2 information & Links.

Post by Dyfi »

The link below should help you - good luck.

http://forums.solydxk.com/viewtopic.php?f=9&t=2841
darvems

Re: Grub2 information & Links.

Post by darvems »

lways nice to register for a forum and find the answer to the problem already there.
Thanks.
Anartist

Re: Grub2 information & Links.

Post by Anartist »

I understand it can boot iso's off of most partitions
I really want that, a menu with boot isos
right now I am using Yumi but it is using a complicated chainloader system built on 2 boot managers
I'd like to simplify it.

I am very interested in how the menu systems of these boot managers work,
I would like to customize them heavily.
tone303

Re: Grub2 information & Links.

Post by tone303 »

When i updated the mint I am building on an external hard drive to make a new dist iso, grub caught the fact that I had my windows internal drive pluged in & added it to the boot menu

SO i reached into my desktop, unpluged my internal SSD drive and typed 'sudo update-grub'

Now i dont have undesired OS's grub's boot menu

If you have undesired boot menu entries, what you do is remove old kernals, unplug any drives that have OS's on them, and do sudo update-grub

it will then look for all available bootable OS's and update the menu.

You see I am building a linux mint with all the colors changed, panel shortcuts and scripts added, software removed / added and had I not done this, my new iso would have my own windows system on the boot menu no matter who I handed it too

things can be as easy as removing old kernals, unpluging drives and running sudo update-grub before you bother with manual editing.

I find that the following command appears to remove old kernals, and I hope someone can double check it. I have run this command on mint 17.1 and it didnt break anything and i believe it removed old kernals:

Code: Select all

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
User avatar
karlchen
Level 23
Level 23
Posts: 18173
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Grub2 information & Links.

Post by karlchen »

<moderator on>
Split off CycleRob's specific support request into a new thread, Mint 17.2 dual boot, correct Grub entry for Vista, because it does not really match this common Grub2 thread.
</moderator off>
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 762 days now.
Lifeline
Locked

Return to “Installation & Boot”