Jump to content


Grub2 0n Arch ??


  • Please log in to reply
7 replies to this topic

#1 OFFLINE   abarbarian

abarbarian

    Discussion Deity

  • Forum MVP
  • 3,643 posts

Posted 14 February 2012 - 10:51 AM

Hi I'm following this,

QUOTE
Install to 440-byte MBR boot code region

To setup grub2-bios in the 440-byte Master Boot Record boot code region, populate the /boot/grub directory, generate the /boot/grub/core.img file, and embed it in the 32 KiB (minimum size - varies depending on partition alignment) post-MBR gap (MBR disks) or in BIOS Boot Partition (GPT disks), run:

# grub_bios-install --boot-directory=/boot --no-floppy --recheck --debug /dev/sda

where /dev/sda is the destination of the installation (in this case the MBR of the first SATA disk). If you use LVM for your /boot, you can install GRUB2 on multiple physical disks.

The --no-floppy tells grub2-bios utilities not to search for any floppy devices which reduces the overall execution time of grub_bios-install on many systems (it will also prevent the issue below from occurring). Otherwise you get an error that looks like this:

grub-probe: error: Cannot get the real path of '/dev/fd0'
Auto-detection of a filesystem module failed.
Please specify the module with the option '--modules' explicitly.

Warning: Make sure that you check the /boot directory if you use the latter. Sometimes the boot-directory parameter creates another /boot folder inside of boot. A wrong install would look like this /boot/boot/grub !


I have my sole hdd set up as,

sda1
sda2
sda3

I created a LVM on sda2 with a pv and vg and lv's. the lv's are,

/boot
swap
/
/home
/var
/tmp

My questions are,

If I want to use the "lv /boot" (an I do cos I can) what do I call replace "/devsda" with in the code below ?

CODE
# grub_bios-install --boot-directory=/boot --no-floppy --recheck --debug /dev/sda


Or would it be a better idea to not have a "lv /boot" at all and just put grub2-bios  in the MBR of /dev/sda ?

I may have a couple more simple q's you all may be able to help me with later on.  hysterical.gif

In the meantime on my epic quest as I have re-read the info needed it seems I have missed completely one important step so I'm of to try again with this new information so all the above may be totally irelevant  blushing.gif

This is what I missed.

  Generate GRUB2 BIOS Config file

QUOTE
Finally, generate a configuration for grub2 (this is explained in greater detail in the Configuration section):


Seems that it is quite important to do this.  blushing.gif   oops.gif
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#2 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 15,701 posts

Posted 14 February 2012 - 11:01 AM

Did you see the entry on the wiki page:
QUOTE
LVM

If you use LVM for your /boot, add the following before menuentry lines:
CODE
insmod lvm

and specify your root in the menuentry as:
CODE
set root=(lvm_group_name-lvm_logical_boot_partition_name)


Example:
CODE
# (0) Arch Linux
menuentry "Arch Linux" {
insmod lvm
set root=(VolumeGroup-lv_boot)
# you can only set following two lines
linux /vmlinuz-linux root=/dev/mapper/VolumeGroup-root ro
initrd /initramfs-linux.img
}

https://wiki.archlinux.org/index.php/GRUB2#LVM
Posted ImagePosted Image Posted Image
CNI Radio/Archlinux G+/Configs/PGP Key π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#3 OFFLINE   abarbarian

abarbarian

    Discussion Deity

  • Forum MVP
  • 3,643 posts

Posted 14 February 2012 - 01:03 PM

QUOTE (securitybreach @ Feb 14 2012, 12:01 PM) <{POST_SNAPBACK}>
Did you see the entry on the wiki page:

https://wiki.archlinux.org/index.php/GRUB2#LVM


Blimey mate thats in section 4 of the wiki. I'm still assimilating info from section 2.
QUOTE
2 Installation

    * 2.1 During Arch Linux installation
    * 2.2 From a running Arch Linux


I'll bear it in mind if I can rectify my  oops.gif from me first post  hysterical.gif as you can see I don't even have a menuentry or a file yet  blushing.gif

However the good news is that whilst in Elive I took a peek at me hdd and it seems that I have installed something on the hdd. As I have sda1,sda3 and ARCHV partitions.Looks like a nearly full install on ARCHV as folders are showing and seem populated with stuff(see screenshot).

ARCHV nearly alive and kicking

Sooooooooooooooooooooo ta fer the pointer. Perhaps you could help me with getting a "boot.conf"(or whatever )  into ARCHV whilst I'm in a live ELIVE. This would save me having to do the full install again  sweatingbullets.gif

This I think is the step I missed. I'm guessing that it is not as simple as opening up a terminal and copy and pasting. So I'll probably have to do some chrooting but that is only a guess and I do not have a clear grip on chrooting at all.  Oh and I did run "gtpfdisk" which flashed a lot of input past me eyes in the terminal whilst installing and then it told me everything had installed "ok" which might add an extra layer of complexity to everything.  hmm.gif
QUOTE
Generate GRUB2 BIOS Config file

