Jump to content

Grub2 0n Arch ??


abarbarian

Recommended Posts

Hi I'm following this,

 

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 ?

 

# 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:

 

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 :">

 

This is what I missed.

 

Generate GRUB2 BIOS Config file

 

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. :"> :oops:

Link to comment
Share on other sites

securitybreach

Did you see the entry on the wiki page:

LVM

 

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

insmod lvm

and specify your root in the menuentry as:

set root=(lvm_group_name-lvm_logical_boot_partition_name)

 

Example:

# (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

Link to comment
Share on other sites

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.

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: from me first post :hysterical: as you can see I don't even have a menuentry or a file yet :">

 

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:

 

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:

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

 

 

 

 

Link to comment
Share on other sites

securitybreach

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.

Link to comment
Share on other sites

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: 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 :happyroll:

 

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.

 

B)

 

 

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

 

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

 

GPT fdisk

 

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. <_<

Edited by abarbarian
Link to comment
Share on other sites

securitybreach

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.

Link to comment
Share on other sites

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:

Edited by abarbarian
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...