Finally, generate a configuration for grub2 (this is explained in greater detail in the Configuration section):

# GRUB_PREFIX="/boot/grub" grub-mkconfig -o /boot/grub/grub.cfg

The GRUB_PREFIX env variable is supported in extra/grub2-common >=1:1.99-6 package.

If grub2 complains about "no suitable mode found" while booting, go to #Correct_GRUB2_No_Suitable_Mode_Found_Error.

If grub-mkconfig fails, convert your /boot/grub/menu.lst file to /boot/grub/grub.cfg using:

# grub-menulst2cfg /boot/grub/menu.lst /boot/grub/grub.cfg





Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#4 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 15,701 posts

Posted 14 February 2012 - 01:43 PM

Hmm, I think ARCHV is just the volume name and Elive chose that instead of the partition name. As far as grub2, I have no idea as I do not run Grub2. Honestly just for a boot manager, that seems like way too much work. Whenever I installed it before, I do not remember having to setup UEFI and such but maybe I am mistaken.
Posted ImagePosted Image Posted Image
CNI Radio/Archlinux G+/Configs/PGP Key π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#5 OFFLINE   abarbarian

abarbarian

    Discussion Deity

  • Forum MVP
  • 3,643 posts

Posted 14 February 2012 - 07:44 PM

QUOTE (securitybreach @ Feb 14 2012, 02:43 PM) <{POST_SNAPBACK}>
Hmm, I think ARCHV is just the volume name and Elive chose that instead of the partition name. As far as grub2, I have no idea as I do not run Grub2. Honestly just for a boot manager, that seems like way too much work. Whenever I installed it before, I do not remember having to setup UEFI and such but maybe I am mistaken.


Elive has I think correctly shown ARCHV instead of /dev/sda2 as it is a LVM partition. After digging around in it I am sure that I have an install with just a few missing bits.
Here is a screen shot of some files from the /boot directory,

Too many boot entrys I think

Found various entries in different locations for "lvm" and "gptfdisk" so it looks like I have those installed as I thought. After some more deep reading I think that I need to rectify my original oops.gif and also run and execute some "gptfdisk" utilities and commands and then do the same for "grub2".

Then I think I will have a Arch with LVM and GPT and Grub2 which I recon will not only be bleeding edge computing but also a bleeding miracle  happy71.gif

So as you can see I am not just trying to have a different boot loader which as you so rightly pointed out would be a lot of effort. I am however lazy and looking forward.
Grub Legacy development has stopped and Grub2 or something else will take its place. So as I know nothing I may as well learn about Grub2 rather than Grub and then also Grub2.
I like the idea of LVM. Shrinking or expanding partitions to suit my needs seems to fit in well with the penguin way. Also I am miffed that I could not implement it last year as I had originally intended. I do like to accomplish aims I have set myself.
GPT also appeals to me as it does away with the ridiculous four partition nonsense. Running a gpt hdd  it should be easy peasy to try out new os's without the limitations of VM's .Many newer mobo's are Unified Extensible Firmware Interface (UEFI) compliant and this seems as though it will replace Bios fairly rapidly for newer mobo's so I may as well learn a bit about the tools need for utilizing this new innovation.
Also I like a challenge.
Which is why one reason I chose Arch.

cool.gif


Now if only I could figure out how to twiddle with ARCHV from this live cd   whistling.gif

Some excellent reading and usage information here from Rod Smith the creator of GPT fdisk,

GPT fdisk

QUOTE
The heir apparent to MBR is GPT. This new partitioning scheme fixes many of MBR's problems:

    * In its most common configuration, GPT supports up to 128 partitions, so there's no need for extended or logical partitions.


His WEB page has some articles that look well worth a look over.   dry.gif

Edited by abarbarian, 14 February 2012 - 07:57 PM.

Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#6 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 15,701 posts

Posted 15 February 2012 - 10:19 AM

I didnt mean to discourage you from tinkering with your machine. It just seemed like an overkill for a simple function(bootmanger) but as you stated above, this is a lot more than just the boot manager menu. This sounds interesting and I may have to read up on it.
Posted ImagePosted Image Posted Image
CNI Radio/Archlinux G+/Configs/PGP Key π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#7 OFFLINE   abarbarian

abarbarian

    Discussion Deity

  • Forum MVP
  • 3,643 posts

Posted 16 February 2012 - 08:02 PM

This has been solved,

See Post 17    tongue.gif
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#8 OFFLINE   abarbarian

abarbarian

    Discussion Deity

  • Forum MVP
  • 3,643 posts

Posted 16 February 2012 - 11:48 PM

Well it took 27 minutes and 38 seconds for me to install Arch on ordinary partitions with Grub and that was including rebooting to make sure it had all worked. All I have to do now is a bit of installing and tweaking and its Arrr arr Arch Ooooooooooooooooooooooh time.

Shame I could not solve the LVM GPT riddle. Oh well maybe next time.   rolleyes.gif

Edited by abarbarian, 16 February 2012 - 11:49 PM.

Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users